[Bug 207940] stand/efi/boot1: Add boot partition selection

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 06 Jan 2023 08:57:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207940

--- Comment #43 from Tomoaki AOKI <junchoon@dec.sakura.ne.jp> ---
(In reply to Warner Losh from comment #42)

Glad to know the plan!
Once it is completed, I have no objection to retire boot1.efi.

I should mention that...
  *When selected non-default partition, boot should be done
   as if selected partition is the default partition.
   Currently, as boot1.efi kickes loader.efi and /boot/loader.conf
   is handled by loader.efi, this is naturally achieved.

  *If possible (I know it would be difficult), partitions would be
   better shown just as booted FreeBSD, like ada0s1, da2p5,...
   Maybe, nvd* and nda case would be impossible, as it depends on
   /boot/loader.conf settings.

BTW, current default partition (pool) selection order is different
between boot1.efi and loader.efi. Is this intentional?
Current default boot1.efi behaves like
  1. ZFS has always higher priority than UFS in the same physical drive.
  2. First, sniff the drive UEFI loaded boot1.efi itself.
  3. If neither ZFS pools nor UFS partitions have /boot/loader.conf,
     seek for next drive.
  4. Drives are sniffed the order UEFI firmware finds.
  5. Boot from first pool/partition found.

The 1. seems to be different on loader.efi, IIUC.

1. would be because Non-Root-on-ZFS pool wouldn't have /boot/loader.efi
and admins would want ZFS pool over UFS if installed as Root-on-ZFS.

-- 
You are receiving this mail because:
You are on the CC list for the bug.