Make Ubuntu system LiveCD to start

Source: Internet
Author: User
There are many tools for creating LiveCD packages, among which UCK and Reconstructor are well known. But these two tools can not make the current operating system into LiveCD, back up the current operating system, and made LiveCD tool also has, such as the Chinese language compiled tool UClone, its usage instructions in http://upc.gg.blog.163.com/blog/static/2979

There are many tools for creating LiveCD packages, among which UCK and Reconstructor are well known. However, neither of these tools can make the current operating system LiveCD, back up the current operating system, and make LiveCD tools, such as the UClone tool compiled by Chinese people /. Here I want to introduce another method, which can package the current operating system and make it LiveCD.

 

Make LiveCD package, need to be the same as the current Ubuntu version of topdiso installation package, I used here is the ubuntu-10.10-desktop-i386.iso, this ISO file is actually a ready-made LiveCD, we just need to use its structure, you can easily and quickly generate your own minimum system LiveCD. The main thing to do here is to first back up the files on the installed operating system into a squashfs archive file, and then copy the content in the ubuntu-10.10-desktop-i386.iso, replace the existing files with the new squashfs file, adjust some configurations, generate a new ISO file, and then burn it into a CD or a USB boot disk, this process is a success.

 

However, if the current operating system is relatively large, for example, 8 or 9G, what will happen, I did not test it, so it cannot be guaranteed that such LiveCD will be able to run well.

 

1. there are many tools to back up the current operating system into squashfs archive files, the easiest of which is Live Ubuntu BackupV2.2, especially it also supports Chinese prompts in http://forum.ubuntu.org.cn/viewtopic.php? F = 21 & t = 206287 can be downloaded and instructions for use. This is an Ubuntu backup tool written in shell scripts. run it directly.

Copy lub to/home, $ sudo chmod 777/home/lub, run $ sudo/home/lub-B, and then press e or c to select an English prompt, or a Chinese prompt. During the first execution, you may be prompted to install lupin-casper and squashfs-tools, in which lupin-casper can be ignored, while squashfs-tools must be installed, run $ sudo apt-get installsquashfs-tools.

Run $ sudo/home/lub-B again and follow the prompts to generate a backup-2011.01.05 directory in the user folder, where some backup-2011.01.05.squashfs files are what we want.

 

2. copy the ubuntu-10.10-desktop-i386.iso to the user directory, such as/home/jxg,

Run $ sudo mkdir/home/jxg/mnt to create a directory,

Then run $ sudo mount-o loop/home/jxg/ubuntu-10.10-desktop-i386.iso/home/jxg/mnt to mount ISO to/home/jxg/mnt, run $ sudo mkdri/home/jxg/livecd to create a livecd working directory.

Use $ sudo rsync -- exclude =/home/jxg/mnt/casper/filesystem. squashfs-a/home/jxg/mnt // home/jxg/livecd except the content in/home/jxg/mnt for casper/filesystem. squashfs, synchronized to the/home/jxg/livecd Directory

Next, we want to file system in the/home/jxg/livecd/casper/directory. squashfs, filesystem. manifest, filesystem. manifest-desktop: These three files only have read permission. Therefore, run $ sudo chmod o + w/home/jxg/livecd/casper/filesystem first. *

 

Copy the backup-2011.01.05.squashfs file generated by lub to/home/jxg/livecd/casper/filesystem. squashfs

Run: $ sudo cp/home/jxg/backup-2011.01.05/backup2011.05.squashfs/home/jxg/livecd/casper/filesystem. squashfs

In addition, you must update filesystem in the/home/jxg/livecd/casper/directory. manifest and filesystem. manifest-desktop. these two files are actually the list of packages installed by the system. update them as follows:

$ Sudo dpkg-l | grep ii | awk '{print $2, $3}'>/home/jxg/livecd/casper/filesystem. manifest

$ Sudo dpkg-l | grep ii | awk '{print $2, $3}'>/home/jxg/livecd/casper/filesystem. manifest-desktop

In fact, filesystem. manifest-desktop and filesystem. manifest is different, primarily because the ubiquity casper live-initramfs user-setup discover1 xresprobeos-prober libdebian-installer4 is missing these packages, which we ignore here.

 

3. the returned LiveCD's working directory/home/jxg/livecd,

Run $ sudo rm md5sum.txt.

Run $ find-type f-print0 | sudo xargs-0 md5sum | grep-v./isolinux/| grep-v./md5sum.txt | sudo tee md5sum.txt

Update the original md5sum

 

4. package the contents in the working directory into ISO

Run $ sudo apt-get install mkisofs to install the ISO packaging tool first,

 

Run $ sudo mkisofs-D-r-V "$ IMAGE_NAME"-cache-inodes-J-l-bisolinux/isolinux. bin-c isolinux/boot. cat-no-emul-boot-load-size 4-boot-info-table-o .. /ubuntu-jxg-test.iso.

This must be executed at the bottom of the working directory, and the last command must not be forgotten. After the command is complete, you can find the ubuntu-jxg-test.iso file under the Directory of the upper level.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.