The container I chose to act as the base for my virtual BBS is QEmu. There are many other systems out there, but QEmu is small, fast as a flushing toilet and ridiculously pain-free to get running. In fact, there's really only 3 steps before you never have to worry about Qemu again. I'm assuming you've already downloaded and [built|installed] Qemu and most of it's programs seem to do their thing.
Step 1: Creating QEmu images
Before we can start installing software into our virtual machine, it's going to need a hard drive. Remembering that for the most part this is 16-year-old technology, I chose the ridiculous size of 500mb. To create your harddrive, use the qemu-img program:
$ qemu-img create bbs.hd 500M
I'd also like to point out that at 500mb, this is the biggest harddrive I've ever had in any BBS I've ever run. Amazing how much things change
From here on, all the instructions I give are going to be based on using MS-DOS. If you're anti-Microsoft, FreeDOS is an acceptable alternative, but I had issues with it's SHARE.EXE not sharing and, let's face it, most TurboPascal applications crap out on a 200MHz processor or higher, lord knows how they'd deal with a different DOS. If you decide to use FreeDOS, however, you'll need to create a floppy image for no other reason than FreeDOS will bitch endlessly unless you do. This is done in much the same way as your hard drive image:
$ qemu-img create bbs.fd 1440K
Also note that if you're using FreeDOS, all
qemu command lines must have
-fda bbs.fd appended to them in order for the image to be found. Note this image doesn't actually have to have anything in it, it just has to be there. I know, it's stupid.
Step 2: Install MS-DOS
If you chose FreeDOS, you can skip this step, but remember where to find it, you might be coming back to it later. I did.
Before installing DOS, the first thing we need to do is find DOS 6.22 disk images somewhere. I keep all my installation "media" in a subdirectory off my BBS directory called "dist" and you'll find out why in the next step.
Since I'm running qemu on a headless Linux machine, I'm going to be using VNC running on port 30000 for console purposes (my recommended client is TightVNC). If you're running on a Windows machine, you can omit
-vnc :24100 from the given qemu command lines (your virtual machine will run in something roughly resembling a DOS window). The same holds true for a Linux machine with a console or X.
To fire up our virtual machine and start installing DOS, the command is quite simple:
$ qemu -vnc :24100 -hda bbs.hd -fda dist/dos622/DOS622_1.IMG -boot a
I can almost here what you're thinking: "But Jason, didn't you say VNC would be running on port 30000?". It is. VNC normally runs on port 5900 and Qemu's VNC port option is actually how much to add to 5900, so :24100 + 5900 = 30000. I lost some time there.
If you're rocking a physical console, you're good to go, otherwise fire up your VNC client and point it at port 30000 on the host machine. Whichever way you're doing it, here's our first stop on our trip down memory lane:
Haven't seen you in a while...
From here on in, it's just a simple matter of following prompts on screen. I'm not going to go into detail here, but you should be warned that for whatever reason the MS-DOS installer can't reboot Qemu's virtual machine, so you're going to have to do it yourself through the Qemu management console
Qemu has a built in management console for things like swapping disks (which you'll have to do shortly) and resetting the system. To access Qemu's console, press
Ctrl-Alt-2 from your virtual machine's console. To return to your regularly scheduled session, press
Ctrl-Alt-1. The command to reset the virtual machine is, simply enough:
After you've partitioned your drive for MS-DOS and rebooted your virtual machine, you can continue with your installation.
This time, the installer will pause and ask you to insert the other 2 disks in the install package. This is done through the Qemu console and requires you know where on the filesystem your DOS disk images are. To switch disks, hop over to the qemu console and:
(qemu) change floppy0 dist/dos622/DOS622_2.IMG
Ctrl-Alt-1 to hop back and continue the installation. You'll have to do this again for disk 3.
After the DOS installation is finished it will fail to restart the virtual machine (at least it does with qemu-0.9.1 for Win32 and Linux), but that's okay because we want to kill qemu anyways. If you're VNCing to a remote machine, CTRL-C on the virtual console running qemu, or if it's local just close the Qemu window and move on to the fun part:
Step 3: C:\DOS> RUN
With any luck, your installation will have finished with no problems. We're going to start qemu again, but with a slightly different command line so we can start installing stuff onto our DOS machine. This is where the dist directory I mentioned earlier comes in to play. Extract everything you'll need and run the following command line:
$ qemu -vnc :24100 -hda c.hd -hdb fat:dist -m 8
This starts a Qemu machine with 8mb RAM (8 times more than any machine I ever used to run a BBS), our fresh DOS installation as drive C and the contents of the "dist" subdirectory as drive D. When you get back to your machine's console, take a quick peek at drive D just to make sure everything went well:
My dist/ directory. More information at the end of the article
If your virtual machine isn't starting or you can't see the contents of your D drive, double check your qemu installation. I didn't encounter a single problem using qemu-0.9.0 and 0.9.1 on both Linux and Win32, but your mileage may vary.
Assuming you've made it this far, we can now move on to the fun part: Teaching DOS how to speak TCP/IP!