switch from grub to systemd bootloader

AxelTwin

Well-Known Member
Oct 10, 2017
133
5
58
39
Hi there,

Anyone knows where to change the config file to tell proxmox to boot from systemd insead of grub ?
 
systemd has nothing to do with grub. You mean UEFI and GRUB/BIOS boot and no, you need an UEFI partition and you cannot change that easily. Just reinstall with correct settings as in install PVE in a system that is UEFI capable in order to have UEFI.
 
Thanks for replying.
story is:
- dedicated server at hetzner UEFI only
- csm activation in bios greyed out
- installation for proxmox zfs has to be in rescue mode from VNC console, so proxmox installer doesn't detect legacy/uefi and set legacy by default.

now we can't boot using systemd boot loader.
proxmox-boot-tool status Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount newspace.. 03C9-B3F3 is configured with: grub 03CC-7BDB is configured with: grub
 
Last edited:
Interesting.

Seems that I have nearly the opposite problem.
proxmox-boot-tool has generated EFI entry's, but I need grub ...

Maybe only the UEFI entry is missing.
Have you had a look at the ESP partition?
Is the systemd bootloader still there?
 
That's where I get a bit confused...
I have a 512mb vfat partition, proxmox-boot-tool refresh generates all the config.
When I mount the partition everything seems in place but I can't find where is the entry that tell the system to boot from systemd
Then I don't know wherelse to look.
 
Last edited:
That's where I get a bit confused...
I have a 512mb vfat partition, proxmox-boot-tool refresh generates all the config.
When I mount the partition everything seems in place but I can't find where is he entry that tell the system to boot from systemd
Then I don't know wherelse to look.
Hi,
you should be able to select the systemd-boot loader entry in you BIOS/UEFI boot menu.

What does bootctl tell you? Please post the output.
 
If "only" the EFI entry is missing, try adding by hand (like I did for grub).
Code:
efibootmgr -c -d /dev/sda -p 2 -L "Proxmox Grub" -l "\EFI\PROXMOX\GRUBX64.EFI"
-c create entry
-d points to the device, where your ESP partition lives
-p is partition number
-L Label of this UEFI entry (renaming after creation is not possible, as far as I know)
-l Loader name, should point to your systemd entry, whithin the partition. Attention use "\" instead of "/"
 
By the way. You can list all entry's with
Code:
efibootmgr -v

All entry's are listed starting wirh "Boot00...". The last 4 Bytes (the number) are in hex. Even it looks like int for simple installations

If you like to remove an entry, you will need the number.
I have been struggling with the syntax of the efibootmgr command, so here an example to delete entry "Boot0004"
Code:
efibootmgr -Bb 0004
 
Hi,
you should be able to select the systemd-boot loader entry in you BIOS/UEFI boot menu.

What does bootctl tell you? Please post the output.
Not possible to switch to legacy. CSM is greyed out, hetzner support team told me it's probably not possible.
 
Not possible to switch to legacy. CSM is greyed out, hetzner support team told me it's probably not possible.
Why switch to CSM?? UEFI is what you need with systemd-boot.
 
here are the output from a clean installed system:


Code:
root@hyperbackup1:"# bootctl
Couldn't find EFI system partition. It is recommended to mount it to ‘boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.
System:
Not booted with EFI

root@hyperbackup1:7# proxmox-boot-tool status
Re-executing ‘usr/sbin/proxmox-boot-tool' in new private mount namespace.…
System currently booted with legacy bios
A45-E147 is configured with: grub (versions: 5.15,102-1-pve)
JJA49-1904 is configured with: grub (versions: 5.15,102-1-pve)

root@hyperbackup1:"# efibootmgr -v
EFI variables are not supported on this system.
 
Last edited:
here are the output from a clean installed system:


Code:
root@hyperbackup1:"# bootctl

Couldn't find EFI system partition. It is recommended to mount it to ‘boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.

System:

Not booted with EFI

root@hyperbackup1:7# proxmox-boot-tool status

Re-executing ‘usr/sbin/proxmox-boot-tool' in new private mount namespace.…
System currently booted with legacy bios

A45-E147 is configured with: grub (versions: 5.15,102-1-pve)

