Le Blog Utux

HTTP 200 GET /

Install openSUSE from Alpine on aarch64 on Hetzner

Rédigé par uTux Aucun commentaire

Hetzner provides a console access (aka kvm ip) on cheap virtual servers which is really a cool thing. While it's not possible to mount a custom iso image, they have a library with multiple choices. The openSUSE project has iso images for aarch64 but unfortunately they are missing on hetzner.

Fortunately it is possible to boot another iso and install openSUSE anyway.

  1. Provision an aarch64 virtual machine with any system.
  2. Mount the Alpine iso, reboot the virtual machine and open console / kvm ip.
  3. Login as "root" (no password) and run "setup-alpine". Set your keyboard, configure Network, and press CTRL+C to cancel.

Find the latest "Generic" KVM/Xen aarch64 image on openSUSE's website and grab it:

curl -O https://fr2.rpmfind.net/linux/opensuse/distribution/leap/15.5/appliances/openSUSE-Leap-15.5-Minimal-VM.aarch64-kvm.qcow2

Edit /etc/apk/repositories then add:

http://dl-cdn.alpinelinux.org/alpine/v3.19/main
http://dl-cdn.alpinelinux.org/alpine/v3.19/community

Install qemu-img and convert the qcow2 image to raw:

apk update && apk add qemu-img
qemu-img convert -f raw \
openSUSE-Leap-15.5-Minimal-VM.aarch64-kvm.qcow2 \
openSUSE-Leap-15.5-Minimal-VM.aarch64-kvm.raw

Now you can dd the raw image to disk (make sure /dev/sda is the main disk):

dd if=openSUSE-Leap-15.5-Minimal-VM.aarch64-kvm.qcow2 of=/dev/sda bs=1M

Unmount iso & restart the virtual server. You should see the openSUSE cloud image initial setup :)

Security warning: /etc/ssh/sshd_config has "PermitRootLogin yes". Copy your SSH public key to /root/.ssh/authorized_keys then quickly change the config file to "PermitRootLogin prohibit-password".

Bonus: to extend the root partition:

zypper install growpart
growpart /dev/sda 2
Fil RSS des articles de ce mot clé