How to install Ubuntu 18.04 on the Hercules mainframe - M87
Channel: moshix
Date: 2018-09-18

In this video we do a step by step install of Ubuntu 18.04 on Hercules and configure network to make it accessible to your LAN. 

The original article is here: https://astr0baby.wordpress.com/2018/06/03/installing-ubuntu-18-04-server-s390x-in-hercules-mainframe-simulator/

Obtain Ubuntu for the mainframe from here: http://cdimage.ubuntu.com/releases/16.04/release/

Obtain your Hercules 4.00 from here: https://github.com/hercules-390/hyperion

We will configure a network and related NAT so we can give our Linux on the Hercules it's own IP address. 

Here is the config file: 


CPUSERIAL 002623
CPUMODEL  2086
MAINSIZE  6000
NUMCPU    4
MAXCPU    4
OSTAILOR  LINUX
PANRATE   SLOW
ARCHMODE  z/Arch
ALRF     ENABLE
DIAG8CMD ENABLE
ECPSVM YES
ARCHLVL  ENABLE BIT44
ARCHLVL  ENABLE BIT45
ARCHLVL  ENABLE BIT37
ARCHLVL  ENABLE BIT49



# Display Terminals

0700 3270
0701 3270


# dasd
0120 3390 ./dasd/ubuntu.120.cckd

# tape
0581    3420

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



here is the network set up script:


#!/bin/bash
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
iptables -t nat -A POSTROUTING -o ens160 -s 10.1.1.0/24 -j MASQUERADE
iptables -A FORWARD -s 10.1.1.0/24 -j ACCEPT
iptables -A FORWARD -d 10.1.1.0/24 -j ACCEPT
echo 1  /proc/sys/net/ipv4/ip_forward
echo 1  /proc/sys/net/ipv4/conf/all/proxy_arp