cd
apt-get -y install lzma squashfs-tools mkisofs
wget http://ftp.jaist.ac.jp/pub/Linux/ubuntu-releases/10.04.3/ubuntu-10.04.3-desktop-i386.iso
wget -O - 'http://sourceforge.jp/projects/tomoyo/svn/view/branches/ubuntu-10.04/LiveCD.tar.gz?root=tomoyo&view=tar' | tar -zxf -
cd LiveCD/
chmod +x *.sh
modprobe binfmt_misc
modprobe -q -b lp
modprobe -q -b ppdev
mkdir mnt cdrom squash initrd
mount -o loop ~/ubuntu-10.04.3-desktop-i386.iso mnt/
cp -a mnt/* mnt/.disk/ cdrom/
umount -d mnt/
mount -t squashfs -o loop cdrom/casper/filesystem.squashfs mnt/
cp -a mnt/* squash/
umount -d mnt/
cd squash/
cp -p ../package-install.sh /etc/apt/sources.list .
cp -p /etc/resolv.conf etc/
chroot . /package-install.sh
cd ../
./generate-livecd.sh
