Vic's experiences with Linux for S/390

Home

Why do it?

I'm what you would call a Linux fan. Not quite a fanatic, but there's lots about Linux that I like. I'm a bit more fanatical about mainframes, however. Put the two together...

Hey, I've just got to try it!

My first experiences were using Hercules, before I got my P/390. I visited the Linux for S/390 site at Princeton Univeristy, which has instructions on using Hercules to IPL a Linux/390 system. At the time, the instructions were built around the filesystem known as the "Marist distribution", so named because it was built by the folks at Marist College in New York State. Now, it looks like all of the doco at Princeton has been updated to cover SuSE and more recent versions of Hercules.
The Marist filesystem is somewhat limited, if you don't know 100% what you're doing, which I didn't. The way its distributed, in combination with the state of Hercules at the time, it had two major flaws: The first is a knowledge thing: what I know now would allow me to have a decent stab at making a standalone, disk-based system using the Marist filesystem as a starting point.
The second was a Hercules thing, which thanks to a little program called vmnet by Willem Konynenberg, was resolved.
At the time, all I could do with the Marist system was IPL, issue a couple of commands, say "Wow", and shut it down. Fun, but not riveting stuff. Time to move on...

Back to top

SuSE

About the time that I got my ADSL connection at home, I found out that the SuSE folks had made a pre-release of their S/390 distribution available for download. What better way to test a new broadband Internet connection than downloading a CD image! I just managed to get the image downloaded and burnt before I had to leave home for another of my month-long work trips -- a shame, because I was itching to try it out on my newly-assembled P/390. That would have to wait.

So, with a Dell PII-400 with 128MB RAM and running Linux Mandrake 7.1, I proceeded to try my first SuSE install. Altogether, it went surprisingly well. I encountered a couple of problems: This machine is still in use, but the Linux/390 system is about to be 'transferred' to another machine with more DASD, more RAM.

What's it being used for? Believe it or not, a real-life proof-of-concept of an NDS-based single signon utility with multi-platform access. We want to demonstrate that the tool can administer on the mainframe also...!

I also run Linux/390 on my home Hercules server, a dual processor PIII-450 with only 64MB RAM. I have 96MB RAM defined as Hercules main storage, which I know is far from ideal (having a decent sized chunk of Hercules' main actually in Linux virtual storage), but it performs quite well for me.

Back to top

P/390

Fresh from my success with the install on Hercules, I started work on the P/390 when I returned home. The outlook was bleak, however, when I was confronted with hard DISABLED WAIT states on IPLing the installation TDF that had worked so well for me on Hercules. Nothing I tried worked: parameter line changes, insert tapemarks, remove tapemarks, large initrd, small initrd, console at 0x1f, console at 0x09, NOTHING.

It was looking very bleak indeed. Especially considering I was reading reports almost daily from folks around the world who had beaten their initial problems and got it working.

Some time before this, SuSE had released the GA version of their distribution. It came to light that those who were having success were using the GA version, not the pre-release that I was still using. Perhaps the pre-release doesn't have the required kernel mods to support the P/390...?

Hesitantly, I downloaded CD1 of the SuSE GA distribution, and burned the CD. And IPLed...

DISABLED WAIT.

I was almost at wit's end (so, I suspect, were the subscribers to the Linux-VM and P370-L mailing lists). I left it alone for a day or so, came back, rechecked all the files, tried again, DISABLED WAIT. Assuming that the problem was kernel-related, I didn't bother redoing all of the things I'd tried using the pre-release (the TDF changes, the parmfile changes, etc).

Almost at the point of giving up entirely, and contemplating giving away my P/390 (shame!), I looked again at the sample TDFs that were on the SuSE CD. They looked different from the TDF I was using, the TDF that had worked under Hercules. On Hercules, you need to manually insert TM for tapemark between the files in the TDF, but the samples on the CD had no such tapemarks...

Thinking "what's the point, you've tried this already", I removed the tapemarks from the TDF, and IPLed...

...and nearly fell off the chair when I saw kernel messages on the 3215 console. IT WORKED!!!

In disbelief, I followed the prompts, set up networking through LAN3172 (called it an OSA, I think), got the adapter number wrong, re-IPLed, tried the networking again with the correct adapter number, and THAT WORKED TOO!!!

By now, I was so happy I could have stopped there. But I figured I should actually install the thing! Again, I had disk space trouble, but decided to use LVM to 'partition' my DASDs partly to try it out, and partly to give me some flexibility for later on. That worked TOO!!!

After a while (overnight), I had a Linux system built!

Back to top

zLinux

This is where it gets real interesting. Neale Ferguson provided a Linux 2.4.0 kernel image, compiled under the 64-bit "z/Architecture". The race was now on in earnest to get the new Hercules version 2, complete with ESAME (ESA Modal Extensions) support, ready to run a 64-bit OS.

The competitor in the race is z/VM, and some of the 'Herculeans' are working on this. As VM uses the machine heavier than Linux, however, there's a lot of work involved in getting Hercules to the point where z/VM will run well.

Back to zLinux (our affectionate term for the 64-bit "Linux for zSeries"). In theory, we simply take our installation TDF, replace the 2.2 kernel image file with the 2.4 one, and IPL. Quite quickly, we discovered problems -- the kernel was attempting to use instructions that had not yet been implemented in Hercules. I was the lucky chap who ended up implementing the Divide Logical instruction family (DL, DLR, DLG, DLGR), with some help from Bob Abeles who provided an algorithm for 128-bit division. Now, our kernel could actually read its parmline!

The race is not yet over, however. Jan Jaeger and Roger Bowler have swatted some other bugs, and Dr Ulrich Weigand pointed out an address translation problem. Now, we appear to be stuck on a not-insignificant problem: IEEE floating point. Hercules, like the P/390 and earlier 9672s, does not have the hardware IEEE facility sported by the latest G5/G6 9672s, and obviously the 2064 (e[logo]server ZSeries 900). So, Linux provided IEEE emulation, which was used if the hardware was not equipped with the IEEE facility. With the zLinux kernel, however, since the only hardware that was expected to run zLinux was IEEE facility-equipped, the IEEE floating-point emulation code was removed.

IPLing the zLinux kernel on my Hercules system, I get to the point where init starts, then everything stops. Hercules is busily processing 'zInstructions' at 1.02MIPS, but nothing further happens on the console. Dr Weigand advised that he was able to run simple programs like bash, so he must have a different way of getting a system up.

As at time of writing, one of the Herculeans is working on the IEEE floating point emulation in Hercules, so STAY TUNED!!! The race may be about to be won!

Back to top

Some Links

Back to top
© 2001 Vic Cross vic.cross@veejoe.com.au