Date: Fri, 19 Feb 2021 14:07:36 -0700 From: Warner Losh <imp@bsdimp.com> To: Greg Rivers <gcr+freebsd-stable@tharned.org> Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: FreeBSD 13/stable and zpool upgrade Message-ID: <CANCZdfphKtsYvUauo%2BFe8Hg%2B3TEFjkEthk=B5So0=WHsRFDpxQ@mail.gmail.com> In-Reply-To: <2027600.x0N0T6uNKo@no.place.like.home> References: <ac735a6b-b82e-36e4-eb66-d2c0d422cc75@lapinbilly.eu> <CANCZdfrm0dpQ6tyggj-VStTz1zTz8wvqZ35ePn5Dc-o66nC4JQ@mail.gmail.com> <YDACWGA4mLKXiuAb@home.opsec.eu> <2027600.x0N0T6uNKo@no.place.like.home>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 19, 2021 at 1:49 PM Greg Rivers via freebsd-stable < freebsd-stable@freebsd.org> wrote: > On Friday, 19 February 2021 12:24:24 CST Kurt Jaeger wrote: > > > > Unfortunately it contains an old version of the boot loader: > > [...] > > > We should be better about upgrading boot blocks, but EFI is kinda new > and > > > kinda different than the other out-of-root-filesystem boot blocks > we've had > > > in the past, so there's still some rough edges. > > > > We run many systems at remote sites. If we can't remotely upgrade > > without drama from 12.x to 13.x, that would be a catastrophe. > > > > Any chance this can be fixed before 13.0-REL ? > > > Informed by reading the bsdinstall(8) scripts, I've been creating my own > boot1.efifat thusly: > > #!/usr/bin/env sh > TMPDIR=/mnt > rm -f /boot/boot1.efifat > newfs_msdos -F 32 -c 1 -L EFISYS -C 200m /boot/boot1.efifat > MD=$(mdconfig -f /boot/boot1.efifat) > mount -t msdosfs /dev/${MD} ${TMPDIR} > mkdir -p ${TMPDIR}/efi/boot ${TMPDIR}/efi/freebsd > cp -a /boot/loader.efi ${TMPDIR}/efi/boot/bootx64.efi > cp -a /boot/loader.efi ${TMPDIR}/efi/freebsd/ > umount ${TMPDIR} > mdconfig -d -u ${MD} > > Then I use `gpart bootcode -p /boot/boot1.efifat ...` as usual. > > To avoid confusion and errors, I think a proper boot1.efifat should be put > back into the base system so that people don't have to track the above > recipe (which is likely to change). > There's no safe way to do this. The old process has been deprecated because it is dangerous and inflexible. For upgrading from an old-style installation, the new process is actually fairly simple: mount -t msdos /dev/daXsY /mnt cp /boot/loader.efi /mnt/efi/boot/bootx64.efi umount /mnt Though if you're using eftbootmgr to select things, you'll need to copy to efi/freebsd/loader.efi. Different BIOS vendors have a number of different bugs that make this trickier than it should be, alas. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfphKtsYvUauo%2BFe8Hg%2B3TEFjkEthk=B5So0=WHsRFDpxQ>