NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GPT and UEFI booting



Hello Robert,

Le Tue, Apr 05, 2022 at 06:59:46PM +0700, Robert Elz a écrit :
>     Date:        Tue, 5 Apr 2022 12:54:40 +0200
>     From:        Martin Husemann <martin%duskware.de@localhost>
>     Message-ID:  <20220405105440.GA20376%mail.duskware.de@localhost>
> 
>   | This is meant for expert use firmware bugs workarounds, and there seems
>   | to be no official way to toggle it off again.
> 
> If I am reading the got sources correctly, using gpt biosboot
> without giving the -A flag shoukd turn off the PMBR "active" bit.
> 

Thank you for taking the time to read the source---I should have done
it.

I tried it. It does unset the flag if and only if a partition is
given as an argument.

So using my first GPT partition (EFI System), the sequence:

gpt biosboot -A -i 1 wd1

sets the biosboot attribute to the first GPT part and sets the active
flag in the PMBR.

gpt biosboot -i 1 wd1

then removes the active flag in the PMBR keeping/setting again the
biosboot flag on the part 1.

But the command:

gpt biosboot wd1

will not work alone without specifying a partition to flag.

So after suppressing the PMBR active flag, one can simply suppress
the biosboot attribute on the partition by:

gpt unset -a biosboot -i 1 wd1

Thanks for the information, Robert! It's simpler and safer than writing
bytes to the raw disk---and should probably be added to the man page.
-- 
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
                     http://www.kergis.com/
                    http://kertex.kergis.com/
                       http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C


Home | Main Index | Thread Index | Old Index