Date: Thu, 21 Dec 2023 14:22:14 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Nuno Teixeira <eduardo@freebsd.org> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: symlink to /boot/loader.efi Message-ID: <90AA5680-49A9-4630-80EF-0580E8F31EA2@FreeBSD.org> In-Reply-To: <CAFDf7UKxDM1_9DqqHcXZWUc0KYJPfwX0KDn1qzNGQ8GCqU=WqQ@mail.gmail.com> References: <CAFDf7U%2BgTr7D38n9Kh7g4AJh4f0AJ2UVGEDTj5c7ibEBxZZYCQ@mail.gmail.com> <631DF939-4E18-4319-BE94-335E63B27B09@FreeBSD.org> <CAFDf7UKxDM1_9DqqHcXZWUc0KYJPfwX0KDn1qzNGQ8GCqU=WqQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Yeah, my procedure is the same as yours: I first copy = /boot/efi/efi/freebsd/loader.efi to /boot/efi/efi/freebsd/loader.old, = then copy the freshly built and installed /boot/loader.efi to = /boot/efi/efi/freebsd/loader.efi. I don't see a technical reason why = this could not be just another step in the installworld procedure. That said, I am unsure if the pathname /boot/efi/efi is always the same, = at least for all UEFI systems. It is the default layout when you do a = regular install with recent installer onto a UEFI system, but some users = may use completely different mount points. So you should still have some = way of configuring the default location for loader installation. Also, on default installations a fallback entry named = /boot/efi/efi/boot/bootx64.efi is made, essentially another copy of = loader.efi but with a different name. Namely, the default name that UEFI = (on x86_64 at least) searches for, if it doesn't know anything else. = I.e. if it isn't configured via efibootmgr(8), or the EFI variables have = been junked for some reason. It might make sense to also update that = file. -Dimitry > On 21 Dec 2023, at 13:59, Nuno Teixeira <eduardo@freebsd.org> wrote: >=20 > Hello Dimitry, >=20 > For a moment I forgot that efiboot is a fat system... > I am inspired on what installworld does to kernel and kernel.old. > I was thinking in something like it but with efi boot, something = automatic. >=20 > Thanks!=20 >=20 > Dimitry Andric <dim@freebsd.org> escreveu no dia quinta, 21/12/2023 = =C3=A0(s) 12:48: > On 21 Dec 2023, at 13:22, Nuno Teixeira <eduardo@freebsd.org> wrote: > >=20 > > On every current upgrade I update efi/freebsd/loader.efi (amd64) and = efi/boot/boota64 (aarch64) with new copies on /boot/loader.efi. > > For safety reasons I always have a copy of last running loader by = appending "-old.efi" to loader or boota64 and use beinstall to get BEs = if needed. > >=20 > > Is that possible to link, e.g., /boot/efi/efi/freebsd/loader.efi -> = /boot/loader.efi ? >=20 > Symlinks do not work on FAT file systems, so I assume you mean a = symlink placed in /boot (assuming that is UFS or ZFS), which points to = /boot/efi/efi/freebsd? >=20 > At the moment I think installworld would not write 'through' such a = symlink. In fact, it makes a hard link from /boot/loader_lua.efi to = /boot/loader.efi, unlinking any previous /boot/loader.efi. >=20 > That said, it would be nice to have some sort of semi-official way of = upgrading the real EFI loader through installworld. It would probably = require some top-level Makefile magic. >=20 > -Dimitry >=20 >=20 >=20 > --=20 > Nuno Teixeira > FreeBSD Committer (ports)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?90AA5680-49A9-4630-80EF-0580E8F31EA2>