2023-08-14 10:36:26 +00:00
.. _autoinstall-quickstart-s390x:
2023-10-06 12:18:09 +00:00
Automatic installation quick start for s390x
***** ***** ***** ***** ***** ***** ***** ***** *** *
2023-08-14 10:36:26 +00:00
2023-10-06 12:18:09 +00:00
This how-to provides basic instructions to perform an automatic installation
in a virtual machine (VM) on a local machine on the s390x architecture.
2023-08-14 10:36:26 +00:00
2023-10-06 12:18:09 +00:00
This how-to is a version of :ref: `autoinstall_quickstart` .
adapted for s390x.
2023-08-14 10:36:26 +00:00
Download an ISO
===============
2023-10-06 11:45:34 +00:00
Download an ISO image of the latest release from the `release page <https://cdimage.ubuntu.com/ubuntu/releases/> `_ (currently |ubuntu-latest-version| (|ubuntu-latest-codename|)).
2023-08-14 10:36:26 +00:00
2023-10-06 11:45:34 +00:00
.. parsed-literal ::
2023-08-14 10:36:26 +00:00
2023-10-06 11:45:34 +00:00
wget https:\ //cdimage.ubuntu.com/ubuntu/releases/|ubuntu-latest-version|/release/ubuntu-|ubuntu-latest-version|-live-server-s390x.iso -P ~/Downloads
2023-08-14 10:36:26 +00:00
Mount the ISO
=============
2023-10-06 11:45:34 +00:00
.. parsed-literal ::
2023-08-14 10:36:26 +00:00
mkdir -p ~/iso
2023-10-06 11:45:34 +00:00
sudo mount -r ~/Downloads/ubuntu-|ubuntu-latest-version|-live-server-s390x.iso ~/iso
2023-08-14 10:36:26 +00:00
2023-10-22 15:50:03 +00:00
Write your autoinstall configuration
====================================
2023-08-14 10:36:26 +00:00
2023-10-06 12:18:09 +00:00
Create a cloud-init configuration:
2023-08-14 10:36:26 +00:00
2023-10-06 12:18:09 +00:00
.. code-block :: none
2023-08-14 10:36:26 +00:00
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
2023-10-22 15:50:03 +00:00
The encrypted password is `` ubuntu `` .
2023-08-14 10:36:26 +00:00
2023-10-22 15:50:03 +00:00
Serve the cloud-init configuration over HTTP
============================================
2023-08-14 10:36:26 +00:00
Leave this running in one terminal window:
2023-10-06 12:18:09 +00:00
.. code-block :: none
2023-08-14 10:36:26 +00:00
cd ~/www
python3 -m http.server 3003
Create a target disk
====================
Proceed with a second terminal window:
2023-10-06 12:18:09 +00:00
.. code-block :: none
2023-08-14 10:36:26 +00:00
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
2023-10-06 12:18:09 +00:00
Run the installation
====================
2023-08-14 10:36:26 +00:00
2023-10-06 12:18:09 +00:00
.. code-block :: none
2023-08-14 10:36:26 +00:00
sudo apt install qemu-kvm
...
2023-10-06 12:18:09 +00:00
Add the default user to the `` kvm `` group:
2023-08-14 10:36:26 +00:00
2023-10-06 12:18:09 +00:00
.. code-block :: none
2023-08-14 10:36:26 +00:00
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-22.10-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'
2023-10-06 12:18:09 +00:00
The above commands boot the virtual machine, download the configuration from the server
(prepared in the previous step) and run the installation.
2023-08-14 10:36:26 +00:00
2023-10-06 12:18:09 +00:00
The installer reboots at the end. The `` -no-reboot `` flag to `` kvm `` instructs `` kvm ``
to terminate on reboot. The procedure takes approximately 5 minutes.
2023-08-14 10:36:26 +00:00
Boot the installed system
=========================
2023-10-06 12:18:09 +00:00
.. code-block :: none
2023-08-14 10:36:26 +00:00
kvm -no-reboot -name auto-inst-test -nographic -m 2048 \
-drive file=disk-image.qcow2,format=qcow2,cache=none,if=virtio
2023-10-06 12:18:09 +00:00
This command boots into the installed system. Log in using `` ubuntu `` for both the user
name and password.