You are viewing sharkcz

Previous Entry | Next Entry

Installing Fedora 20 in Hercules

dhorak1
Hercules is a software implementation of the IBM mainframe architectures and serves as a viable solution for various tasks for people who don't have access to the real mainframe hardware. Using these steps you can install the latest Fedora in Hercules on one emulated ECKD DASD device with CTC adapter used for networking. The procedure doesn't require manual intervention as it is using a kickstart file for unattended installation. LVM is used for managing the storage, so it's easy to add new DASDs to expand the available space. The resulting product of the procedure bellow can be found at http://s390.koji.fedoraproject.org/test/hercules/20/

  1. create directory structure
    cd somewhere
    mkdir dasd images
    
  2. get the Hercules config file
    wget http://s390.koji.fedoraproject.org/test/ks/fedora.cnf
    
  3. create an empty ECKD DASD image
    cd dasd
    dasdinit -bz2 -linux linux-ckd.130 3390-9 LNX000
    cd ..
    
  4. get the installer kernel and initrd
    cd images
    wget http://s390.koji.fedoraproject.org/tree/releases/20/Fedora/s390x/os/images/kernel.img
    wget http://s390.koji.fedoraproject.org/tree/releases/20/Fedora/s390x/os/images/initrd.img
    wget http://s390.koji.fedoraproject.org/tree/releases/20/Fedora/s390x/os/images/initrd.addrsize
    
  5. get the parameters file
    wget http://s390.koji.fedoraproject.org/test/ks/generic.prm.kslvm
    cd ..
    
  6. get the LPAR ins file
    wget http://s390.koji.fedoraproject.org/test/ks/ks-lvm.ins
    
  7. the resulting directory structure is then
    ├── dasd
    │   └── linux-ckd.130
    ├── fedora.cnf
    └── images
        ├── generic.prm.kslvm
        ├── initrd.addrsize
        ├── initrd.img
        └── kernel.img
    
  8. add the masquerade rule to your local firewall and enable forwarding
    sudo iptables -t nat -A POSTROUTING -s 192.168.200.0/24 -d 0.0.0.0/0 -j MASQUERADE
    sudo echo 1 > /proc/sys/net/ipv4/ip_forward
    
    You should also check whether there are other firewall rules the could conflict with the Hercules traffic.
  9. start Hercules
    sudo hercules -f fedora.cnf
    
    and check that you see the devices 0130 (DASD) and 0600-0601 (CTC network interface)

  10. IPL Fedora installer
    ipl ks-lvm.ins
    
  11. the installation is now running

  12. log into the running installation as root (no password is set) and apply the workaround for bug 904245
    You need to wait until you see these messages on the console
    ...
    Started OpenSSH server daemon.
    ...
    Started Network Manager.
    ...
    
    then do:
    ssh -l root 192.168.200.3
    chmod 0644 /sys/firmware/reipl/ccw/loadparm
    exit
    
  13. wait some time (cca 3 hours on my dated workstation) until Hercules starts to throw some exceptions (from MSCH opcode), then quit Hercules and you are done
    HHCCP014I CPU0000: Operand exception CODE=0015 ILC=4
    CPU0000:  PSW=00001000 80000000 00000000001167F0 INST=B232D116     MSCH  278(13)                modify_subchannel
    
    EDIT 2014-01-20: after an advice from Robert Knight I changed the reboot command in the kickstart to poweroff, so the guest will shutdown correctly after installation, no more tons of error messages

  14. enjoy Fedora 20 on your virtual mainframe
    sudo hercules -f fedora.cnf
    ipl 130
    
    and from another terminal run
    ssh -l root 192.168.200.3 (password=fedora as set in the kickstart file)
    

More information

  • if you see on console
    Warning: /dev/root does not exist
    ...
    Starting Dracut Emergency Shell...
    
    then the root= parameter doesn't exist in your generic.prm or points to inaccessible file or firewall rules block IP traffic, either the HTTP connection or DNS queries

  • description of Anaconda options
  • read the Release notes, also follow the links to the previous releases

Comments

( 1 comment — Leave a comment )
Xose Vazquez Perez
Jan. 10th, 2014 02:23 pm (UTC)
8 and 9 = hercules-run
( 1 comment — Leave a comment )

Profile

dhorak1
sharkcz
sharkcz

Latest Month

July 2014
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  
Powered by LiveJournal.com
Designed by Lilia Ahner