Subversion Repositories livecd

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
269 beyerleu 1
########################################################################
2
#
3
#  Mini LiveCD with icewm dekstop
4
#
5
########################################################################
6
 
7
lang en_US.UTF-8
8
keyboard us
9
timezone US/Eastern
10
auth --useshadow --enablemd5
11
selinux --enforcing
12
firewall --enabled --service=mdns
13
repo --name=base     --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/os/
14
repo --name=updates  --baseurl=http://ftp.scientificlinux.org/linux/scientific/6rolling/$basearch/updates/
15
xconfig --startxonboot
16
part / --size 4096 --fstype ext4
17
services --enabled=NetworkManager --disabled=network,sshd
18
 
19
%packages
20
syslinux
21
kernel
22
@base
23
 #package added to @base
24
  squashfs-tools
25
 #packages removed from @base
26
 -bind-utils
27
 -ed
28
 -kexec-tools
29
 -libaio
30
 -libhugetlbfs
31
 -microcode_ctl
32
 -psacct
33
 -quota
34
@core
35
@fonts
36
@graphical-admin-tools
37
@network-file-system-client
38
@network-tools
39
 #package added to @network-tools
40
 nmap
41
@remote-desktop-clients
42
 #packages added to @remote-desktop-clients
43
 rdesktop
44
 tsclient
45
@x11
46
 
47
# login manager
48
gdm
49
 
50
# icewm desktop
51
@ice-desktop
52
 
53
# other usefull packages
54
busybox
55
mailx
56
memtest86+
57
livecd-tools
58
 
59
# livecd bits to set up the livecd and be able to install
60
anaconda
61
device-mapper-multipath
62
isomd5sum
63
 
64
## mini SL LiveCD specific changes
65
 
66
# packages to remove
67
-scenery-backgrounds
68
-qt3
69
-xinetd
70
 
71
# packages to add
72
ibus-gtk
73
thunderbird
74
firefox
75
#@openafs-client
76
 
77
%end
78
 
79
########################################################################
80
#
81
#  LiveCD post install 
82
#
83
########################################################################
84
 
85
%post
86
 
87
########################################################################
88
# LiveCD configuration file and LiveCD functions
89
########################################################################
90
 
91
cat > /etc/livesys.conf << 'EOF_livesysconf'
92
###--------------------------------------------------------------------
93
### Configuration file for LiveCD
94
###--------------------------------------------------------------------
95
 
96
## default LiveCD user
97
LIVECD_DEF_USER="sluser"
98
 
99
# delay in sec. before auto login
100
LOGIN_DELAY=15
101
 
102
EOF_livesysconf
103
 
104
 
105
cat > . /etc/init.d/livesys.functions << 'EOF_livesysfunctions'
106
###--------------------------------------------------------------------
107
### livesys functions
108
###--------------------------------------------------------------------
109
 
110
# egrep_o is a replacement for "egrep -o". It prints only the last matching text
111
egrep_o() {
112
   cat | egrep "$1" | sed -r "s/.*($1).*/\\1/"
113
}
114
 
115
# boot parameter
116
cmdline_parameter() {
117
   CMDLINE=/proc/cmdline
118
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1(\$|=|[[:space:]]+)" | egrep_o "$1"
119
}
120
 
121
# boot parameter value
122
cmdline_value()
123
{
124
   CMDLINE=/proc/cmdline
125
   cat "$CMDLINE" | egrep_o "(^|[[:space:]]+)$1=([^[:space:]]+)" | egrep_o "=.*" | cut -b 2- | tail -n 1
126
}
127
 
128
exists() {
129
    which $1 >/dev/null 2>&1 || return
130
    $*
131
}
132
 
133
EOF_livesysfunctions
134
 
135
 
136
 
137
########################################################################
138
# Create a sub-script so the output can be captured
139
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
140
########################################################################
141
 
