Thursday, November 20, 2008

Hercules and Slackware (slack/390) - Part 2

As promised, here are the first steps to get Slack/390 running on your Hercules emulator!


0) Get Hercules installed & running
See my previous post if you don't have Hercules yet.

I am a GNU/Linux user, but I know Hercules works under Windows and Mac OS X as well.
If you use one of them, some steps on this page might differ, but I'll leave this up to the reader to find out ;-)

1) Obtain a copy of Slack/390
I got mine from but other sources are available.
Check the official Slack/390 site for other links.

Personally I did this installation with the -current version (which is equivalent to Slackware 10.1) but if you prefer the stable version, get 10.0.

To save some time downloading, get only the /kernels and /slackware directories.
From the /slackware directory, you can even skip the gnome, kde and kdei subdirectories, which are large and a bit useless on a terminal-only system.
(ok, it is possible to run KDE or GNOME on Hercules with a X-terminal, but that's too much trouble for me...)

The directory where you downloaded all this, I will call '(download)' from now on.

2) 'Export' the Slack/390 packages
Since we cannot simply insert a CD in our mainframe, we'll install over NFS.
This means that we need to 'export' the directory with the downloaded packages.

I won't write a NFS manual here, since there is enough information available in the man-pages and on the internet, but basically the steps are:
- include the (download)/slackware directory in /etc/exports
- restart NFS with '/etc/rc.d/rc.nfsd restart'

3) Prepare a directory on a file system for your new Slack/390 installation
We'll create some folders with the images to boot our mainframe and the images of our drives where we'll install Slack/390.
A basic installation is about 700MB, but make sure you have some extra space to play around afterwards.
I'll call this base directory (install) from now on.

Create the following directory structure:
$ mkdir (install)/rdr # Here we'll put files for our virtual reader
$ mkdir (install)/ptr # For output of a printer
$ mkdir (install)/dasd # Here we'll put our virtual DASDs (= 'drives')

4) Create two virtual Direct Access Storage Devices
The S/390 works with DASDs - think of hard drives to have an idea.
For our installation, we need to create these drives to have some storage space.

Hercules emulates several models of DASDs, and I selected the 3390-3, which has a capacity of just over 2GB. This is enough for a standard installation (remember we won't use KDE or anything else that takes up a lot of space).
I'll create a second DASD to be mounted as /home, so that we can put any extra stuff there.

A nice feature of Hercules is that is can use compacted DASD images, so that you won't use more than necessary on your host system. My complete installation is under 700MB.

These are the commands to create the two DASDs:
$ cd (install)/dasd
$ dasdinit -z -linux 3390.SLACK.0120 3390-3 SLW120
$ dasdinit -z -linux 3390.SLACK.0121 3390-3 SLW121

Of course, substitute '(install)' with your real path.

- '-z' is to create the 'zipped' or compacted images
- '-linux' is to make sure the DASDs will work under GNU/Linux
- '3390.SLACK.0120' is the name of the file we'll create
- '3390-3' is the model number to emulate
- 'SLW120' if the volume label

For the curious: '120' & '121' are the device numbers we'll configure in Hercules.

5) Prepare the virtual reader for IPL
We'll need to boot a kernel to start installing Slack/390.
On a 'normal' desktop, we'd use a CD, USB-stick, or whatever.
On our mainframe, we'll use the virtual reader.

We'll need to read three files: the kernel, an initial-ram-disk, and a file with some parameters.
Copy the following files from (download)/kernels to (install)/rdr:
- initrd.gz
- parmfile.txt
- vminstall.image-2.4.26.gcc-3.3.4.img

We're ready now to take this to the next level of complexity: editing the configuration files...
See my next post for an explanation and sample files.

Labels: , , ,


Post a Comment

Subscribe to Post Comments [Atom]

<< Home