From nobody Thu Feb 24 16:55:37 2022 X-Original-To: freebsd-stable@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 9461C19E67CC for ; Thu, 24 Feb 2022 16:55:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-vs1-xe2d.google.com (mail-vs1-xe2d.google.com [IPv6:2607:f8b0:4864:20::e2d]) (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 4K4JvH4j4Wz3QSf for ; Thu, 24 Feb 2022 16:55:55 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-vs1-xe2d.google.com with SMTP id d11so2816785vsm.5 for ; Thu, 24 Feb 2022 08:55:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bx3yMDUB1l8LcdLiAwRlnR0c4l1Fidj1lvuhZxmUVk4=; b=IFTfoYNxbQwpr3bGm1SoZD+e8gyq56tarnOBahbBKlHIu9INtKumI8wq812XHFb1x0 h5pgxhwmmZo7GIKAVPksWdRk095d9F/+/s+FcUljXLwKti7aZuxKOUKHHMfSYBCpWQnc woCfdJ7r1DBXiAaaAT7E4N4THDFEa5Tlmd5ai8TrARDjcqogQRLl9TNFNpd9PtvpSCDH xlpTB+dOfwZ+hmWGirQIaRXRtHE56Qiun7B3j5SqN1BU6q4bJdXr4675OzHynPCVs3vp fJIY9Gy6HZthAY8Jg1WIK2ODY9+81CMzAccyCXdMjZWkMTgkwDQHeuBda2E5fQVq9K1x j8vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bx3yMDUB1l8LcdLiAwRlnR0c4l1Fidj1lvuhZxmUVk4=; b=ZXwuRlhQq60mwe+8fIJgMCxfmuJJFVNZf/TN6mMlemEtAaGQ1V16G7wzsgsxpHgPJu AgQ06ATyPvfFubJUXTLS8SC2FqcXUoZOeGfanXrx/lZvUkqAz+Vv6I37NvkvFdEHgddQ 1NofQ98l8d60trekY3reSranD19ND+4jWaVOw6COwl7cKkV9YxKL/2HPosCJ5/l3ePTL hjbsn/QzcHqXXTMZcjm5LE3Cwqfvx24BExbyt3/3fH90ElgF8XISkQRqZCRZS7nu4LNR 5Dsjj7NoAB8qZxKDVbwV67T3q5eIzJ0M+oYF7Cr7/DXir0UiuDC1Kucd1wA9GlirDj62 xAVg== X-Gm-Message-State: AOAM530yrF+z1/bgat8szHeXwH8e/oTD+RxQx2ILg5nqAIdWR2Xj2B7d xMA7WHUcBFydzTizXqG6v0ETfHEqjD+tFgmvwn3XqeTNAyc= X-Google-Smtp-Source: ABdhPJyoKTavjlrgCG5/lSBM4VzbOFDLfTTDooAWurQeEqZukynAPNd1zaoWeDE+6zVHhii7PnqeNGONS1qyFsIJQ2M= X-Received: by 2002:a67:e005:0:b0:303:b07f:9735 with SMTP id c5-20020a67e005000000b00303b07f9735mr1690686vsl.6.1645721749088; Thu, 24 Feb 2022 08:55:49 -0800 (PST) List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 References: <20220224104322.Horde.akByDDeJzjTUIyGt_Few2RI@webmail.leidinger.net> <5715fdc2-fb94-99d4-7a11-fe0666807866@quip.cz> In-Reply-To: <5715fdc2-fb94-99d4-7a11-fe0666807866@quip.cz> From: Warner Losh Date: Thu, 24 Feb 2022 09:55:37 -0700 Message-ID: Subject: Re: bootcode update after zpool upgrade To: Miroslav Lachman <000.fbsd@quip.cz> Cc: Alexander Leidinger , FreeBSD Stable Mailing List Content-Type: multipart/alternative; boundary="00000000000040ffdd05d8c67480" X-Rspamd-Queue-Id: 4K4JvH4j4Wz3QSf X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=IFTfoYNx; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::e2d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.98 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.98)[-0.982]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::e2d:from]; MLMMJ_DEST(0.00)[freebsd-stable]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000040ffdd05d8c67480 Content-Type: text/plain; charset="UTF-8" On Thu, Feb 24, 2022 at 4:49 AM Miroslav Lachman <000.fbsd@quip.cz> wrote: > On 24/02/2022 10:43, Alexander Leidinger wrote: > > Quoting Miroslav Lachman <000.fbsd@quip.cz> (from Wed, 23 Feb 2022 > > >> I am not sure what I should update. This machine is EFI boot only > >> (this is the only one EFI machine we have). > > > >> Should I run: > >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 nvd0 > >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 nvd1 > > > > This is the bootcode zpool upgrade talks about. > > > >> Or should I update EFI partitions? (if so, then how?) > > > > The EFI partition contains the loader, not the bootcode. > > > > While we are at it, I'm still looking for the place where I can find > > which features the bootcode supports. Not all features are supported for > > a root pool. > > Thank you for the clarification! > If you've updated your ZFS pool and have an old system, you do need to update the EFI boot code. None of the mbr stuff is used for EFI booting. If you have an old installation, it may be small. So ideally, you'd copy over /boot/loader.efi to ESP:efi/boot/bootx64.efi. However, it may be too big if you have an ESP created by the old installer. In that case, you'll need to either create a new, larger ESP, or copying /boot/boot1.efi instead. Warner --00000000000040ffdd05d8c67480 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Feb 24, 2022 at 4:49 AM Miros= lav Lachman <000.fbsd@quip.cz>= ; wrote:
On 24/0= 2/2022 10:43, Alexander Leidinger wrote:
> Quoting Miroslav Lachman <000.fbsd@quip.cz> (from Wed, 23 Feb 2022

>> I am not sure what I should update. This machine is EFI boot only =
>> (this is the only one EFI machine we have).
>
>> Should I run:
>> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 nvd0
>> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 2 nvd1
>
> This is the bootcode zpool upgrade talks about.
>
>> Or should I update EFI partitions? (if so, then how?)
>
> The EFI partition contains the loader, not the bootcode.
>
> While we are at it, I'm still looking for the place where I can fi= nd
> which features the bootcode supports. Not all features are supported f= or
> a root pool.

Thank you for the clarification!

If you= 've updated your ZFS pool and have an old system, you do need to update=
the EFI boot code. None of the mbr stuff is used for EFI booting= .

If you have an old installation, it may be small= . So ideally, you'd copy over /boot/loader.efi
to ESP:efi/boo= t/bootx64.efi. However, it may be too big if you have an ESP created by the=
old installer. In that case, you'll need to either create a = new, larger ESP, or copying=C2=A0/boot/boot1.efi
instead.

Warner
--00000000000040ffdd05d8c67480--