Thursday, November 20, 2008

Hercules and Slackware (slack/390) - Part 3

...Continuing from Part 2

Configuring Hercules

So now we have Hercules installed and working and downloaded everything we need to install Slack/390 on it.

But first we need to configure our mainframe (tell the emulator which devices it needs to emulate, where they are, etc.).

Hercules uses a configuration file named hercules.cnf and looks for it in the directory it started from (but you can override the name and location with the -f option when starting Hercules).

You can find lots of information in the installed documentation (/usr/local/share/hercules/hercconf.html) so I'll just discuss some important details here you need to configure.

1) First we'll define the system parameters:

ARCHMODE ESA/390
Here we define the architecture we will emulate with Hercules. Since we're going to install Slack/390, we'll need the ESA/390 architecture here.

MAINSIZE 256
This defines the 'main storage size' (think of RAM) of your mainframe in MB. I use 256, which is enough for me and doesn't put a high load on my host system. Feel free to change this value depending on your needs and resources.

NUMCPU 1
Here you set the number of virtual CPUs for your emulated mainframe.
For me, one is enough, but you can try two if you like (even on a host with only one physical CPU!). If you need more than two emulated CPUs, you might have to recompile Hercules (see the documentation).

OSTAILOR LINUX
This parameter is just to suppress some unnecessary messages on the Hercules control panel when running GNU/Linux.

PANRATE SLOW
Here we define the refresh rate of the Hercules panel. 'SLOW' means 500 milliseconds, which is fine and reduces the load on the host system. If you define a faster rate here, you can get some funny effects for instance when your file system is checked during boot (the increasing line that shows the completion will scroll like crazy).

2) Now we'll define the hardware we have

In Hercules we configure devices by setting a 'Device number', a 'Device type' (mostly the original model numbers from IBM), and the file name on the host system.

I'll give the lines of a very basic configuration we can use to install Slack/390:

000C   3505   ./rdr/vminstall.image-2.4.26.gcc-3.3.4.img ./rdr/parmfile.txt ./rdr/initrd.gz autopad eof
Note: this is one line in hercules.cnf!
- 000C is the device number
- 3505 is the model number (a card reader)
- then follow a list of the three local file names
- autopad means all lines will be padded up to 80 characters (standard width for punched cards)
- eof signals the end of the 'deck' of cards.
We still need to alter the parmfile.txt... See below...

0120   3390   ./dasd/3390.SLACK.0120
0121   3390   ./dasd/3390.SLACK.0121

You might recognize the device numbers from my previous post, when we created the virtual DASDs. So this is where we define the 'disks' we'll use. GNU/Linux will recognize them as '/dev/dasda' and '/dev/dasdb'.
- 0120 & 0121 are the device numbers
- 3390 is the model number
- ./dasd/3390.SLACK.012[0/1] is the file name on the host

0F00,0F01 LCS   -n /dev/net/tun 192.168.1.162
- 0F00,0F01 are the devices numbers
- LCS stands for Lan Channel Station for Hercules to emulate an Ethernet adapter
- -n /dev/net/tun is the local device that points to your 'tun' adapter
- 192.168.1.162 is the IP address of your mainframe

This is all you need for a minimal Hercules configuration. You can add devices later as needed / wanted.

3) Sample hercules.cnf file
To prevent typing errors, you can copy the following lines and save them as 'hercules.cnf' in the (install) directory:

MAINSIZE  256
NUMCPU    1
OSTAILOR  LINUX
PANRATE   SLOW
ARCHMODE  ESA/390

# reader
000C    3505 ./rdr/vminstall.image-2.4.26.gcc-3.3.4.img ./rdr/parmfile.txt ./rdr/initrd.gz autopad eof

# dasd
0120    3390 ./dasd/3390.SLACK.0120
0121    3390 ./dasd/3390.SLACK.0121

# network
0F00,0F01 LCS -n /dev/net/tun 192.168.1.162



OK, we're getting closer to installing, but we still need to configure the kernel parameters.
See my next post to continue!

Labels: , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home