Fast Hyperlinks
That outdated legacy system is gone, by no means to be heard from once more. Proper? However what do you do on the fateful day that somebody must entry information that is trapped in an outdated legacy utility? If trendy functions cannot learn the info, you could run the legacy system. And that is the place system emulation is available in.
The open-source PC emulator QEMU is included by default in most mainline Linux distributions, however you can too obtain variations of QEMU for different Linux distributions. If you happen to run Home windows or macOS, the QEMU website supplies packages for these platforms, too. QEMU supplies wonderful system-level compatibility and assist, making it a really perfect and light-weight digital machine atmosphere.

Associated
How to Run Windows 11 in a Virtual Machine
Home windows 11 does not make itself simple to put in, that’s for positive.
Set Up a Digital Disk
You will want a spot to put in the legacy system inside QEMU, and for that you will want a digital C: drive. In DOS, simply as in Home windows, drives are represented as letters. A: and B: are the primary and second floppy disk drives, and C: is the primary arduous drive. Different media, together with different arduous drives or CD-ROM drives, are assigned D:, E:, and so forth.
Underneath QEMU, digital drives are picture information. To initialize a file that you need to use as a digital C: drive, use the qemu-img
command. To create a picture file that is about 200MB, kind this:
$ qemu-img create picture.img 200M
It is best to get an output studying one thing like “Formatting ‘picture.img’, fmt=uncooked dimension=209715200” in your terminal.
The Components of a QEMU Command
In contrast to PC emulator programs like VMware or VirtualBox, you could “construct” your digital system by instructing QEMU so as to add every element of the digital machine. QEMU makes use of command line choices to outline every part. This will make QEMU troublesome to make use of at first, however this supplies flexibility in creating precisely the digital machine that you really want. To get began, you solely must know a number of parameters to start out a digital machine:
1. The Command to Begin QEMU
To emulate a legacy PC system (from earlier than Home windows 7, usually), use qemu-system-i386
. To emulate a extra trendy system, use qemu-system-x86_64
as a substitute.
2. The Digital Disk
Use -hda imagefile
to inform QEMU to make use of imagefile because the arduous drive picture. This needs to be the identical digital disk you outlined with the qemu-img
command.
3. The Boot ISO
Set -cdrom isofile
to outline the CD-ROM or DVD picture file. For instance, this is perhaps the bootable ISO picture to put in Linux, Home windows, or one other working system.
4. The Reminiscence Quantity
Set the quantity of reminiscence within the digital machine with the -m dimension
possibility. If you don’t explicitly set this, QEMU defaults to 128 MB. You can too append a suffix of M
or G
to specify the reminiscence in MB or GB.
5. The Boot Order
Use -boot [options]
to specify the order that QEMU ought to search for bootable gadgets. For instance, set -boot order=dc
to inform QEMU to attempt the CDROM ( d
) first, then the arduous drive ( c
).
Put It All Collectively
Now that we now have the necessities to start out a digital machine with QEMU, we will put all of it collectively on a single command line to create and boot your digital machine!
Let’s attempt it with an instance: putting in a replica of the FreeDOS working system. FreeDOS is an open supply DOS-compatible working system that you need to use to run legacy enterprise software program and different DOS functions. Any program that works on MS-DOS must also run on FreeDOS.
First, obtain a replica of the FreeDOSset up CD-ROM from the FreeDOS website. On the time of writing, the newest model is FreeDOS 1.3, so our file will probably be named FD13LIVE.iso.
Then, when you did not do it earlier, go forward and outline a digital disk with the qemu-img
command:
$ qemu-img create picture.img 200M
Use that digital disk within the command line to start out QEMU:
$ qemu-system-i386 -hda picture.img -cdrom FD13LIVE.iso -m 16M -boot order=dc
And observe the prompts to put in FreeDOS:
Word that you could be be prompted to reboot after partitioning your C: drive. After doing that, restart the set up course of to finish it.
And now you’ve a operating DOS system!
QEMU and FreeDOS make it simple to run outdated DOS applications beneath different working programs, together with Linux. As soon as you have arrange QEMU because the digital machine emulator and put in FreeDOS, try to be all set to run your favourite classic DOS programs from Linux.