Hercules

Hercules is Roger Bowler's free System 370/390 emulator, now maintained by Jay Maynard. It is complete enough to run Linux/390, as well as OS/360, MVS 3.8, and VMr6. Reports claim that VM/ESA and OS/390 work too, but the legal situation is iffy, so unless you have a license that allows you to do testing and disaster recovery with your current mainframe OS, you can't legally try those operating systems. However, there are no such restrictions on Linux, OS/360, VMr6, or MVS 3.8.


Booting Linux/390 on Hercules

It's pretty straightforward to run Linux/390 on Hercules. Here's the recipe (Some of these files will require you to shift-click (in Netscape or IE) or press "d" (in Lynx) to download rather than display them.):

  1. Get the Hercules 1.70 sources.
  2. Unpack Hercules into its own directory
  3. Build Hercules:
    make
  4. Create an appropriate Hercules configuration file . This one is for a minimalist system with one swap disk and one filesystem disk. You actually probably don't need the console at 0009, the card reader at 000c, the punch at 000d, the printer at 000e, or the 3270 console at 001f, but they don't hurt anything either.
  5. As root, mkdir /tapes.
  6. Create a space for the Linux installation:
    mkdir linux-390 && cd linux-390 && ln -s /tapes tapes. The /tapes business is a consequence of Hercules's TDF handling.
  7. Get vmnet. We will use IP addresses 192.168.0.1 and 192.168.0.2; if you need different IP addresses, the vmnet docs explain how to invoke it.
  8. Unpack vmnet. make && make install. Install an /etc/vmnet.conf as per the instructions, and use /bin/true for your init program.
  9. Get the SuSE 7.0 GA distribution, at least CD1 . If you're on dialup, this is probably, a little slow. Find someone with a fast connection and get him or her to download and maybe burn the CD images for you. You may also want CD2 and CD3
  10. Mount CD1 somewhere. Pull initrd and tapeipl.ikr off of it (it's in suse/images on CD1.)
  11. Get a Parameter Line and a Tape Description File too. (The parmline is in EBCDIC; in ASCII it looks like this.)
  12. As root, put all these files into /tapes. You may need to use dd with the sync option to make sure that they are all multiples of 1024 bytes.
  13. Define your disk for Hercules: dasdinit linux.120 3390 LIN120 1200 and dasdinit linux.121 3390 LIN121 20. This creates a 1200-cylinder disk for the filesystem and a 20-cylinder disk for swap.
  14. Either export the mounted CD-ROM (or image) via NFS or make it accessible via FTP
  15. The moment you've been waiting for: boot Hercules:
    hercules-390 -f l390.cnf
    If vmnet is correctly set up, you should get a slip connection up with (in our example) 192.168.0.2 as the L/390 machine, and 192.168.0.1 as the host machine.
    At this point, type ipl 0581 on the Hercules system console. You should be off and running.
  16. You'll need to manually add routes to the other machines on your network, so that they know that 192.168.0.1 is the gateway to 192.168.0.2, which is the L/390 box.
  17. As you need to respond to questions asked by the Linux installation, prepend a . to them. For example, when you're asked whether you're running a network, type .yes at the Hercules console. It's a CTC network. The Linux/390 side is 192.168.0.2 and its peer is 192.168.0.1. Your netmask is 255.255.255.255.
  18. After Linux comes up under Hercules, you can telnet to it at 192.168.0.2. Once you've done that, you should be able to follow the on-screen directions to probe your dasd addresses (in this case, modprobe dasd dasd=121,120) (YaST likes having its swap disks first for some reason), then run YaST and have it format your disks for you.
  19. Use YaST just like you would on an x86 system. If you only have CD1, the standard and minimal installations will work without requiring the other CDs. If you have the CD NFS mounted, use an NFS install; otherwise, do an FTP installation.
  20. Once YaST finishes, type .shutdown -h now at the hercules console to shut down the running system. Then type stop, and ipl 120 should boot from your new Linux disk. As SuSE says, "Have a lot of fun..."
Thanks to Richard Higson for help getting vmnet working.

Running Hercules on Linux/390

Running Hercules on Linux/390 is straightforward. Download Hercules, and build it with make HOST_ARCH=s390.


Booting Linux/390 on Hercules under Linux/390

Of course you can.

Just follow the steps on Linux/390 on Hercules. Hope you have plenty of time, though.


Screenshots

What would life be without screenshots?

Linux/390 running on Hercules/x86

Linux/390 running on Hercules/s390

Just after shutdown of Linux/390 
on Hercules/s390, with uname output showing that it's running on a Linux/390 
box.


<adam@io.com>
10 December 2000