Posted by: h4ck@lyst | June 24, 2009

Creating LIVE USB/bootable gparted on usb using linux

I used the following tips found at
http://gparted.sourceforge.net/liveusb.php
to burn a live image of gparted onto my usb pendrive and to make it bootable..

Extract files and make USB flash drive bootable under GNU/Linux

* Choice 1 (Manually):
1. Prepare an USB flash drive or USB hard drive or external disk which has a partition using FAT (either FAT16, FAT32) file system. If the USB flash drive or USB hard drive does not have any partition, you can use disk tool (e.g. gparted, fdisk, cfdisk or sfdisk) to create a partition with size 200 MB or more, Here we assume your USB flash drive or USB hard drive is /dev/sdd (You have to comfirm your the device name, since it’s _NOT_ always /dev/sdd) on your GNU/Linux, so the partition table is like:

# fdisk -l /dev/sdd
Disk /dev/sdd: 12.8 GB, 12884901888 bytes
15 heads, 63 sectors/track, 26630 cylinders
Units = cylinders of 945 * 512 = 483840 bytes
Disk identifier: 0x000c2aa7

Device Boot Start End Blocks Id System
/dev/sdd1 * 1 26630 12582643+ b W95 FAT32

Then format the partition as FAT (e.g. “mkfs.vfat -F 32 /dev/sdd1” WARNING! Executing it incorrectly could cause your GNU/Linux not to boot. Confirm the command before you run it.).

# mkfs.vfat -F 32 /dev/sdd1
mkfs.vfat 2.11 (12 Mar 2005)

2. Insert your USB flash drive or USB hard drive into the USB port on your Linux machine and wait a few seconds. Next, run the command “dmesg” to query the device name of the USB flash drive or USB hard drive. Let’s say, for example, that you find it is /dev/sdd1. In this example, we assume /dev/sdd1 has FAT filesystem, and it is automatically mounted in dir /media/usb/. If it’s not automatically mounted, manually mount it by “mkdir -p /media/usb; mount /dev/sdd1 /media/usb/”.
3. Unzip all the files, and copy them into your USB flash drive or USB hard drive (You can make it by the command like: “unzip gparted-live-0.4.5-2.zip -d /media/usb/”). Keep the directory architecture, for example, file “COPYING” should be in the USB flash drive or USB hard drive’s top directory (e.g. /media/usb/COPYING).
4. To make your USB flash drive bootable, first change the working dir, e.g. “cd /media/usb/utils/linux”, then run “bash makeboot.sh /dev/sdd1” (replace /dev/sdd1 as your USB flash drive device name), and follow the prompts to finish that. WARNING! Executing it with wrong device name could cause your GNU/Linux not to boot. Confirm the command before you run it. (There is a known problem if you run makeboot.sh on Debian Etch, since the program utils/linux/syslinux does not work on that. Make sure you run it on newer GNU/Linux, e.g. Debian Lenny, Ubuntu 8.04, Fedora 9…).
5. If your USB flash drive or USB hard drive is not able to boot, check (1) Is there any partition in your flash drive ? It must contain 1 partition at least. (2) The partition must be marked as “bootable” in the partition table. (3) The partition must be on the cylinder boundary

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: