In efivar_device_path_to_unix_path, prefer returning a glabel over a
partition. This fixes "efibootmgr -Ep" when the efi partition is
mounted by label.
PR: 269564
Reported by: corvink
MFC after: 3 days
Sponsored by: Axcient
Differential D38610
libefivar: more glabel support asomers on Feb 15 2023, 6:39 PM. Authored by Tags None Referenced Files
Subscribers None
Details In efivar_device_path_to_unix_path, prefer returning a glabel over a PR: 269564 manually tested with "efibootmgr -pE" and "efivar -Op 8be4df61-93ca-11d2-aa0d-00e098032b8c-Boot0014" on a system that uses UEFI and mounts the boot partition by its partition label.
Diff Detail
Event TimelineComment Actions Why prefer a glabel? There's no requirement that it be used for the mount point, so this introduces a bug where there IS a label, but the label isn't used, I believe. I think this is not such a good way to go.
Comment Actions https://reviews.freebsd.org/D38614 won't solve the original problem that Corvin described in PR 269564. The find_geom_efimedia function doesn't even get executed by "efibootmgr -pE". Are you planning to fix that? Comment Actions Right. this won't either when there are multiple labels if you pick the wrong one first. I'm working on a fix... Comment Actions https://reviews.freebsd.org/D38619 should do the trick. It worked for all the cases I could throw at it, including creating a new label on the fly in /dev/label to mount the ESP on, mounting via msdos label, mounting via gpt label and mounting the raw device. It also removes some bogus code I wrote when I only thought I understood how geom worked... |