How to Set Up FreeDOS on Linux Using QEMU

How to Set Up FreeDOS on Linux Using QEMU

Introduction

(How to Set Up FreeDOS on Linux Using QEMU) FreeDOS functions as an open-source operating system which enables access to classic DOS applications together with old games and legacy software programs. The virtualization tool QEMU provides Linux users with an ideal way to work with FreeDOS systems. The following instructional guide details how to establish FreeDOS on Linux through QEMU and explains the entire setup and configuration procedure.

Prerequisites

Before you start, ensure you have the following:

  • A Linux distribution installed (Ubuntu, Debian, Fedora, Arch, etc.)
  • QEMU installed on your system
  • FreeDOS installation ISO file

Installing QEMU on Linux

QEMU can be installed easily via your Linux package manager.

For Debian/Ubuntu-based systems, use:

How to Set Up FreeDOS on Linux Using QEMU

For Fedora:

How to Set Up FreeDOS on Linux Using QEMU

For Arch Linux:

How to Set Up FreeDOS on Linux Using QEMU

Once QEMU is installed, verify the installation by running:

How to Set Up FreeDOS on Linux Using QEMU

This should display the installed QEMU version.

Downloading FreeDOS

FreeDOS can be downloaded from the official website:

Make sure to save the ISO in a known location, such as your home directory.

Creating a Virtual Hard Disk

Before installing FreeDOS, create a virtual hard disk image for the operating system.

Run the following command to create a 500MB disk image:

How to Set Up FreeDOS on Linux Using QEMU

This creates a dynamically allocated virtual disk in the QCOW2 format.

Booting FreeDOS in QEMU

With the virtual hard disk ready, you can now boot into the FreeDOS installer.

Use the following command:

How to Set Up FreeDOS on Linux Using QEMU

Explanation of options:

  • -hda freedos.qcow2: Specifies the virtual hard disk.
  • -cdrom /path/to/freedos.iso: Mounts the FreeDOS installation ISO.
  • -boot d: Boots from the CD-ROM drive.
  • -m 64: Allocates 64MB of RAM.

You should now see the FreeDOS installation screen in the QEMU window.

Installing FreeDOS

Follow these steps to install FreeDOS on the virtual hard disk:

Select “Install to Harddisk” when prompted.

Partition the virtual hard disk using fdisk.

  • Create a new primary partition.
  • Mark it as bootable.
  • Write the changes and exit fdisk.

Restart QEMU to apply the partition changes:

How to Set Up FreeDOS on Linux Using QEMU

Format the partition when prompted.

Proceed with the installation by selecting the default options.

Once the installation is complete, remove the CD-ROM by exiting QEMU and running:

How to Set Up FreeDOS on Linux Using QEMU

Configuring FreeDOS

Once FreeDOS is installed, configure it for optimal performance:

Editing AUTOEXEC.BAT and CONFIG.SYS

  • Modify AUTOEXEC.BAT to include useful utilities.
  • Optimize memory management in CONFIG.SYS.

Mounting Additional Drives

To mount a shared directory:

How to Set Up FreeDOS on Linux Using QEMU
How to Set Up FreeDOS on Linux Using QEMU

Running DOS Programs in FreeDOS

Now that FreeDOS is installed, you can run classic DOS programs. Simply transfer .EXE or .COM files to the virtual machine and execute them from the command line.


Additional Steps

Step 1: Enabling Sound in FreeDOS

If you want to enable sound in FreeDOS under QEMU, use the following command:

How to Set Up FreeDOS on Linux Using QEMU

This enables a Sound Blaster 16 card, which many DOS applications support.

Step 2: Using a Graphical User Interface (GUI) in FreeDOS

While FreeDOS primarily uses a command-line interface, you can install graphical environments like OpenGEM:

  1. Download OpenGEM from the FreeDOS repository.
  2. Transfer it to the FreeDOS virtual machine.
  3. Install and launch OpenGEM for a basic graphical interface.

Step 3: Networking in FreeDOS

To enable networking in FreeDOS under QEMU:

How to Set Up FreeDOS on Linux Using QEMU

This sets up a network adapter that allows limited internet access and file transfers.

Step 4: Using Disk Images for Software Installation

To mount and use floppy disk images for software installation:

How to Set Up FreeDOS on Linux Using QEMU

This allows you to install software from floppy disk images.

Step 5: Expanding Virtual Hard Disk Size

If you need more space, you can expand the virtual hard disk size with:

How to Set Up FreeDOS on Linux Using QEMU

Then, use FreeDOS fdisk and format to extend the partition.

Conclusion

The procedure to set FreeDOS on Linux by using QEMU follows simple steps which lets you restore DOS applications and games from the past. You can establish a functioning FreeDOS environment within your Linux system through the provided direction. Through this setup users obtain a powerful solution which caters to their needs of running classic titles alongside outdated software.

Leave a Reply

Your email address will not be published. Required fields are marked *