howtos:building_a_custom_liveusb_2
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | howtos:building_a_custom_liveusb_2 [02/12/2018 21:34] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | This tutorial will show you how to customize and remaster your ubuntu 9.04 jaunty using a jaunty iso file. | ||
+ | |||
+ | 1. Create a work directory | ||
+ | |||
+ | < | ||
+ | mkdir jaunty | ||
+ | </ | ||
+ | |||
+ | 2. Create the following directoires | ||
+ | < | ||
+ | mkdir jaunty/ | ||
+ | mkdir jaunty/tmp | ||
+ | mkdir jaunty/root | ||
+ | </ | ||
+ | |||
+ | 3. Mount the jaunty iso image on jaunty/ | ||
+ | |||
+ | < | ||
+ | sudo mount -o loop jaunty.iso jaunty/ | ||
+ | </ | ||
+ | |||
+ | 4. Copy everything from the cdrom to jaunty/ | ||
+ | |||
+ | < | ||
+ | cp -r jaunty/ | ||
+ | </ | ||
+ | |||
+ | 5. Now the image directory has the content of your cdrom | ||
+ | |||
+ | We are going to rebuild filesystem.squashfs under jaunty/ | ||
+ | |||
+ | Move the filesystem.squashfs image to jaunty/tmp directory | ||
+ | |||
+ | < | ||
+ | sudo mv jaunty/ | ||
+ | </ | ||
+ | |||
+ | 6. Mount the filesystem.squashfs under jaunty/root direct | ||
+ | |||
+ | < | ||
+ | sudo mount -o loop jaunty/ | ||
+ | </ | ||
+ | |||
+ | 7. Copy the contents of fileystem.squashfs to jaunty/ | ||
+ | < | ||
+ | sudo cp -r jaunty/root jaunty/ | ||
+ | </ | ||
+ | |||
+ | 8. Copy resolv.conf and sources.list from the host system | ||
+ | |||
+ | < | ||
+ | cp / | ||
+ | </ | ||
+ | |||
+ | 9. Preserve original sources.list. | ||
+ | |||
+ | < | ||
+ | sudo cp jaunty/ | ||
+ | sudo cp / | ||
+ | </ | ||
+ | |||
+ | Make sure that sources.list points to jaunty archive | ||
+ | |||
+ | 10. Now you can chroot to jaunty/ | ||
+ | |||
+ | < | ||
+ | chroot jaunty/ | ||
+ | </ | ||
+ | |||
+ | 11. Now run the following ( You are inside chroot ) | ||
+ | |||
+ | < | ||
+ | mount /proc | ||
+ | mount /sys | ||
+ | mount -t devpts none /dev/pts | ||
+ | </ | ||
+ | |||
+ | The above commands mount the respective directories inside chroot. | ||
+ | |||
+ | 12. Now you can install/ | ||
+ | eg: | ||
+ | < | ||
+ | apt-get update | ||
+ | apt-get install vlc | ||
+ | apt-get remove gimp | ||
+ | </ | ||
+ | |||
+ | You can update the platform in general by running. | ||
+ | |||
+ | < | ||
+ | apt-get update | ||
+ | apt-get dist-upgrade -y | ||
+ | </ | ||
+ | |||
+ | 13. Cleanup the unwanted files. | ||
+ | |||
+ | < | ||
+ | apt-get clean | ||
+ | rm -rf /tmp/* | ||
+ | rm / | ||
+ | umount -l -f /proc | ||
+ | umount -l -f /sys | ||
+ | umount /dev/pts | ||
+ | </ | ||
+ | |||
+ | 14. Now replace the sources.list with the original sources.list | ||
+ | |||
+ | < | ||
+ | cp jaunty/ | ||
+ | </ | ||
+ | |||
+ | 15. Repack squashfs: | ||
+ | |||
+ | < | ||
+ | mksquashfs remaster image/ | ||
+ | </ | ||
+ | |||
+ | 16. Recreate filesystem.manifest & filesystem.manifest.desktop: | ||
+ | |||
+ | Run the following commands. | ||
+ | |||
+ | < | ||
+ | chroot remaster dpkg-query -W --showformat=' | ||
+ | cp -v image/ | ||
+ | REMOVE=' | ||
+ | for i in $REMOVE | ||
+ | do | ||
+ | sed -i "/ | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | 17. Recreate md5sum | ||
+ | |||
+ | < | ||
+ | cd image && find . -type f -print0 | xargs -0 md5sum > md5sum.txt | ||
+ | </ | ||
+ | |||
+ | 18. Copy filesytem.squashfs manifest to imag dirtorey | ||
+ | |||
+ | Recreate the iso image: | ||
+ | |||
+ | < | ||
+ | mkisofs -r -V " | ||
+ | cd .. | ||
+ | </ | ||
+ | |||
+ | Now your remastered ubuntu 9.04 jaunty is achived. | ||
+ | |||
+ | Now install the image on to a hard disk or use it as a liveCD/USB environment for recovery or general use. | ||
+ | ---- | ||
+ | You can also just use {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | Source: http:// | ||
howtos/building_a_custom_liveusb_2.txt · Last modified: 02/12/2018 21:34 by 127.0.0.1