Unable to change Legacy boot to UEFI

gkovacs

Renowned Member
Dec 22, 2008
516
51
93
Budapest, Hungary
I have a Proxmox (currently running version 8.3) server, that was installed on ZFS RAID1 a few years ago, booting Legacy BIOS mode.
There is a 512MB EFI partition present on the boot drives, but when I switch the BIOS to EFI boot mode. nothing happens beside the EFI shell starting.

Searching the forum I found this tutorial thread by @nak :
I tried to boot with the command found there, unfortunately nothing happens:
Code:
fs0:\EFI\systemd\systemd-bootx64.efi
Listing the files on fs0: reveals that there is only a grub folder, and no EFI folder.

Then I found this page on the wiki, claiming to be a solution for a similar situation:
https://pve.proxmox.com/wiki/ZFS:_Switch_Legacy-Boot_to_Proxmox_Boot_Tool

So I did the following steps (actually I did them for sdi and sdj as well, as those two drives are in the ZFS mirror):
Code:
# fdisk -l /dev/sdi
Disk /dev/sdi: 232.89 GiB, 250059350016 bytes, 488397168 sectors
Disk model: CT250MX500SSD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B02EEC69-4A1E-4B7F-AC11-FF3D3DBDF0C8

Device       Start       End   Sectors   Size Type
/dev/sdi1       34      2047      2014  1007K BIOS boot
/dev/sdi2     2048   1050623   1048576   512M EFI System
/dev/sdi3  1050624 482344960 481294337 229.5G Solaris /usr & Apple ZFS

Partition 1 does not start on physical sector boundary.

# pve-efiboot-tool status
Re-executing '/usr/sbin/pve-efiboot-tool' in new private mount namespace..
System currently booted with legacy bios
2556-97DF is configured with: grub (versions: 5.15.152-1-pve, 6.8.12-4-pve, 6.8.12-5-pve)
25D7-3B0E is configured with: grub (versions: 5.15.152-1-pve, 6.8.12-4-pve, 6.8.12-5-pve)

# pve-efiboot-tool format /dev/sdi2 --force
UUID="2556-97DF" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdi" MOUNTPOINT=""
Formatting '/dev/sdi2' as vfat..
mkfs.fat 4.2 (2021-01-31)
Done.

# pve-efiboot-tool init /dev/sdi2
Re-executing '/usr/sbin/pve-efiboot-tool' in new private mount namespace..
UUID="9A36-DC38" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdi" MOUNTPOINT=""
Mounting '/dev/sdi2' on '/var/tmp/espmounts/9A36-DC38'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/sdi2'.
Adding '/dev/sdi2' to list of synced ESPs..
Refreshing kernels and initrds..
Running hook script 'proxmox-auto-removal'..
Running hook script 'zz-proxmox-boot'..
WARN: /dev/disk/by-uuid/2556-97DF does not exist - clean '/etc/kernel/proxmox-boot-uuids'! - skipping
Copying and configuring kernels on /dev/disk/by-uuid/25D7-3B0E
        Copying kernel 5.15.152-1-pve
        Copying kernel 6.8.12-4-pve
        Copying kernel 6.8.12-5-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.12-5-pve
Found initrd image: /boot/initrd.img-6.8.12-5-pve
Found linux image: /boot/vmlinuz-6.8.12-4-pve
Found initrd image: /boot/initrd.img-6.8.12-4-pve
Found linux image: /boot/vmlinuz-5.15.152-1-pve
Found initrd image: /boot/initrd.img-5.15.152-1-pve
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Copying and configuring kernels on /dev/disk/by-uuid/9A36-DC38
        Copying kernel 5.15.152-1-pve
        Copying kernel 6.8.12-4-pve
        Copying kernel 6.8.12-5-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.12-5-pve
Found initrd image: /boot/initrd.img-6.8.12-5-pve
Found linux image: /boot/vmlinuz-6.8.12-4-pve
Found initrd image: /boot/initrd.img-6.8.12-4-pve
Found linux image: /boot/vmlinuz-5.15.152-1-pve
Found initrd image: /boot/initrd.img-5.15.152-1-pve
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

# pve-efiboot-tool clean
Checking whether ESP '2556-97DF' exists.. Not found!
Checking whether ESP '25D7-3B0E' exists.. Found!
Checking whether ESP '9A36-DC38' exists.. Found!
Sorting and removing duplicate ESPs..

# pve-efiboot-tool status
Re-executing '/usr/sbin/pve-efiboot-tool' in new private mount namespace..
System currently booted with legacy bios
25D7-3B0E is configured with: grub (versions: 5.15.152-1-pve, 6.8.12-4-pve, 6.8.12-5-pve)
9A36-DC38 is configured with: grub (versions: 5.15.152-1-pve, 6.8.12-4-pve, 6.8.12-5-pve)

But there is still no EFI boot possible after rebooting the system, it goes straight to EFI shell.
I'm back to where I started, there is still no EFI folder found on fs0:

Anyone knows how to solve this problem and switch to EFI boot successfully without reinstalling the entire server?
 
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!