The way to use QEMU as well one other OS

The way to use QEMU as well one other OS

QEMU logo.

That previous 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 knowledge that’s trapped in an previous legacy software? If fashionable purposes can’t learn the info, it’s good to run the legacy system. And that’s the place system emulation is available in.

The open-source PC emulator QEMU is included by default in most mainline Linux distributions, however you may as well obtain variations of QEMU for different Linux distributions. For those who run Home windows or macOS, the QEMU website gives packages for these platforms, too. QEMU gives glorious system-level compatibility and help, making it a great and light-weight digital machine surroundings.

Set Up a Digital Disk

You’ll want a spot to put in the legacy system inside QEMU, and for that you just’ll 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 exhausting drive. Different media, together with different exhausting drives or CD-ROM drives, are assigned D:, E:, and so forth.

Below QEMU, digital drives are picture recordsdata. To initialize a file that you should use as a digital C: drive, use the qemu-img command. To create a picture file that’s about 200MB, sort this:

$ qemu-img create picture.img 200M


Not like PC emulator methods like VMware or VirtualBox, it’s good to “construct” your digital system by instructing QEMU so as to add every part 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 gives flexibility in creating precisely the digital machine that you really want. To get began, you solely have to know a couple of parameters to begin a digital machine:

1. The command to begin QEMU

To emulate a legacy PC system, use qemu-system-i386 . To emulate a extra fashionable system, use qemu-system-x86_64 .

2. The digital disk

Use -hda imagefile to inform QEMU to make use of imagefile because the exhausting drive picture. This ought 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 could be the bootable ISO picture to put in Linux, Home windows, or one other working system.

4. Reminiscence

Set the quantity of reminiscence within the digital machine with the -m measurement choice. If you don’t explicitly set this, QEMU defaults to 128 MB. You too can append a suffix of M or G to specify the reminiscence in MB or GB.

5. Boot order

Use -boot [options] to specify the order that QEMU ought to search for bootable units. For instance, set -boot order=dc to inform QEMU to attempt the CDROM ( d ) first, then the exhausting drive ( c ).

Put It All Collectively

Now that we now have the necessities to begin 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 duplicate of the FreeDOS working system. FreeDOS is an open supply DOS-compatible working system that you should use to run legacy enterprise software program and different DOS purposes. Any program that works on MS-DOS must also run on FreeDOS.

First, obtain a duplicate of the FreeDOS 1.2 set up CD-ROM from the FreeDOS website, as FD12CD.iso.

Then outline a digital disk with the qemu-img command:

$ qemu-img create picture.img 200M

Use that digital disk within the command line to begin QEMU:

$ qemu-system-i386 -hda picture.img -cdrom FD12CD.iso -m 16M -boot order=dc
Booting the FreeDOS 1.2 installer in QEMU
Booting the FreeDOS 1.2 installer in QEMU.

And comply with the prompts to put in FreeDOS:

Starting the FreeDOS 1.2 installer in QEMU
Beginning the FreeDOS 1.2 installer in QEMU.
Completing the FreeDOS 1.2 install in QEMU
Finishing the FreeDOS 1.2 set up in QEMU.

And now you have got a working DOS system!

Running FreeDOS 1.2 in QEMU
Operating FreeDOS 1.2 in QEMU

QEMU and FreeDOS make it straightforward to run previous DOS applications beneath different working methods, together with Linux. When you’ve arrange QEMU because the digital machine emulator and put in FreeDOS, you need to be all set to run your favourite traditional DOS applications from Linux.

Source link