Corel Linux in QEMU

A recent attempt to get Yale’s copy of Corel Linux running in QEMU/EaaSI inspired the thought that I should document in this forum some of the tips/tricks that it frequently takes to get certain operating systems running. (As a side note, all “base” environments that come from my end at Yale get a documentation package including installation notes and, if possible, screenshots; if you think these might be useful context for configuring an existing environment or creating a new one, lemme know and I’m happy to share)

@ecochrane and I have been trying to get Corel Linux Deluxe running in QEMU on and off for a couple years now. I made ISO copies with cdrtools (or maybe cdrkit, I can never keep straight which fork I have installed) of the installation media:

But QEMU kept freezing when booting the installer, no matter what configuration we tried:


Like I said, I kept going back to it now and then again, especially when new QEMU versions were released, just to see if something had changed in the emulated hardware. It finally started working, thanks to a couple tricks that I’ve gradually learned from trying out many other similar Linux operating systems from the time:

  1. For whatever reason, Linux installers from the late '90s/early aughts get tripped up by QEMU’s hardware, but if you can get them installed first (i.e. in a different emulation/virtualization application) and then copy or convert over the base image, QEMU then often handles it fine

  2. Early Linux systems often freeze when booting in emulation like this because of incorrectly configured graphics/video hardware. I suspect this is at least part of the problem with Corel and QEMU - and, from my understanding of what it was like to be a Linux user in ~1999, that’s actually pretty accurate to how finicky Linux was with real hardware too.

This latest attempt was inspired by finding:

I still don’t see exactly the results that QEMU user did with our installation media - but this time I tried following the same basic steps in VMWare instead, with equivalent hardware settings, and it went without a hitch except for the same visual glitches (text and mouse cursor not rendering properly). Again though, thanks to other '90s Linux installs I have now actually seen these errors elsewhere and the answer lies in correctly configuring the emulated graphics card with the operating system’s X Window System.

So after running a smooth but visually glitchy installation in VMWare (256 MB of RAM, standard video adapter, Soundblaster-compatible sound card, ~20GB virtual drive), I converted the disk image to QCOW2 (you don’t have to do this, QEMU will run off VMWare vmdk files, but it will get converted one way or another if you import such a file into EaaS, so I like doing this early to head off any problems at the pass):

`$ qemu-img convert -O qcow2 corel_linux_VMWare_image.vmdk corel_linux_for_qemu.qcow2`

Then ran with:

`$ qemu-system-i386 -hda corel_linux_for_qemu.qcow2 -m 256 -vga cirrus -soundhw sb16 -net nic,model=pcnet`

(QEMU’s emulated graphics Cirrus card is the one that I know how to configure X properly with…)

At that point, you’re going to want to either boot Corel Linux into “text-only” mode, or open a tty session to communicate with the operating system in the command line, since the graphics are too messed up to re-configure from the desktop. (You can open a TTY session by pressing Ctl-Alt-F3 on pretty much any Linux machine - in QEMU, you may first have to open the QEMU monitor by pressing Ctl-Alt-2, then typing sendkey ctrl-alt-f3 in order to pass the input keys correctly from your host system to the emulated machine)

Once you’ve logged into a command line session (since I didn’t set up any new users during installation, you can get there with just user “root” and no password), you’re going to want to run a command called xf86config, which will walk through the steps of generating a new X Windows System/X11 configuration file for your emulated operating system.

Most of the options that XF86Config offers as the default can be accepted for configuring the monitor (e.g. horizontal and vertical refresh rates, video modes, etc). But when the XF86Config wizard asks for the model of your graphics card, make sure you find the “Cirrus Logic GD544x” option (this most closely matches the Cirrus Logic GD5446 device that QEMU’s trying to emulate. Sometimes GD5446 is itself an option, that should be acceptable to choose here as well)

Even once you go through the XF86Config wizard though, you’re still not done, you need to make some manual edits to get things right. Unfortunately we’re in ~1999 so no nano or other super-simple command line text editor available out of the box here - you’ll need to wrap your head around some vi commands.

When you feel comfortable, as root make a backup of the config file you generated with the wizard:
cp /etc/X11/XF86Config /etc/X11/XF86Config.bak

then open and edit:
vi /etc/X11/XF86Config

You’re looking for two sections: the Device section, where you should see the Cirrus device you named and configured with the wizard. There are some commented-out suggestions for config options to include if you’re having trouble, we’re going to take those suggestions, and then also add a new sw_cursor line in order to get the mouse cursor displaying properly. In the Cirrus section add:

Option "no_bitblt"
Option "noaccel"
Option "sw_cursor"

You’re also going to want to check the Screen section of the config file, and double-check that under the svga server options, under Modes, either 1024x768 or 800x600 is listed first in the series of resolution options, otherwise the desktop is going to resolve to 640x480 no matter what you do.

At this point you should be able to exit vi (hit Esc to make sure you’re still not inserting text, then type :x, enter to save and exit), and run reboot as root. When the machine comes back up, you should be able to boot Corel Linux as normal with no special options and get a desktop with no visual/text rendering errors:

These are some quick notes and there may be other ways to go about this, e.g. using VirtualBox first instead of VMWare. But again, I’ll recommend checking the XF86Config with emulating pretty much any Linux OS from this time period.

Oh and lastly - this was all run with QEMU 4.2.1 locally on Ubuntu, but importing into EaaSI worked fine with the QEMU 3.0 emulator image loaded. So, again, it seems to have little to do with the machine once it’s running, and more of an error with QEMU’s emulated hardware during the installation and configuration process…

1 Like