proxmox-boot-tool does not populate EFI, just grub to EFI partition

mailinglists

Renowned Member
Mar 14, 2012
641
68
93
Hi,

on a server where PBS 1 was installed first, then PM 6, i want to change from bios boot to EFI, so I can finally enable ZFS features.
I have proper partitions and everything, but then, when I run proxmox-boot-tool, it just does not create EFI files on EFI partition.
How to force proxmox-boot-tool to configure EFI as well as BIOS/grub option?

See here...
Code:
root@p36:~# proxmox-boot-tool reinit
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
UUID="3CDC-A436" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sda" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/3CDC-A436' on '/var/tmp/espmounts/3CDC-A436'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/3CDC-A436'.
Adding '/dev/disk/by-uuid/3CDC-A436' to list of synced ESPs..
UUID="3D1B-5F02" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdb" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/3D1B-5F02' on '/var/tmp/espmounts/3D1B-5F02'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/3D1B-5F02'.
Adding '/dev/disk/by-uuid/3D1B-5F02' to list of synced ESPs..
UUID="3D57-99CB" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdc" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/3D57-99CB' on '/var/tmp/espmounts/3D57-99CB'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/3D57-99CB'.
Adding '/dev/disk/by-uuid/3D57-99CB' to list of synced ESPs..
UUID="3D9A-C588" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdd" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/3D9A-C588' on '/var/tmp/espmounts/3D9A-C588'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/3D9A-C588'.
Adding '/dev/disk/by-uuid/3D9A-C588' to list of synced ESPs..
UUID="3E0E-2070" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sde" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/3E0E-2070' on '/var/tmp/espmounts/3E0E-2070'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/3E0E-2070'.
Adding '/dev/disk/by-uuid/3E0E-2070' to list of synced ESPs..
UUID="3E37-D236" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdf" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/3E37-D236' on '/var/tmp/espmounts/3E37-D236'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/3E37-D236'.
Adding '/dev/disk/by-uuid/3E37-D236' to list of synced ESPs..
UUID="3E62-41C6" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdg" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/3E62-41C6' on '/var/tmp/espmounts/3E62-41C6'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/3E62-41C6'.
Adding '/dev/disk/by-uuid/3E62-41C6' to list of synced ESPs..
UUID="4204-85E1" SIZE="536870912" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sdh" MOUNTPOINT=""
Mounting '/dev/disk/by-uuid/4204-85E1' on '/var/tmp/espmounts/4204-85E1'.
Installing grub i386-pc target..
Installing for i386-pc platform.
Installation finished. No error reported.
Unmounting '/dev/disk/by-uuid/4204-85E1'.
Adding '/dev/disk/by-uuid/4204-85E1' to list of synced ESPs..
root@p36:~# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with legacy bios
3CDC-A436 is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
3D1B-5F02 is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
3D57-99CB is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
3D9A-C588 is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
3E0E-2070 is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
3E37-D236 is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
3E62-41C6 is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
4204-85E1 is configured with: grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
root@p36:~# mount /dev/sda2 /mnt/neki/
root@p36:~# ls -la /mnt/neki/
total 141077
drwxr-xr-x 3 root root     4096 Jan  1  1970 .
drwxr-xr-x 5 root root        5 Feb  1 14:18 ..
drwxr-xr-x 5 root root     4096 Feb  1 17:22 grub
-rwxr-xr-x 1 root root 66124900 Feb  1 13:14 initrd.img-5.15.83-1-pve
-rwxr-xr-x 1 root root 53535550 Feb  1 10:36 initrd.img-5.4.203-1-pve
-rwxr-xr-x 1 root root 11314272 Dec 14 14:09 vmlinuz-5.15.83-1-pve
-rwxr-xr-x 1 root root 13470080 Aug 26 14:43 vmlinuz-5.4.203-1-pve
root@p36:~# umount /mnt/neki 
root@p36:~# proxmox-boot-tool refresh
Running hook script 'proxmox-auto-removal'..
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/3CDC-A436
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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/3D1B-5F02
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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/3D57-99CB
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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/3D9A-C588
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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/3E0E-2070
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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/3E37-D236
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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/3E62-41C6
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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/4204-85E1
    Copying kernel 5.15.83-1-pve
    Copying kernel 5.4.203-1-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.83-1-pve
Found initrd image: /boot/initrd.img-5.15.83-1-pve
Found linux image: /boot/vmlinuz-5.4.203-1-pve
Found initrd image: /boot/initrd.img-5.4.203-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
root@p36:~#
 
