26 years old RedHat 5.2 on QEMU i386
====================================

Last week I had some fun with installing and running RedHat 5.2 with
the help of qemu-system-i386 on my Thinkpad X201 running FreeBSD 14.

QEMU
----
QEMU is a generic and open source machine emulator and virtualizer.
QEMU provides full system emulation, emulating different
architectures.

Older Linux distributions require older architectures. QEMU offers a
good and easy to use emulation of the i386 architecture.

RedHat 5.2
----------
RedHat 5.2 is a Linux distribution from 1998. In 1998/1999 I have used
it both for a workstation as for some servers. The Linux kernel version
is 2.0.36.

I started with Slackware and then switched to RedHat 4.2. One
advantage of RedHat was the RPM package management. When you install
an RPM package, the package manager takes care of the dependencies. On
Slackware, users are responsible for managing their dependencies.

The distro is from time before we all used SSH. Telnet would take care
of the remote access, and FTP was used to exchange files.

LILO
----
The Linux distro's at the time booted with LILO (Linux Loader), and
so does RedHat 5.2. Distro's booting with Grub came later.

QEMU start command
------------------
Create a qcow2 image file with qemu-img. With the following command we
boot the virtual system from the CDROM, to start the installation
process.

qemu-system-i386 -M pc -cpu 486 -m 64M  -no-fd-bootchk\
    -vga cirrus -boot d \
    -drive file=rh52.qcow2,if=ide,index=0 \
    -drive file=red-hat-linux-5.2-cd1.iso,if=ide,index=1,media=cdrom \
    -netdev tap,ifname=tap0,id=mynet0,script=no,downscript=no -device ne2k_pci,netdev=mynet0,mac=52:54:00:12:34:57 \
    -k en-us -rtc base=localtime

* In the above example, `rh52.qcow2' is the file name of the image file.
* Make sure the mac address is unique, each VM must have a different
 address.
* On headless systems, add `-display curses', to get a console in the
 terminal
* The NIC is a NE2000, pci model. This NIC is supported by RedHat 5.2
 without having to manual modprobe.
* Prior to running this command, make sure tap0 is added to your bridge.

RedHat 5.2 on QEMU as FTP server
--------------------------------
To facilitate file exchange, I decided to create a small RedHat 5.2
FTP server before setting up a virtual desktop system.

To estimate a proper disk size for the FTP server I did a test install
of RedHat 5.2 with just a few tools, like a FTP and a NFS server. The
virtual machines reboots when the installation is complete. Next a
quick login shows that less than 150 Mb of disk space is used.

I discarded the machine by deleting the disk image, and created a new
image of 500 Mb. This is more than enough. The image is in qcow2
format. After the initial install the physical size of the image is
about 75 Mb, this will grow during usage.

During the installation process we select `anonymous FTP server'.
Starting a FTP session from our FreeBSD laptop we are required to log
in. For this we need a mortal user, connecting to the FTP-server or
the telnet-server as root is refused.

FTP from my FreeBSD box works with `ftp <ip-address>`, but from the
other RedHat 5.2 virtual machines I have to issue `ftp -p
<ip-address>` (passive FTP).

RedHat 5.2 on QEMU as workstation
---------------------------------
Next I created a RedHat 5.2 workstation, running XFree-3.3.2. As root
I used the XF86Setup utitly to create the XF86Config file (see below).

When running 'startx', the system defaults to the Fvwm96 window manager.
The menu gives the option to switch to Fvwm2, Afterstep, or Lesstif.

In the installer I choose for a workstation and after the install
I added the ircii package. The total disk space used is about
350 MB.

I also installed the x-gopher package, but was not able to
open Gopher burrows with it. However, both lynx and Netscape
are installed, and support gopher :)

XF86Config
----------
The hardest part is getting X working.
After fooling around with XF86Setup I got a working desktop.

In `etc/X11`` X is a symbolic link:

   X -> ../../usr/X11R6/bin/XF86_SVGA

Contents of `/etc/X11/XF86Config`:

   # XF86Config auto-generated by XF86Setup
   #
   # Copyright (c) 1996 by The XFree86 Project, Inc.

   #
   # Permission is hereby granted, free of charge, to any person obtaining a
   # copy of this software and associated documentation files (the "Software"),
   # to deal in the Software without restriction, including without limitation
   # the rights to use, copy, modify, merge, publish, distribute, sublicense,
   # and/or sell copies of the Software, and to permit persons to whom the
   # Software is furnished to do so, subject to the following conditions:
   #
   # The above copyright notice and this permission notice shall be included in
   # all copies or substantial portions of the Software.
   #
   # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
   # THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
   # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
   # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   # SOFTWARE.
   #
   # Except as contained in this notice, the name of the XFree86 Project shall
   # not be used in advertising or otherwise to promote the sale, use or other
   # dealings in this Software without prior written authorization from the
   # XFree86 Project.
   #

   # See 'man XF86Config' for info on the format of this file

   Section "Files"
      RgbPath    "/usr/X11R6/lib/X11/rgb"
      FontPath   "/usr/X11R6/lib/X11/fonts/misc:unscaled"
      FontPath   "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
      FontPath   "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
      FontPath   "/usr/X11R6/lib/X11/fonts/Type1"
      FontPath   "/usr/X11R6/lib/X11/fonts/Speedo"
      FontPath   "/usr/X11R6/lib/X11/fonts/misc"
      FontPath   "/usr/X11R6/lib/X11/fonts/75dpi"
      FontPath   "/usr/X11R6/lib/X11/fonts/100dpi"
   EndSection

   Section "ServerFlags"
   EndSection

   Section "Keyboard"
      Protocol        "Standard"
      XkbRules        "xfree86"
      XkbModel        "pc101"
      XkbLayout       "us"
   EndSection

   Section "Pointer"
      Protocol        "PS/2"
      Device          "/dev/mouse"
   EndSection

   Section "Monitor"
      Identifier      "Primary Monitor"
      VendorName      "Unknown"
      ModelName       "Unknown"
      HorizSync       31.5-64.3
      VertRefresh     50-90
      Modeline  "1024x768"   85.23 1024 1032 1152 1360 768 784 787 823
   EndSection

   Section "Device"
      Identifier      "Primary Card"
      VendorName      "Unknown"
      BoardName       "Cirrus Logic GD544x"
      Clocks          25.23 28.32 41.16 36.08 31.50 39.99 45.08 49.87 64.98 72.16 75.00 80.01 85.23
      VideoRam        4096
   # Use Option "no_bitblt" if you have graphics problems. If that fails
   # try Option "noaccel".
   # Refer to /usr/X11R6/lib/doc/README.cirrus.
   # To allow linear addressing, uncomment the Option line and the
   # address that the card maps the framebuffer to.
   Option "no_bitblt"
   Option "noaccel"

   EndSection

   Section "Screen"
      Driver          "Accel"
      Device          "Primary Card"
      Monitor         "Primary Monitor"
      DefaultColorDepth 16
      SubSection "Display"
         Depth        8
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        15
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        16
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        24
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        32
         Modes        "1024x768"
      EndSubSection
   EndSection

   Section "Screen"
      Driver          "SVGA"
      Device          "Primary Card"
      Monitor         "Primary Monitor"
      DefaultColorDepth 16
      SubSection "Display"
         Depth        8
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        15
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        16
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        24
         Modes        "1024x768"
      EndSubSection
      SubSection "Display"
         Depth        32
         Modes        "1024x768"
      EndSubSection
   EndSection

   Section "Screen"
      Driver          "VGA16"
      Device          "Primary Card"
      Monitor         "Primary Monitor"
      SubSection "Display"
         Depth        4
         Modes        "1024x768"
      EndSubSection
   EndSection

   Section "Screen"
      Driver          "VGA2"
      Device          "Primary Card"
      Monitor         "Primary Monitor"
      SubSection "Display"
         Depth        1
         Modes        "1024x768"
      EndSubSection
   EndSection

   Section "Screen"
      Driver          "Mono"
      Device          "Primary Card"
      Monitor         "Primary Monitor"
      SubSection "Display"
         Depth        1
         Modes        "1024x768"
      EndSubSection
   EndSection

Have fun with old Linux distributions!


Last edited: $Date: 2024/03/19 19:22:38 $