git: 2c26d77d989a - main - Remove /boot/efi from mtree, missed in 0b7472b3d8d2.

Mark Millard marklmi at yahoo.com
Wed Mar 3 05:14:37 UTC 2021


bdragon at FreeBSD.org wrote on
Wed Mar 3 03:38:18 UTC 2021 :

> grep -q rather.
> 
> In any case, instead of checking for directory existence, checking whether something is actually mounted there.
> 
> On Tue, Mar 2, 2021, at 9:34 PM, Brandon Bergren wrote:
> > OK, how about this as an idea then:
> > 
> > Parse mount output to see if anything is mounted to /boot/efi directly?
> > 
> > if mount -p | cut -f 2 | grep '^/boot/efi$'; then
> > ....
> > fi
> > 
> > -- 
> >   Brandon Bergren
> >   bdragon at FreeBSD.org
> >

I've no problem dealing with whatever ends up chosen.
But I may be providing examples of what you may run
into overall with folks that might not as easily
adjust to rules that reserve some usage patterns. So
I report the following for reference only.

I've got aarch64 systems that do not automatically mount
/boot/efi/ in FreeBSD but use EFI to boot FreeBSD. I only
mount to /boot/efi/ when I want to update EFI material
(or inspect it). Usually this is for separate removable
media as far as where EFI material is vs. FreeBSD. The
EFI media might be removed after booting in order to allow
use of other media of the same type.

I also have example aarch64 systems for which I have
both /usb_efi and /microsd_efi because of direct booting
USB vs. using a microsd card that in turn root-mounts
the same USB drive. (Sometimes other infrastructure
vintages/types determine what combinations can work.) In
some contexts I used /boot/efi instead of /microsd_efi
but that was commonly because of a normally less-removable
eMMC that was in use instead of something live-removable,
like a microsd card. (A convention I did not start with
but progressed to with newer setups.)

Whenever EFI might be on media not needed once FreeBSD
has booted far enough, depending on EFI materials being
mounted vs. not seems odd to me.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the dev-commits-src-main mailing list