I believe that the bhyve environment implements UEFI boot correctly because it boots from the Gentoo amd64 installation CD. However, it will not boot the Gentoo kernel image.
As the bhyve config. shows, there are three disks, one each for boot/EFI, root and swap. From inside the enviroment (i.e., boot from DVD then chroot into root), they look like this:
Code: Select all
(Cheroot) livecd / # lsblk -f
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0 squashfs 4.0 0 100% /run/rootfsbase
sr0 iso9660 Joliet Extension Gentoo-amd64-20250216 2025-02-16-17-56-25-00 0 100% /run/initramfs/live
vda
└─vda1 vfat FAT32 Boot A4FC-8281 8.9M 50% /boot
vdb
└─vdb1 ext4 1.0 Root d5d0fe72-73a5-4b6f-ab98-236b80b4098b 17.5G 23% /
vdc swap 1 swap1 c8e1c86a-dd29-4817-9dfe-a87aca546cafCode: Select all
efibootmgr -c -d /dev/vda -p 1 -L "Gentoo 6.1.1 EFI Bhyve" -l '\EFI\BOOT\bootx64.efi' -u 'root=UUID=d5d0fe72-73a5-4b6f-ab98-236b80b4098b'Code: Select all
# efibootmgr
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0008,0002,0001,0000,0003,0004,0005,0006,0007
Boot0000* UiApp FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0001* UEFI BHYVE SATA DVD ROM BHYVE-C19E-208D-A891 PciRoot(0x0)/Pci(0x3,0x0)/Sata(0,65535,0){auto_created_boot_option}
Boot0002* UEFI Misc Device PciRoot(0x0)/Pci(0x4,0x0){auto_created_boot_option}
Boot0003* UEFI Misc Device 2 PciRoot(0x0)/Pci(0x5,0x0){auto_created_boot_option}
Boot0004* UEFI Misc Device 3 PciRoot(0x0)/Pci(0x5,0x1){auto_created_boot_option}
Boot0005* UEFI PXEv4 (MAC:0208202FF8E9) PciRoot(0x0)/Pci(0x6,0x0)/MAC(0208202ff8e9,1)/IPv4(0.0.0.00.0.0.0,0,0){auto_created_boot_option}
Boot0006* UEFI HTTPv4 (MAC:0208202FF8E9) PciRoot(0x0)/Pci(0x6,0x0)/MAC(0208202ff8e9,1)/IPv4(0.0.0.00.0.0.0,0,0)/Uri(){auto_created_boot_option}
Boot0007* EFI Internal Shell FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(7c04a583-9e3e-4f1c-ad65-e05268d0b4d1)
Boot0008* Gentoo 6.1.1 EFI HD(1,GPT,caf2dfc5-7494-43a5-99d7-1c412719fc2d,0x800,0x9000)/File(\EFI\Gentoo\linuz-6.1.1.efi)72006f006f0074003d0055005500490044003d00640035006400300066006500370032002d0037003300610035002d0034006200360066002d0061006200390038002d00320033003600620038003000620034003000390038006200
Again I believe I've set up the ESP partition correctly. It was formatted with the command:
Code: Select all
mkfs.fat -F 32 -n Boot /dev/vda1Code: Select all
# ls -lR /boot/
/boot/:
total 1711
drwxr-xr-x 4 root root 512 Mar 30 05:40 EFI
-rwxr-xr-x 1 root root 1751347 Mar 28 03:21 System.map
/boot/EFI:
total 1
drwxr-xr-x 2 root root 512 Mar 30 05:41 BOOT
drwxr-xr-x 2 root root 512 Mar 29 07:01 Gentoo
/boot/EFI/BOOT:
total 3638
-rwxr-xr-x 1 root root 3724352 Mar 30 05:41 bootx64.efi
/boot/EFI/Gentoo:
total 3638
-rwxr-xr-x 1 root root 3724352 Mar 28 03:21 linuz-6.1.1.efiCode: Select all
# parted /dev/vda print
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 21.0MB
Sector size (logical/physical): 512B/8192B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 19.9MB 18.9MB fat32 EFI system partition boot, espCan I ask that if you want to contribute a peripheral/irrelevant comment such as the kernel is quite old, or it's ESP partition so why is it mounted at /boot etc., that you wait for a real answer so that the question, which has taken me over an hour to put together, is seen as not-replied-to by someone who might actually know the answer. Thank you.


