FREEDOS: COME AND PLAY! In this text file I will attempt to show how to simply ins- tall and configure FreeDOS with the QEMU emulator (with sound and network support). As a reminder, FreeDOS is an open source software developped by Jim Hall since 1994. In that year, Microsoft announced that Chicago will replace completely DOS. Seeing the future death of his system of choice Jim Hall decided to start a public domain version of DOS, named PD-DOS at the time. The project rapidly gathered volunteers and changed its name for Free-DOS, then FreeDOS. According to its wiki, it is "a complete, free, DOS-compati- ble operating system". The current version is 1.3, and was published on Febrary 2022. Installation of FreeDOS Two things are needed. First QEMU has to be installed with support for the i386 architecture. Please follow the documentation of your sys- tem to do so. Note that, even if it is possible to run the emulation directly in your terminal thanks to curses libra- ry, you might need to have a GUI installed. On Debian, the system I use, the GUI is handled by GTK, but QEMU's GUI can be run with SDL. The next thing we need is the ISO of the distribution. It is available at http://www.freedos.org/download/. You can go with the FD13-LiveCD.zip and already take for later the FD13-BonusCD.zip file. After unziping the archives, you'll have a FD13LIVE.iso and a FD13BNS.iso file. We're going to create an image for FreeDOS then launch QEMU with FD13LIVE.iso in a virtual CD-ROM to start the instal- lation: $ qemu-img create freedos.img 300M $ qemu-system-i386 -hda freedos.img -cdrom FD13LIVE.iso \ -m 16 -boot order=d -display gtk -enable-kvm FreeDOS needs at least 20MB of free disk space for the plain DOS system. But a full installation including applications and games from the Live CD will need not less than 275MB. On another note, you may notice that we clearly specify the boot order (where d is D:, the virtual drive with our ISO file), and that KVM is enabled to enjoy better performance (you can safely remove it to have a system closer to the "reality", but it is really slower). After running the command, you will find yourself in the FreeDOS installation program. With QEMU run in a GTK win- dow, you can press Control-Alt-F to go fullscreen. Everything is straightforward but if you need help with the install process, Jim Hall made an explanatory video on You- Tube: https://www.youtube.com/watch?v=Se69XJWxwAc. During the installation, I recommand to make just a plain DOS ins- tall. It is faster and you're gonna be able to install only the programs and games you'll want later. By the way, I use QEMU here but if you prefer, it alwo works very well with VirtualBox (see the explanatory video by Jim Hall here: https://www.youtube.com/watch?v=xXkmOwLPpcg). Once the installation is done, you can "shutdown" FreeDOS at the command prompt. Installing new packages Like many modern distributions, FreeDOS comes with its pac- kage installer. It is called FDIMPLES (FreeDOS Installer - My Package List Editor Software, that's for the name). To use it you will need to have in your D: drive the Live CD ISO or the Bonus CD ISO. Note that the Bonus CD contains all packages available in the Live CD with some more, so if you don't plan to install again FreeDOS you can put aside the FD13LIVE.iso file and just keep at hand the FD13BNS.iso file. To take advantage of the applications that have not been installed, plus the additional ones from the Bonus CD, you will have to launch the virtual machine with almost the same options as for the installation. But note that the boot order is C:, where is our FreeDOS system. $ qemu-system-i386 -hda freedos.img -cdrom FD13BNS.iso \ -m 16 -boot order=c -display gtk -enable-kvm Once FreeDOS launched, you just need to enter FDIMPLES at the command prompt and navigate in the menus with the arrow keys and the TAB key, select the packages with SPACE when they are highlighted, go down with TAB to the [OK] button when you're done, then press ENTER to install everything you've selected. And since you're in there, I recommend installing FDNET, MTCP, WATTCP, plus probably HGET/WGET, LYNX and GOPHERUS pa- ckages from the Networking category. The first two will be used in the next step to configure the network to access the Internet. Sound and network support For sound and network support, it necessary to activate some devices. QEMU can obviously emulate a lot of different devices (see 'qemu-system-i386 -device help' for a list) but we're gonna use basic ones so we'll not need to struggle with drivers in FreeDOS. For the sound, to the qemu-system-i386 command line we used above, we'll add: '-device sb16 -device adlib -device pcspk' Note that '-device pcspk' activate the computer bips, so it can be annoying. That is why, personally, I don't append it. About the sound support: on my computer, which has a quadco- re i5-6300U running at 2.40GHz and 8G of RAM, I experience lags when some sounds are played in FreeDOS (and only when they are played). Basically it means that the games, when the sound is on, are not really playable. I guess I need to find a more suitable configuration of QEMU to avoid these slowdowns. Now for the network, in the same way, we'll add to our com- mand line: '-netdev user,id=u1 -device pcnet,netdev=u1' Everthing put together we have something like: $ qemu-system-i386 -hda freedos.img -cdrom FD13BNS.iso \ -m 16 -boot order=c -display gtk -enable-kvm -device sb16 \ -device adlib -device pcspk -netdev user,id=u1 \ -device pcnet,netdev=u1 Configuration of the network in FreeDOS Now that we launched FreeDOS with all the devices we need, we can actually configure the network within FreeDOS. It is simple as running FDNET at the command prompt. It will make a DHCP request and get an IP, a Netmask, a Gateway and a Nameserver. All will be written in C:\FREEDOS\MTCP.CFG. For good mesure and compatibility I recommand using the information given by FDNET and write a C:\FREEDOS\WATTCP.CFG file (with the EDIT command for instance). With the infor- mation I've got from the result of FDNET command, here is mine (the IP, netmask, &c. never change from one session to an other): my_ip = 10.0.2.15 netmask = 255.255.255.0 domain_list = fdos.huld.re nameserver = 10.0.2.3 gateway = 10.0.2.2 You should then successfully go to C:\NET\GOPHERUS, launch GOPHERUS.EXE and take a walk in the digital meadown from FreeDOS! Or launch LYNX.EXE and browse the web in relaxing plain text. Just keep in mind that FreeDOS doesn't support modern encryption. File sharing between the host and FreeDOS A last thing before the conclusion. It can be usefull to have a way to share files between the host and FreeDOS. There's two ways I know for doing this. When QEMU is stopped, you can mount the FreeDOS image under the filesystem: # mkdir -p /mnt/freedos # mount -t msdos -o loop,offset=32256 \ /path/to/freedos.img /mnt/freedos # cp /path/to/file /mnt/freedos/ # unmount /mnt/freedos/ The second way is to mount a path directly in FreeDOS when we start QEMU (the directory will be available in B: drive): $ qemu-system-i386 (...) -hdb fat:rw:/path/to/dir/ But note that it is limited to 512MB and it doesn't reflect any changes made to the directory from the host system after QEMU starts. Conclusion I find FreeDOS a really fun and relaxing system to use. And with the network support and an access to Internet, it is not that difficult to make it a daily driver for casual tasks. Its simplicity makes it easy to focus on what you are doing, since you can only have one, and only one appli- cation launched at the time. I guess my next step will be to find myself an old computer, a 486 or maybe a Pentium with a generic ethernet card (probably a NE2000), to have it running for "real". In the meantime, and in a future post, I'll explain how I'm trying to use FreeDOS for different tasks on a daily basis. If you were interested by this article and have tried (or retried) FreeDOS, please send me a message, I'll be happy to hear from you and your experience. Likewise, if you have encountered any difficulties in following the directions I have given, I will try to answer them as best as I can with my meager knowledge. In any case, thanks for reading me, have fun, and take good care of youself and yours at home. f6k, 2o23/o5/14