Create bootable USB drive with Fedora 11

by jagbir on June 18, 2009

Here are quick steps on CentOS 5.3 box (should be identical on any RH based distro) to create a bootable USB stick of latest Fedora 11 distrubution:

1. Check whether required tools are already installed or not:

# rpm -q livecd
<no output>

2. Install tools:

# yum install livecd-tools

3. Insert your USB stick in one of USB port, it should get automatically detected and mounted. Make sure your stick has atleast 1 GB free space. Jump to step #7 as it’s absolutely not necessary to format it, but if there’s no worthy data in and you are willing to clean it completely before moving forward, here is the way to proceed after unmounting it:

# fdisk -l /dev/sda
Disk /dev/sda: 4043 MB, 4043309056 bytes
125 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes

Device Boot      Start         End      Blocks   Id  System

4. Proceed to format:

# fdisk /dev/sda
Command (m for help): d
No partition is defined yet!
Command (m for help): n
Command action
 e   extended
 p   primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-1018, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1018, default 1018):
Using default value 1018
Command (m for help): a
Partition number (1-4): 1
Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 6
Changed system type of partition 1 to 6 (FAT16)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
Syncing disks.

## here, after initiating fdisk with USB device controller ie /dev/sda (it may be different in your machine, Please make sure you choose correct). We tried deleting (d) any existing partitions, then create new one (n) of type primary (p) with all avaialbe size. Then make this partition active (a) and assign (t) filesystem FAT 16 (6) to it. Save these changes or write these changes to device by pressing w.

5. Issue parprobe to detect new changes and check:

# partprobe
# fdisk -l /dev/sda
Disk /dev/sda: 4043 MB, 4043309056 bytes
125 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes
 Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1018     3944719    6  FAT16

6. Format USB stick partition (sda1) with FAT file system and mount it:

# mkdosfs -n usbdisk /dev/sda1
mkdosfs 2.11 (12 Mar 2005)
# mount /dev/sda1 /mnt/cam
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda2              43G   17G   24G  42% /
/dev/hda5              51G   20G   29G  41% /var
tmpfs                 248M     0  248M   0% /dev/shm
/dev/sda1             3.8G  4.0K  3.8G   1% /mnt/cam

7. USB stick is ready for use, you should have ISO image of Fedora 11 in your machine to proceed. If you didnt downloaded yet, get it from here. I’m a kde fan, if you too, grab it from here.

8. Start the actual process of creating bootable and transferring files now. The command syntax is: livecd-iso-to-disk <ISO File path> <USB Device>:

# livecd-iso-to-disk F11-i686-Live.iso /dev/sda1
Verifying image...
F11-i686-Live.iso:   f21debace1339dbdefff323064d40164
Fragment sums: c22bcc22b29728f2a7136396121621caf6c18169f3326e5c7e66153cd57e
Fragment count: 20
Percent complete: 100.0%   Fragment[20/20] -> OK
The supported flag value is 0
The media check is complete, the result is: PASS.
It is OK to install from this media.
Copying live image to USB stick
Updating boot config file
Installing boot loader
USB stick set up as live image!

9. All Done! grab any PC available sideby and restart it (after saving fellows work :). Go to BIOS menu, change boot option from HDD/CD to USB Drive, insert USB stick in one of avaiable USB ports. Start the PC and enjoy!!

  • Stephan Keller

    an other possibility for create bootable USB drive: Unetbootin



  • forestmountain

    If using Fedora you install “Fedora LiveUSB Creator”. In this utility you can select already downloaded ISO or select and download a fedora/sugar distro from within the application. You select your attached USB drive, select how much persistent storage you need and you are now ready to create your Live USB drive. Couldn’t be any easier…

Previous post:

Next post: