Running GNU/Linux Debian s390 under a i386
Posted by enerv on Tue 2 Jan 2007 at 06:07
Using the hercules emulator it is possible to have your system emulate an IBM mainframe! Here we'll give a brief overview of using the emulator to install a pre-made image of Woody, giving you a Debian GNU/Linux S390 system.
Installing the emulator with a fresh installation of Sarge is as simple as:
aptitude install hercules mkdir /etc/hercules cd /etc/herculeswget http://people.debian.org/~mdz/hercules/Debian-3.0r1.3390 wget http://people.debian.org/~mdz/hercules/hercules.cnf
Now edit the file /etc/hercules/hercules.cnf and comment out the following line :
000C 3505 bf/vmrdr/kernel.debian bf/vmrdr/parmfile.debian bf/vmrdr/initrd.debian autopad eof
Uncomment these two lines:
0A00 3088 CTCI /dev/net/tun 2000 192.168.10.2 192.168.10.1 255.255.255.252 0A01 3088 CTCI /dev/net/tun 2000 192.168.10.2 192.168.10.1 255.255.255.252
Now change the line:
0300 3390 debian.3390
to read:
0300 3390 /etc/hercules/Debian-3.0r1.3390
Now that the configuration file has been updated we can execute hercules:
slut:/etc/hercules# hercules
Once the system has started started enter into the console:
iodelay 800 ipl 0300
This should now start to run the system. When HERCULES asks you for login and password just type (using a dot):
.root
You are logged into the a Debian GNU/Linux s390 machine! All commands that you will use in this system console needs a dot before the syntax (eg.: .cat /proc/cpuinfo). It's because the emulator needs to "translate" the syntax this way. On the other hand Hercules will run the commands without the dot.
If you want to use the internet connection of your host system you will need to use the nat table in your iptables firewall. For example run these commands:
iptables -t nat -A POSTROUTING -j MASQUERADE echo "1" > /proc/sys/net/ipv4/ip_forward
Once the system is booted you can carry out the rest of your work using the installed telnet server, via the IP address we added to /etc/hercules/hercules.cnf file we edited.
In our case:
telnet 192.168.10.2
Now you will finish the Debian installation. Remember that you need to edit the /etc/resolv.conf file typing your nameservers.
Note: when you run through the installer second-stage over telnet you will need to edit the source.list file, since it will refer to "stable" and not "woody".
You also need to remember to save the configurations before you close Hercules:
stop savecore debian-current start
Now you can test your packages in this arch (s390)! ;)
Let's HACK! ;)
- Download the files for the "generic" image from the D-I project website
- Add a line to hercules.cnf:
000C 3505 kernel.debian parmfile.debian initrd.debian autopad eof
- Start hercules and use 'ipl c' to boot the installer
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
i do not have networking either. yes, i do have tun/tap enabled in the kernel.
and i have an additional problem... i issued "ping" on the debian console...
i do not know how to abort it since i cannot do "CTRL-C" inside hercules...
hmm... i believe i will kill it this time, but for the future, how can i abort such things if i accidently issue a command that is not self-returning?
kind regards
--alex
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Once this was removed, I didn't get the corresponding error you see at boot time and the network started without issue. Until I made this change, I couldn't see the hsi0 device through an ifconfig -a either. The network also worked perfectly during the install, but failed on the subseqent boot. I believe there may be a place to set this in a config file rather than delete the line that sets it in setup script, but its location eludes me at this time. I hope this helps someone else! I'll try to submit a bug report when I get the time.
[ Parent | Reply to this comment ]
http://tech.groups.yahoo.com/group/hercules-390/message/51239
for the message I sent to the hercules list that has a hackish fix.
Vince
[ Parent | Reply to this comment ]
from the IBM webpage: http://www.vm.ibm.com/related/tcpip/faqlinux.html
"For the ping (and many other commands), the Ctrl-C (or, ^c) sequence provides the appropriate interrupt."
And don't forget you can limit ping attemps with the switch -c
example: ping -c 3 10.0.0.1
this issues 3 pings and then drop back to shell.
Hope that helps.
[ Parent | Reply to this comment ]
why don't you put a link on your home page that lets you download the 'MIXMASTER'?!? Its so much easier than searching your page and then learning that you have to go to www.anonymizer.com ...or whatever.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]