Installing MS-DOS on Qemu

From Computer History Wiki
Revision as of 12:57, 11 August 2009 by Neozeed (talk | contribs)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

MS-DOS is a great 'little' OS for bootstrapping other OS's. If you are going to install Windows 95, Windows 98 or Windows Me, Novell Netware, Windows NT 3.1/3.5/3.51/4.0 or even setup a dual boot OS/2 VM it's best to start here.

First MS-DOS 5.0 & 6.0 (6.1/6.2/6.22) are the 'best' versions to load as they can support a hard disk up to 2GB in size. MS-DOS 4.0 can only use 32mb partitions, however it can use extended partitions.. So you can have LOTS of 32mb partitions. MS-DOS 3.x can only use a single 32MB partition.. I wouldn't waste time with MS-DOS 1, as it has no support for hard disks, and early 2.0 doesn't have support for directories.

In this example I'm going to install MS-DOS 6.22. It's very straight forward.

Create a hard disk

The first step is to create a hard disk image. I'm going to create a 2GB one, so the syntax is:

qemu-img create -f qcow msdos.disk 2G

Installing MS-DOS

MS-DOS uses the BIOS for all IO so the ISA/PCI thing doesn't matter. Also the installation, and all files will run on 8088/8086 or higher so you don't have to worry about any cpu flags. MS-DOS himem.sys will only see a maximum of 64MB of ram. So there is no point in letting qemu grab 128mb of ram.

qemu -hda msdos.disk -m 64 -L . -fda dos622_1.img -boot a

On the first boot, MS-DOS will partition the disk & slap down a MBR.. Let it have the whole disk, you just hit enter a few times, then qemu will reboot, then it will format the disk & then prompt for disk two. Remember it's control+alt+2 to get to the qemu console to change the floppy to dos622_2.img, then control+alt+1 to get back to the display to hit enter. You only have to do this twice, then MS-DOS is installed. Once it is installed, you can close Qemu.


Running MS-DOS

You can now start Qemu like this:

qemu -hda msdos.disk -m 64 -L . 

And you are good to go.

Where to go from here

Well MS-DOS by itself isn't that useful, you may want to investigate network clients (ones that use TCP/IP are better!), sound settings and of course CD-ROM access. I'll update these topics in the future.