paperlined.org
sysadmin > boot > MS-DOS
document updated 14 years ago, on Sep 10, 2009
Basic steps for making a bootable MS-DOS disk

Basic steps for making a bootable MS-DOS disk

All of these tools are included on the Knoppix DVD.

This procedure will make many different devices DOS-bootable (hard drive, USB thumb drive, floppy disk, etc).

I've modified an existing partition numerous times without damaging the existing files, but it's still best to backup before doing this.

1) setup the partition

use GParted to:

  1. make sure the partition is formatted as FAT16, or as FAT32 (required for >2GB partitions)
  2. enable the BOOT FLAG
  3. enable the LBA FLAG (required for >504MB partitions)

2) write boot sectors (with ms-sys)

Note that for partitioned drives, you have to write TWO chunks of bytes: the MBR, and VBR. For unpartitioned drives (or partitions that you'll boot with a chainloading bootloader), you only need the VBR.

These are the combinations that have worked for me so far:

file system OS MBR partition boot record (VBR)
FAT32 MS-DOS v7.10 ms-sys --mbr /dev/sda ms-sys --fat32 /dev/sda1

3) copy bare-minimum files over

These files MUST be copied over: (download)

4) copy over additional files to taste

Autoexec.bat and config.sys are most helpful.

Logo.sys can be added for good looks.

You can copy over the full install of MS-DOS. For v7.10, these files are:

5) test that it works under QEMU

This step is optional, but it really is a quick step that can save a lot of time — it's MUCH faster to boot under QEMU than it is to unplug the drive and try to boot it up on a second computer (or worse, to reboot the same computer).

External links