How To Boot From a USB Device

Ask a question
USB drives are used to connect a wide variety of external hardware to a computer for storing and sharing pieces of data across multiple computers. USB drives can also be used to set up a thumb drive as a booting device for BIOS as well.

For this, the thumb drive needs to be formatted in FAT format and must have the required boot sector file residing on the drive itself.

This article will walk you through the process of booting from a thumb drive.


Booting from a USB Device

Getting Boot Sectors

To be able to boot from a device, you will need boot sectors. Boot sectors contain the information needed by the BIOS to enable it to boot using the device.

Using a Floppy Disk Formatted in Windows

Before you can make a USB device bootable, you will need to get your hands on a bootable floppy. In all current Windows versions (including Windows 2000 and XP) you can do that by formatting a floppy disk.


Open Windows Explorer, and right-click the A: drive. Choose Format from the popup menu.

In the window that appears, check the Create an MS-DOS startup disk option.

Make sure Windows is formatting the right drive: it should show Format 3½ Floppy (A:). Once you're sure about the drive, click the Start button. Windows will now format the disk and make it bootable.

Extracting Floppy Disk Boot Sectors

After creating the bootable floppy, you will now need to extract the boot sectors from this floppy using Bart's MKBT.


To do so, open a DOS Window and go to the directory where you extracted MKBT.

Type mkbt -c a: bootsect.bin as shown in the example below:

C:\Windows\System32\cmd.exe     
D:\Downloads\mkbt20>mkbt -c a: bootsect.bin

Copy boot sector mode (-c)

D:\Downloads\mkbt20>     

N.B.: Here a represents the drive that holds the newly made bootable floppy. Once the command prompt returns, you will have a boot sector stored in the file bootsect.bin. Do not close this DOS window yet; you will need it again later in the process.

Using Images from Bootable Floppies

On the Internet you can find a lot of bootable disks. Take a look at the BootCD.info website, where you will find plenty of floppy disk images and tools to write these images to floppy disk. Most of these disks are specialized, for example direct network access, packed with handy tools and more. One of the best network enabled bootdisks is Bart's Network Boot Disk.

Follow the instructions there on how to make a bootable floppy.

N.B.: Some .BAT files refer to the A: drive directly. This can cause problems during boot.

Preparing the Thumb Drive

Format the thumb drive in the same format that you formatted the floppy disk, i.e. FAT.

Right-click the drive letter of the thumb drive, and select Format. Select the proper format (FAT), and click Start.

Copy the Boot Sectors to the Thumb Drive

Thanks to MKBT by Bart, you can now easily copy the boot sectors onto the USB thumb drive.

You can download the file online.

Open a DOS Window, and go to the directory where you extracted MKBT.

Type mkbt -x bootsect.bin G: as shown in the example below, remembering to change G: to the drive corresponding to your thumb drive:

C:\Windows\System32\cmd.exe     
D:\Downloads\mkbt20>mkbt -x bootsect.bin g:

Copy Files to the Thumb Drive

Now that the drive is bootable, you can put the essential files onto it. Copy all of the files that you put on the A: drive earlier on to your thumb drive.


Be warned that if your floppy has a .BAT or CONFIG.SYS file and they use absolute path referencing to the A: drive, this could be a problem.

Restart and Go Into the BIOS

Restart your PC, and go into the BIOS by pressing the [Del] button on your keyboard. ([F1], [F2], [Insert], and [F10] are all alternative keys that may be used here, depending on your model. Sometimes the PC will display a message telling you which key to press.)

N.B.: Some laptops allow you to set the boot devices using a Windows application. Toshiba, for example, does this with some of their laptops. The application is either a standalone application or an applet in the Control Panel.

BIOS Settings

Depending on the BIOS of your computer, you can set the USB stick as a boot device. If your PC's BIOS does not seem to support this, check if there is an update available. For some reason, most BIOS prefer to refer to the thumb drive than to a USB Removable Floppy Disk or to a USB Zip Disk.


If the settings mentioned do not seem to work with your PC, then do the following procedure.

Go into the BIOS, and go to the page that determines the boot order. (It is usually called Advanced Setup, Boot options, or Feature Setup.)

Try all USB drive variants. Start with USB ZIP, then USB FDD, USB HDD, etc.

To speed up the testing, disable all other boot devices. This goes for the 2nd, 3rd etc, but also for Alternative boot devices.

AMI BIOS

AMI refers to AMIBIOS Simple Setup Utility.

To access it, go to Feature Setup and enable the USB Function Support, USB Function For DOS, and ThumbDrive for DOS options.

Go to Advanced Setup, and set the 1st Boot Device to USB RMD-FDD.

Reboot the PC. It should now boot from the thumb drive.

If this doesn't work, go to USB Mass Storage Device Configuration > Emulation Type and set it to Hard disk.

Go to the Boot Menu, and set the 1st boot device to USB-Stick.

Now you can exit the BIOS after saving the changes. If this does not seem to work, then you can try setting the Emulation Type value to Floppy or Forced FDD.

Phoenix/Award BIOS

To access the Phoenix/Award BIOS, go to Advanced BIOS Features<bold>.

Go to the <bold>1st Boot device
, and set it to USB-ZIP.

Sometimes the device is listed as a USB hard drive under the hard drives menu. Finish by rebooting.

What Is MKBT?

Introduction to MKBT

MKBT is used for installing boot sectors. It supports FAT, NTFS, and RAW boot sectors. It allows you to transfer a boot sector to floppy images. This allows you to create a bootable 2.88MB floppy image without needing a 2.88MB floppy drive.


MKBT is compiled as a Win32 executable and runs on Windows 95/98/ME (FAT) and Windows NT4/2000/XP (FAT and NTFS).

MKBT copies parts of the boot sector. The boot sector, the very first sector of a floppy disk, is 512 bytes long and looks like this:
FAT Boot sector
Offset Length Meaning
0x0 3 bytes Jump instruction
0x3 8 bytes OEM Name
0xB 25 bytes BIOS parameter block
0x24 26 bytes Extended BIOS parameter block
0x3E 448 bytes Bootstrap code
0x1FE 2 bytes End of sector marker

The BIOS parameter block and extended BIOS parameter block contains the information:
BIOS parameter block for FAT volumes
Offset Length Meaning
0xB 2 bytes Bytes per sector
0xD 1 byte Sectors per cluster
0x0E 2 bytes Reserved sectors
0x10 1 byte Number of FATs
0x11 2 bytes Root entries
0x13 2 bytes Small sectors
0x15 1 byte Media type
0x16 2 bytes Sectors per FAT
0x18 2 bytes Sectors per track
0x1A 2 bytes Number of heads
0x1C 4 bytes Hidden sectors
0x20 4 bytes Large sectors

Extended BIOS parameter block for FAT volumes
Offset Length Meaning
0x24 1 byte Physical disk number
0x25 1 byte Dos: Current head
NT: Dirty flag
0x26 1 byte Signature
0x27 4 bytes Volume serial number
0x2B 11 bytes Volume label
0x36 8 bytes Filesystem ID

Command Line Syntax

The command line syntax is as follows:


Usage:
mkbt [switches] <source> <target>

<source> The source file/drive which contains the boot sector to install
<target> The target file/drive to install the boot sector on

Switches: -v Verbose mode
-c Copy mode (no install) used for copying the
boot sector(s)
-x Expert mode (do not check drive A or B only)
USE WITH CAUTION!
-l=<xxx> Set Volume Label to <xxx>

Returns errorlevel 0 when OK, 1 when some error occurred.

Examples:
To install boot sector from file "bootsect.bin" onto drive A:
-> mkbt c:\os\dos622\bootsect.bin a:

To install boot sector from file "bootsect.bin" onto floppy image "288.img"
-> mkbt c:\os\dos622\bootsect.bin c:\tmp\288.img

To copy boot sector from a bootable floppy in drive A: to a file called
"bootsect.bin"
-> mkbt -c a: c:\os\dos622\bootsect.bin

Installing a Boot Sector

To install a boot sector, MKBT follows the following steps.


First, it reads the source sector in buffer 1. Then, it reads the target sector in buffer 2. Then, it transfers the boot sector parts from buffer 1 to buffer 2. Finally, it writes buffer 2 to target sector.

Copying the Boot Sector

MKBT v1.3 (and higher) has a Copy boot sector option, which copies the complete boot sector. Previous versions only copied those sections that where needed to install it.

Thanks to spikerboys for this tip on the forum.

Add music to your Nintento DS
How To Format a USB Flash Drive