142
cat > /root/post-install << EOF_post
143
#!/bin/bash
144
 
145
 
146
echo ###################################################################
147
echo ## Creating the livesys init script - livesys
148
echo ###################################################################
149
 
150
cat > /etc/rc.d/init.d/livesys << EOF_initscript
151
#!/bin/bash
152
#
153
# live: Init script for live image
154
#
155
# chkconfig: 345 00 99
156
# description: Init script for live image.
157
 
158
. /etc/init.d/functions
159
. /etc/livesys.conf
160
. /etc/init.d/livesys.functions
161
 
162
if ! strstr "\\\`cat /proc/cmdline\\\`" liveimg || [ "\\\$1" != "start" ]; then
163
    exit 0
164
fi
165
 
166
if [ -e /.liveimg-configured ] ; then
167
    configdone=1
168
fi
169
 
170
touch /.liveimg-configured
171
 
172
# read boot parameters out of /proc/cmdline
173
hostname=\\\$( cmdline_value hostanme )
174
 
175
# set livecd user
176
LIVECD_USER=\\\$( cmdline_value user )
177
[ ! "\\\$LIVECD_USER" ] && LIVECD_USER=\\\$LIVECD_DEF_USER
178
 
179
# mount live image
180
if [ -b \\\`readlink -f /dev/live\\\` ]; then
181
   mkdir -p /mnt/live
182
   mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
183
fi
184
 
185
livedir="LiveOS"
186
for arg in \\\`cat /proc/cmdline\\\` ; do
187
  if [ "\\\${arg##live_dir=}" != "\\\${arg}" ]; then
188
    livedir=\\\${arg##live_dir=}
189
    return
190
  fi
191
done
192
 
193
# enable swaps unless requested otherwise
194
swaps=\\\`blkid -t TYPE=swap -o device\\\`
195
if ! strstr "\\\`cat /proc/cmdline\\\`" noswap && [ -n "\\\$swaps" ] ; then
196
  for s in \\\$swaps ; do
197
    action "Enabling swap partition \\\$s" swapon \\\$s
198
  done
199
fi
200
if ! strstr "\\\`cat /proc/cmdline\\\`" noswap && [ -f /mnt/live/\\\${livedir}/swap.img ] ; then
201
  action "Enabling swap file" swapon /mnt/live/\\\${livedir}/swap.img
202
fi
203
 
204
mountPersistentHome() {
205
  # support label/uuid
206
  if [ "\\\${homedev##LABEL=}" != "\\\${homedev}" -o "\\\${homedev##UUID=}" != "\\\${homedev}" ]; then
207
    homedev=\\\`/sbin/blkid -o device -t "\\\$homedev"\\\`
208
  fi
209
 
210
  # if we're given a file rather than a blockdev, loopback it
211
  if [ "\\\${homedev##mtd}" != "\\\${homedev}" ]; then
212
    # mtd devs don't have a block device but get magic-mounted with -t jffs2
213
    mountopts="-t jffs2"
214
  elif [ ! -b "\\\$homedev" ]; then
215
    loopdev=\\\`losetup -f\\\`
216
    if [ "\\\${homedev##/mnt/live}" != "\\\${homedev}" ]; then
217
      action "Remounting live store r/w" mount -o remount,rw /mnt/live
218
    fi
219
    losetup \\\$loopdev \\\$homedev
220
    homedev=\\\$loopdev
221
  fi
222
 
223
  # if it's encrypted, we need to unlock it
224
  if [ "\\\$(/sbin/blkid -s TYPE -o value \\\$homedev 2>/dev/null)" = "crypto_LUKS" ]; then
225
    echo
226
    echo "Setting up encrypted /home device"
227
    plymouth ask-for-password --command="cryptsetup luksOpen \\\$homedev EncHome"
228
    homedev=/dev/mapper/EncHome
229
  fi
230
 
231
  # and finally do the mount
232
  mount \\\$mountopts \\\$homedev /home
233
  # if we have /home under what's passed for persistent home, then
234
  # we should make that the real /home.  useful for mtd device on olpc
235
  if [ -d /home/home ]; then mount --bind /home/home /home ; fi
236
  [ -x /sbin/restorecon ] && /sbin/restorecon /home
237
  if [ -d /home/\\\$LIVECD_USER ]; then USERADDARGS="-M" ; fi
238
}
239
 
240
findPersistentHome() {
241
  for arg in \\\`cat /proc/cmdline\\\` ; do
242
    if [ "\\\${arg##persistenthome=}" != "\\\${arg}" ]; then
243
      homedev=\\\${arg##persistenthome=}
244
      return
245
    fi
246
  done
247
}
248
 
249
if strstr "\\\`cat /proc/cmdline\\\`" persistenthome= ; then
250
  findPersistentHome
251
elif [ -e /mnt/live/\\\${livedir}/home.img ]; then
252
  homedev=/mnt/live/\\\${livedir}/home.img
253
fi
254
 
255
# if we have a persistent /home, then we want to go ahead and mount it
256
if ! strstr "\\\`cat /proc/cmdline\\\`" nopersistenthome && [ -n "\\\$homedev" ] ; then
257
  action "Mounting persistent /home" mountPersistentHome
258
fi
259
 
260
# make it so that we don't do writing to the overlay for things which
261
# are just tmpdirs/caches
262
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
263
mount -t tmpfs tmp /tmp
264
mount -t tmpfs vartmp /var/tmp
265
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp >/dev/null 2>&1
266
 
267
if [ -n "\\\$configdone" ]; then
268
  exit 0
269
fi
270
 
271
 
272
## fix various bugs and issues
273
# unmute sound card
274
exists alsaunmute 0 2> /dev/null
275
 
276
# Stopgap fix for RH #217966; should be fixed in HAL instead
277
touch /media/.hal-mtab
278
 
279
# set the LiveCD hostname
280
[ ! "\\\$hostname" ] && hostname="livecd.localdomain"
281
sed -i -e 's/HOSTNAME=localhost.localdomain/HOSTNAME=\\\$hostname/g' /etc/sysconfig/network
282
/bin/hostname \\\$hostname
283
 
284
## create the LiveCD default user
285
# add default user with no password
286
/usr/sbin/useradd -c "LiveCD default user" \\\$LIVECD_USER
287
/usr/bin/passwd -d \\\$LIVECD_USER > /dev/null
288
# give default user sudo privileges
289
echo "\\\$LIVECD_USER     ALL=(ALL)     NOPASSWD: ALL" >> /etc/sudoers
290
 
291
## configure default user's desktop
292
# set up timed auto-login at 10 seconds
293
cat >> /etc/gdm/custom.conf << FOE
294
[daemon]
295
TimedLoginEnable=true
296
TimedLogin=LIVECD_USER
297
TimedLoginDelay=$LOGIN_DELAY
298
FOE
299
sed -i "s|LIVECD_USER|\\\$LIVECD_USER|" /etc/gdm/custom.conf
300
 
301
# add keyboard and display configuration utilities to the desktop
302
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
303
cp /usr/share/applications/gnome-keyboard.desktop           /home/\\\$LIVECD_USER/Desktop/
304
cp /usr/share/applications/gnome-display-properties.desktop /home/\\\$LIVECD_USER/Desktop/
305
 
306
# disable screensaver locking
307
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool   /apps/gnome-screensaver/lock_enabled "false" >/dev/null
308
 
309
# disable PackageKit update checking by default
310
gconftool-2 --direct --config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t int /apps/gnome-packagekit/update-icon/frequency_get_updates "0" >/dev/null
311
 
312
# detecting disk partitions and logical volumes 
313
CreateDesktopIconHD()
314
{
315
cat > /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop << EOF_HDicon
316
[Desktop Entry]
317
Encoding=UTF-8
318
Version=1.0
319
Type=Link
320
Name=Local hard drives
321
Name[en_US]=Local hard drives
322
Name[fr_CA]=Disques durs locaux
323
URL=/mnt/disc
324
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
325
EOF_HDicon
326
 
327
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ hard\ drives.desktop
328
}
329
 
330
CreateDesktopIconLVM()
331
{
332
mkdir -p /home/\\\$LIVECD_USER/Desktop >/dev/null
333
 
334
cat > /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop << EOF_LVMicon
335
[Desktop Entry]
336
Encoding=UTF-8
337
Version=1.0
338
Type=Link
339
Name=Local logical volumes
340
Name[en_US]=Local logical volumes
341
Name[fr_CA]=Volumes logiques locaux
342
URL=/mnt/lvm
343
Icon=/usr/share/icons/gnome/32x32/devices/gnome-dev-harddisk.png
344
EOF_LVMicon
345
 
346
chmod 755 /home/\\\$LIVECD_USER/Desktop/Local\ logical\ volumes.desktop
347
}
348
 
349
# don't mount disk partitions if 'nodiskmount' is given as a boot option
350
if ! strstr "\\\`cat /proc/cmdline\\\`" nodiskmount ; then
351
	MOUNTOPTION="ro"
352
	HARD_DISKS=\\\`egrep "[sh]d.\\\$" /proc/partitions | tr -s ' ' | sed 's/^  *//' | cut -d' ' -f4\\\`
353
 
354
	echo "Mounting hard disk partitions... "
355
	for DISK in \\\$HARD_DISKS; do
356
	    # Get the device and system info from fdisk (but only for fat and linux partitions).
357
	    FDISK_INFO=\\\`fdisk -l /dev/\\\$DISK | tr [A-Z] [a-z] | egrep "fat|linux" | egrep -v "swap|extended|lvm" | sed 's/*//' | tr -s ' ' | tr ' ' ':' | cut -d':' -f1,6-\\\`
358
	    for FDISK_ENTRY in \\\$FDISK_INFO; do
359
		PARTITION=\\\`echo \\\$FDISK_ENTRY | cut -d':' -f1\\\`
360
		MOUNTPOINT="/mnt/disc/\\\${PARTITION##/dev/}"
361
		mkdir -p \\\$MOUNTPOINT
362
		MOUNTED=FALSE
363
 
364
		# get the partition type
365
		case \\\`echo \\\$FDISK_ENTRY | cut -d':' -f2-\\\` in
366
		*fat*) 
367
		    FSTYPES="vfat"
368
		    EXTRAOPTIONS=",uid=500";;
369
		*)
370
		    FSTYPES="ext4 ext3 ext2"
371
		    EXTRAOPTIONS="";;
372
		esac
373
 
374
		# try to mount the partition
375
		for FSTYPE in \\\$FSTYPES; do
376
		    if mount -o "\\\${MOUNTOPTION}\\\${EXTRAOPTIONS}" -t \\\$FSTYPE \\\$PARTITION \\\$MOUNTPOINT &>/dev/null; then
377
			echo "\\\$PARTITION \\\$MOUNTPOINT \\\$FSTYPE noauto,\\\${MOUNTOPTION}\\\${EXTRAOPTIONS} 0 0" >> /etc/fstab
378
			echo -n "\\\$PARTITION "
379
			MOUNTED=TRUE
380
			CreateDesktopIconHD
381
		    fi
382
		done
383
		[ \\\$MOUNTED = "FALSE" ] && rmdir \\\$MOUNTPOINT
384
	    done
385
	done
386
	echo
387
fi
388
 
389
# don't mount logical volumes if 'nolvmmount' is given as a boot option
390
if ! strstr "\\\`cat /proc/cmdline\\\`" nolvmmount ; then
391
        MOUNTOPTION="ro"
392
	FSTYPES="ext4 ext3 ext2"
393
	echo "Scanning for logical volumes..."
394
	if ! lvm vgscan 2>&1 | grep "No volume groups"; then
395
	    echo "Activating logical volumes ..."
396
	    modprobe dm_mod >/dev/null
397
	    lvm vgchange -ay
398
	    LOGICAL_VOLUMES=\\\`lvm lvdisplay -c | sed "s/^  *//" | cut -d: -f1\\\`
399
	    if [ ! -z "\\\$LOGICAL_VOLUMES" ]; then
400
		echo "Making device nodes ..."
401
		lvm vgmknodes
402
		echo -n "Mounting logical volumes ... "
403
		for VOLUME_NAME in \\\$LOGICAL_VOLUMES; do
404
		    VG_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f3\\\`
405
		    LV_NAME=\\\`echo \\\$VOLUME_NAME | cut -d/ -f4\\\`
406
		    MOUNTPOINT="/mnt/lvm/\\\${VG_NAME}-\\\${LV_NAME}"
407
		    mkdir -p \\\$MOUNTPOINT
408
 
409
		    MOUNTED=FALSE
410
		    for FSTYPE in \\\$FSTYPES; do
411
			if mount -o \\\$MOUNTOPTION -t \\\$FSTYPE \\\$VOLUME_NAME \\\$MOUNTPOINT &>/dev/null; then
412
			    echo "\\\$VOLUME_NAME \\\$MOUNTPOINT \\\$FSTYPE defaults,\\\${MOUNTOPTION} 0 0" >> /etc/fstab
413
			    echo -n "\\\$VOLUME_NAME "
414
			    MOUNTED=TRUE
415
			    CreateDesktopIconLVM
416
			    break
417
			fi
418
		    done
419
		    [ \\\$MOUNTED = FALSE ] && rmdir \\\$MOUNTPOINT
420
		done
421
		echo
422
 
423
	    else
424
		echo "No logical volumes found"
425
	    fi
426
	fi
427
fi
428
 
429
# give back ownership to the default user
430
chown -R \\\$LIVECD_USER:\\\$LIVECD_USER /home/\\\$LIVECD_USER
431
 
432
EOF_initscript
433
echo ###################################################################
434
echo ## End of livesys script
435
echo ###################################################################
436
 
437
 
438
 
439
echo ###################################################################
440
echo ## Creating the livesys init script - livesys-late
441
echo ###################################################################
442
 
443
cat > /etc/rc.d/init.d/livesys-late << EOF_lateinitscript
444
#!/bin/bash
445
#
446
# live: Late init script for live image
447
#
448
# chkconfig: 345 99 01
449
# description: Late init script for live image.
450
 
451
. /etc/init.d/functions
452
. /etc/livesys.conf
453
. /etc/init.d/livesys.functions
454
 
455
if ! strstr "\\\`cat /proc/cmdline\\\`" liveimg || [ "\\\$1" != "start" ] || [ -e /.liveimg-late-configured ] ; then
456
    exit 0
457
fi
458
 
459
touch /.liveimg-late-configured
460
 
461
# read boot parameters out of /proc/cmdline
462
ks=\\\$( cmdline_value ks )
463
xdriver=\\\$( cmdline_value xdriver )
464
kb=\\\$( cmdline_value kb )
465
 
466
# if liveinst or textinst is given, start anaconda
467
if [ "\\\$( cmdline_parameter liveinst )" ]; then
468
   plymouth --quit
469
   /usr/sbin/liveinst \\\$ks
470
fi
471
if [ "\\\$( cmdline_parameter textinst )" ] ; then
472
   plymouth --quit
473
   /usr/sbin/liveinst --text \\\$ks
474
fi
475
 
476
# configure X, allowing user to override xdriver
477
if [ "\\\$xdriver" ]; then
478
    exists system-config-display --noui --reconfig --set-depth=24 --set-driver=\\\$xdriver
479
fi
480
 
481
# configure keyboard
482
if [ "\\\$kb" ]; then
483
    exists system-config-keyboard --noui \\\$kb 
484
fi
485
 
486
EOF_lateinitscript
487
echo ###################################################################
488
echo ## End of livesys-late script
489
echo ###################################################################
490
 
491
 
492
 
493
echo ###################################################################
494
echo ## Configure the LiveCD
495
echo ###################################################################
496
 
497
# workaround avahi segfault (#279301)
498
touch /etc/resolv.conf
499
/sbin/restorecon /etc/resolv.conf
500
 
501
chmod 755 /etc/rc.d/init.d/livesys
502
/sbin/restorecon /etc/rc.d/init.d/livesys
503
/sbin/chkconfig --add livesys
504
 
505
chmod 755 /etc/rc.d/init.d/livesys-late
506
/sbin/restorecon /etc/rc.d/init.d/livesys-late
507
/sbin/chkconfig --add livesys-late
508
 
509
# turn off firstboot for livecd boots
510
echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
511
 
512
# turn off services, which are not useful on LiveCD, to preserve resources
513
chkconfig --level 345 mdmonitor       off 2>/dev/null
514
chkconfig --level 345 setroubleshoot  off 2>/dev/null
515
chkconfig --level 345 auditd          off 2>/dev/null
516
chkconfig --level 345 crond           off 2>/dev/null
517
chkconfig --level 345 atd             off 2>/dev/null
518
chkconfig --level 345 readahead_early off 2>/dev/null
519
chkconfig --level 345 readahead_later off 2>/dev/null
520
chkconfig --level 345 kdump           off 2>/dev/null
521
chkconfig --level 345 microcode_ctl   off 2>/dev/null
522
chkconfig --level 345 openct          off 2>/dev/null
523
chkconfig --level 345 pcscd           off 2>/dev/null
524
chkconfig --level 345 postfix         off 2>/dev/null
525
 
526
# start afs with option -memcache (is this correct?)
527
[ -e /etc/sysconfig/afs ] && sed -i "s|^OPTIONS=.*|OPTIONS=\"-memcache\"|" /etc/sysconfig/afs
528
 
529
# go ahead and pre-make the man -k cache (#455968)
530
/usr/sbin/makewhatis -w
531
 
532
# save a little bit of space at least...
533
rm -f /var/lib/rpm/__db*
534
rm -f /boot/initrd*
535
rm -f /boot/initramfs*
536
# make sure there aren't core files lying around
537
rm -f /core*
538
 
539
# convince readahead not to collect
540
rm -f /.readahead_collect
541
touch /var/lib/readahead/early.sorted
542
 
543
# workaround clock syncing on shutdown that we don't want (#297421)
544
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt
545
 
546
# import RPM GPG keys
547
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-beta
548
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
549
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl6
550
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-dawson
551
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-sl
552
 
553
# evolution is in the gnome launch panel (workaround to start thunderbird instead)
554
[ ! -e /usr/bin/evolution ] && ln -s /usr/bin/thunderbird /usr/bin/evolution
555
 
556
EOF_post
557
 
558
# run post-install script
559
/bin/bash -x /root/post-install 2>&1 | tee /root/post-install.log
560
 
561
%end
562
########################################################################
563
# End of configure LiveCD in chroot
564
########################################################################
565
 
566
 
567
 
568
%post --nochroot
569
########################################################################
570
# Post install in no chroot
571
# Must change "$" to "\$" and "`" to "\`" to avoid shell quoting
572
########################################################################
573
cat > /root/postnochroot-install << EOF_postnochroot
574
#!/bin/bash
575
 
576
# Copy licensing information
577
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
578
 
579
# add livecd-iso-to-disk utility on the LiveCD
580
# only works on x86, x86_64
581
if [ "\$(uname -i)" = "i386" -o "\$(uname -i)" = "x86_64" ]; then
582
  if [ ! -d \$LIVE_ROOT/LiveOS ]; then mkdir -p \$LIVE_ROOT/LiveOS ; fi
583
  cp /usr/bin/livecd-iso-to-disk \$LIVE_ROOT/LiveOS
584
fi
585
 
586
# customize boot menu entries
587
grep -B4 'menu default'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/default.txt
588
grep -B3 'xdriver=vesa'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/basicvideo.txt
589
grep -A3 'label check0'  \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/check.txt
590
grep -A2 'label memtest' \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/memtest.txt
591
grep -A2 'label local'   \$LIVE_ROOT/isolinux/isolinux.cfg > \$LIVE_ROOT/isolinux/localboot.txt
592
 
593
sed "s/label linux0/label linuxtext0/"   \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textboot.txt
594
sed -i "s/Boot/Boot (Text Mode)/"                                           \$LIVE_ROOT/isolinux/textboot.txt
595
sed -i "s/liveimg/liveimg 3/"                                               \$LIVE_ROOT/isolinux/textboot.txt
596
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textboot.txt
597
 
598
sed "s/label linux0/label install0/"     \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/install.txt
599
sed -i "s/Boot/Install/"                                                    \$LIVE_ROOT/isolinux/install.txt
600
sed -i "s/liveimg/liveimg liveinst noswap nolvmmount/"                      \$LIVE_ROOT/isolinux/install.txt
601
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/install.txt
602
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/install.txt
603
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/install.txt
604
 
605
sed "s/label linux0/label textinstall0/" \$LIVE_ROOT/isolinux/default.txt > \$LIVE_ROOT/isolinux/textinstall.txt
606
sed -i "s/Boot/Install (Text Mode)/"                                        \$LIVE_ROOT/isolinux/textinstall.txt
607
sed -i "s/liveimg/liveimg textinst noswap nolvmmount/"                      \$LIVE_ROOT/isolinux/textinstall.txt
608
sed -i "s/ quiet / /"                                                       \$LIVE_ROOT/isolinux/textinstall.txt
609
sed -i "s/ rhgb / /"                                                        \$LIVE_ROOT/isolinux/textinstall.txt
610
sed -i "/menu default/d"                                                    \$LIVE_ROOT/isolinux/textinstall.txt
611
 
612
cat \$LIVE_ROOT/isolinux/default.txt \$LIVE_ROOT/isolinux/basicvideo.txt \$LIVE_ROOT/isolinux/check.txt \$LIVE_ROOT/isolinux/memtest.txt \$LIVE_ROOT/isolinux/localboot.txt > \$LIVE_ROOT/isolinux/current.txt
613
diff \$LIVE_ROOT/isolinux/isolinux.cfg \$LIVE_ROOT/isolinux/current.txt | sed '/^[0-9][0-9]*/d; s/^. //; /^---$/d' > \$LIVE_ROOT/isolinux/cleaned.txt
614
cat \$LIVE_ROOT/isolinux/cleaned.txt \$LIVE_ROOT/isolinux/default.txt \$LIVE_ROOT/isolinux/textboot.txt \$LIVE_ROOT/isolinux/basicvideo.txt \$LIVE_ROOT/isolinux/install.txt \$LIVE_ROOT/isolinux/textinstall.txt \$LIVE_ROOT/isolinux/memtest.txt \$LIVE_ROOT/isolinux/localboot.txt > \$LIVE_ROOT/isolinux/isolinux.cfg
615
rm -f \$LIVE_ROOT/isolinux/*.txt
616
 
617
EOF_postnochroot
618
 
619
# run postnochroot-install script
620
/bin/bash -x /root/postnochroot-install 2>&1 | tee /root/postnochroot-install.log
621
 
622
%end
623
########################################################################
624
# End of configure LiveCD in nochroot
625
########################################################################