Friday, January 18, 2013

How to make your USB drive bootable for Fedora 18 DVD ISO

Fedora 18


After more than year of usage of Fedora 16, I decided to install Fedora 18. Since my DVD ROM started to give me problems few months ago, I decided to install Fedora 18 from USB drive. I had good experience with installing Ubuntu from USB drive. I used UNetbootin to make USB drives bootable. I tried same thing for Fedora 18 DVD. USB drive became bootable. But installer failed with "failed to mount /dev/root". Same problem with Fedora Live USB Creator.


Workaround for this is using "dd" and completely create partition table on USB drive.  
Note:
This will erase all data in the drive.   
Step 1: Plug your USB drive and give a "fdisk -l" as root. You need to identify the device name of your USB drive with this.

[root@kasendra kasun]# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4db0b0f5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1050623      524288   83  Linux
/dev/sda2         1050624   365094911   182022144   83  Linux
/dev/sda3       365094912   373483519     4194304   82  Linux swap / Solaris
/dev/sda4       373483520   625141759   125829120   83  Linux

Disk /dev/sdc: 15.8 GB, 15829303296 bytes
255 heads, 63 sectors/track, 1924 cylinders, total 30916608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007482d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    30916607    15457280    7  HPFS/NTFS/exFAT
[root@kasendra kasun]#

My USB drive device name is /dev/sdc. It is 16GB device.

Step 2: You need to use dd to dump ISO file to USB drive with "dd if=/path/Fedora-18-x86_64-DVD/Fedora-18-x86_64-DVD.iso of=/dev/sdc bs=8M" as root .

Note:  
It is not sdc1. It is sdc only.
 
This will take couple of minutes. You can have tea and come back.


[root@kasendra kasun]# dd if=/home/kasun/Downloads/Deluge/Fedora-18-x86_64-DVD/Fedora-18-x86_64-DVD.iso of=/dev/sdc bs=8M
545+1 records in
545+1 records out
4573888512 bytes (4.6 GB) copied, 530.617 s, 8.6 MB/s
[root@kasendra kasun]# 


Step 3: Now issue a "fdisk -l" again. You can see new "GUID Partition Table (GPT)" type partition table on USB drive.


[root@kasendra kasun]# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4db0b0f5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1050623      524288   83  Linux
/dev/sda2         1050624   365094911   182022144   83  Linux
/dev/sda3       365094912   373483519     4194304   82  Linux swap / Solaris
/dev/sda4       373483520   625141759   125829120   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 15.8 GB, 15829303296 bytes
255 heads, 63 sectors/track, 1924 cylinders, total 30916608 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4b135c9a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           0     8933375     4466688    0  Empty
/dev/sdc2            2748       14895        6074   ef  EFI (FAT-12/16/32)
/dev/sdc3           14896       63535       24320    0  Empty
[root@kasendra kasun]#

Sometimes you may get something like this also.

Disk /dev/sdc1: 4573 MB, 4573888512 bytes
255 heads, 63 sectors/track, 556 cylinders, total 8933376 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4b135c9a

     Device Boot      Start         End      Blocks   Id  System
/dev/sdc1p1   *           0     8933375     4466688    0  Empty
/dev/sdc1p2            2748       14895        6074   ef  EFI (FAT-12/16/32)
/dev/sdc1p3           14896       63535       24320    0  Empty


Now your USB drive is ready to boot. If you need to make your USB dribe back to normal, use GParted and delete "GPT" type partition table. Then create "msdos" type partition table. Then create a partition.

No comments: