Platform Builder Help provides instructions for setting up a floppy disk to boot using BIOSLoader. Really a floppy disk? Who uses a floppy disk anymore? Many of us need to boot from more modern storage devices, especially devices that are readily available for purchase. This article will focus on USB mass storage devices, also known as USB Keys or USB Sticks.
For those of you who have been working with x86 Wintel boxes for years, setting up a boot device is probably simple. But, many of us are just starting with x86 now that Intel has created the new Atom low power processors. This means that we need to get back to the roots of booting an x86 with a BIOS. Those of us who are moving to Atom from other architectures, like ARM, are used to putting a bootloader at the reset vector to boot a system.
For x86, the BIOS handles the reset vector. Then the BIOS looks for a storage device that contains boot code in the Master Boot Record (MBR). That means that to boot from a USB stick, we need to format the stick and put the BIOSLoader in the MBR. I have experimented with several ways of doing this from my PC running Windows XP Professional and was not successful with any of them. What I found that works is booting my x86 system to DOS and using DOS to set up the USB key.
Here is how I set up the USB key to boot with BIOSLoader:
1. Setup a DOS bootable USB key
i. Set the File System to FAT. I found that using a USB key less than 2GB is necessary for FAT to be available as an option
ii. Select Create a DOS startup disk
b. Include the following files from the FreeDOS distribution:
i. Attrib.com
ii. Format.exe
iii. Fdisk.exe
c. Copy the files from %_WINCEROOT%\PLATFORM\CEPC\SRC\BOOTLOADER\BIOSLOADER\DISKIMAGES\SETUPDISK to the USB Key. Exclude the following files: attrib.exe, fdisk.exe and format.com. These files will cause the following steps to fail.
d. Modify Mkdisk.bat to remove the ‘:’ at the end of the line “if exist bldr goto Xfer:”. FreeDOS doesn’t like that, but apparently MS-DOS is okay with it.
2. Boot the system to DOS with the target USB key also plugged in to a USB port
3. At the DOS prompt run fdisk to create a primary DOS partition on the target USB key (not the USB key that you are running DOS from)
a. Select ‘N’ when asked “Do you want to use large disk (FAT32) support” unless your BIOS supports FAT32. The rest of these instructions will focus on FAT.
b. Select Change current fixed disk drive and select the target disk from the list
c. Select delete partition or Logical DOS Drive and delete the existing partitions
d. Select create partition or Logical DOS Drive
i. Select Create Primary DOS Partition
ii. Select a size less than 2GB – I used 1024 Megabytes
e. Select set active partition and make the new partition the active partition
f. Exit fdisk
g. Reboot the system
4. Format the disk by running “Format D:”. Of course use the appropriate drive letter for your USB key
5. Setup the disk to run BIOSLoader by running “mkdisk D:”
6. Put your nk.bin on the USB Key
7. Remove the DOS USB Key and reboot
Copyright © 2009 – Bruce Eitman
All Rights Reserved