[Bug 282891] gptboot and loader.efi can't work with geli encrypted virtio_block devices
Date: Thu, 21 Nov 2024 13:29:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282891 Bug ID: 282891 Summary: gptboot and loader.efi can't work with geli encrypted virtio_block devices Product: Base System Version: 14.1-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: ant_mail@inbox.ru After series of experiments I came to conclusion that gptboot and loader.efi can't detect and work with geli encrypted virtio_block devices (vtbdX). Steps to reproduce. Run QEMU VM machine as: .. -drive file="freebsd-guest.qcow2",if=virtio,index=0,media=disk \ -drive media=cdrom,file=dvdboot.iso \ ... Create geli-encrypted system according to https://forums.freebsd.org/threads/is-full-disk-encryption-with-ufs-possible.92399/#post-643920 Try to boot VM without DVD and you'll get: --- Booting from Hard Disk... gptboot: No /boot/loader on 0:ad(0p3) gptboot: No /boot/kernel/kernel on 0:ad(0p3) FreeBSD/x86 boot Default: 0:ad(0p3)/boot/kernel/kernel boot: --- Then try to boot via UEFI using ... -drive if=pflash,format=raw,unit=0,file=edk2-x86_64-code.fd,readonly=on \ -drive if=pflash,format=raw,unit=1,file=fbsdguest-vars.fd \ -drive file="freebsd-guest.qcow2",if=virtio,index=0,media=disk \ ... You'll get: --- Setting currdev to disk0p2: FreeBSD/amd64 EFI loader, Revision 3.0 Command line arguments: loader.efi Image base: 0x1dd33000 EFI version: 2.70 EFI Firmware: EDK II (rev 1.00) Console: efi (0x1000) Load Path: \BOOT\BOOTX64.EFI Load Device: PciRoot(0x0)/Pci(0x2,0x0)/HD(2,GPT,96DDAD28-A7EA-11EF-88EF-B388856C1CCC,0x428,0x82000) BootCurrent: 0008 BootOrder: 0007 0001 0002 0003 0004 0005 0006 0000 BootInfo Path: PciRoot(0x0)/Pci(0x2,0x0)/HD(2,GPT,96DDAD28-A7EA-11EF-88EF-B388856C1CCC,0x428,0x82000)/\BOOT\BOOTX64.EFI Ignoring Boot0008: Only one DP found Trying ESP: PciRoot(0x0)/Pci(0x2,0x0)/HD(2,GPT,96DDAD28-A7EA-11EF-88EF-B388856C1CCC,0x428,0x82000) Setting currdev to disk0p2: Trying: PciRoot(0x0)/Pci(0x2,0x0)/HD(1,GPT,42FF997F-A7EA-11EF-88EF-B388856C1CCC,0x28,0x400) Setting currdev to disk0p1: Trying: PciRoot(0x0)/Pci(0x2,0x0)/HD(3,GPT,CAB6C2BE-A7EA-11EF-88EF-B388856C1CCC,0x82428,0x1C00000) Setting currdev to disk0p3: Trying: PciRoot(0x0)/Pci(0x2,0x0)/HD(4,GPT,D2D4B5C3-A7EA-11EF-88EF-B388856C1CCC,0x1C82428,0x17DBB0) Setting currdev to disk0p4: Failed to find bootable partition ERROR: cannot open /boot/lua/loader.lua: no such file or directory. --- Repeat the steps replacing 'virtio' to 'ide': -drive file="freebsd-guest.qcow2",if=ide,index=0,media=disk and things will work. QEMU is v9.0.0-12054. -- You are receiving this mail because: You are the assignee for the bug.