Date: Fri, 19 Feb 2021 14:00:13 -0700 From: Warner Losh <imp@bsdimp.com> To: David Marec <david.marec@lapinbilly.eu> Cc: Kurt Jaeger <pi@freebsd.org>, freebsd-stable <freebsd-stable@freebsd.org> Subject: Re: FreeBSD 13/stable and zpool upgrade Message-ID: <CANCZdfqHKb2T8LCtLDa5oHBLrkMN7rUwxgCKJ2BH3vQj8yDqQw@mail.gmail.com> In-Reply-To: <7c9810fe-6960-0ec7-cab3-2f0c344471f4@lapinbilly.eu> References: <ac735a6b-b82e-36e4-eb66-d2c0d422cc75@lapinbilly.eu> <CANCZdfrm0dpQ6tyggj-VStTz1zTz8wvqZ35ePn5Dc-o66nC4JQ@mail.gmail.com> <YDACWGA4mLKXiuAb@home.opsec.eu> <7c9810fe-6960-0ec7-cab3-2f0c344471f4@lapinbilly.eu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 19, 2021 at 1:41 PM David Marec <david.marec@lapinbilly.eu> wrote: > Hi, > > On 19/02/2021 19:24, Kurt Jaeger wrote: > > > I suspect that your 'zpool upgrade' enabled things that weren't enabled > > before. This caused the old boot blocks to no longer work. > > Correct. That' s definitely the source of the booting issue. > > > We should be better about upgrading boot blocks, but EFI is kinda new > and > > kinda different > > EFI is able to boot any FreeBSD box for a while. > > The main issue is that the legacy way to upgrade these /bootcode and > partcode/ not only does not work, but do bad things. > > # gpart bootcode -p /boot/gptzfsboot -i 1 ada0s1 > > will install an old and inappropriate /partcode/. > Yes. it was a mistake to try to make EFI fit into that paradigm originally. All the efifat stuff should be gone, but you misunderstand what gptzfsboot is or can do. When booting with EFI, the above command will have no effect because those boot blocks will be ignored. IMO, > 'gptzfsboot' should be sweep off along with 'boot1.efifat' ( by calling > 'make delete-old') or be built with the right 'BOOTx64.EFI', which > actually is`/boot/loader.efi` . > We can't do that. gptzfsboot is for something else that we can't get rid of: BIOS/CMS booting. It's never been used for EFI booting at all. There's no way to for EFI to use it, nor is there anyway for us to build it to just work. You have to copy BOOTx64.efi to your ESP. What we could do, but don't currently, is automate this process. That's been bogged down in implementation details. It's easy if there's only one, but if you have a USB stick installed, you don't want that to accidentally be upgraded, for example... and I have test boxes with a dozen ESPs to test different boot scenarios... And multiboot systems also can be screwed up by automatically copying things into the ESP... Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfqHKb2T8LCtLDa5oHBLrkMN7rUwxgCKJ2BH3vQj8yDqQw>