Jump to content

Running Caldera OpenLinux 1.3 in QEMU

This is an article on running Caldera Open Linux 1.3 on QEMU. I am a bit late to the party, as there is already a guide online for this exact activity. However, I originally performed this install sometime in 2018, and am primarily documenting the process I already followed. My process deviated from the existing article in a few ways, but two stand out:

That said, I will augment this with details on getting X11 running, so both mods of X operation are documented.

The Install

So, with that out of the way, let's get started. First off, create a working directory for your VM, then create a disk image in that folder. I opted for 10 GB maximum, of which only 1.2 GB was actually used in the end.

$ qemu-img create -f qcow2 openlin.qcow2 10G

Then create a shell script to run & install the virtual machine. Here's mine for the initial setup. I opted to install direct from my optical drive; most people will probably insert a path to an ISO instead of /dev/sr0

#!/bin/sh
qemu-system-i386 -machine pc \
    -net nic,model=ne2k_pci \
    -net user \
    -device sb16 \
    -device adlib \
    -hda openlin.qcow2 \
    -cdrom /dev/sr0 \
    -boot d

Running the script should result in the initial bootloader screen:

Initial Caldera OpenLinux boot screen

Simply press enter (or wait) and you will eventually get to the the language selection:

Language selection

At this point, just answer the usual language/keymap settings and specify to not load a saved configuration. You will reach the "Change LISA setup" dialog:

Change LISA setup menu

The first time through we'll do nothing here and continue (fourth option) The installer will then report detected hardware:

Hardware found list

Just accept and confirm everything has been recognized. Select "Yes" when prompted to change disk partitioning. Select the hard drive:

Hard drive selection, with /dev/hda selected

After an information screen, you will be transferred to a shell session of fdisk to create your partitions.

Initial fdisk screen

Most of the operations work in cylinders by default, which is easy enough to compute with a 10 GB drive. With 1024 cylinders, this means each is 10 MB. I'm going to allocate 240 MB for swap, which means 24 cylinders. As such, exactly 1000 cylinders are used for data. This can be accomplished as follows:

Demonstration of creating two partitions (1-1000 cylinders and 1001-1024 cylinders)

Finally, we need to change our swap partition type, and then write the changes to disk:

Demonstration setting partition type of smaller partition to swap (82)

We are warned to reboot, so use the QEMU Machine > Reset option do to this.

Reboot warning

When back around the second time, proceed as before until you reach the Change Partition Table screen the second time. This time, select No.

Change partition table dialog, with 'No' selected.

Select the swap partition:

Selecting /dev/hda2 as swap partition

Install from CD-ROM:

Selecting '1 CD-ROM' as install source

Then select the ATAPI-CD-ROM, but change to /dev/hdc.

Selecting '16 ATAPI-CD-ROM as /dev/hdc' for CD-ROM drive and type

Next, select the partition created earlier:

Selecting /dev/hda1 to install to

Accept formatting, but don't accept the bad sector check. When prompted for installation type, INSTALL IT ALL!

Selecting '5 Install all packages'

Then the copy begins!

Example of install progress screen

Once it is done, just pick a hostname:

Setting newly-installed hostname. This shows an example of 'caldera.zerker.home'

For me, the networking wasn't working, even though I tried the probe option earlier. For now, just say we don't have a network card and we'll fix it after install. Just leave CMOS time on GMT/UTC and pick your time zone. Next, pick a PS/2 mouse:

Selecting '7 PS/2 mouse' as the mouse type

But don't bother setting up a printer (unless you want to experiment with QEMU redirection). When prompted, specify a password for your root user.

Entering a root password

Pick a reasonable name for your non-root account:

Setting a user name. This shows my user of 'zerker'.

Then select default UID, group membership and home folder. Pick your shell next; there are a few choices beyond the bash default:

Selecting '2 GNU bash' as the default shell

Then enter your full name and set the password for that user as well. The installer will then report any boot issues for you:

Example summary screen for LISA boot analysis.

Specify to install LILO into the MBR of the first IDE hard drive:

Selecting LILO destination of '1 The first IDE hard disk'

And pick vmlinuz as your default boot image.

Selecting LILO boot image of 'vmlinuz'

Accept the default boot entry name and no kernel boot parameters:

Entering boot entry of 'linux' Enter no boot parameters

It will then show you the following screen that displays the LILO configuration:

Screen showing the LILO configuration file

The next screen shows the default services that are installed. The following are the defaults and probably all you'd want. Any of the others would likely be better suited for a modern Linux distro.

Screen showing list of services, which are left at defaults

Initially, just select the VGA X server. We'll fix this later.

Selecting '2 VGA 16-color' for now

Probably best to say "no" to configuring it here.

Selecting 'No' to calling XF86Setup

Beyond this, it's just a few more dialog boxes to hit Okay on, then the the main install is done. If you forgot to disable the XFree86 configuration, it would run here. If so, just hit okay for the defaults.

Initial screen of XF86Setup

And the install is done! After rebooting from the install, I suggest powering off the virtual machine and removing the CD-Rom image by removing the -cdrom and -boot lines from the shell script. This is the result:

#!/bin/sh
qemu-system-i386 -machine pc \
    -net nic,model=ne2k_pci \
    -net user \
    -device sb16 \
    -device adlib \
    -hda openlin.qcow2

Post-Install Configuration Fixes

So, the install is done, but the network doesn't work and X11 will be a weird resolution. Have no fear; both of these can be fixed.

Networking

First off, start up the VM and log in as root. Since we configured the network adapter as an ne2k-pci, we just need to generate the module dependency tree and then load the module:

# depmod -a
# modprobe ne2k-pci

Which should detect our network card. Then we can re-run LISA (by typing lisa, naturally) and configure networking. When LISA starts, select the 3 System Configuration option, then 3 Network Configuration. You will end up here:

Network setup screen shot, selecting '2 Configure Network Access'

Unfortunately, I couldn't find any obvious settings to enable DHCP or run a DHCP client (I could run a server though). Thankfully, QEMU networking is well documented, so we can just set it up manually.

  1. Select 1 Configure Network Card
  2. Select Yes you have one
  3. Pick eth0 as your network interface.
  4. Enter anything valid in the 10.0.2 subnet for the IP address. I used 10.0.2.44, but it doesn't matter, as long as it's not .2 or .20 (due to a bug in LISA).
  5. Accept the default network mask and broadcast address.
  6. Select 2 Configure Network Access, then 2 Enter Router.
  7. Specify the IP of 10.0.2.2

I also suggest adding a hosts entry for your VM host, so you can communicate with it easily. This can be accomplished by returning to the previous screen (shown above) and...

  1. Select 1 Add a computer to the host table.
  2. Select 2 Add entry to '/etc/hosts'
  3. Enter the IP address of 10.0.2.2
  4. Enter the hostname of your machine, using the same fully-qualified parent domain as the VM. I.e., my VM is caldera.zerker.home and the hostname used for my PC is alpha.zerker.home.
  5. It will also ask if you want to refer to the machine by another name. Here, you should put just the base name (for me, this is alpha)

Finally, for DNS...

  1. Go back one more time and select 3 Configure General Network Services.
  2. Select the 1 Configure Domain Name Service
  3. Enter 10.0.2.3 as the primary DNS server. It's up to you whether to enter a secondary one; QEMU should internally use the DNS servers of your host if you configure it this way.

Go ahead and exit LISA now. You should be able to successfully ping your HOST PC using just its bare hostname (e.g. ping alpha for me).

However, we aren't quite done yet. The last step is to enable the Kernel module permanently. I forget the "easy/intended" way to do this in OpenLinux, and got bored reading the contents of /usr/doc, so I found the answer in /etc/rc.d/rc.modules:

contents of rc.modules

Per the script, the module list is $PFX/$REL/$VER$Sep$1, where $PFX is /etc/modules and $REL and $VER are from uname -r and uname -v, respectively. Checking this on my install resulted in:

running uname and listing directory /etc/modules/2.0.35

So it looks like we just need to edit #1 Wed Aug 19 12:57:30 MST 1998. Full disclosure: I looked in this folder much earlier, but the dates-as-file-names confused me, so I went looking for more information.

Vi and vim users will already find their favourite editor present here, but nano fans might be feeling dissapointed that it yields a 'not found' error. Not to worry, let's check the available editors with an apropos editor command:

list of editors

It looks like there are actually a few non-vi terminal editors: joe, Easy-edit (ee), Jed and... pico. Yup, nano originated as a clone of pico, but here we have the original.

Pick your favourite (or check the manpages to help choose), then edit the #1 Wed file. Add ne2k-pci to the bottom of the file:

Adding ne2k-pci to the module list

Save then restart (reboot command if you're used to modern methods). It should now load the ne2k-pci module on boot, so networking will always be available.

X11 Build

This section is optional if you are only ever going to use X11 forwarding (see next section for that). However, native X11 is generally more convenient, so let's get started. As mentioned before, this information is based on the previous guide at the Gravis Ultrasad site, written my own words. See that site if you want to save some steps and use a precompiled version.

While we can configure and try to use the provided X server, it appears to display garbled fonts and is unusable. I was unable to isolate what part of the packaging process caused this issue, but (as mentioned at the above site), a complete rebuild of XFree86 without the packaging split solves the problem.

For this we need... the source CD. Yup. Time to add a -cdrom line back on your shell script to mount the source CD and start up QEMU with it attached.

Contrary to modern documentation, the source RPMs will install to a system path, and we need to mount the CD-ROM anyways, so go ahead and log in as root again and follow along:

  1. Mount the CD-ROM to /mnt/cdrom and change directory to /mnt/cdrom/Packages/SRPMS.
  2. Install all XFree86 Source RPMs:

    # rpm -i XFree86*
    

    (add -h and/or -v if you want status)

  3. Change directory to /usr/src/OpenLinux/BUILD

  4. Create a subdirectory XFree86-3.2.2 to work from. Change into this subdirectory.
  5. Extract each of the X server source tar files:

    # tar xzf ../../SOURCES/X332serveronly.tgz
    # tar xzf ../../SOURCES/X332src-1.tgz
    # tar xzf ../../SOURCES/X332src-2.tgz
    

    Feel free to add & to the end if you want to start the next before waiting for the previous to finish.

  6. Apply the two primary patches, ignoring the rest:

    # patch -p0 < ../../SOURCES/3.3.2-patch1
    # patch -p0 < ../../SOURCES/3.3.2-patch2
    
  7. Then just change directories, make and install:

    # cd xc
    # make World
    # make install
    

Yup, we just hammered a fresh X11 install into the VM. Not a typically recommended process, but.. it works. We did clobber xinitrc too, so let's restore it to the provided one:

# cd /etc/X11/xinit
# mv xinitrc twmxinitrc
# ln -s ../wmconfig/xinitrc

X11 Configuration

So, if you replaced your XFree86 and want to use it locally, you need to first configure it by running XF86Setup. Keyboard and Mouse settings should select the correct defaults, so switch over to the Card pane and select the Cirrus Logic GD544x.

Selecting the Cirrus Logic GD544x

Add the following options for maximum compatibility:

Option "noaccel"
Option "no_bitblt"

Then manually set the Video RAM to 4Meg.

Adding 'noaccel' and 'no_bitblt' options and setting 4Meg Video RAM

Switch over to the Monitor pane and select Multi-frequency that can do 1280x1024 @ 60 Hz.

Selecting 'Multi-frequency that can do 1280x1024 @ 60 Hz' as the monitor type

Then switch over to Modeselection and pick 1024x768 at 24bpp. Feel free to try other modes later, if you like, by re-running XF86Setup.

Setting the video mode to 1024x768 at 24bpp

Hit done and you're good to go. Time to finally log off from root and use your normal user.

X11 local use

If you followed the above setup, you should be good to go. Try running startx as your normal user. You should find yourself in Caldera's "Looking Glass" desktop:

OpenLinux running Looking Glass

Have fun, play around and have a look at how things are organized and how they behave. Note that most applications are not configured in the Programs/Games groups shown by default; just left-click on the desktop to get a more comprehensive list.

Alternatively, if you are getting bored of the unique Caldera desktop and just want some classic KDE, that's here too. Just launch using the kde command. You will find yourself in a KDE 2.0.35 desktop.

OpenLinux running KDE

From this point, you can stop and just explore and enjoy the virtual machine. However, if you also want to try re-directing X11 to your host machine, read on to the next section.

X11 Forwarding

Since the VM has networking configured, and X11 is a network-transparent protocol, the other option is to just run another X Server on your host machine and have OpenLinux connect to that. While it is technically possible for it to connect to your primary X server, the security changes needed for this configuration are not recommended. Instead, there are two options: nested X server and a second X server.

The nested X server is the simpler and more recommended option. Simply install xnest if it is not already installed, then run as follows:

$ Xnest -ac -listen tcp :1

The -ac parameter disables access protection, -listen tcp listens for TCP connections, and :1 specifies this is the second (index 1) server on the machine. Your primary X server is likely already :0. This will give you a blank window of some reasonable default size. If this size is not to your liking, resist the instinct to just resize it. Instead, quit and re-run with the -geometry parameter specified. There are other options for XNest; refer to the manual page for more info.

An initial blank Xnest window will appear as follows:

XNest session with no clients

Note: most sources recommend using Xephyr nowadays for nested X servers, as it supports more modern X features. Since we are using this for a very old Linux distribution, the lack of these features is actually a benefit.

The other option is to run a second, full-screen X server on your host machine. To do this, switch to a separate TTY (e.g. by pressing ctrl + alt + F1), then run:

$ X -ac -listen tcp :1

Which is basically the same as the XNest command. Here, you'll have to use Ctrl + Alt + F7 to switch back to your QEMU session before running commands. The new X session should be available on Ctrl + Alt + F8, but I don't recommend switching away from it once you get applications running. On my machine, it doesn't re-display, but this could be NVidia's fault. It's probably just easier to make a larger Xnest window.

Regardless which method you picked, you would simply run the following command on the OpenLinux VM to set the X server to use:

$ export DISPLAY=alpha:1

Where alpha is the short hostname if your VM's host, specified when adding the entry to the hosts file earlier and :1 is the display index specified when running the nested/second X server.

Beyond this, you just need to run a window manager and some applications for your new nested X server. If you want to run the default "Looking Glass" configuration, simply execute the xinitrc file itself:

$ /etc/X11/xinit/xinitrc

And it will show up as so: XNest session running 'Looking Glass'

If you ran the full-screen X server, it should switch to it automatically once a window manager starts controlling it.

Similarly, if you want to run KDE, you would run the following:

$ /etc/X11/xinit/kdeinitrc

There are a few other window managers you can run separately if you like. For example, to get an Open Look window manager session running xterm and Xfm, you would run the following:

$ olwm &
$ xfm &
$ xterm &

And get this result:

XNest session running olwm, xterm and fwm

However, xfm has problems with mouse events on anything resembling a modern X server (even XNest).

If you wish to use this sort of thing often, I suggest creating a shell script or application launcher to get XNest running quickly, then a shell script on the VM side to set DISPLAY and connect easily.

And that's it. Have fun with your Retro Linux VM.

Comments

There are no comments yet.

Add a Comment
Comment Atom Feed