Remaster Ubuntu CD (TEST)

sudo apt-get install squashfs-tools mkisofs qemu
 
-- wget ubuntu-8.04-desktop-i386.iso
sudo mount download/iso/ubuntu-8.04-desktop-i386.iso /mnt/ -o loop
 
mkdir ~/live
cd ~/live
 
mkdir extract-cd
#rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
 
mkdir squashfs
sudo mount -t squashfs -o loop /mnt/casper/filesystem.squashfs squashfs
 
mkdir edit
sudo cp -a squashfs/* edit/
 
sudo cp /etc/resolv.conf edit/etc/
 
sudo cp /etc/hosts edit/etc/
 
sudo mount --bind /dev/ edit/dev
 
sudo mount --bind /dev/ edit/dev
 
sudo chroot edit
mount -t proc none /proc
mount -t sysfs none /sys
 
export HOME=/root
export LC_ALL=C
 
# get free isze
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -nr | less
apt-get remove --purge openoffice* evolution* ubuntu-docs gnome-games-data gimp*
 
add universe, multiuniverse to 
 
install apps
 
apt-get clean
 
rm -rf /tmp/*
 
rm /etc/resolv.conf
 
umount /proc
umount /sys
exit
sudo umount edit/dev