(Solved) Native UEFI booting Proxmox 5.2, 5.3 with ZFS root

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

arglebargle

H̸̖̅ȩ̸̐l̷̦͋l̴̰̈ỏ̶̱ ̸̢͋W̵͖̌ò̴͚r̴͇̀l̵̼͗d̷͕̈
Jul 15, 2018
657
244
43
Proxmox 5.2: See post #2 below
Proxmox 5.3: link here

--------------------

I've just done a fresh install of Proxmox 5.2 on a machine with a single drive ZFS root and it looks like the installer neglects to create an EFI partition. I've found a couple of write-ups that work around this by formatting the solaris reserved partition as vfat and installing EFI grub there -- is this the way to do this or is there something else I should be doing? This is my first ZFS root on UEFI so I don't really know what I'm doing.

Here're the writeups I've been looking at:
[SOLVED] - UEFI install and RAID
Booting a ZFS Root via UEFI on Debian (ctrl+f "vfat")
 
Last edited:

arglebargle

H̸̖̅ȩ̸̐l̷̦͋l̴̰̈ỏ̶̱ ̸̢͋W̵͖̌ò̴͚r̴͇̀l̵̼͗d̷͕̈
Jul 15, 2018
657
244
43
After reading a bit more I settled on just kicking this script snippet off after installing and it seems to work. I'm still not sure if I'm doing the "correct" thing by re-using the solaris reserved partition (apparently it's reserved for EFI use, so this should be fine?)

Code:
mkdir -p /boot/efi
mkfs.vfat /dev/sda9
fatlabel /dev/sda9 BOOT_EFI
mount /dev/sda9 /boot/efi
grub-probe -d /dev/sda9
update-grub
grub-install -d /usr/lib/grub/x86_64-efi /dev/sda
echo "/dev/disk/by-label/BOOT_EFI /boot/efi vfat defaults 0 1" >> /etc/fstab
Cribbed from this post: [SOLVED] - UEFI install and RAID

EFI boot order is a little out of whack after this, Proxmox is set to boot before USB EFI devices, but that's easy enough to re-order in the bios.
 

fossxplorer

Active Member
Mar 17, 2016
554
97
28
Oslo, Norway
After following the above steps and a reboot, did you see an 'efi' folder in /sys/firmware?
I did also install PVE with single disk ZFS RAID0, but it boots into BIOS mode. Using XFS for boot drive, it works fine with UEFI.
 

arglebargle

H̸̖̅ȩ̸̐l̷̦͋l̴̰̈ỏ̶̱ ̸̢͋W̵͖̌ò̴͚r̴͇̀l̵̼͗d̷͕̈
Jul 15, 2018
657
244
43
Yeah, it's there. The machine is definitely booting in EFI mode, I shut off legacy boot in the BIOS entirely.

I actually had legacy boot shut off when I performed the install, so I was a bit confused when the machine failed to boot after removing the USB key. I worked around the legacy boot by booting rescue mode from the install stick and making the changes above.
 
  • Like
Reactions: fossxplorer

fossxplorer

Active Member
Mar 17, 2016
554
97
28
Oslo, Norway
I see. So do i understand you right, you didn't use the rEFInd (my first encounter with it, very very useful utility) and was able to fix the EFI partition with grub-install by rebooting into the already installed Proxmox using the installer USB?

And i'd like to say THANK YOU very much for posting this since i managed to fix the issue based on your posts in this thread!
The reason i didn't encounter the "issue" was that i had both UEFI and BIOS boot enabled, although i booted Proxmox installer in UEFI mode, the consequent reboot after successful installation simply booted Proxmox in BIOS mode :)

EDIT1: ironically your thread was started just around the time i had my first Proxmox installation up and running to be played with :)
 
Oct 13, 2018
1
0
1
The instructions below worked perfectly for me - seems Proxmox 5.2.1 doesn't install a UEFI boot partition (creates the partition, but doesn't set it up) when you select ZFS and RAID0 - booted a proxmox USB stick in 'Recovery Mode', and followed the instructions below and it's all peachy. :)

I've just done a fresh install of Proxmox 5.2 on a machine with a single drive ZFS root and it looks like the installer neglects to create an EFI partition. I've found a couple of write-ups that work around this by formatting the solaris reserved partition as vfat and installing EFI grub there -- is this the way to do this or is there something else I should be doing? This is my first ZFS root on UEFI so I don't really know what I'm doing.

Here're the writeups I've been looking at:
[SOLVED] - UEFI install and RAID
Booting a ZFS Root via UEFI on Debian (ctrl+f "vfat")
After reading a bit more I settled on just kicking this script snippet off after installing and it seems to work. I'm still not sure if I'm doing the "correct" thing by re-using the solaris reserved partition (apparently it's reserved for EFI use, so this should be fine?)

Code:
mkdir -p /boot/efi
mkfs.vfat /dev/sda9
fatlabel /dev/sda9 BOOT_EFI
mount /dev/sda9 /boot/efi
grub-probe -d /dev/sda9
update-grub
grub-install -d /usr/lib/grub/x86_64-efi /dev/sda
echo "/dev/disk/by-label/BOOT_EFI /boot/efi vfat defaults 0 1" >> /etc/fstab
Cribbed from this post: [SOLVED] - UEFI install and RAID

EFI boot order is a little out of whack after this, Proxmox is set to boot before USB EFI devices, but that's easy enough to re-order in the bios.
 

arglebargle

H̸̖̅ȩ̸̐l̷̦͋l̴̰̈ỏ̶̱ ̸̢͋W̵͖̌ò̴͚r̴͇̀l̵̼͗d̷͕̈
Jul 15, 2018
657
244
43
To anyone struggling with the same issue on a fresh Proxmox 5.3 install you can't rescue boot from the 5.3 install media, there's some issue with ZFS and compression, but you can still boot from 5.2 install media. Image a 5.2 install USB and just rescue boot from that.

Here's a copy/paste of my proxmox setup gist:

Code:
in UEFI mode: install zfs root, shut down completely, cold boot from Proxmox ___5.2___ install media
use rescue boot, 5.3 install media will not rescue boot successfully.

# 5.3 fix UEFI:
##  find 512MB UEFI partition, for me it was /dev/sda2 (sda1 was BIOS boot stuff)
## lsblk -f
## fdisk -l /dev/sda  (YOUR BOOT DEVICE HERE)
##
## use your EFI partition below, mine is /dev/sda2

mkdir -p /boot/efi
mkfs.vfat -F32 /dev/sda2
echo PARTUUID=$(blkid -s PARTUUID -o value /dev/sda2) /boot/efi vfat noatime,nofail,x-systemd.device-timeout=1 0 1 >> /etc/fstab
mount /boot/efi
grub-probe -d /dev/sda2
update-grub
grub-install -d /usr/lib/grub/x86_64-efi /dev/sda

# optional: reboot now & test
 
Last edited:
  • Like
Reactions: leonroy