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:
2. FreeDOS (or any volume name you like) - you may be prompted to set the copy folder to FREEDOS_USB_BOOT - if so then accept it.
4. FAT16 (or FAT32) + Boot as HDD
5. Tick the Copy OS Files box and Browse to the .\FREEDOS_USB_BOOT folder if it has not already been set.
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).
Example if 'boot as floppy' option 1 is chosen.
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.
How it 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.
Booting to MS-DOS instead of FreeDOS
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 rename it as 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.
Create and boot from an MS-DOS 7 image file
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):
Note: IO.SYS may be a hidden file. kernel.sys will be present on FreeDOS images instead of IO.SYS.
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).
3. Press F11 in RMPrepUSB to test it...
MS-DOS boot disk obtained as above.
Alternativrly, you can extract the boot files from the .ima file using 7Zip or WinImage, etc.
Booting to MS-DOS and FreeDOS
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.
#This file is only of use if you also install grub4dos to your USB drive
#Lines starting with # are comments
#valid colours are: black, blue, green, cyan, red, magenta, brown, light-gray, dark-gray, light-blue, light-green, light-cyan, light-red, light-magenta, yellow and white
#color pairs are : NORMAL HIGHLIGHT HELPTEXT HEADING consisting of foreground/background
color black/cyan red/yellow green/light-blue white/light-cyan
#These next two lines overwrites the grub4dos info with a nice title
Making DOS 6.22 and DOS 5.xx bootable drives
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.
The partition size must be set to less than 2GB for FAT16.
if you install grub4dos then use this menu:
title MS-DOS 6.22
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):
title MS-DOS 6.22
geometry --bios --sync
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
01C0 01 00 0E FE 3F BE 3F 00 - 00 00 C0 D1 2E 00 00 00 ...þ?¾?. ..ÀÑ....
and change it from 0E to 06
01C0 01 00 06 FE 3F BE 3F 00 - 00 00 C0 D1 2E 00 00 00 ...þ?¾?. ..ÀÑ....
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.
Checking the disk using DiskDoctor or the RMPrepUSB DriveInfo button.
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:
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!
Boot from a FreeDOS image file with USB drivers
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 accessibleunless 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:
If you have a bootable floppy disk image, you can simply use the .img or .ima file extension. The file will be loaded into memory as a floppy disk drive. Any changes you make under DOS will be made to the memory RAM drive and will not be permanent.
If you use the .imarw file extension, the file will be directly mapped and any changes you make to it under DOS will be permanent.
Various other file extensions are also available for different behaviour - see here.
Bootable USB drives
If you have a bootable USB drive that boots as drive C:, you can add an image of it (.imghd) to your E2B drive. Use:
If the USB drive boots as A:, you can create an image in a similar way
RMPrepUSB - Drive->File - (filename - e.g. DOS.ima) - start=0 - length=(size of image = 3MB) - file start=0
The size of image will usually be 1.44MB or 2.88MB, therefore enter a size of 3MB.
If you have a bootable ISO which boots to DOS, you can use various file extensions
.isoDOS - use for DOS-emulation bootable ISOs which normally load CD drivers to access the CD, all CD contents will be found on the FAT32 B: volume once booted to DOS. .isoDOS01 - as .isoDOS but swaps over the USB boot drive with the internal hard disk so that the internal HDD is drive 0 - use for Win98 Install ISOs, etc.
.isonousb - loads ISO as CD (0xff), maps USB drive as fd0, removes USB drive from BIOS hard disk list. Useful for DOS if you don't want your USB drive to appear as a hard disk. v1.61+ more details here