Z/Linux Emulation with Hercules

From Leo's Notes
Revision as of 07:06, 30 April 2013 by Leo (talk | contribs)
This page was last edited on 30 April 2013, at 07:06.

Installation

The guide I am using is available at http://www.josefsipek.net/docs/s390-linux/hercules-s390.html

Requirements

Install hercules, either from a package manager or from source.

cd ~
mkdir zlinux
cd zlinux
mkdir rdr dasd prt

Images

Download the images from http://ftp.debian.org/debian/dists/stable/main/installer-s390/current/ into rdr/.

Create a configuration file at ~/zlinux/s390.cnf with:

CPUSERIAL 000069        # CPU serial number
CPUMODEL  9672          # CPU model number
MAINSIZE  256           # Main storage size in megabytes
XPNDSIZE  0             # Expanded storage size in megabytes
CNSLPORT  3270          # TCP port number to which consoles connect
NUMCPU    2             # Number of CPUs
LOADPARM  0120....      # IPL parameter
OSTAILOR  LINUX         # OS tailoring
PANRATE   SLOW          # Panel refresh rate (SLOW, FAST)
ARCHMODE  ESAME         # Architecture mode ESA/390 or ESAME

# .-----------------------Device number
# |     .-----------------Device type
# |     |       .---------File name and parameters
# |     |       |
# V     V       V
#---    ----    --------------------

# console
001F    3270

# terminal
0009    3215

# reader
000C    3505    ./rdr/kernel.debian ./rdr/parmfile.debian ./rdr/initrd.debian autopad eof

# printer
000E    1403    ./prt/print00e.txt crlf

# dasd
0120    3390    ./dasd/3390.LINUX.0120
0121    3390    ./dasd/3390.LINUX.0121

# tape
0581    3420

# network                               s390     realbox
0A00,0A01  CTCI -n /dev/net/tun -t 1500 10.1.10.2 10.1.10.1


Create the disks

cd ~/zlinux/dasd
dasdinit -lfs -linux 3390.LINUX.0120 3390-3 LIN120  # for /
dasdinit -lfs -linux 3390.LINUX.0121 3390-3 LIN121  # for /home

Start hercules as root

hercules -f s390.cnf
ipl c


The following device numbers might belong to CTC or ESCON connections.
CTC read device:
  1. 0.0.0a00      2. 0.0.0a01
Prompt: '?' for help>
.1
1

The following device numbers might belong to CTC or ESCON connections.
CTC write device:
  1. 0.0.0a00      2. 0.0.0a01
Prompt: '?' for help>
.2
2

Protocol for this connection:
  1. S/390 (0)  *!  2. Linux (1)      3. OS/390 (3)
Prompt: '?' for help, default=1>
.1
1


Configure a network using static addressing
-------------------------------------------

The IP address is unique to your computer and consists of four numbers
separated by periods.  If you don't know what to use here, consult your network
administrator.
IP address:
Prompt: '?' for help>
.10.1.10.2
10.1.10.2



The point-to-point address is used to determine the other endpoint of the point
to point network.  Consult your network administrator if you do not know the
value.  The point-to-point address should be entered as four numbers separated
by periods.
Point-to-point address:
Prompt: '?' for help>
.10.1.10.1
10.1.10.1

The name servers are used to look up host names on the network. Please enter
the IP addresses (not host names) of up to 3 name servers, separated by spaces.
Do not use commas. The first name server in the list will be the first to be
queried. If you don't want to use any name server, just leave this field blank.
Name server addresses:
Prompt: '?' for help, default=10.1.10.1>
.10.1.1.8
10.1.1.8


Please enter the hostname for this system.

The hostname is a single word that identifies your system to the network. If
you don't know what your hostname should be, consult your network
administrator. If you are setting up your own home network, you can make
something up here.
Hostname:
Prompt: '?' for help, default=debian>
.zlinux
zlinux


The domain name is the part of your Internet address to the right of your host
name.  It is often something that ends in .com, .net, .edu, or .org.  If you
are setting up a home network, you can make something up, but make sure you use
the same domain name on all your computers.
Domain name:
Prompt: '?' for help>
.home.steamr.com
home.steamr.com


Generating SSH host key