Install openSUSE from Alpine on aarch64 on Hetzner
Rédigé par uTuxHetzner 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.
- Provision an aarch64 virtual machine with any system.
- Mount the Alpine iso, reboot the virtual machine and open console / kvm ip.
- 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.qcow2Edit /etc/apk/repositories then add:
http://dl-cdn.alpinelinux.org/alpine/v3.19/main
http://dl-cdn.alpinelinux.org/alpine/v3.19/communityInstall qemu-img and convert the qcow2 image to raw:
apk update && apk add qemu-img
qemu-img convert \
openSUSE-Leap-15.5-Minimal-VM.aarch64-kvm.qcow2 \
openSUSE-Leap-15.5-Minimal-VM.aarch64-kvm.rawNow 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=1MUnmount 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