s390x

Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2020-05-22 08:20:03
Size: 3084
Editor: fheimes
Comment:
Revision 7 as of 2020-06-11 04:20:04
Size: 78
Editor: mwhudson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#pragma section-numbers 2

= Autoinstall Quick Start for s390x =

The intent of this page is to provide simple instructions to perform an autoinstall in a VM on your machine on s390x. <<BR>>
This page is just a slightly adapted page of https://wiki.ubuntu.com/FoundationsTeam/AutomatedServerInstalls/QuickStart mapped to s390x.

== Download an ISO ==

At the time of writing (just before focal release), the best place to go is here: <<BR>>
http://cdimage.ubuntu.com/ubuntu/releases/20.04/release/ <<BR>>
Any serial that is 20200408 or later should work.

`wget http://cdimage.ubuntu.com/ubuntu/releases/20.04/release/ubuntu-20.04-live-server-s390x.iso -P ~/Downloads`

== Mount the ISO ==

{{{
mkdir -p ~/iso
sudo mount -r ~/Downloads/ubuntu-20.04-live-server-s390x.iso ~/iso
}}}

== Write your autoinstall config ==

This means creating cloud-init config as follows:

{{{
mkdir -p ~/www
cd ~/www
cat > user-data << 'EOF'
#cloud-config
autoinstall:
  version: 1
  identity:
    hostname: ubuntu-server
    password: "$6$exDY1mhS4KUYCE/2$zmn9ToZwTKLhCw.b4/b.ZRTIZM30JZ4QrOQ2aOXJ8yk96xpcCof0kxKwuX1kqLG/ygbJ1f8wxED22bTL4F46P0"
    username: ubuntu
EOF
touch meta-data
}}}

The crypted password is just "ubuntu".

== Serve the cloud-init config over http ==

Leave this running in one terminal window:

{{{
cd ~/www
python3 -m http.server 3003
}}}

== Create a target disk ==

Proceed with a second terminal window:

{{{
sudo apt install qemu-utils
...
}}}

{{{
qemu-img create -f qcow2 disk-image.qcow2 10G
Formatting 'disk-image.qcow2', fmt=qcow2 size=10737418240 cluster_size=65536 lazy_refcounts=off refcount_bits=16

qemu-img info disk-image.qcow2
image: disk-image.qcow2
file format: qcow2
virtual size: 10 GiB (10737418240 bytes)
disk size: 196 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
}}}

== Run the install! ==

{{{
sudo apt install qemu-kvm
...
}}}

You may need to add the default user to the kvm group: <<BR>>
`sudo usermod -a -G kvm ubuntu # re-login to make the changes take effect`

{{{
kvm -no-reboot -name auto-inst-test -nographic -m 2048 \
    -drive file=disk-image.qcow2,format=qcow2,cache=none,if=virtio \
    -cdrom ~/Downloads/ubuntu-20.04-live-server-s390x.iso \
    -kernel ~/iso/boot/kernel.ubuntu \
    -initrd ~/iso/boot/initrd.ubuntu \
    -append 'autoinstall ds=nocloud-net;s=http://_gateway:3003/ console=ttysclp0'
}}}

This will boot, download the config from the server set up in the previous step and run the install. <<BR>>
The installer reboots at the end but the -no-reboot flag to kvm means that kvm will exit when this happens. <<BR>>
It should take about 5 minutes.

== Boot the installed system ==

{{{
kvm -no-reboot -name auto-inst-test -nographic -m 2048 \
    -drive file=disk-image.qcow2,format=qcow2,cache=none,if=virtio
}}}

This will boot into the freshly installed system and you should be able to log in as ubuntu/ubuntu.
moved to https://ubuntu.com/server/docs/install/autoinstall-quickstart-s390x

FoundationsTeam/AutomatedServerInstalls/QuickStart/s390x (last edited 2020-06-11 04:20:04 by mwhudson)