[SOLVED] Cannot install PVE as UEFI OS

promoxer

Member
Apr 21, 2023
226
23
23
While reinstalling PVE, I was able to install it as an UEFI OS on a Transcend SSD but not on my Kingston SSD SV300S37A120G.
I'm able to differentiate because the BIOS selections will prefix with UEFI OS.

Also checked that Windows 10 had no issues installing itself on Kingston as an UEFI OS.
Also checked that there was no newer firmware for this Kingston.

At the end of the PVE install, it says

Bash:
bootloader setup errors:
- failed to prepare EFI boot using Grub on '/dev/sda2': unable to install the EFI boot loader on '/dev/sda'

Even though there was this error, PVE was still able to boot (non UEFI) after a restarting

There was another thread about making the Kingston the only UEFI bootable device, but that did not have an effect for me
https://forum.proxmox.com/threads/proxmox-7-0-failed-to-prepare-efi.95466/

2 reasons why this is of interest to me:

1. What's wrong with my Kingston? (Can it happen to my other storage?)
2. Does UEFI play a role in making GPU passthrough less hassle? (in my UEFI PVE, I did not had to configure anything for GPU passthrough to work)
 
EFI variables was clogged up with dump entries

1. While installing PVE, press ctrl + alt + F3
2. Ran rm /sys/firmware/efi/efivars/dump-* to fix
3. ctrl + alt + F4 to switch back to installer

BE CAREFUL IF YOU ARE GOING TO TRY THIS, REMOVING THE WRONG ENTRIES COULD BREAK YOUR MACHINE
 
Last edited:
EFI variables was clogged up with dump entries

1. While installing PVE, press ctrl + alt + F3
2. Ran rm /sys/firmware/efi/efivars/dump-* to fix
3. ctrl + alt + F4 to switch back to installer

BE CAREFUL IF YOU ARE GOING TO TRY THIS, REMOVING THE WRONG ENTRIES COULD BREAK YOUR MACHINE
Thx a lot!!! It works for me.
 
When should this be done? There are no `/sys/firmware/efi/efivars/dump-*` files
IIRC efi variables are stored in the motherboard nvram, they're entrypoints to your os bootstrap, if you reinstall a lot, and you reinstall systems that do not reuse variables, you could end up with no space left to insert another entry to boot your last installation of [something] - if you don't perform a fresh windows install every 3 months (as it seems needed for that stupid os to work because it breaks itself randomly, but I digress) or something similar, you shouldn't encounter this issue.
 
IIRC efi variables are stored in the motherboard nvram, they're entrypoints to your os bootstrap, if you reinstall a lot, and you reinstall systems that do not reuse variables, you could end up with no space left to insert another entry to boot your last installation of [something] - if you don't perform a fresh windows install every 3 months (as it seems needed for that stupid os to work because it breaks itself randomly, but I digress) or something similar, you shouldn't encounter this issue.

Thanks.
in my case (Dell Inspiron 3050)
  • deleted all UEFI entries
  • disabled secure boot
  • erased both SSD's partition table with dd
  • UEFI boot from PVE USB
there were no dump-* files, but insllation always fails at the end with this `bootloader setup errors`. Eventually I gave up and switched to installation from legacy boot, which worked without any issues
 
  • Like
Reactions: HanzoHuang
EFI variables was clogged up with dump entries

1. While installing PVE, press ctrl + alt + F3
2. Ran rm /sys/firmware/efi/efivars/dump-* to fix
3. ctrl + alt + F4 to switch back to installer

BE CAREFUL IF YOU ARE GOING TO TRY THIS, REMOVING THE WRONG ENTRIES COULD BREAK YOUR MACHINE
This really saved me I never would have figured it out otherwise! I even took out the motherboard cmos battery for a couple hours and then tried again, but it stil didn't work. Thanks!!!
 
Thanks.
in my case (Dell Inspiron 3050)
  • deleted all UEFI entries
  • disabled secure boot
  • erased both SSD's partition table with dd
  • UEFI boot from PVE USB
there were no dump-* files, but insllation always fails at the end with this `bootloader setup errors`. Eventually I gave up and switched to installation from legacy boot, which worked without any issues
I have the same problem, it now working on legacy boot. But I really want to use UEFI.
 
Run this, how much Use% remaining?
Code:
# df -h
Filesystem               Size  Used Avail Use% Mounted on
...
efivarfs                 256K  149K  103K  60% /sys/firmware/efi/efivars
...
 
Last edited:
Well, the thread is solved, but nothing helped me so far from here, neither from another thread, so LMTry and sum it up nicely what I had to do.

Mr. LLM model tells me it's a UEFI firmware bug which i can neither deny or confirm, but it's, well, sad...
For the sake, I'm using a Lenovo Thinkcentre M70q Gen.5 with freshest avail BIOS framework (26 Jun 2025).

Anyways, let's not waste time here:
1. Install proxmox from a bootable device (like USB, via Rufus)
2. Get the error message of failed to prepare EFI boot using Grub on '/dev/sda2': unable to install the EFI boot loader on '/dev/sda'
3. Reboot
4. Select Advanced from the USB's installation boot-menu => Rescue boot
4.1. It should let in with the root and the pw you set.
5. Copy a fallback bootloader: cp /boot/efi/EFI/proxmox/grubx64.efi /boot/efi/EFI/BOOT/BOOTX64.EFI
6. That wasn't enough so I had to copy the whole config folder alongside: cp -r /boot/grub/x86_64-efi /boot/efi/EFI/BOOT/
7. Let grub to re-configure bootloader: grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=proxmox --removable --recheck
7.1. It might happen grub-install does have difficulties or wrongly installed, therefore it needs (needed in my case) re-install, so find online how to...
8. Apply the config change: update-grub

Voila! It must work, if you had the same reason as I.

FINAL NOTE: I'd hope I left out nothing, because I really spent hours trying to debug and fix, while did a lod of re-installs and operations in the meantime. I'll likely need a re-install soon, therefore will update if so.
 
Last edited:
EFI variables was clogged up with dump entries

1. While installing PVE, press ctrl + alt + F3
2. Ran rm /sys/firmware/efi/efivars/dump-* to fix
3. ctrl + alt + F4 to switch back to installer

BE CAREFUL IF YOU ARE GOING TO TRY THIS, REMOVING THE WRONG ENTRIES COULD BREAK YOUR MACHINE
it works once,but now it not work! “Ran rm /sys/firmware/efi/efivars/dump-* to fix ”,it “invalid argument”;but “rm /sys/firmware/efi/efivars/*” it works 。poor English:)
 
it works once,but now it not work! “Ran rm /sys/firmware/efi/efivars/dump-* to fix ”,it “invalid argument”;but “rm /sys/firmware/efi/efivars/*” it works 。poor English:)
If rm gives you "invalid argument", then check your argument again, did you paste in some unicode with spaces etc?