Index of /M1-Apple/s390x-M1-Qemu/

NameLast ModifiedSizeType
../ -  Directory
README.txt2021-Jan-18 22:01:272.0Ktext/plain; charset=utf-8
install.sh2021-Jan-18 21:51:220.2Ktext/x-sh; charset=utf-8
run.sh2021-Jan-18 21:51:110.1Ktext/x-sh; charset=utf-8
MAINFRAME on your M1 
====================

We will be using the latest Ubuntu 20.10 s390x image 
Download from 
https://cdimage.ubuntu.com/releases/20.10/release/ubuntu-20.10-live-server-s390x.iso 
Download - rename as ubuntu.iso and place in your s390x working directory 

For the disk image disk.img I have used dd to create 20G dummy disk image 

dd if=/dev/zero of=disk.img bs=1024 count=20M 

Next we need the kernel and initrd.ubuntu from the ISO (mount it and copy it over to the 
s390x working directory)

hdiutil mount ubuntu.iso 

cd /Volumes/Ubuntu-Server 20 

dr-xr-xr-x 1 user staff     2048 Oct 22 16:34 .
dr-xr-xr-x 1 user staff     2048 Oct 22 16:34 ..
-r--r--r-- 1 user staff        4 Oct 22 16:34 initrd.off
-r--r--r-- 1 user staff        4 Oct 22 16:34 initrd.siz
-r--r--r-- 1 user staff 30055882 Oct 22 16:06 initrd.ubuntu
-r--r--r-- 1 user staff 10986040 Oct 22 16:06 kernel.ubuntu
-r--r--r-- 1 user staff       11 Oct 22 16:34 parmfile.ubuntu
-r--r--r-- 1 user staff      340 Oct 22 16:34 ubuntu.exec
-r--r--r-- 1 user staff 46833664 Oct 22 16:34 ubuntu.ikr
-r--r--r-- 1 user staff      157 Oct 22 16:34 ubuntu.ins

copy only kernel.ubuntu  and initrd.ubuntu to your working dir 
 

Installer
---------

qemu-system-s390x -machine s390-ccw-virtio \
-cpu max,zpci=on -serial telnet::4441,server \
-display none -m 4096 \
--cdrom ubuntu.iso \
-net nic -net user,hostfwd=tcp::2222-:22 \
-kernel kernel.ubuntu -initrd initrd.ubuntu \
-hda disk.img 

Do not yet reboot the system after the installer finishes 

Once installed is finished we need to copy the installed kernel.ubuntu and initrd.ubuntu from /boot to our Qemu 
working directory 

use scp to move these files out 

cd /boot
scp kernel.ubuntu initrd.ubuntu user@10.0.2.2:/Users/user 

now shut down the installer instance

Move the kernel and initrrd to your s390x working dir 



Run 
---

emu-system-s390x -machine s390-ccw-virtio \
-cpu max,zpci=on -serial telnet::4441,server \
-display none -m 4096 \
-net nic -net user,hostfwd=tcp::2222-:22 \
-hda disk.img 


Enjoy the Mainframe on your M1

twitter.com/astr0baby
Webserver 1.0