Bug 201788 - UEFI boot1.efi doesn't honor GPT bootme/bootonce flags
Summary: UEFI boot1.efi doesn't honor GPT bootme/bootonce flags
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD bugs mailing list
Depends on:
Reported: 2015-07-23 13:28 UTC by holger
Modified: 2017-06-11 05:38 UTC (History)
3 users (show)

See Also:

Include gpt functionality (9.88 KB, patch)
2015-07-23 13:28 UTC, holger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description holger 2015-07-23 13:28:05 UTC
Created attachment 159109 [details]
Include gpt functionality

boot1.efi currently selects the first partition it can find that has a valid UFS partition. I would like it to honor the gptboot(8) bootme/bootonce flags and pick the partition that gptboot would have picked.
Comment 1 holger 2015-07-23 13:34:02 UTC
The patch is a bit nasty (because of the UEFI API or me not finding the right function)

* The code has not been tested with CDROM or different block sizes
* common/gpt.c needs to be changed as the BSS is too big for the tianocore
* It is kind of random which disk is picked. It looks at the first one
Comment 2 Marius Halden 2017-06-10 17:25:57 UTC
We observe the same problem with NanoBSD built from 11-stable r312663. Which is an issue for us since we are unable to switch between the code images when using the efi loader, forcing us to use gptboot instead. The patch given earlier does not apply cleanly on r312663.
Comment 3 holger 2017-06-11 05:38:56 UTC
I tried really hard to get feedback (mails, irc, etc) but there didn't seem to be any interest in it. Right now I have no deployments that require nanobsd/gpt booting so feel free to rebase the patch yourself.