From nobody Sat Jul 16 16:57:55 2022 X-Original-To: freebsd-current@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 4LlZDH3hZBz4X0RR for ; Sat, 16 Jul 2022 16:58:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LlZDH36jFz3lt9; Sat, 16 Jul 2022 16:58:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657990687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MpzNCcMNegNak/GHTOu1+0ub5ivl0Yt56D8Ik7mhuHc=; b=aefgwMeiy1zOxYPfPV9Z7v+9D/qgkRLpDT7x43IgvmKx+92X+fBpNagT+IoNxu++T+uBC/ HXIRt9HKB0kz2cuAMS9GrX3KH6P3vvTBk5oOUFG2k85xAUUo3VqT2FC1/pNGBoQ8xKjtly V1L+FnkCgZ/DnUum3hjKh6srE2L8v9/vxXNa5+2mciyj1B5KQvNFnhJ7Btaa1IPWrvlrir 3NDOPlRJp2+c0NtqMUp+PXk/4YHVQCM+17ORGzKQTfMUjx6Qnp1qmUDp6HoubuKjsGEEYA HDWfq0jYCyBs7hEwTCCBWUcs4pv4aZqHDA6GWwXffmdkgbFQ+imWrLgUg7lEdA== Received: from mail-oa1-f47.google.com (mail-oa1-f47.google.com [209.85.160.47]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4LlZDH22CJzV4y; Sat, 16 Jul 2022 16:58:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-10c0430e27dso13301154fac.4; Sat, 16 Jul 2022 09:58:07 -0700 (PDT) X-Gm-Message-State: AJIora8hrK05F36rpKGpTxULMHDoxBCEBh/YITz/KiIJ9OQ5DSD639IS wbSFQvGTUx3IOrPjBynnQ1+siFEXeSOTbW4z6Ac= X-Google-Smtp-Source: AGRyM1vj/2sXPMdC8YdclXVJw+1JRwEBZM/87XNnKvc57l12s/H9oQx476kXSH/nw7SVw3lsWnTI3jDX3LujrGkT4lY= X-Received: by 2002:a05:6870:972c:b0:10c:151d:4df8 with SMTP id n44-20020a056870972c00b0010c151d4df8mr12888175oaq.210.1657990686560; Sat, 16 Jul 2022 09:58:06 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Nuno Teixeira Date: Sat, 16 Jul 2022 17:57:55 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: About zfs upgrade To: Dimitry Andric Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="000000000000e9d97305e3ef09b4" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657990687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MpzNCcMNegNak/GHTOu1+0ub5ivl0Yt56D8Ik7mhuHc=; b=S2Ixhz7QkGOXpwz2X1iMGepP/W26ty+9MZi6s3PIe2XAKquaiq+NAyCFBcu5JTE8gCKzJk e2a5u4VbYLpbBdr/ziKjOCHZ6WHiRT+zj+B0GLZZ+a0N96e5ySuqX8xYn2sElEFPHPFD6B ky7HFpDBEjV5wK9SUxyshnGi8JISswB52M9/3Wy881qdOL0tqAqZHV6Qla8oinx7F43vGw ZdHIisV4Sek3aKl8ALK7cqyysdHIj+q1Xi7RO7wNjpMv4NTINuW1ZdE0OvA63OpJu+OV5c TljPD5y0QneEeuC8+H2rjc6tpoIzAHvMUmIUAAGSePfKYSB1ur1vdz99gcQkDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657990687; a=rsa-sha256; cv=none; b=JeqPZ8uk5yDiq/pHDsb3OEF94f0JKFSpcvTdl1JYIbOj8VGUPCO4V/wdvaDFqJRljvDnr9 vnOIAjI0uOd/5AbLIAAYzPtokPGCZGiLNVkO/qEKs5aFlwNtw+3BADt6Ko9tmVG4EcQhYM uWnk9vfZsygwU+Hx/duetdzsnTNUw5T23W/cdsA4WtS3ubphU9z+ve8aPxzarjGSo6x98N fkJP1vMOzZZIfe9Icx9P6wFThTu5RgfhLhngWjVDJfNYZOouQnAHbnVCczBulcA5UaLiCG AWaQldhOnH/dzD29yCGrLLlnfBr6/9vx58wEpKoq2Gx1PWAoX2Y+/vh0/DPreA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --000000000000e9d97305e3ef09b4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Dimitry! Thanks for the tips. zfs upgraded, bootcode updated and system working fine= . Cheers, Nuno Teixeira Dimitry Andric escreveu no dia s=C3=A1bado, 16/07/2022 = =C3=A0(s) 17:17: > On 16 Jul 2022, at 18:09, Nuno Teixeira wrote: > > I'm about to upgrade zfs pool and I need to know the command to update > boot code on my efi config: > > --- > > gpart show > > =3D> 40 2000409184 nvd0 GPT (954G) > > 40 532480 1 efi (260M) > > 532520 2008 - free - (1.0M) > > 534528 8388608 2 freebsd-swap (4.0G) > > 8923136 1991485440 3 freebsd-zfs (950G) > > 2000408576 648 - free - (324K) > > --- > > Handbook says: > > gpart bootcode -p /boot/boot1.efifat -i 1 ada1 > > > > Should I use: > > gpart bootcode -p /boot/boot1.efifat -i 1 nvd0p1 ? > > For gpart, you should specify the base device, i.e. nvd0. The "-i 1" > option indicates the partition. > > In any case, assuming FreeBSD 13 or later, you can just mount the EFI > partition and copy loader.efi over: > > mount -t msdosfs /dev/nvd0p1 /mnt > cp /mnt/efi/boot/bootx64.efi /mnt/efi/boot/bootx64.old > cp /boot/loader.efi /mnt/efi/boot/bootx64.efi > > That way you could also revert to bootx64.old if things go wrong. > > -Dimitry > > --000000000000e9d97305e3ef09b4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Dimitry!

Thanks for the = tips. zfs upgraded, bootcode updated and system working fine.

= Cheers,

Nuno Teixeira

=
Dimitry Andric <dim@freebsd.org> escreveu no dia s=C3=A1bado, 16/07= /2022 =C3=A0(s) 17:17:
On 16 Jul 2022, at 18:09, Nuno Teixeira <eduardo@freebsd.org> wrote:
> I'm about to upgrade zfs pool and I need to know the command to up= date boot code on my efi config:
> ---
>=C2=A0 gpart show
> =3D>=C2=A0 =C2=A0 =C2=A0 =C2=A0 40=C2=A0 2000409184=C2=A0 nvd0=C2= =A0 GPT=C2=A0 (954G)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A040=C2=A0 =C2=A0 =C2=A0 532480= =C2=A0 =C2=A0 =C2=A01=C2=A0 efi=C2=A0 (260M)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0532520=C2=A0 =C2=A0 =C2=A0 =C2=A0 2008=C2=A0= =C2=A0 =C2=A0 =C2=A0 - free -=C2=A0 (1.0M)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0534528=C2=A0 =C2=A0 =C2=A08388608=C2=A0 =C2= =A0 =C2=A02=C2=A0 freebsd-swap=C2=A0 (4.0G)
>=C2=A0 =C2=A0 =C2=A0 8923136=C2=A0 1991485440=C2=A0 =C2=A0 =C2=A03=C2= =A0 freebsd-zfs=C2=A0 (950G)
>=C2=A0 =C2=A02000408576=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0648=C2=A0 =C2= =A0 =C2=A0 =C2=A0 - free -=C2=A0 (324K)
> ---
> Handbook says:
> gpart bootcode -p /boot/boot1.efifat -i 1 ada1
>
> Should I use:
> gpart bootcode -p /boot/boot1.efifat -i 1 nvd0p1 ?

For gpart, you should specify the base device, i.e. nvd0. The "-i 1&qu= ot; option indicates the partition.

In any case, assuming FreeBSD 13 or later, you can just mount the EFI parti= tion and copy loader.efi over:

mount -t msdosfs /dev/nvd0p1 /mnt
cp /mnt/efi/boot/bootx64.efi /mnt/efi/boot/bootx64.old
cp /boot/loader.efi /mnt/efi/boot/bootx64.efi

That way you could also revert to bootx64.old if things go wrong.

-Dimitry

--000000000000e9d97305e3ef09b4--