Preamble:
If you are after a simple remastering howto go here
This is basically a simplified write up of https://help.ubuntu.com/community/LiveCDCustomization in that it concentrates on what is happening behind the scenes only.
I am grateful for all comments, improvements, tips and tricks.
Live CD:
A basic Xbuntu life system must at least have a working framework including isolinux and the core squashfs.
core -
- squashfs - this what we need to manipulate to change the desktop system. Consists of the highly compressed live CD file system from / all the way up. It accounts for some 90% of the size of the entire CD.
framework -
- isolinux - linux bootloader, contains everything on how the CD is going to start. The CD's grub is located here including graphics and menu – if you just want to change the packages included in the CD this is of no interest. If, however, you want to change the CD's boot behaviour you will need to look into this a little further.
- the folder /preseed – preseeding appears to be interesting to those who need to streamline installs, good info here https://help.ubuntu.com/community/In...omization#Copy the CD to your hard drive
- out of the other stuff on the live CD you could safely get rid of the windows executive files (the wubi installer) if you so wish.
Requirements:
space – 10GB should do for a large job
packages – sudo apt-get install squashfs-tools mkisofs
iso – a kubuntu iso
environment – a directory structure to a) mount the iso in and b) manipulate its contents, see under process below
Process:
Load the squashfs module to be able to mount and manipulate the live CD's file system.
Set up remastering environment – my motto is “keep your home clean” so I prefer a separate partition to do this in rather than /home
Create the iso environment and change into it
create directory to mount original live CD into
create directory for new framework and copy the original into it
create directory for new core and mount original into it (perhaps having to mount twice is at first somewhat confusing, but consider that squashfs is in itself a read-only file system which needs to be mounted and copied before it can be manipulated).
create editing directory within which to manipulate the squashfs and copy over the mounted original
The environment is created. To make it liveable in connect it to the network
Mount the live CD to the edit/dev mountpoint within our environment, chroot into the copied squashfs, mount both /proc and /sys volumes and get the locale right:
Now work your magic adjusting repositories, packages, looks, processes, whatever. When finished clean up behind yourself
Then leave chroot and release the live CD mounted in it
Regenerate the list of installed packages so that everything is congruent
Now compress your new edited squashfs (takes some 20 minutes on my single core AMD 2600+)
And finally create the iso (replace space holders in “” with appropriate values, note the full stop at the end of the command)
Testing:
Try your remastered version in a virtual environment, put it on a usb stick or burn it using k3b.
If you are after a simple remastering howto go here
This is basically a simplified write up of https://help.ubuntu.com/community/LiveCDCustomization in that it concentrates on what is happening behind the scenes only.
I am grateful for all comments, improvements, tips and tricks.
Live CD:
A basic Xbuntu life system must at least have a working framework including isolinux and the core squashfs.
core -
- squashfs - this what we need to manipulate to change the desktop system. Consists of the highly compressed live CD file system from / all the way up. It accounts for some 90% of the size of the entire CD.
framework -
- isolinux - linux bootloader, contains everything on how the CD is going to start. The CD's grub is located here including graphics and menu – if you just want to change the packages included in the CD this is of no interest. If, however, you want to change the CD's boot behaviour you will need to look into this a little further.
- the folder /preseed – preseeding appears to be interesting to those who need to streamline installs, good info here https://help.ubuntu.com/community/In...omization#Copy the CD to your hard drive
- out of the other stuff on the live CD you could safely get rid of the windows executive files (the wubi installer) if you so wish.
Requirements:
space – 10GB should do for a large job
packages – sudo apt-get install squashfs-tools mkisofs
iso – a kubuntu iso
environment – a directory structure to a) mount the iso in and b) manipulate its contents, see under process below
Process:
Load the squashfs module to be able to mount and manipulate the live CD's file system.
sudo modprobe squashfs
Create the iso environment and change into it
mkdir tmp1 && cd tmp1
mkdir mnt
sudo mount -o loop path_to_iso/iso_name.iso mnt
sudo mount -o loop path_to_iso/iso_name.iso mnt
mkdir extract-cd
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
mkdir squashfs
sudo mount -t squashfs -o loop mnt/casper/filesystem.squashfs squashfs
sudo mount -t squashfs -o loop mnt/casper/filesystem.squashfs squashfs
mkdir edit
sudo cp -a squashfs/* edit/
sudo cp -a squashfs/* edit/
sudo cp /etc/resolv.conf edit/etc/
sudo cp /etc/hosts edit/etc/
sudo cp /etc/hosts edit/etc/
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
mount -t proc none /proc
mount -t sysfs none /sys
export HOME=/root
export LC_ALL=C
apt-get clean
rm -rf /tmp/*
rm /etc/resov.conf
umount /proc
umount /sys
rm -rf /tmp/*
rm /etc/resov.conf
umount /proc
umount /sys
exit
sudo umount edit/dev
sudo umount edit/dev
chmod +w extract-cd/casper/filesystem.manifest
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
sudo chroot edit dpkg-query -W --showformat='${Package} ${Version}\n' > extract-cd/casper/filesystem.manifest
sudo cp extract-cd/casper/filesystem.manifest extract-cd/casper/filesystem.manifest-desktop
sudo sed -i '/ubiquity/d' extract-cd/casper/filesystem.manifest-desktop
sudo rm extract-cd/casper/filesystem.squashfs
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma
cd extract-cd
sudo mkisofs -r -V “_name_of_newly_created.iso" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o “/_path_/_name_of_your_original_kubuntu.iso” .
sudo mkisofs -r -V “_name_of_newly_created.iso" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o “/_path_/_name_of_your_original_kubuntu.iso” .
Try your remastered version in a virtual environment, put it on a usb stick or burn it using k3b.