Creating a bootable USB drive

Posted: July 5, 2012 in Computers

Since I work with Linux and some cutting edge stuff, several times a year I have to build or rebuild a server.  Yesterday I was putting the finishing touches on the hardware for a 36TB media server i’ve been building lately and needed to put Ubuntu on it to bring everything to life.  Well, my primary machine is a Windows laptop and I haven’t installed a CD drive on a server in years so I install with USB.  For some reason, I can never get those utilities to work.  I’ve tried LiLi USB Creator, I’ve tried Unetbootin, I’ve tried everything and none of them work in creating a bootable USB drive.  Sure, some people get them to work, but not me.

So, because of that, I have come up with a process that I use that works every time.  Without fail.

First, you must delete all partitions on the USB drive.  I mean everything.  Windows in its infinite wisdom does not allow you to do this thru normal means so you must do it from a command line.

Click Start>Programs>Accessories  Right click on Command prompt and click on “Run As Administrator”

Now, you use a program called diskpart to delete the partions on your USB drive.  Be careful here, this program will just as easily delete your system or any other partitions so make sure you are selecting the correct drive to wipe out.

C:\Windows\system32>diskpart

Microsoft DiskPart version 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: WORKSTATION

DISKPART> list disk

Disk ###  Status         Size     Free     Dyn  Gpt
--------  -------------  -------  -------  ---  ---
Disk 0    Online          465 GB      0 B
Disk 1    Online           14 GB  1500 MB

DISKPART> select disk 1

Disk 1 is now the selected disk.

DISKPART> list partition

Partition ###  Type              Size     Offset
-------------  ----------------  -------  -------
Partition 1    Primary           1501 MB    31 KB
Partition 0    Primary             11 GB  3002 MB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> delete partition

DiskPart successfully deleted the selected partition.

DISKPART> list partition

Partition ###  Type              Size     Offset
-------------  ----------------  -------  -------
Partition 1    Primary             11 GB  3002 MB

DISKPART> select partition 1

Partition 1 is now the selected partition.

DISKPART> delete partition

DiskPart successfully deleted the selected partition.

Now, you can download your favorite ISO.  99% of the time I’m using Ubuntu server so I download the latest bootable ISO, and I also get another program called “physdiskwrite”

In that same administrator command prompt, navigate to where you downloaded the ISO and run physdiskwrite.  An example would be:

physdiskwrite -u FreeNAS-i386-embedded

This does a byte by byte copy to the USB drive, resulting in in essence, a bootable CD written to the USB.  From here, make sure your bios is ready to boot from USB and boot it up.

Enjoy
Phantom.