Monday, April 28, 2008

Live USB

This article will show how to create Live USB stick with Ubuntu Hardy Heron. Read more on live USB.

Requirement: USB bar > 700 MB. Any working Linux machine.

1. Get Ubuntu Hardy iso image as per your CPU requirement (x86, AMD64 etc).


2. Format USB stick to ext2
using Gparted or fdisk . Set the boot flag too.

( If you have extra space then you may choose to create another partitions too.)

3.Mount downloaded iso as loopback from root privileges.
#mount -o loop downloaded.iso /mount_dir

4.Copy iso's content in to USB.

#cd /mount_dir

#cp .disk/ casper/ dists/ install/ pics/ pool/ preseed/ README.diskdefines ubuntu /path_to_usb/

NOTE: Please note .disk is hidden directory. Copying *.exe and isolinux is not required as we shall use extlinux as boot loader for USB.

5. Create extlinux dir in USB.

#mkdir /path_to_usb/extlinux

6. Install extlinux at USB. This requires extlinux utility on your box. If you dont have this then please install syslinux package using your package manager ie yum/apt-get/synaptic/emerge etc.

#extlinux -i /path_to_usb/extlinux

7.Create /path_to_usb/extlinux/extlinux.conf and write below content in that.

DEFAULT /casper/vmlinuz
GFXBOOT bootlogo
APPEND file=/preseed/ubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash --

Thats it!!
Now you can boot any machine which is USB boot capable from Live-USB by selecting "Boot from USB" or "Boot from ZIP-HDD" from bios boot menu.

For more info on extlinux/isolinux/syslinux bootloaders please visit extlinux wiki .

No comments: