Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Nov 2022 09:17:48 +0100
From:      Julien Cigar <julien@perdition.city>
To:        Larry Rosenman <ler@lerctr.org>
Cc:        Eric Borisch <eborisch@gmail.com>, Warner Losh <imp@bsdimp.com>, Alan Somers <asomers@freebsd.org>, FreeBSD FS <freebsd-fs@freebsd.org>, John Kennedy <warlock@phouka.net>, Nathan Whitehorn <nwhitehorn@freebsd.org>
Subject:   Re: UEFI question
Message-ID:  <20221123081748.g3jiad4udh4pxzyd@x1>
In-Reply-To: <1e6a680f170f85563caba1d0842bfa46@lerctr.org>
References:  <20220531123221.n7ubs365ceeqo2d4@x1> <YpYzbgexVa0mULas@phouka1.phouka.net> <CAOtMX2g4-2PPTSSP-SfrG8m7gQDDqP0J%2BuwOKKutiQxryye6sw@mail.gmail.com> <CANCZdfo7Zixx%2Bd_DkVi3ymbEjtd=f1yFYyJmMixjGCSFyP8h%2Bw@mail.gmail.com> <CAMsT2=nB46rnvFTbuwG9OCqJdWSRV%2BsB3PKHhC=15PiS8DQegg@mail.gmail.com> <1e6a680f170f85563caba1d0842bfa46@lerctr.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--nvnzkhq26mu6l3s7
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 22, 2022 at 08:01:50PM -0600, Larry Rosenman wrote:
>=20
>=20
> On 11/22/2022 5:50 pm, Eric Borisch wrote:
>=20
> > On Tue, Nov 22, 2022 at 1:50 PM Warner Losh <imp@bsdimp.com> wrote:
> >=20
> > On Tue, Nov 22, 2022, 11:42 AM Alan Somers <asomers@freebsd.org> wrote:
> > On Tue, May 31, 2022 at 9:27 AM John Kennedy <warlock@phouka.net> wrote:
> > >=20
> > > On Tue, May 31, 2022 at 02:32:21PM +0200, Julien Cigar wrote:
> > > > I have a Dell R340 server on which installed a 13.0-RELEASE and then
> > > > upgraded to 13.1-RELEASE (through freebsd-update). ZFS is used
> > > > (raidz2).
> > > >=20
> > > > The system has the following partitions:
> > > > https://gist.github.com/silenius/2defdd5480c5c1bc9ba2ff8940756466
> > > > Some things regarding UEFI are not clear to me:
> > > > - as you can see in the partition list, the installer created an EFI
> > > > partition on all 4 drives, however it looks like only the first
> > > > one has
> > > > has been populated (an mounted):
> > > > https://gist.github.com/silenius/1220c953f905d868c1615fd0e7122bbf
> > > > .. why ?
> > > > - if I understand well if my da0 disk dies the system becomes










> > > >   unbootable
> > > > (https://gist.github.com/silenius/51d202053295270eaaeb2c02316165ee)=
=2E.
> > > > correct?
> > > > - what's the correct way to fix this? should I newfs_msdos on
> > > > each EFI
> > > >   partition and copy /boot/loader.efi as /EFI/BOOT/BOOTX64.EFI? or
> > > >   should I use efibootmgr?
> > > >=20
> > > > Thanks for enlightening me :)
> > >=20
> > > I use UEFI to multi-boot a lot myself, but not through efibootmgr (vs
> > > picking it via UEFI/BIOS on boot manually).  I'm multi-booting windows
> > > and FreeBSD, so I'm being (justifiably) paranoid, but not based on
> > > being burnt in recent memory.
> > >=20
> > > Depending on how your system works (drives are enumerated at startup),
> > > in theory any of your disks could be da0.  If you've only got a
> > > working
> > > EFI partition on one, that is probably hedging your bets a bit but
> > > yes,
> > > if that drive died, you'd probably be dead.
> > >=20
> > > In my dual-disk setups, I'd see an EFI and a freebsd-boot (BIOS)
> > > partition
> > > on both disks, I split my total swap between the two (not mirrored),
> > > and
> > > did ZFS "raiding" (mirroring-ish, usually) across the freebsd-zfs
> > > partitions.
> > >=20
> > > In my case, using the UEFI/BIOS from the motherboard, I could manually
> > > pick a disk to boot from which let me vet UEFI or ZFS bootblock
> > > changes
> > > for sanity before committing to both.  But yes, I'd upgrade them
> > > both to
> > > the same thing once I was sure it would work.
> >=20
> > I just noticed the same problem.  For mirrored installs, the
> > 13.1-RELEASE installer only formats the efi partition on one hard
> > disk.  Shouldn't it do both?
> >=20
> > We go back and forth on this question.... I think we should, but others
> > got grumpy when I suggested it. Maybe just all the drives in the zpool
> > used for the BE?
> >=20
> > Warner
>=20
> Just a "yes, please." If you're installing zfs root on a mirror of disks,
> POLA suggests the required boot bits are on both disks, too.
>=20
> Thanks,
>   - Eric
>=20
> >=20
>=20
> This is my common setup for every FreeBSD box I build:
>=20
> =E2=9D=AF gpart show
> =3D>        40  3905945520  mfid0  GPT  (1.8T)
>           40      532480      1  efi  (260M)
>       532520    16779224      3  freebsd-swap  (8.0G)
>     17311744  3888633816      4  freebsd-zfs  (1.8T)
>=20
> =3D>        40  3905945520  mfid1  GPT  (1.8T)
>           40      532480      1  efi  (260M)
>       532520    16779224      3  freebsd-swap  (8.0G)
>     17311744  3888633816      4  freebsd-zfs  (1.8T)
>=20
> =3D>        40  5859442608  mfid2  GPT  (2.7T)
>           40      532480      1  efi  (260M)
>       532520    16779224      3  freebsd-swap  (8.0G)
>     17311744  5842130904      4  freebsd-zfs  (2.7T)
>=20
> =3D>        40  5859442608  mfid3  GPT  (2.7T)
>           40      532480      1  efi  (260M)
>       532520    16779224      3  freebsd-swap  (8.0G)
>     17311744  5842130904      4  freebsd-zfs  (2.7T)
>=20
> =3D>        40  3905945520  mfid4  GPT  (1.8T)
>           40      532480      1  efi  (260M)
>       532520    16779224      3  freebsd-swap  (8.0G)
>     17311744  3888633816      4  freebsd-zfs  (1.8T)
>=20
> =3D>        40  3905945520  mfid5  GPT  (1.8T)
>           40      532480      1  efi  (260M)
>       532520    16777216      3  freebsd-swap  (8.0G)
>     17309736  3888635824      4  freebsd-zfs  (1.8T)
>=20
> ler in =F0=9F=8C=90 borg in ~ via C v14.0.5-clang on =E2=98=81=EF=B8=8F  =
(us-east-1)
> =E2=9D=AF
>=20
> Disk number and sizes vary but the setup is the same EFI or BOOT or Both,
> swap, and ZFS on *ALL* disks

By default disks are partitionned but.. that's all. You need to=20
newfs_msdos and cp loader.efi on each but first EFI partition.
I don't understand the reason but I think some people will be upset when
the first disk dies and the system won't boot anymore...

>=20
> --=20
> Larry Rosenman                     http://www.lerctr.org/~ler
> Phone: +1 214-642-9640                 E-Mail: ler@lerctr.org
> US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106

--=20
Julien Cigar
Belgian Biodiversity Platform (http://www.biodiversity.be)
PGP fingerprint: EEF9 F697 4B68 D275 7B11  6A25 B2BB 3710 A204 23C0
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.

--nvnzkhq26mu6l3s7
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEnF27CBNtOraRNmgqCLYqJMpBHmkFAmN91yAACgkQCLYqJMpB
HmlvGxAAvgI9g111bg2kLVQVIMLE7WDP3gy+KK1+t+lVdqrE982GJxClKQWFelh8
2KD5w7o1NTryZDkRA4rqz5k9pLu0sEblt6un9VJrlszMHFwrmIQ6Gps1fm30N2zz
ARlQqv3sf/F6KYazzcb7n4nT3u2BWX9qG3nMmYjcMGZZJLyzA6DqRnqmSraxaWvx
lV6FzcBOWT8dNrA3BQcCoDWsTwsA0QkkxOSALwwZtZ0ZzpjJGjOLxQaw6yt28orj
z1eFXu5ZEp/eb2wfsxAnmpQlwpTkZOAW/nNpIrUvi7TSWlGgmUpZFoAXwmZfgXd6
ZE1GhACoTgs6KtXmYseKDZ8JB/YsKms+2iDsgyeeKU66vttCQgYcmjzF0wkQHkTV
u1Koece4DzbYWoGp70g3q2NTmgHusn3lcC1Au7TItRGqFN1uawgg3D6hxvkRRIxD
jwUVlsENj+vRlUXTOHjkKPVZGPq/JDC/XqWzdlLc2g3H4CSU+uiJDKThm5fvacPq
zZGsS6rTxjXVm/VBDfJPg90EVbzrBnd0Gm94ZnfO4MVUFCN8OhDXN8c9Dps3wwTt
C6d8yWy6HOWL5ZmedZ3Cyj65OLOC8M2lfK8NtXdMRJB/fNQaY13cJPRvcHryEIgO
w9V/xGXTWUOvfO4u0069Sv6wO05jwd/nUaFJ/NBUalBnPwOauBY=
=QiNu
-----END PGP SIGNATURE-----

--nvnzkhq26mu6l3s7--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20221123081748.g3jiad4udh4pxzyd>