Appendix Here’s the complete procedure I described in Part I for adding and removing packages in a custom Ubuntu live CD, in the form of a raw list of all commands described in that article. The $ prompts indicate commands executed as an unprivileged user; the # prompts show commands that are executed by root:
16-# apt-get install tor privoxy
00-$ dd if=/dev/cdrom of=./ubuntu-7.10-desktop-i386.iso
19-# rm -rf /tmp/*
01-$ mkdir -p ./isomount ./isonew/squashfs ./isonew/cd
20-# umount /proc/
17-# apt-get dist-upgrade
18-# apt-get clean
¯./isonew/custom 21-# umount /sys/ 02-$ sudo mount -o loop ./ubuntu-7.10-desktop-i386.iso ./isomount/ 22-# exit 03-$ rsync --exclude=/casper/filesystem.squashfs -a ./isomount/ ¯./isonew/cd
23-$ chmod +w ./isonew/cd/casper/filesystem.manifest
04-$ sudo modprobe squashfs
24-$ sudo chroot ./isonew/custom dpkg-query -W --showformat='${Package} ¯${Version}\n' > ./isonew/cd/casper/filesystem.manifest
05-$ sudo mount -t squashfs -o loop ¯./isomount/casper/filesystem.squashfs ./isonew/squashfs/
25-$ sudo cp ./isonew/cd/casper/filesystem.manifest ¯./isonew/cd/casper/filesystem.manifest-desktop
06-$ sudo rsync -a ./isonew/squashfs/ ./isonew/custom 26-$ sudo mksquashfs ./isonew/custom 07-$ sudo cp /etc/resolv.conf /etc/hosts ./isonew/custom/etc/
¯./isonew/cd/casper/filesystem.squashfs
08-$ sudo cp /etc/apt/sources.list ./isonew/custom/etc/apt/
27-$ sudo rm ./isonew/cd/md5sum.txt
09-$ sudo chroot ./isonew/custom
28-$ sudo -s
10-# mount -t proc none /proc/
29-# cd ./isonew/cd
11-# mount -t sysfs none /sys/
30-# find . -type f -print0 | xargs -0 md5sum > md5sum.txt
12-# export HOME=/root
31-# exit
13-# apt-get remove --purge `dpkg-query -W --showformat='${Package}\n'
32-$ cd ./isonew/cd
¯|grep openoffice` 33-$ sudo mkisofs -r -V "Ubuntu-Live-PrivateSurf" -b 14-# apt-get remove --purge `dpkg-query -W --showformat='${Package}\n'
¯isolinux/isolinux.bin -c isolinux/boot.cat -cache-inodes
¯|grep gimp`
¯-J -l -no-emul-boot -boot-load-size 4 -boot-info-table ¯-o ~/Ubuntu-Live-7.10-PrivateSurf.iso .
15-# apt-get update
Resources Ubuntu Community Wiki Page on How to Customize Ubuntu Live CDs: https://help.ubuntu.com/community/LiveCDCustomization Information about Zeroconf and Avahi on Ubuntu: https://help.ubuntu.com/community/HowToZeroconf The Hidden Volume Information Page on the Official TrueCrypt Web Site: www.truecrypt.org/hiddenvolume.php The Debian Live Wiki: wiki.debian.org/DebianLive Download Site for the NoScript Plugin for Firefox: https://addons.mozilla.org/en-US/firefox/addon/722 Download Site for the RefControl Plugin for Firefox: https://addons.mozilla.org/en-US/firefox/addon/953 w w w. l i n u x j o u r n a l . c o m july 2008 | 35