Saturday 31 March 2007

System Builder Tip: Creating a Bootable USB Drive

UPDATE 2011-05-27: Create A Bootable USB Flash Drive Larger Than 4 GB. This is the up to date method that we use now.

Normally we would hunt for the HP Windows-based Format Utility for HP Drive Key or DiskOnKey USB Device (HP has killed the link - Bay Wolf has a copy of the utility available for download). After downloading, creating a floppy boot disk, one could format a USB flash drive to boot from.

That is the method we have been using to date.

The following method, as authored by Marwan Shaher is another method that was pointed to by a support page on Intel's site. It utilizes FDisk and Format.com to create the bootable drive by essentially using the USB Flash disk as the only drive attached to the system, thus mimicing a fixed disk. Excellent method.

Marwan Shaher's original Web page: Bootable USB Drive.

Here is his method:

  • A computer with a BIOS that allows for booting from a USB port.
I used a Dell Optiplex GX260 that has a Phoenix ROM BIOS Plus version 1.10 revision A05.

  • A Bootable floppy disk or CD.
I used a Windows 98 bootable CD. For those who have Dell systems, you can also use the bootable Dell Optiplex Resource CD that is used to reinstall your system with Windows 98.


  • Utilities with the ability to create a master boot record, create partitions, set active partitions, and format and transfer boot files to the active partition
I used the DOS FDISK and FORMAT that are on the Windows 98 CD.

  • Of course, the USB drive that you want to make bootable
I used a 256MB SanDisk Cruzer Mini USB Flash Drive.

Directions

  1. Make the USB drive the first in the drive sequence.
    • Why?? fdisk does not allow for a partition to be set as ACTIVE (bootable) unless it is the first drive. It is most likely that your hard drive(s) is set as the first drive. This needs to be changed.
    • How?? Setting your USB drive to be the first in the drive sequence can be done by following ONE of the methods below. No matter which method you follow, the computer MUST be booted with the USB drive plugged in into the computer. Take a note of how the options that you are about to change were set before, as they will need to be changed back later.
    • Method # 1. BIOS drive sequence option.
      Depending on your BIOS, there may be an option to change the drive sequence. On mine, there was an option labeled "Hard-Disk Drive Sequence". If your BIOS has this or a similar option, make sure you change the sequence so that the USB Drive is listed first.
    • Method # 2. Disabling other hard drives.
      Again, this is done from the BIOS. Different BIOS's may have different options to disable the hard drive. On mine, the system had just one hard drive. I changed the option labeled "Primary Drive 0" to "OFF".
    • Method # 3. Unplugging the hard drives.
      If your BIOS doesn't have an option to change the drive sequence or to turn off the hard drive, you can turn off your computer and unplug your hard drive(s). Make sure you know what you are doing here. Opening your computer case may result in voiding your computer warranty if you have one.
  2. Boot the computer from the boot floppy/CD into the command prompt with the USB Drive plugged in.
  3. Run fdisk
  4. Use fdisk's "Set Active Partition" (option 2) to set the primary partition on the USB Drive to ACTIVE.
    This step assumes that a primary partition already exists on the USB Drive. If this is not the case, use fdisk to create one. As noted in step # 1, fdisk will not allow for setting the the partition to ACTIVE unless the drive the partition is on is the FIRST in the drive sequence.
  5. Exit fdisk.
  6. Reboot the computer from boot floppy/CD into the command prompt with the USB Drive plugged in.
  7. At the command prompt enter the following command: dir c:
    This step is just to verify that the C: drive is actually the primary partition on the USB Drive. Regardless of the result that the command generates whether it be a listing of files or an error message, what is important here is to make sure that the size of the primary partition on the USB Drive is roughly equal to the sum of the empty space and the used space.
  8. Format and copy the boot files to the primary partition.
    At the command prompt, from the directory where FORMAT.COM is located, enter:format /s c:
  9. Run fdisk /mbr
    "fdisk /mbr" writes the master boot record, in this case to the USB drive, without altering the partition table information.
  10. Restart the computer and choose booting from the USB Drive. If all goes well, you should see a C:> command prompt.
  11. Change the computer settings back to what they were before step # 1.

Well done sir!

UPDATE 2011-05-27: Create A Bootable USB Flash Drive Larger Than 4 GB. This is the up to date method that we use now.

Philip Elder
MPECS Inc.
Microsoft Small Business Specialists

2 comments:

Anonymous said...

Marwan Shaher's original Web page (http://ucsu.colorado.edu/~shaher/Bootable_USB.html) is also history. You can see it now at http://www.marwanshaher.com/

Anonymous said...

Update: the link to the original page is now at www.marwanshaher.com/BootableUSB_old.html. The page at www.marwanshaher.com/ shows how to use Linux to create a ext3 bootable USB drive that installs a Linux distro.