From nobody Tue Nov 22 19:50:09 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 4NGvxW5Dhwz4hRDP for ; Tue, 22 Nov 2022 19:50:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 4NGvxW34j0z41Wv for ; Tue, 22 Nov 2022 19:50:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x633.google.com with SMTP id n21so38117864ejb.9 for ; Tue, 22 Nov 2022 11:50:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.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=8LaCptmn5zuPVUCrH+K6I/hUwnlxcL/isLODo1Z489I=; b=u33vF6610RaGOPMijS+T1T0WudG7MXRIeD0parTJJt3RUEhiKi4kGZ+8erb6oN2m9/ +fGh9r+G2fwQ9ylRIgQ4WviTVxC/JjqnNEM8UvNubqlynNCLx+HKDz46CnFY4iyhKHGK jq/ejWCZCZESiNKuTDul9TFQnKLlkOgnLEX0KSj8jtCjC4rcctDsnmqF0tzS4dGsJEW8 YCUnJbtLT8g0hzR8emVl4Bv6KXiNBoqtF4XfVNLpMR21eybUWPw+ol2mFa3tORrsXo7J 4nli/t9QmHEtNHCYRg/fdef0+ySRVYm/pjCYSnuDt8zFfmY1hw+wilfQE5LcoqbLI7sD 6/iA== 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=8LaCptmn5zuPVUCrH+K6I/hUwnlxcL/isLODo1Z489I=; b=qdtxwxnXLXbpknRYrXmO9WdarqjVt1HkE8t3k1JhC7p6Z8fMZ97qSiol5OUKntqLVT vSTWnd7hHTaqd6ljzN2tndumIWvdUPf72iLAUytJZbTVbRnHiJNwF/Ipd9jU3Q2eGPOe v3UboCmb9ibG0+wMVUSCf/TfqmkkIXFOniew9a/QYFpnW9iKpZcx/e1InYNfr+ftu09c LOvqHECKwHXmmVES6i4wXHRG1zilAE6GV1lS2uWy4ZzKEWLu6TZdQV1gC0pVuKskcRHU UK0z0qf9k3ALWkJCI9IFiNOf2C2dCF52HQkivPXaRc+5N/ZZ9CV30wqktYCbJ+qbETSs XCQg== X-Gm-Message-State: ANoB5pnDmxXJlHzrSLrHrcSrfJ9Dn8yyVmZcq/aDKWdhxk0YEtGUtW76 uj2S1X7Fk6SOxc61a53IdOf8uFmz7ZBwuo9fGQnrAaVxF4k= X-Google-Smtp-Source: AA0mqf7IgYPwc/ZPAI5SOi3+LNHSoPtECWntZFxWCkpayIvto+Pv89HzQIcS+bqMgXyLpBNjwzbacg+euP+zq3cmEX0= X-Received: by 2002:a17:907:11d1:b0:7a7:1d4f:c7dc with SMTP id va17-20020a17090711d100b007a71d4fc7dcmr6958865ejb.252.1669146621901; Tue, 22 Nov 2022 11:50:21 -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: Warner Losh Date: Tue, 22 Nov 2022 12:50:09 -0700 Message-ID: Subject: Re: UEFI question To: Alan Somers Cc: John Kennedy , FreeBSD FS , Nathan Whitehorn Content-Type: multipart/alternative; boundary="0000000000007a15c505ee147bcb" X-Rspamd-Queue-Id: 4NGvxW34j0z41Wv X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N --0000000000007a15c505ee147bcb Content-Type: text/plain; charset="UTF-8" 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 EFI > > > 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 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) > 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. > > > > 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. > > 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 used for the BE? Warner > --0000000000007a15c505ee147bcb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Tue, Nov 22, 2022, 11:42 AM Alan Somers <asomers@freebsd.org> wrote:
On Tue, May 31, 2022 at 9:27 AM John Kenned= y <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
--0000000000007a15c505ee147bcb--