From nobody Thu Dec 21 13:22:14 2023 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 4Swrgq6Xz0z54nXq for ; Thu, 21 Dec 2023 13:22:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 4Swrgq66Ypz4KYR; Thu, 21 Dec 2023 13:22:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703164935; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=siFlT2yk7iMV/slOwqmFuCAGSJWwFK+I71Fb6XXwb94=; b=cLOLe7iOTE9On6Cfv7w2qPYakx/0yrgnxL8yHv8m24PsTxzaz00HSWQtG9zDFldVHYr7Y0 OjptknwMfPEzP2SXvc2tOT2xfYfAQ/h1cIHZWmU6bAJs96hZ/GDf8UyhZN+eZdWxp9R/hr oezZTwXyKX1zdXpzQqJHRl9mku3V350FK7a1ZV3nSjgoaahUSfqZ11URkUNWJHj2UqHckk vp5SNMF6Qd/5cPMlsc2NADPHhWThr827PuRZHkZD7EDySoY1R17HsQNImH+Ppce3z/jnlr TI9W5cZqW3gDQWgzlVv2gD5bb6mEod43wX6CgVX8uPTB5ovA7JUlWnmt74L2xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703164935; a=rsa-sha256; cv=none; b=qMKyaMdj2Xb+LuSuC7tQq0zq9Kt9exm9QPwkMHV9gb+ujGL8i5lSfibX2fwxH9sJjVMpQs ML+Kl0ea4PEYMC6rjoTbMuQstW3QpZS4bBpOpJnjm3cwgrMmDEtiWYAADxWlAszu79bvhy nCIcNI2/ZCgqa5k972ZNYGlhKGKuCmKpAmP99Ncy0Xf8h9LQokyicD7C/e9HMZNL192ULg yt0pYSkRzTQlHmWo7yXY2FIIZfHKm/jPKIoNkzgbbjHWWWhglvlskJ7IfWB+CCso6ahBKR yfE6x3texBzP4xJOlbXVh3dZQtxpLxpiLmJtAcBH6tfPz66zZoF5DvFY6E8Udw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703164935; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=siFlT2yk7iMV/slOwqmFuCAGSJWwFK+I71Fb6XXwb94=; b=N4vuplE6SsESI4m40ew8flX+DLV7AsPdf90MIUQrk3fo0iF8aJ2NY3MPRP/EDaMICLboOI lQxLfYrI9VXRkP/lDW+hXJHU/FMoMXq7pKl2Q5zC7O50ln2W/pMfhxh+LNH1jnuOZagpt5 W8fLRB7EXEIP5uTK1zxKz2YktAH2tn+FpV6q8a8q2JfoIU+D7F4RLGb7SayIDTvqsS+blA IjcrmCuczCnbi4jzqgUVldBfB/Lw8uOuibKTATPUT2DBN1pwOuMW/mqOB0f6tfXwQCHXLC deku/1rAfpxIeItXJWNrA49npXlNBcYue3Np6FK/S4I6jNOI9dLCyNVRwzJ3ZA== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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 (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Swrgq4SXtz16xx; Thu, 21 Dec 2023 13:22:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8AF114F24B; Thu, 21 Dec 2023 14:22:14 +0100 (CET) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3731.700.6\)) Subject: Re: symlink to /boot/loader.efi From: Dimitry Andric In-Reply-To: Date: Thu, 21 Dec 2023 14:22:14 +0100 Cc: FreeBSD CURRENT Content-Transfer-Encoding: quoted-printable Message-Id: <90AA5680-49A9-4630-80EF-0580E8F31EA2@FreeBSD.org> References: <631DF939-4E18-4319-BE94-335E63B27B09@FreeBSD.org> To: Nuno Teixeira X-Mailer: Apple Mail (2.3731.700.6) 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 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 escreveu no dia quinta, 21/12/2023 = =C3=A0(s) 12:48: > On 21 Dec 2023, at 13:22, Nuno Teixeira 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)