-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasaltOS-10.ks
More file actions
186 lines (146 loc) · 4.97 KB
/
BasaltOS-10.ks
File metadata and controls
186 lines (146 loc) · 4.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Keyboard layouts
keyboard 'us'
# System timezone
timezone US/Eastern
# System language
lang en_US.UTF-8
# Repos
url --url=https://repo.almalinux.org/almalinux/10.1/BaseOS/$basearch/kickstart/
repo --name="appstream" --baseurl=https://repo.almalinux.org/almalinux/10.1/AppStream/$basearch/os/
repo --name="extras" --baseurl=https://repo.almalinux.org/almalinux/10.1/extras/$basearch/os/
repo --name="crb" --baseurl=https://repo.almalinux.org/almalinux/10.1/CRB/$basearch/os/
repo --name="epel" --baseurl=https://dl.fedoraproject.org/pub/epel/10.1/Everything/$basearch/
repo --name="baseos" --baseurl=https://repo.almalinux.org/almalinux/10.1/BaseOS/$basearch/os/ --exclude=kernel*
repo --name="basaltos" --baseurl=https://download.copr.fedorainfracloud.org/results/forecastwolf157/BasaltOS-Repo/rhel+epel-10-$basearch/
# Network information
network --activate --bootproto=dhcp --device=link --onboot=on
# SELinux configuration
selinux --disabled
# System services
services --disabled="sshd" --enabled="NetworkManager,ModemManager"
# livemedia-creator modifications.
shutdown
# System bootloader configuration
bootloader --location=none
# Clear blank disks or all existing partitions
clearpart --all --initlabel
rootpw rootme
# Disk partitioning information
part / --size=10238
%post
# Enable livesys services
systemctl enable livesys.service
systemctl enable livesys-late.service
# enable tmpfs for /tmp
systemctl enable tmp.mount
# make it so that we don't do writing to the overlay for things which
# are just tmpdirs/caches
# note https://bugzilla.redhat.com/show_bug.cgi?id=1135475
cat >> /etc/fstab << EOF
vartmp /var/tmp tmpfs defaults 0 0
EOF
# work around for poor key import UI in PackageKit
rm -f /var/lib/rpm/__db*
# import AlmaLinux PGP key
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
echo "Packages within this LiveCD"
rpm -qa
# Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db*
# go ahead and pre-make the man -k cache (#455968)
/usr/bin/mandb
# make sure there aren't core files lying around
rm -f /core*
# convince readahead not to collect
# FIXME: for systemd
echo 'File created by kickstart. See systemd-update-done.service(8).' \
| tee /etc/.updated >/var/.updated
# Remove random-seed
rm /var/lib/systemd/random-seed
# Remove the rescue kernel and image to save space
# Installation will recreate these on the target
rm -f /boot/*-rescue*
# Disable network service here, as doing it in the services line
# fails due to RHBZ #1369794
systemctl disable network
# Remove machine-id on pre generated images
rm -f /etc/machine-id
touch /etc/machine-id
# set livesys session type
sed -i 's/^livesys_session=.*/livesys_session="gnome"/' /etc/sysconfig/livesys
# Set default target to graphical.target
systemctl set-default graphical.target
# Create a first-boot script to add Flathub repository
cat > /etc/systemd/system/setup-flathub.service << 'FLATHUB_EOF'
[Unit]
Description=Setup Flathub Repository on First Boot
After=network-online.target
Wants=network-online.target
ConditionPathExists=!/var/lib/flatpak/.flathub-setup-done
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo && touch /var/lib/flatpak/.flathub-setup-done'
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
FLATHUB_EOF
# Enable the first-boot Flathub setup service
systemctl enable setup-flathub.service
# Workaround to add openvpn user and group in case they didn't added during
# openvpn package installation
getent group openvpn &>/dev/null || groupadd -r openvpn
getent passwd openvpn &>/dev/null || \
/usr/sbin/useradd -r -g openvpn -s /sbin/nologin -c OpenVPN \
-d /etc/openvpn openvpn
# Kill this fuckass selinux
if [ -f /etc/selinux/config ]; then
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
fi
%end
# Packages
%packages
# Explicitly specified mandatory packages
kernel
kernel-modules
kernel-modules-extra
-kernel-uki-virt
# Release and branding packages!!!!!!!!!!!!!
basalt-release
basalt-logos
# im still fucking testing this so this isnt permanent
anaconda
anaconda-install-env-deps
anaconda-live
@anaconda-tools
# Anaconda has a weak dep on this and we don't want it on livecds, see
# https://fedoraproject.org/wiki/Changes/RemoveDeviceMapperMultipathFromWorkstationLiveCD
-fcoe-utils
-sdubby
# Without this, initramfs generation during live image creation fails: #1242586
dracut-live
# anaconda needs the locales available to run for different locales
glibc-all-langpacks
# provide the livesys scripts
livesys-scripts
# Mandatory to build media with livemedia-creator
memtest86+
# Workstation environment group
@^workstation-product-environment
# Workstation specific
-@workstation-product
# GNOME specific
@gnome-desktop
# EPEL repo
epel-release
# OpenVPN
openvpn
NetworkManager-openvpn
NetworkManager-openvpn-gnome
# Exclude unwanted packages from @anaconda-tools group
-gfs2-utils
-reiserfs-utils
# minimization
-hplip
-almalinux*
-firefox
%end