JJA49-1904 is configured with: grub (versions: 5.15,102-1-pve)
root@hyperbackup1:"#
root@hyperbackup1:"# efibootmgr -v

EFI variables are not supported on this system.
Yes, this is because you installed and booted via legacy BIOS and not via UEFI. You need to use UEFI for systemd-boot.

Just to get the picture, why do you want to use systemd-boot instead of grub anyway? What is your goal here?
 
I am trying to install PVE-7.4 on a zfs mirrored system
Hetzner doesn't hvae proxmox ZFS image so you c'an't install proxmox on a ZFS pool.
I installed it from rescue mode passing arguments to with VNC so I get the GUI and can install from that but the server is UEFI only (enabling CSM is greyed out in bios) and the server tries to boot from legacy so it gets stuck hanging at bios menu
My target is to find a way to rewrite boot sector to swap to systemd bootloader.
I read several tuto but didn't find anything very clear, If you have an idea I'll take it
 
I am trying to install PVE-7.4 on a zfs mirrored system
Hetzner doesn't hvae proxmox ZFS image so you c'an't install proxmox on a ZFS pool.
I installed it from rescue mode passing arguments to with VNC so I get the GUI and can install from that but the server is UEFI only (enabling CSM is greyed out in bios) and the server tries to boot from legacy so it gets stuck hanging at bios menu
My target is to find a way to rewrite boot sector to swap to systemd bootloader.
I read several tuto but didn't find anything very clear, If you have an idea I'll take it
I assume you followed this guide https://community.hetzner.com/tutorials/proxmox-docker-zfs?

But still, I am a bit confused, because you state that your server is UEFI only, but then you show
System currently booted with legacy bios

You should install PVE via UEFI, how did you even get the system to boot in legacy bios if that is not supported by the server?
 
I guess it is because to install proxmox we had to do it that way:

- from rescue mode we downloaded the iso
- launch installer with: qemu-system-x86_64 -m 1024 -k it -hda /dev/nvme0n1 -hdb /dev/nvme1n1 -cdrom proxmox.iso -boot d -vnc :0
- installed from VNC

So my guess is that the installer didn't pick up the corect boot mode as it couldn't see it
 
Last edited:
Ah now I get the picture. The Hetzner guide makes you use qemu in order to install the system on the disks, but the guide does not include any parameters needed to load a UEFI firmware, therefore legacy bios is used.

You will have to load the OVMF firmware when launching qemu to boot in UEFI mode.

You can try to add e.g.
Code:
-drive 'if=pflash,unit=0,format=raw,readonly=on,file=OVMF_CODE.fd' -drive 'if=pflash,unit=1,format=raw,file=OVMF_VARS.fd'
to the qemu invocation inside the rescue shell, in order to load the OVMF UEFI firmware. You will however have to find a way to get/download the firmware files to the local env first, e.g. by getting it from an existing PVE installation, where the firmware files are located under /usr/share/pve-edk2-firmware
 
Ah now I get the picture. The Hetzner guide makes you use qemu in order to install the system on the disks, but the guide does not include any parameters needed to load a UEFI firmware, therefore legacy bios is used.

You will have to load the OVMF firmware when launching qemu to boot in UEFI mode.

You can try to add e.g.
Code:
-drive 'if=pflash,unit=0,format=raw,readonly=on,file=OVMF_CODE.fd' -drive 'if=pflash,unit=1,format=raw,file=OVMF_VARS.fd'
to the qemu invocation inside the rescue shell, in order to load the OVMF UEFI firmware. You will however have to find a way to get/download the firmware files to the local env first, e.g. by getting it from an existing PVE installation, where the firmware files are located under /usr/share/pve-edk2-firmware
Sounds great ! I am going to try that and let you know the result.
Cheers
 
ok, so it didnt work with qemu.
Drives appears in bios in UEFI but can't get the system to boot on them.

I managed to get the installer to work from usb stick with KVM console (after hundred issues) but it failed at writting boot partition (99% installed, sic...).

Here is what I get when I try to do it manually (it fails at proxmox-boot-tool init)

Sorry I can't copy paste from KVM console, see attached screenshot
 

Attachments

  • Capture d’écran 2023-04-29 133756.png
    Capture d’écran 2023-04-29 133756.png
    773.2 KB · Views: 26
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!