on a server where PBS 1 was installed first, then PM 6, i want to change from bios boot to EFI, so I can finally enable ZFS features.
I have proper partitions and everything, but then, when I run proxmox-boot-tool, it just does not create EFI files on EFI partition.
How to force proxmox-boot-tool to configure EFI as well as BIOS/grub option?
currently proxmox-boot-tool checks the current boot-mode and then acts accordingly
in this case - your system is booted in legacy mode - thus grub gets installed (to boot from the EFI partition)
To be clear - that way you should also be able to upgrade your pools and use the new ZFS features on it (grub is installed and boots from the VFAT EFI partition not from ZFS)

If you want to switch over to EFI boot you currently need to:
* change the boot-type of your hardware to UEFI (disable CSM,....)
* boot a live-cd with ZFS (e.g. a PVE-ISO in debug mode - the second debug shell should have everything you need)
* import your rpool
* bind mount /sys, /proc, /dev/, /var/run, etc. into the rpool
* chroot into the rpool
* run proxmox-boot-tool there
steps should be similar to:
https://pve.proxmox.com/wiki/ZFS:_S...iring_a_System_Stuck_in_the_GRUB_Rescue_Shell

As this is a bit involved and has the potential to render your system unbootable - make sure you have a current, working and tested backup!

I hope this helps!
 
  • Like
Reactions: leesteken
Ah, tnx for the answer Stoikov.

Are there any technical limitations to not be able to populate EFI partition when the system is booted via BIOS MBR? Maybe implement a command line switch for proxmox-boot-tool to call the EFI part of its code?

I guess I could just take that EFI folder from one of my other servers and copy it to this one as well? proxmox-boot-tool might even "refresh" EFI partition then. :-)
 
Sometimes we are just lucky. On another server it seems that when installing EFI partitions were also created:
Code:
root@p38:~# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with legacy bios
F32B-BD2F is configured with: uefi (versions: 5.4.106-1-pve, 5.4.73-1-pve), grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
F32C-515E is configured with: uefi (versions: 5.4.106-1-pve, 5.4.73-1-pve), grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)

While the kernel is a bit older (probably from the time of install), I was able to switch to EFI boot via BIOS and remote access, and once it was up as efi, proxmox-boot-tool updated the EFI kernels as well:
Code:
root@p38:~# proxmox-boot-tool refresh
Running hook script 'proxmox-auto-removal'..
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/F32B-BD2F
        Copying kernel and creating boot-entry for 5.15.83-1-pve
        Copying kernel and creating boot-entry for 5.4.106-1-pve
        Copying kernel and creating boot-entry for 5.4.203-1-pve
        Removing old version 5.4.73-1-pve
Copying and configuring kernels on /dev/disk/by-uuid/F32C-515E
        Copying kernel and creating boot-entry for 5.15.83-1-pve
        Copying kernel and creating boot-entry for 5.4.106-1-pve
        Copying kernel and creating boot-entry for 5.4.203-1-pve
        Removing old version 5.4.73-1-pve
root@p38:~# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
F32B-BD2F is configured with: uefi (versions: 5.15.83-1-pve, 5.4.106-1-pve, 5.4.203-1-pve), grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
F32C-515E is configured with: uefi (versions: 5.15.83-1-pve, 5.4.106-1-pve, 5.4.203-1-pve), grub (versions: 5.15.83-1-pve, 5.4.203-1-pve)
root@p38:~

Now (sometime in the future) I will just try and copy EFI from here to the one that is has missing, so I can boot to EFI and then rerun proxmox-boot-tool. Will report back if it worked, as I do not feel like booting from live cd and mounting all the .. :-)
 
Are there any technical limitations to not be able to populate EFI partition when the system is booted via BIOS MBR? Maybe implement a command line switch for proxmox-boot-tool to call the EFI part of its code?
One limitation is that without mounted efivarfs it is not possible to tell the UEFI, to actually use the ESP for booting...

There was a patch-set for actively choosing the boot-mode (precisely for being able to switch from a running system), at some point, but it did not get merged, because there were some open questions. We hope to address those soon, and I'll try to resubmit the patches then again.
 
One limitation is that without mounted efivarfs it is not possible to tell the UEFI, to actually use the ESP for booting...

There was a patch-set for actively choosing the boot-mode (precisely for being able to switch from a running system), at some point, but it did not get merged, because there were some open questions. We hope to address those soon, and I'll try to resubmit the patches then again.
Understood. But:

- An LVM- or BTRFS-Installation does handle both Boot-Modi.

Thus that type of Installation is specific for ZFS. At least when performing an EFI-Install, the i386-pc target could be additionally installed...
 

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!