Hercules on Fedora guide ======================== Introduction ------------ Hercules is a IBM System Z (aka s390(x)) emulator running on Unix machines. It does a pretty good job doing so but it's not horribly fast, even on modern systems. Still, it's usable for trying it out or fixing package failures or stuff like that. The official homepage of the emulator is here: http://www.hercules-390.org/ Now, for a brief history, we used to have Fedora running on System Z ways back up to Fedora 6. After that secondary arch were introduced and due to several circumstances System Z wasn't one of them, so work on it for Fedora basically stopped. It got picked up again around Fedora 10/11 by a Red Hat, specifically Karsten Hopp. This was mainly due to the reason that we were going to ship Red Hat Enterprise Linux 6 with System Z support and therefore we needed something to build upon for that, which as probably most of the Fedora users know is usually one of the Fedora releases. This lead after a huge effort to a fairly complete Fedora 11 on System Z for which we released serveral hercules images and a tarball as well as a yum config pointing to the repo with all the remaining packages. As it was done somewhere in between Fedora 11 and 12 it never got out as a real release and Karsten had to switch his focus from Fedora to finishing up the remaining issues for Red Hat Enterprise Linux 6, so there just wasn't any time left to do a clean Fedora 12 release or anything. Over the last few months now with the help of several other people, mainly Dan Horak, Dennis Gilmore and Justin Payne we're finally getting close to having a real release for Fedora again. Most of the work, a bit of history and some details about everyhing together with pointers to various information about System Z, Fedora and the like can be found on the Fedora secondary arch wiki for System Z: http://fedoraproject.org/wiki/Architectures/s390x But let's get to the real deal, so without further delay: How to run the hercules z/Series emulator with the Fedora images ---------------------------------------------------------------- In case you just want to try out how hercules works or if you want to have a System Z running on your box then this part is the right thing for you. It's a very basic install but contains all the necessary stuff and configs to get you going, mainly proper yum setup to update and install anything you want/need for your work/tests/whatever. 1) Just install the latest hercules if your host system is running Fedora 10 or newer using: yum install hercules Otherwise you'll need to rebuild the current SRPM on your system. 2) Copy the config files from http://secondary.fedoraproject.org/pub/alt/spins/S390/ to /etc/hercules: mkdir -p /etc/hercules wget http://secondary.fedoraproject.org/pub/alt/spins/S390/hercules.cnf -P /etc/hercules wget http://secondary.fedoraproject.org/pub/alt/spins/S390/hercules.init -P /etc/hercules 3) Copy one of the images from http://secondary.fedoraproject.org/pub/alt/spins/S390/ to /home/data mkdir -p /home/data wget http://secondary.fedoraproject.org/pub/alt/spins/S390/fedora-14-s390x.img.bz2 -P /home/data cd /home/data bunzip fedora-14-s390x.img.bz2 4) Make sure your firewall configuration is modified to work with the NAT setup we're doing in the hercules.init file. In case you don't have a firewall running on your system you will be perfectly fine. 5) Start up hercules with the startup script: cd /etc/hercules ./hercules.init 6) IPL (boot) the image you want to work with. ipl 0120 7) Wait till the system has finished booting. 8) Log in via ssh and have fun. Password for root is "fedora": ssh -X root@192.168.200.3 9) Have fun! :) How to install Fedora in a hercules z/Series emulator ----------------------------------------------------- The second part is for those a bit more adventureous who'd like to a complete install by themselves. Several steps are similar to the ones for just running a preinstalled image, but on the other hands it's not too hard to do a full install yourself. 1) Just install the latest hercules if your host system is running Fedora 10 or newer using: yum install hercules Otherwise you'll need to rebuild the current SRPM on your system. 2) Copy the config files from http://secondary.fedoraproject.org/pub/alt/spins/S390/ to /etc/hercules: mkdir -p /etc/hercules wget http://secondary.fedoraproject.org/pub/alt/spins/S390/hercules.cnf -P /etc/hercules wget http://secondary.fedoraproject.org/pub/alt/spins/S390/hercules.init -P /etc/hercules 3) Copy the kernel, initrd and parameter file to /etc/hercules: wget http://secondary.fedoraproject.org/pub/alt/spins/S390/current/images/kernel.img -P /etc/hercules wget http://secondary.fedoraproject.org/pub/alt/spins/S390/current/images/initrd.img -P /etc/hercules wget http://secondary.fedoraproject.org/pub/alt/spins/S390/generic.prm -P /etc/hercules As you can see at the moment i don't use our default generic.prm file from the install tree. Thats mainly because we haven't updated the one from the install tree yet and secondly because it contains already a fairly specific way to do the install to make it as easy as possible. 4) Generate a DASD disk image to install into: mkdir -p /home/data dasdinit -lfs /home/data/fedora-14-s390x.img 3390-9 LNX1 5) Make sure your firewall configuration is modified to work with the NAT setup we're doing in the hercules.init file. In case you don't have a firewall running on your system you will be perfectly fine. 6) Start up hercules with the startup script: cd /etc/hercules ./hercules.init 7) IPL (Initial Program Loader aka boot) the virtual punchcard reader to start installation: ipl c 8) Wait till you get the following message in the console: Connect now to 192.168.200.3 and log in as user install to start the installation. E.g. using: ssh -x install@192.168.200.3 You may log in as the root user to start an interactive shell. 9) Login as install user now: ssh -x install@192.168.200.3 10) After a while if you do this the 1st time you will be asked to confirm to low level format the drive. Do this as this has to happen for a first time image. If you reuse an old image you won't be bothered with this anymore. We've had some cases where with a completely fresh image even partition would traceback. In that case simply restart the install from step 7) onwards and it should work. 11) Just relax and enjoy the rest of the automated install 12) After everything finished simply exit hercules by typing "quit" and follow the instructions above to boot your fresh install using: ipl 0120