If you need to boot a computer to DOS to flash the BIOS or perform some other task under DOS such as formatting a hard disk or running a DOS-based recovery program, here is how to do it.
1. Download and install RMPrepUSB v2.1.622 or later
2. Insert a USB drive (hard disk or Flash drive) into the same computer and run RMPrepUSB
3. Select the USB drive in the top selection box and then set the options numbered 1 to 5 as follows:
4. Now click on the 6 Prepare Drive blue button
5. When the drive has been formatted, click on the Install grub4dos button and follow the prompts (choose MBR option or PBR option).
6. Now copy your BIOS Flash tools (typically a .exe file and a .ROM file) to the USB drive.
The USB drive is now ready to test. You can do this by pressing F11 when in RMPrepUSB. You should see a menu like the one below:
Note that you can choose to boot the USB drive either as a floppy (so you get the drive A: prompt), as hard disk 0 (so your computer hard disk will be the second hard disk when FreeDOS booots), or as hard disk 1 (so the computers hard disk will be the first hard disk and if you run FDISK or a DOS partition program, the first hard disk will be the computer's hard disk and not your USB drive).
Once you have booted to DOS, you can type DIR to list the files on the USB drive.
Note: If you receive a message 'Bad or missing Command Interpreter' then you may need to type in the path and name of COMFREE.COM - e.g. Type D:\COMFREE.COM.
Feel free to edit the menu.lst file to change the title to anything you like! See the grub4dos tutorial for how to do this and more details on how grub4dos works.
The 'boot chain' is - (MBR boot code) -> (grub4dos code and menu) -> KERNEL.SYS -> FDCONFIG.SYS -> COMFREE.COM -> FDAUTO.BAT
FreeDOS is booted by executing the file KERNEL.SYS (this is equivalent to the IO.SYS file when booting to MS-DOS).
KERNEL.SYS then looks for a CONFIG.SYS text file or an FDCONFIG.SYS text file. The commands inside this text file tell it what to do next.
In our case, it will load the shell COMFREE.COM (this is equivalent to the file COMMAND.COM when booting to MS-DOS).
When COMFREE.COM loads, it will look for a file called AUTOEXEC.BAT or FDAUTO.BAT. In our case we have FDAUTO.BAT and so commands in this file are executed.
The file GRLDR contains the grub4dos code and the text file menu.lst contains our grub4dos menu.
If you wish, to simplify the files, you can rename COMFREE.COM to COMMAND.COM and delete FDAUTO.COM and FDCONFIG.SYS. The 'boot chain' is then: KERNEL.SYS -> COMMAND.COM.
If you want to boot MS-DOS instead of FreeDOS, simply copy all MS-DOS (v7) files to the USB drive after following the steps above and then copy the IO.SYS file and overwrite the KERNEL.SYS file so that the file KERNEL.SYS will actually contain the contents of IO.SYS.
You will, of course, need to obtain the MS-DOS boot files (IO.SYS, COMMAND.COM, MSDOS.SYS, CONFIG.SYS) first.
RMPrepUSB can make a 1.44MB MS-DOS 7 floppy disk image containing the standard DOS boot files by extracting the floppy disk image from a standard Windows file within your Windows system.
1. Click Files - Create 1.44Mb Floppy DIsk Image - the disk image file DOSBOOT.IMA will be created and automatically highlighted in Windows Explorer.
2. Copy the DOSBOOT.IMA file to your USB boot drive and add the following menu.lst entries (use F4 in RMPrepUSB):
You will need to make your USB drive bootable by formatting it with RMPrepUSB (use the 2PTNs option) and installing grub4dos (use the Install grub4dos button).
Alternativrly, you can extract the boot files from the .ima file using 7Zip or WinImage, etc.
If you want to put both MS-DOS and FreeDOS onto the one USB drive and boot to either OS, simply copy the MS-DOS files to the USB stick after preparing it as above, and then edit the menu.lst menu text file and copy the FreeDos menu items 1 - 3 to make three more menu items (4, 5 and 6). Then edit the 3 new entries to change the titile and also change the KERNEL.SYS text in the menu item to IO.SYS. An example complete menu.lst is shown below which you can cut and then paste into the menu.lst file if you prefer.
DOS 6.22 and previous versions only support smaller FAT16 drives and are not recommended as they do not support larger disks.
For a book on using DOS 6.22 (Using MS-DOS 6.22 by Jim Cooper) see here.
DOS 6.22 bootable FAT16 drives can be made using RMPrepUSB as follows:
Please use RMPrepUSB version 2.1.639 or later - set FAT16 + MS-DOS + Use 64hd/32sec if possible (CHS) tick box to force use of type 6 if FAT16 is used.
For the grub4dos menu use:
Note that chainloader /io.sys does not work if 64/32 geometry is used when under QEMU! But you can fix it using (note there are two minus signs before each word):
If using an earlier version of RMPrepUSB
1. Format a drive as FAT16 - MS-DOS using RMPrepUSB - Note: this will create a type 0E FAT16 partition which DOS 6.22 does not understand!
2. Edit the Partition Type number in the drive partition table to 06 (RMPrepUSB uses 0Eh by default) - this can be done as follows:
a. Select the disk in the selection box that you want to edit
b. Run DiskDoctor from RMPrepUSB (type ALT+CTRL+F5 or CTRL-D)
c. Set Start=0 and No. Sectors=1
d. Click on the Sequential READ button and then the Display and Edit Buffer button
e. Edit the partition table byte 1C2 text in the form window
and change it from 0E to 06
f. Click on WRITE using Buffer to save the change
g. Check the change was made by clicking on the Sequential READ button again and then the Display and Edit Buffer button
h. Exit from DiskDoctor
3. Now copy over the DOS 6.22 files (at least IO.SYS, MSDOS.SYS and COMMAND.COM are required)
Note that if you have prepared the partition using DOS 6.22 boot volume code, the file IO.SYS must be the first directory entry and this must be followed by MSDOS.SYS (which contains code and NOT text as with later versions). However, if you use RMPrepUSB to prepare the drive, the files do not need to be in any particular order as long as they are in the root of the drive.
DOS 7 bootable drives can be FAT32 or FAT16. To prepare a DOS 7 bootable drive, use RMPrepUSB and the MS-DOS setting. RMPrepUSB installs DOS 7 compatible volume boot code. Then simply copy over the DOS boot files. At least, IO.SYS, MSDOS.SYS and COMMAND.COM are required. See the section below to obtain a DOS 7 boot image and boot from it.
If IO.SYS missing, -> 'Error!' (for 6.22 boot code, IO.SYS must be the first entry in the directory)
If MSDOS.SYS is missing -> 'Starting MS-DOS...' and non-flashing cursor if RMPRepUSB Dos 7 boot sector - OR 'Non-system disk or disk error, Replace and press any key when ready' if a DOS 6.22 boot sector is present.
1. Examine the first sector of the disk (0) - check it is a FAT16 type 06 (see above) if DOS 6.22 (use DiskDoctor or the Drive Info button)
2. Examine the start of the partition (P1), normally sector 63 or sometimes 32, to check the strings at the end of the sector are looking for IO.SYS.
3. Search the disk for the string .SYS using the DiskDoctor Search button (use 'Tio' as a search string and a start sector of 100) until you find the 32-byte directory entries which may look like this:
[Sector 1291] 0MB
0000 44 4F 53 36 32 32 20 20 - 20 20 20 28 00 00 00 00 DOS622 (....
0010 00 00 00 00 00 00 00 00 - 21 28 00 00 00 00 00 00 ........ !(......
0020 44 52 56 53 50 41 43 45 - 42 49 4E 20 00 22 2B 98 DRVSPACE BIN ."+˜
0030 54 40 54 40 00 00 C0 32 - BF 1C 03 00 F6 02 01 00 T@T@..À2 ¿...ö...
0040 41 55 54 4F 45 58 45 43 - 42 41 54 26 00 29 2B 98 AUTOEXEC BAT&.)+˜
0050 54 40 54 40 00 00 22 5D - 54 40 14 00 10 00 00 00 T@T@.."] T@......
0060 4D 53 44 4F 53 20 20 20 - 53 59 53 20 00 2C 2B 98 MSDOS SYS .,+˜
0070 54 40 54 40 00 00 C0 32 - BF 1C 15 00 FA 94 00 00 T@T@..À2 ¿...ú”..
0080 49 4F 20 20 20 20 20 20 - 53 59 53 20 00 30 2B 98 IO SYS .0+˜
0090 54 40 54 40 00 00 C0 32 - BF 1C 1F 00 46 9F 00 00 T@T@..À2 ¿...FŸ..
00A0 43 4F 4D 4D 41 4E 44 20 - 43 4F 4D 26 00 44 2B 98 COMMAND COM&.D+˜
00B0 54 40 54 40 00 00 C0 32 - BF 1C 29 00 75 D5 00 00 T@T@..À2 ¿.).uÕ..
This shows that the first directory entry is the volume label 'DOS622', the next file in the directory is DRVSPACE.BIN, the next is AUTOEXEC.BAT, and so on.
This is fine for a FAT16 drive prepared using RMPrepUSB as the order is not important and it will boot correctly (as long as the MBR partition table type is 06 and not 0E).
However, for a DOS 6.22 drive that has been prepared using some other utility, the directory entries must have IO.SYS first followed by MSDOS.SYS for the very first two entries. This includes the volume label which cannot be at the start of the directory for a pure DOS 6.22 boot disk as the partition boot code will fail to boot unless IO.SYS is the first entry and MSDOS.SYS the 2nd entry!
You can have lots of DOS image files. e.g. a 1.44MB or 2.88MB floppy disk image file, all on the same USB flash or hard disk. When you boot to the image from a USB drive, only the files inside the image and the boot drive will be accessible unless the DOS image also contains USB drivers so that you can also access other USB drives.
A DOS disk image which contains various USB drivers can be found here. Using this image, you could also boot from a CD and access USB drives.
Download the USB19.zip file, extract the USB19.BIN file and copy it to your USB drive, then add the following entry to you menu.lst grub4dos menu:
The above menu can be modified to work with MS-DOS or FreeDOS images by changing the name of the .bin file to match your image file.
Once an option is picked and the drivers are loaded, look for USB drives by typing dir C: and then dir D: etc.
On a USB flash drive contain four 125Mb FAT16 partitions, I found C: and D: returned errors but E: and F: (the 3rd and fourth partitions on the USB drive) were accessible!
Running the PELS.exe DOS benchmark under DOS