IMPORTANT: This description is valid for SL4 and SL5 only. For SL6 LiveCD please see Create your own SL6 LiveCD
The build scripts provided here should allow you to build your own Scientific Linux Live CD. This scripts (with some modifications) are also used to build the CentOS 4 Live CD. You can either install Scientific Linux on a normal PC and use this system as a build system for your livecd. Or you can build the LiveCD in a chroot environment as described below.
WARNING: Do not run the build script on your PC ! Only run it on a special build PC or in the chroot environment !! The build scripts will change the system and will/can make your system unusable.
Some parts of the following description are taken from How to make a CentOS 4 Live CD. You will need root access for many of these steps (for chroot and mount) but it is designed to not impact your main install. The build is done in a single directory.
No special livecd kernel is required. The standard Scientific Linux kernel can be used. You just have to install the unionfs and squashfs kernel modules for SL4 and aufs kernel modules for as SL5 as described below.
svn co https://svn.iac.ethz.ch/pub/livecd/trunk/SL4_SL5 livecd-trunk
LIVE=/scratch/livecd mkdir -p $LIVE
cd $LIVE mkdir dev proc sys etc tmp
touch etc/fstab etc/mtab
mount --bind /dev dev mount null -t proc proc mount null -t sysfs sys
cp -a /etc/yum.conf $LIVE/etc cp -a /etc/yum.repos.d $LIVE/etc/
mkdir -p $LIVE/var/lock/rpm
yum -c $LIVE/etc/yum.conf --installroot=$LIVE install yum rootfiles shadow-utils \ bind-utils gnupg vim-enhanced vixie-cron crontabs passwd which kudzu dhclient \ pciutils eject alsa-utils mkisofs wget kernel grub
cd $LIVE sed -i "s|\*|x|" etc/passwd sed -i "s|^root::|root:x:|" etc/passwd cat etc/passwd | cut -d":" -f 1 | while read u; do echo "$u:*:12345:0:99999:1:::"; done >> etc/shadow chmod 600 etc/shadow
cp -a etc/group etc/gshadow sed -i "s|:x:|::|" etc/gshadow sed -i "s|:[0-9]\+:|::|" etc/gshadow chmod 600 etc/gshadow
yum -c $LIVE/etc/yum.conf --installroot=$LIVE install kbd system-config-keyboard
yum -c $LIVE/etc/yum.conf --installroot=$LIVE install system-config-display gdm xterm icewm
yum -c $LIVE/etc/yum.conf --installroot=$LIVE install kdeartwork kdebase \ kdegraphics kdelibs kdemultimedia kdenetwork kdepim kdesdk kdeutils
yum -c $LIVE/etc/yum.conf --installroot=$LIVE install openssh-clients
cp /etc/resolv.conf $LIVE/etc
cp /etc/sysconfig/network $LIVE/etc/sysconfig/
cp /etc/sysconfig/i18n $LIVE/etc/sysconfig/ cp /etc/sysconfig/authconfig $LIVE/etc/sysconfig/ cp /etc/sysconfig/kernel $LIVE/etc/sysconfig/ cp /etc/sysconfig/clock $LIVE/etc/sysconfig/
umount $LIVE/proc chroot $LIVE
mount -t proc proc /proc
umount /proc exit
yum -c $LIVE/etc/yum.conf --installroot=$LIVE install kernel
chroot $LIVE yum install squashfs kernel-module-squashfs yum install unionfs kernel-module-unionfs
chroot $LIVE yum install squashfs-tools
yum install aufsto install aufs and the related kernel module.
mkdir $LIVE/build cp livecd-x.x.x.tar.gz $LIVE/build
chroot $LIVE
cd /build tar xfvz livecd-x.x.x.tar.gz
cd /build/livecd-x.x.x
vi livecd.conf
KERNEL="2.6.9-42.0.3.EL"
OS_RELEASE=4For SL5, RHEL5, CentOS5 set
OS_RELEASE=5
build-livecd.sh -h
OS_UPDATE=3
RUNLEVEL=3
EXTRA_BOOT_OPTIONS="kb=us nopasswd"
./build-livecd.sh
qemu -m 256 -cdrom livecd.iso qemu -m 256 -full-screen -cdrom livecd.iso
Last modified: Thursday, 30-Jun-2011 17:23:41 CEST by Urs Beyerle