"How to Customise the Ubuntu Desktop CD"
its used to replace the
steps
- 1)"Extracting the CD contents"
- 2)"Extracting the Desktop system"(Extract the SquashFS filesystem )
# you must script steps 3 - 6 [and possibly step 7)a) ] / or pause the script and continue manually! bashing
- 7)Putting the CD together
using aufs
en.wikipedia.org/wiki/Aufs
to 'mount' the iso and the filesystem.squashfs as writable
( so you need not extract them ! )
leaving you to script the (chroot) customization
and finally
- Compressing filesystem
- Recomputing MD5 sums
and Creating ISO image
for testing the scripted customization !!
# aufs - remastering - script
# from https://help.ubuntu.com/community/LiveCDCustomization #comments #Hi, I've created a simple script to ease remastering the Kubuntu Live CD. It uses aufs to avoid copying all the files #back and forth. Maybe it will be usefull to others too. The script must be run as root. CD="${1:-kubuntu-9.04-desktop-i386.iso}"; shift # exit after any error: set -e which mkisofs mksquashfs tempfile sed WDIR=`mktemp -d $PWD/kubuntu-remastered.XXXXXXXXXX` ISO="$WDIR/${CD##*/}" ISO="${ISO%.iso}-remastered-KDM.iso" EXIT="" function addExit { EXIT="$@; $EXIT" trap "$EXIT" EXIT HUP TERM INT QUIT } function mnt { local margs="$1"; shift local mp="$WDIR/$1" for D in "$@"; do mkdir -v -p "$WDIR/$D" done mount -v $margs "$mp" addExit "umount -v $mp" } # mount the CD image mnt "-t auto $CD -o loop,ro" cd # mount compressed filesystem mnt "-t squashfs $WDIR/cd/casper/filesystem.squashfs -o ro,loop" sq # create joined writable filesystem for the new CD mnt "-t aufs -o br:$WDIR/cd-w=rw:$WDIR/cd=ro none" cd-u cd-w # create joined writable filesystem for the new compressed squashfs filesystem mnt "-t aufs -o br:$WDIR/sq-w=rw:$WDIR/sq=ro none" sq-u sq-w echo ">>> Updating CD content" ( cd sq-u # DO YOUR CUSTOMIZATION STUFF HERE, CHROOT, MODIFY FILES, ETC. # ... # ... ) echo ">>> Compressing filesystem" mksquashfs $WDIR/sq-u/ $WDIR/cd-u/casper/filesystem.squashfs -noappend echo ">>> Recomputing MD5 sums" ( cd $WDIR/cd-u && find . -type f -not -name md5sum.txt -not -path '*/isolinux/*' -print0 | xargs -0 -- md5sum > md5sum.txt ) echo ">>> Creating ISO image $ISO" mkisofs \ -V "Custom KUbuntu Live CD" \ -r -cache-inodes -J -l \ -b isolinux/isolinux.bin \ -c isolinux/boot.cat \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -o "$ISO" \ $WDIR/cd-u # The trap ... callbacks will unmount everything. #//===============================================
or try the gui this (remastersys, Create a customized Ubuntu LiveCD)
also the
http://remastersys.s...e.net/tips.html has lots of tips !
and
https://wiki.ubuntu.com/BootToRAM