Ubuntu 10.10 code name Maverick Meerkat has been released on October 10th 2010 you can download it from ubuntu.com for free. But when you are an Ubuntu advance user, you need to add more package or remove some package that you won’t use. Then you can live boot your custom Ubuntu live CD. And it’s not limited to live CD, you can make it as live USB too.
There are some reasons you want to customize Ubuntu live CD:
- Make your own Linux / Ubuntu distribution, something like rebranding but based on Ubuntu
- Show off a particular application
- Localise to a certain language
- Remove software packages
- Add software packages
- Update software packages
- Change system defaults (theme, icons, desktop background, panels, browser homepage, etc)
To make custom Ubuntu live CD:
- Open your terminal and install squashfs-tools and genisoimage:
sudo apt-get install squashfs-tools genisoimage
- Download Ubuntu Desktop CD:
wget http://releases.ubuntu.com/maverick/ubuntu-10.10-desktop-i386.iso
- Move it to working directory, call it livecdtemp:
mkdir ~/livecdtmp mv ubuntu-10.10-desktop-i386.iso ~/livecdtmp cd ~/livecdtmp
- Extract the CD .iso contents
mkdir mnt sudo mount -o loop ubuntu-10.10-desktop-i386.iso mnt
- Extract .iso contents into dir ‘extract-cd’
mkdir extract-cd rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd
- Extract the SquashFS filesystem to edit folder
sudo unsquashfs mnt/casper/filesystem.squashfs sudo mv squashfs-root edit
- Give network connection within chroot
sudo cp /etc/resolv.conf 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 mount -t devpts none /dev/pts export HOME=/root export LC_ALL=C
- Customization time!
To enable apt-get within chroot:dbus-uuidgen > /var/lib/dbus/machine-id dpkg-divert --local --rename --add /sbin/initctl ln -s /bin/true /sbin/initctl
Update your sources.list if necessary:
vim /etc/apt/sources.list
Update your repository:
apt-get update
To install new package:
apt-get install [package-name]
To remove unwanted package:
aptitude purge package-name
To customize Gnome:
a. Customize background:
* add wallpaper file to /usr/share/backgrounds
* edit /usr/share/gnome-background-properties/ubuntu-wallpapers.xml to point to your wallpaper file
b. Change font, panels, etc:
To make any change on the gconf attributes you must add the value that you want in the file /etc/gconf/gconf.xml.defaults/%gconf-tree.xml. Adding a value in that file will change the default values of Gnome or other applications, so you can change fonts, backgrounds, themes, cursors etc. You can use gconftool-2, under the chroot environment to adjust the gconf file:gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type string --set yourkey "yourvalue"
I haven’t do this much, since the livecd i create is for disaster recovery, so default desktop it’s fine with me. But it’s worth to try.
Change the default timezone used by the live cd:
dpkg-reconfigure tzdata
Change local setting:
locale-gen new_locale update-locale LANG=new_locale LANGUAGE=new_locale LC_ALL=new_locale
- Clean up
aptitude clean rm -rf /tmp/* ~/.bash_history rm /etc/resolv.conf rm /var/lib/dbus/machine-id rm /sbin/initctl dpkg-divert --rename --remove /sbin/initctl
- Regenerate manifest:
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 sed -i '/casper/d' extract-cd/casper/filesystem.manifest-desktop
- Compress filesystem:
sudo rm extract-cd/casper/filesystem.squashfs sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma
- Remove old md5sum.txt and calculate new md5 sums
cd extract-cd sudo rm md5sum.txt find -type f -print0 | sudo xargs -0 md5sum | grep -v isolinux/boot.cat | sudo tee md5sum.txt
- Create the ISO image:
sudo mkisofs -D -r -V "$IMAGE_NAME" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o ../ubuntu-10.10-desktop-i386-custom.iso .
- Testing the CD image:
qemu -cdrom ubuntu-10.10-desktop-i386-custom.iso -boot d -m 512
- Burn the CD:
You can use any tools you like, for example Gnomebaker. Or:cdrecord dev=/dev/cdrom ubuntu-10.10-desktop-i386-custom.iso
You can make the USB live with Unetbootin.
That’s it. You can create your custom Ubuntu live cd or even rebranded it. Long live Ubuntu!
There is online tools to create custom Ubuntu and Debian live CD it is called Reconstructor. You can see the tutorial from How-To Geek article.
Credits:
LiveCDCustomization Documentation
what
is
the
difference
between
this
and
REMASTERSYS
——————–
incomplete – missleading
maaf mas mau tanya
aku sudah ngikuti step by step
sampai ke step 11
ketika kuketik perintah
sudo mksquashfs edit extract-cd/casper/filesystem.squashfs -nolzma
kok muncul error
mksquashfs: invalid option
SYNTAX:mksquashfs source1 source2 … dest [options] [-e list of exclude
dirs/files]
yang salah option sebelah mana?
Coba periksa kembali ke step 6 saat folder edit di create.
I don't speak Bahasa, so I am relying on the translation. I am getting the same error message as Liko, and referring to step 6 when the edit folder was created is not enlightening me.
For compression options with the latest version of mksquashfs, I can only find -noI, -noD and -noF listed in the man page.
"mksquashfs: invalid option" when -nolzma is on the right, and when it is on the left, of course it just breaks syntax completely and gives a general error.
I will assume lzma compression is removed.
thanks buat tutorialnya.
cm masih penasaran, gmn cara create ubuntu yang alternate version dengan packages yang ter-up2date seperti LTS release ex: 10.04.2
Hello Ivan.
How could I delete the livecdtmp folder after the iso has been created?
I understand that I have to unmount the mnt first but it still won’t let me delete the livecdtmp folder
This is an old post, you don’t need to go through all this anymore.
see this new way here: https://help.ubuntu.com/community/LiveCD