From nobody Tue Nov 22 23:50:08 2022 X-Original-To: freebsd-fs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NH1GP3XwYz4hxL8 for ; Tue, 22 Nov 2022 23:50:21 +0000 (UTC) (envelope-from eborisch@alumni.stanford.edu) Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NH1GP08pTz3HWV for ; Tue, 22 Nov 2022 23:50:21 +0000 (UTC) (envelope-from eborisch@alumni.stanford.edu) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102f.google.com with SMTP id a22-20020a17090a6d9600b0021896eb5554so382560pjk.1 for ; Tue, 22 Nov 2022 15:50:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ADtC74B0P5GXvITWyyV+bJSHoX9QgtoO5tyCtoEj1NI=; b=RJf236Unw6Gw4AMINjv+iMJ16lW49U1qw71ANC3bVJyw61fKdq2GIfcY5+Ys+WnMgj BX6TAMEOHs4pdwxajwono+W874fANRDKqoR9uiMnzSbBUeISJiKwg2NhCDclRBIiutH8 UHvQhSMVU67r9qgb64QIL5+D5rXRa3bxAW+DH9vIh/0Ovdb1scGUpySMhVD6/Cu9gJTU Ya4L6bMBDdIB06lPwPMe7HUlmpPJWaMK9eO22Nh/o/xSrZfdEViomhJOqcYJ8kkGwxh2 Ph0IxTtRTZeKW2Lzs/E0UkxDyjMCBir4v3knK7AlOj0w/2x9wERGOfY7qRzte/O6A+t3 dhow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ADtC74B0P5GXvITWyyV+bJSHoX9QgtoO5tyCtoEj1NI=; b=yRae9VOXvZtdCYd0w3XL/V08iAOvf2mCw/Sj6ZupkwcEpHVNx9OskkFF+zH1E8c7Q5 UUKw9DDPULCQlqzy+OnH41lVTfJ9eqjlg5yZpP5jP+qEvsposYh8EMt4lIXtg8+EWQC9 67pbTmUffKZYp6wUyTlNK4Sy6LE/JFqrZUaOxy7wZTKnYBXv7Qb8Hn+aFfhdzPZfDIRq ATHJ7S49a3m4FK8Dx5PA5LoU5oJLgAX36tandgBphKq4gT6HOzFJ/CwH1qy8hMSK7wi0 siKgl/+mviy+yL4soQ4CtDf2sIP0qJmIe7ja1gB/NvGf70KjYnWQxSYvVJYebk0jrelh 9pxw== X-Gm-Message-State: ANoB5plVA4qtf17HvEW6PcKbnTqxhnwnlPI2rbQLWbNlrsCqP5MidFs2 oXRF7OfVLEcMPNb/FlcvY7bGmtcOfOxcKfmxsSpJ5Q== X-Google-Smtp-Source: AA0mqf6+hRvbxx3SiUGnupNgMQYA/Vq4wHe7KPCD2wEP6MO55sfJojYaLFkus8DhnvW9B9VvvVP5Fu1+ycNZMnZzSsw= X-Received: by 2002:a17:902:bc43:b0:186:da90:5936 with SMTP id t3-20020a170902bc4300b00186da905936mr6732472plz.158.1669161019603; Tue, 22 Nov 2022 15:50:19 -0800 (PST) List-Id: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 References: <20220531123221.n7ubs365ceeqo2d4@x1> In-Reply-To: From: Eric Borisch Date: Tue, 22 Nov 2022 17:50:08 -0600 Message-ID: Subject: Re: UEFI question To: Warner Losh Cc: Alan Somers , FreeBSD FS , John Kennedy , Nathan Whitehorn Content-Type: multipart/alternative; boundary="000000000000a58ef805ee17d589" X-Rspamd-Queue-Id: 4NH1GP08pTz3HWV X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --000000000000a58ef805ee17d589 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Nov 22, 2022 at 1:50 PM Warner Losh wrote: > > > On Tue, Nov 22, 2022, 11:42 AM Alan Somers wrote: > >> On Tue, May 31, 2022 at 9:27 AM John Kennedy wrote: >> > >> > 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). >> > > >> > > 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).. >> correct? >> > > - what's the correct way to fix this? should I newfs_msdos on each E= FI >> > > partition and copy /boot/loader.efi as /EFI/BOOT/BOOTX64.EFI? or >> > > should I use efibootmgr? >> > > >> > > Thanks for enlightening me :) >> > >> > 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. >> > >> > 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 workin= g >> > EFI partition on one, that is probably hedging your bets a bit but yes= , >> > if that drive died, you'd probably be dead. >> > >> > 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), a= nd >> > did ZFS "raiding" (mirroring-ish, usually) across the freebsd-zfs >> partitions. >> > >> > 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 change= s >> > for sanity before committing to both. But yes, I'd upgrade them both = to >> > the same thing once I was sure it would work. >> >> 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? >> > > > 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 us= ed > for the BE? > > Warner > Just a =E2=80=9Cyes, please.=E2=80=9D If you=E2=80=99re installing zfs root= on a mirror of disks, POLA suggests the required boot bits are on both disks, too. Thanks, - Eric > --000000000000a58ef805ee17d589 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Nov 22, 2022 at 1:50 PM Warner Losh <imp@bsdimp.com> wrote:


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:
>
> 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 t= hen
> > upgraded to 13.1-RELEASE (through freebsd-update). ZFS is used (r= aidz2).
> >
> > The system has the following partitions: https://gist.github.com/silenius/2defdd5480c5c1b= c9ba2ff8940756466
> > 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 o= ne has
> > has been populated (an mounted): https://gist.github.com/silenius/1220c953f905d868c1615fd= 0e7122bbf .. why ?
> > - if I understand well if my da0 disk dies the system becomes
> >=C2=A0 =C2=A0unbootable (https://gist.github.com/silenius/51d202053295270eaaeb2c02316165= ee).. correct?
> > - what's the correct way to fix this? should I newfs_msdos on= each EFI
> >=C2=A0 =C2=A0partition and copy /boot/loader.efi as /EFI/BOOT/BOOT= X64.EFI? or
> >=C2=A0 =C2=A0should I use efibootmgr?
> >
> > Thanks for enlightening me :)
>
> I use UEFI to multi-boot a lot myself, but not through efibootmgr (vs<= br> > picking it via UEFI/BIOS on boot manually).=C2=A0 I'm multi-bootin= g windows
> and FreeBSD, so I'm being (justifiably) paranoid, but not based on=
> being burnt in recent memory.
>
> Depending on how your system works (drives are enumerated at startup),=
> in theory any of your disks could be da0.=C2=A0 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.
>
> In my dual-disk setups, I'd see an EFI and a freebsd-boot (BIOS) p= artition
> on both disks, I split my total swap between the two (not mirrored), a= nd
> did ZFS "raiding" (mirroring-ish, usually) across the freebs= d-zfs partitions.
>
> 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 change= s
> for sanity before committing to both.=C2=A0 But yes, I'd upgrade t= hem both to
> the same thing once I was sure it would work.

I just noticed the same problem.=C2=A0 For mirrored installs, the
13.1-RELEASE installer only formats the efi partition on one hard
disk.=C2=A0 Shouldn't it do both?


We go bac= k and forth on this question.... I think we should, but others got grumpy w= hen I suggested it. Maybe just all the drives in the zpool used for the BE?=

Warner

Just a =E2=80=9Cyes, please.=E2=80=9D If you=E2=80=99re installing zfs r= oot on a mirror of disks, POLA suggests the required boot bits are on both = disks, too.

Thanks,
=C2=A0 - Eric
--000000000000a58ef805ee17d589--