document updated 15 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:
- make sure the partition is formatted as FAT16, or as FAT32 (required for >2GB partitions)
- enable the BOOT FLAG
- 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:
3) copy bare-minimum files over
These files MUST be copied over: (download)
- io.sys (but if you're just copying it over, you MUST use MS-DOS v7.x; earlier versions required io.sys to be the first file on the disk [the first FAT entry], which requires sys.com to do)
- msdos.sys
- command.com
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:
ados.com
append.exe
attrib.exe
bdrv.exe
chkdsk.exe
choice.com
command.com
compress.exe
ctmouse.exe
cvt.exe
debug.exe
deltree.exe
diskcomp.com
diskcopy.com
doshelp.com
doskey.com
doslfn.com
dosshell.com
dosshell.exe
dosswap.exe
edit.com
edlin.exe
emm386.exe
exe2bin.exe
expand.exe
extract.exe
fakemous.com
fasthelp.exe
fastopen.exe
fc.exe
fdisk.exe
find.exe
format.com
graphics.com
keyb.com
killer.exe
label.exe
lmod.com
loadfix.com
mem.exe
memmaker.exe
mklink.exe
mode.com
more.com
move.exe
mscdex.exe
msd.exe
nlsfunc.exe
power.exe
print.exe
qbasic.exe
recover.exe
replace.exe
scandisk.exe
setver.exe
share.exe
shutdown.com
sizer.exe
smartdrv.exe
sort.exe
subst.exe
sys.com
tree.com
vsafe.com
xcopy.exe
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).
qemu -hda /dev/sda
External links