3
# Defines the basics for all kickstarts in the fedora-mini branch
8
auth --useshadow --enablemd5
10
firewall --enabled --service=mdns
11
xconfig --startxonboot
12
part / --size 4096 --fstype ext4
13
services --enabled=NetworkManager,messagebus --disabled=network,sshd
15
# To compose against the current release tree, use the following "repo" (enabled by default)
16
repo --name=released --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-12&arch=i386
17
# To include updates, use the following "repo" (enabled by default)
18
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f12&arch=i386
19
repo --name=updates-testing --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f12&arch=i386
21
# To compose against rawhide, use the following "repo" (disabled by default)
22
#repo --name=rawhide --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=i386
24
# To compose against local trees, (edit and) use:
25
#repo --name=f11 --baseurl=http://localrepo/fedora/releases/11/Everything/$basearch/os/
26
#repo --name=f11-updates --baseurl=http://localrepo/fedora/updates/11/$basearch/
27
#repo --name=fedora-mini --baseurl=http://localhost/
39
# Remove default base packages we don't want
42
-device-mapper-multipath
71
-system-config-firewall-tui
72
-system-config-network-tui
80
# Remove default base-x packages we don't want
85
-system-config-firewall
86
-system-config-network
87
-system-config-printer
88
-system-config-services
91
# Remove default core packages we don't want
98
# Remove default unwanted hardware firmware and support we don't want
114
# These are listed somewhere other than hardware support!
118
# Remove unwanted default fonts we don't want
130
-thai-scalable-waree-fonts
134
# Remove default input-methods we don't want
138
# dictionaries are big
144
# livecd bits to set up the livecd and be able to install
147
# Add some useful utils
148
system-config-firewall-base
153
# Add this so we don't pull in sendmail/exim
159
# FIXME: it'd be better to get this installed from a package
160
cat > /etc/rc.d/init.d/livesys << EOF
163
# live: Init script for live image
165
# chkconfig: 345 00 99
166
# description: Init script for live image.
168
. /etc/init.d/functions
170
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
174
if [ -e /.liveimg-configured ] ; then
179
which \$1 >/dev/null 2>&1 || return
183
touch /.liveimg-configured
186
if [ -b \`readlink -f /dev/live\` ]; then
188
mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
192
for arg in \`cat /proc/cmdline\` ; do
193
if [ "\${arg##live_dir=}" != "\${arg}" ]; then
194
livedir=\${arg##live_dir=}
199
# enable swaps unless requested otherwise
200
swaps=\`blkid -t TYPE=swap -o device\`
201
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
202
for s in \$swaps ; do
203
action "Enabling swap partition \$s" swapon \$s
206
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f /mnt/live/\${livedir}/swap.img ] ; then
207
action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img
210
mountPersistentHome() {
212
if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" != "\${homedev}" ]; then
213
homedev=\`/sbin/blkid -o device -t "\$homedev"\`
216
# if we're given a file rather than a blockdev, loopback it
217
if [ "\${homedev##mtd}" != "\${homedev}" ]; then
218
# mtd devs don't have a block device but get magic-mounted with -t jffs2
220
elif [ ! -b "\$homedev" ]; then
221
loopdev=\`losetup -f\`
222
if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then
223
action "Remounting live store r/w" mount -o remount,rw /mnt/live
225
losetup \$loopdev \$homedev
229
# if it's encrypted, we need to unlock it
230
if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
232
echo "Setting up encrypted /home device"
233
plymouth ask-for-password --command="cryptsetup luksOpen \$homedev EncHome"
234
homedev=/dev/mapper/EncHome
237
# and finally do the mount
238
mount \$mountopts \$homedev /home
239
# if we have /home under what's passed for persistent home, then
240
# we should make that the real /home. useful for mtd device on olpc
241
if [ -d /home/home ]; then mount --bind /home/home /home ; fi
242
[ -x /sbin/restorecon ] && /sbin/restorecon /home
243
if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
246
findPersistentHome() {
247
for arg in \`cat /proc/cmdline\` ; do
248
if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
249
homedev=\${arg##persistenthome=}
255
if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
257
elif [ -e /mnt/live/\${livedir}/home.img ]; then
258
homedev=/mnt/live/\${livedir}/home.img
261
# if we have a persistent /home, then we want to go ahead and mount it
262
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" ] ; then
263
action "Mounting persistent /home" mountPersistentHome
266
# make it so that we don't do writing to the overlay for things which
267
# are just tmpdirs/caches
268
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
269
mount -t tmpfs tmp /tmp
270
mount -t tmpfs vartmp /var/tmp
271
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
273
if [ -n "\$configdone" ]; then
277
# add fedora user with no passwd
278
action "Adding live user" useradd \$USERADDARGS -c "Live System User" liveuser
279
passwd -d liveuser > /dev/null
281
# turn off firstboot for livecd boots
282
chkconfig --level 345 firstboot off 2>/dev/null
284
# don't start yum-updatesd for livecd boots
285
chkconfig --level 345 yum-updatesd off 2>/dev/null
287
# turn off mdmonitor by default
288
chkconfig --level 345 mdmonitor off 2>/dev/null
290
# turn off setroubleshoot on the live image to preserve resources
291
chkconfig --level 345 setroubleshoot off 2>/dev/null
293
# don't do packagekit checking by default
294
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_updates never >/dev/null
295
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_get_upgrades never >/dev/null
296
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string /apps/gnome-packagekit/frequency_refresh_cache never >/dev/null
297
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_available false >/dev/null
298
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/notify_distro_upgrades false >/dev/null
299
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_firmware false >/dev/null
300
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_check_hardware false >/dev/null
301
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_codec_helper false >/dev/null
302
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_font_helper false >/dev/null
303
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool /apps/gnome-packagekit/enable_mime_type_helper false >/dev/null
306
# don't start cron/at as they tend to spawn things which are
307
# disk intensive that are painful on a live image
308
chkconfig --level 345 crond off 2>/dev/null
309
chkconfig --level 345 atd off 2>/dev/null
310
chkconfig --level 345 readahead_early off 2>/dev/null
311
chkconfig --level 345 readahead_later off 2>/dev/null
313
# Stopgap fix for RH #217966; should be fixed in HAL instead
314
touch /media/.hal-mtab
316
# workaround clock syncing on shutdown that we don't want (#297421)
317
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
319
# and hack so that we eject the cd on shutdown if we're using a CD...
320
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
321
cat >> /sbin/halt.local << FOE
323
# we want to eject the cd on halt, but let's also try to avoid
324
# io errors due to not being able to get files...
325
cat /sbin/halt > /dev/null
326
cat /sbin/reboot > /dev/null
327
/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1
328
echo "Please remove the CD from your drive and press Enter to finish restarting"
329
read -t 30 < /dev/console
331
chmod +x /sbin/halt.local
336
# bah, hal starts way too late
337
cat > /etc/rc.d/init.d/livesys-late << EOF
340
# live: Late init script for live image
342
# chkconfig: 345 99 01
343
# description: Late init script for live image.
345
. /etc/init.d/functions
347
if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
352
which \$1 >/dev/null 2>&1 || return
356
touch /.liveimg-late-configured
358
# read some variables out of /proc/cmdline
359
for o in \`cat /proc/cmdline\` ; do
365
xdriver="--set-driver=\${o#xdriver=}"
370
# if liveinst or textinst is given, start anaconda
371
if strstr "\`cat /proc/cmdline\`" liveinst ; then
373
/usr/sbin/liveinst \$ks
375
if strstr "\`cat /proc/cmdline\`" textinst ; then
377
/usr/sbin/liveinst --text \$ks
380
# configure X, allowing user to override xdriver
381
if [ -n "\$xdriver" ]; then
382
exists system-config-display --noui --reconfig --set-depth=24 \$xdriver
387
chmod 755 /etc/rc.d/init.d/livesys
388
/sbin/restorecon /etc/rc.d/init.d/livesys
389
/sbin/chkconfig --add livesys
391
chmod 755 /etc/rc.d/init.d/livesys-late
392
/sbin/restorecon /etc/rc.d/init.d/livesys-late
393
/sbin/chkconfig --add livesys-late
395
# work around for poor key import UI in PackageKit
396
rm -f /var/lib/rpm/__db*
397
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
399
# go ahead and pre-make the man -k cache (#455968)
400
/usr/sbin/makewhatis -w
402
# save a little bit of space at least...
404
# make sure there aren't core files lying around
411
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
412
cp $INSTALL_ROOT/usr/share/doc/HTML/readme-live-image/en_US/readme-live-image-en_US.txt $LIVE_ROOT/README
414
# only works on x86, x86_64
415
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
416
if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
417
cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS