Guide: Installing Fedora IoT on Hetzner Cloud

After bashing my head against this for a few hours, I figure I would share how I managed to install Fedora IoT on an Hetzner VPS:

  1. Make sure you get an instance with UEFI support. As of time of writing, only dedicated servers w/ AMD have it, but you can later resize to a shared instance without losing UEFI support.

  2. Reboot into rescue mode and ssh into it. Double-check that EFI is enabled by running efibootmgr. It should not throw an error.

  3. Download Fedora IoT raw image (.raw.xz) to the rescue system

  4. Write the image to disk: pv Fedora-IoT-raw-42-20250724.1.x86_64.raw.xz | xz -d | dd of=/dev/sda bs=1048576

  5. With parted, resize the main partition to use the entire disk, with the command resize 3 100% to use the remaining disk size. Then resize the filesystem itself with resize2fs /dev/sda3

  6. Create EFI record: efibootmgr --create --disk /dev/sda --part 1 --label "Fedora IoT" -l /EFI/fedora/shimx64.efi

  7. Mount /dev/sda2 to /mnt/ and set the root authorized_keys file in /mnt/ostree/deploy/fedora-iot/var/roothome/.ssh/authorized_keys

  8. SELinux will throw a tantrum after modifying a file outside its purview and won’t allow you to login, so temporarily set the SELINUX option to permissive on /mnt/ostree/deploy/fedora-iot/deploy/whatever.0/etc/selinux/config

  9. Reboot and login via ssh with root. You can now restore SELinux permissions with restorecon -r -v -F /root/.ssh and then setenforce enforcing

2 Likes

One could in theory try to make this work on the regular shared instances which do not support UEFI, but figuring out how to fix the bootloader is above my pay grade, and didn’t manage to make it work.

As I said, it’s easier just to provision a dedicated instance that supports UEFI, then later resizing it to a smaller and cheaper shared VPS (I’m running a CPX21 now, the smallest shared VPS I was able to resize to)