[TUTORIAL] Fixing UEFI boot

nak

New Member
Apr 15, 2021
6
5
3
I recently installed Proxmox VE on a server that was set to boot in BIOS/legacy mode, not UEFI. I later ran into the bug in grub where grub is really picky about what features are enabled in ZFS and will refuse to boot if certain features are enabled (large_dnode in my case). So I decided to switch the server to boot using UEFI but it dropped me to the UEFI shell.

It looks like although the Proxmox installer creates the UEFI partition, it does not properly create the boot entry if it is installed in BIOS/legacy mode (with grub).

So here are my notes on how I fixed this, hopefully this can help someone else:

On my system, at the UEFI prompt I entered:

fs0:\EFI\systemd\systemd-bootx64.efi

in order to boot the system as a one-time thing.

Once the system was booted I did fdisk -l and found that /dev/sda2 was my EFI partition. I also did efibootmgr -v and found that only the EFI shell was setup. So to fix this I ran (making sure /dev/sda2 is the proper EFI partition)

Code:
pve-efiboot-tool init /dev/sda2
pve-efiboot-tool refresh

Now I ran efibootmgr -v and found that there was an entry for Proxmox in the list.

Reboot and it should work.

See https://pve.proxmox.com/wiki/Host_Bootloader#sysboot_systemd_boot for more info.
 
I tried this to see if it would fix my non booting problem..... sadly didn't work for me.
 
Proxmox-boot-tool wants a 512MB ESP partition for systemd boot. So maybe you can shink an existing partition to get some unallocated space to create a new 512MB ESP partition. Also thought about switching from grub to systemd boot but I only got a free 300MB partition I reserved back then for the ESP. :(
 
I recently installed Proxmox VE on a server that was set to boot in BIOS/legacy mode, not UEFI. I later ran into the bug in grub where grub is really picky about what features are enabled in ZFS and will refuse to boot if certain features are enabled (large_dnode in my case). So I decided to switch the server to boot using UEFI but it dropped me to the UEFI shell.

It looks like although the Proxmox installer creates the UEFI partition, it does not properly create the boot entry if it is installed in BIOS/legacy mode (with grub).

So here are my notes on how I fixed this, hopefully this can help someone else:

On my system, at the UEFI prompt I entered:

fs0:\EFI\systemd\systemd-bootx64.efi

in order to boot the system as a one-time thing.

Once the system was booted I did fdisk -l and found that /dev/sda2 was my EFI partition. I also did efibootmgr -v and found that only the EFI shell was setup. So to fix this I ran (making sure /dev/sda2 is the proper EFI partition)

Code:
pve-efiboot-tool init /dev/sda2
pve-efiboot-tool refresh

Now I ran efibootmgr -v and found that there was an entry for Proxmox in the list.

Reboot and it should work.

See https://pve.proxmox.com/wiki/Host_Bootloader#sysboot_systemd_boot for more info.
This works like a charm dude. Thanks a lot.
 
Last kernel upgrade on January30th from :
Kernel Version Linux 6.5.11-7-pve (2023-12-05T09:44Z)
to
Kernel Version Linux 6.5.11-8-pve (2024-01-30T12:27Z)
After reboot in UEFI mode (been using for years) to upgrade to new kernel, all 4 nodes in cluster now stop booting at "grub rescue>". If I switch my BIOS setting from UEFI only to DUAL (UEFI and LEGACY) the nodes will boot. Motherboards are Supermicro X10. latest BIOS version.

message on terminal:
error: symbol 'grub_is_lockdown' not found.
entering rescue mode...
grub rescue>

Any ideas to fix?
 
Thank you for the guide, it did help me a lot. My only issue was FIRSTLY, getting into the "UEFI Shell". My HP Z840 does NOT have one built in, took me forever to figure that out, had to download a "rescue" iso, DISABLE SECURE BOOT, boot from rescue iso from my Ventoy USB stick. Then I got into UEFI shell after hours I worked on it.

From there it was pretty easy, except to figure out the UEFI SHELL commands. I eventually went "cd FS0:" (capitals mattered, and the ":". I just slowly navigated one folder at a time until I reached the path OP specified, but just make sure to do a "dir" at every level so you can see the capitalization required. I did not wanna mess this up after it took so long to get there. Then once I got to the EFI folder, just typed the "SYSTEMD-BOOTx64.EFI" filename, and it worked. All the other commands given in the tutorial were accurate. Just glossed over the hardest part lmao.
 

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!