Re: FreeBSD 14.1 and UEFI boot ignores bootme flag

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Tue, 13 Aug 2024 07:42:20 UTC
You can choose which partition/pool to boot using boot1.efi with
whichever of latest 2 patches at Bug 207940 [1] applied.

As boot1.efi would be dropped in the future, I want the same kind of
functionality on loader.efi, too.

And related PR found: Bug201788 [2]


[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207940

[2] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=201788


On Tue, 13 Aug 2024 00:02:53 -0700
Cy Schubert <Cy.Schubert@cschubert.com> wrote:

> I don't think loader.efi honours the bootme flag. Try the gptboot.efi 
> binary instead. It does honour the various GPT flags.
> 
> 
> -- 
> Cheers,
> Cy Schubert <Cy.Schubert@cschubert.com>
> FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
> NTP:           <cy@nwtime.org>    Web:  https://nwtime.org
> 
> 			e^(i*pi)+1=0
> 
> 
> In message <9DEEEE5F-EC21-4CC5-BC5F-A10162D98365@cs.huji.ac.il>, Daniel 
> Braniss
>  writes:
> > hi Cy,
> > the boot code is the the latest, copied /boot/loader.efi to =
> > /mnt/EFI/BOOT/BOOTX64.efi
> >
> > > On 13 Aug 2024, at 09:50, Cy Schubert <Cy.Schubert@cschubert.com> =
> > wrote:
> > >=20
> > > In message <0C0CF611-4C88-4EF1-9F9A-3A35D5236854@cs.huji.ac.il>, =
> > Daniel=20
> > > Braniss
> > > writes:
> > >> hi,
> > >> 	my disk has 2 root partitions, and once I switched to UEFI boot, =
> > =3D
> > >> can=3DE2=3D80=3D99t boot the second partition:
> > >> (the hardware is a bit old, Dell PowerEdge R710 with bios from =3D
> > >> 05/22/2018)
> > >>=20
> > >> store-08# gpart show -l
> > >> =3D3D>        40  5857345456  mfid0  GPT  (2.7T)
> > >>         40       81920      1  efi  (40M)
> > >>      81960     8388608      2  root  (4.0G)
> > >>    8470568     8388608      3  root0  [bootme]  (4.0G)
> > >>   16859176     8388608      4  d1  (4.0G)
> > >>   25247784     8388608      5  d2  (4.0G)
> > >>   33636392  5823709104      6  zfs  (2.7T)
> > >>=20
> > >> it only boots from partition 2.
> > >>=20
> > >> so is there any magic?
> > >=20
> > > Which bootcode do you have in your efi partition?
> > >=20
> > >=20
> > > --=20
> > > Cheers,
> > > Cy Schubert <Cy.Schubert@cschubert.com>
> > > FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
> > > NTP:           <cy@nwtime.org>    Web:  https://nwtime.org
> > >=20
> > > 			e^(i*pi)+1=3D0
> > >=20
> > >=20


-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>