Code Repo    |     RSS
MD's Technical Sharing



Tuesday, November 4, 2008

Ubuntu on a USB thumb drive

1. Download Ubuntu live CD from http://www.ubuntu.com/getubuntu/download. We are using Ubuntu 7.10
2. Extract all files in the ISO files to a USB thumb drive (size at least 1GB)
3. We'll need a bootloader which makes the thumb drive bootable and will load the ubuntu kernel image into memory. Download syslinux from http://www.kernel.org/pub/linux/utils/boot/syslinux/.
4. Make sure that the thumb drive is FAT/FAT32 formatted, and not NTFS.
5. Assuming the thumb drive is F:, run the following command:Syslinux -ma F:
6. This will copy the bootloader to F: and create a file name ldlinux.sys having System & Hidden attribute

7. Create the boot loader configuration file, named syslinux.cfg, located in the root drive of F:\, containing the following:

    default ubuntu

    prompt 1

    timeout 40

    label ubuntu

    kernel vmlinuz

    append file=/cdrom/preseed/ubuntu.seed boot=casper initrd=initrd.gz --

    For more information on the syntax of the file, see http://members.chello.at/bobby100/ILpart1.htm


8. Move the kernel and the ram disk image (vmlinuz & initrd.gz) from the casper folder to the root directory.
9. Setup BIOS to boot from the thumb drive
10. Reboot and Ubuntu will start from the thumb drive.

An alternative is to use Slax (http://www.slax.org/), a portable Linux solution.

Reference:
http://www.sandaru1.com/2007/07/02/how-to-convert-your-live-cd-iso-into-a-live-usb/

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.