From nobody Fri Sep 6 17:50:52 2024 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 4X0kL85N7Wz5VMh5 for ; Fri, 06 Sep 2024 17:51:12 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0kL76J0jz4FVX for ; Fri, 6 Sep 2024 17:51:11 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (123-1-21-232.area1b.commufa.jp [123.1.21.232]) (authenticated bits=0) by www121.sakura.ne.jp (8.17.1/8.17.1/[SAKURA-WEB]/20201212) with ESMTPA id 486HoqPI024038; Sat, 7 Sep 2024 02:50:54 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dec.sakura.ne.jp; s=s2405; t=1725645054; bh=CQgM9btO8wLi9iFwzeLS3+xuQE7qIg72NbLIJAIN0lo=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=lw/EYrBmwRyVbzPugTsTtuoCPvbAcSzg0iE2aBn50VUwmvYje+yS5O+XpFg0z0etm nJRBRhsbsGTjvautct9DBzzokCDcLNWgD5wfNie6i0yylRyapbm1wJpqh6eBCKhNOH tZ2Hqo9OHqYXkZlE7oO2X/CtH9ktCTXAdSkxJ9BQ= Date: Sat, 7 Sep 2024 02:50:52 +0900 From: Tomoaki AOKI To: Warner Losh Cc: FreeBSD Current , void Subject: Re: Loader needs to be updated message Message-Id: <20240907025052.c93cd502dba60910f47a4c00@dec.sakura.ne.jp> In-Reply-To: References: Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd14.1) 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Queue-Id: 4X0kL76J0jz4FVX On Fri, 6 Sep 2024 09:00:58 -0600 Warner Losh wrote: > On Fri, Sep 6, 2024, 8:44 AM void wrote: > > > On Fri, Sep 06, 2024 at 08:25:16AM -0600, Warner Losh wrote: > > >On Fri, Sep 6, 2024 at 8:13 AM void wrote: > > > > > >> Hi, > > >> > > >> when booting -current (arm64) after building world & friends and > > rebooting, > > >> the beastie menu shows "Loader needs to be updated". > > >> > > >> I presume this to be gptzfsboot because the system is root-on-zfs. > > >> > > >> The issue I'm having is that I can't see in the manpage how to actually > > >> update it. > > >> > > >> The system uses GELI encryption for zfs. i don't want to break this. > > >> > > > > > >Loader, not boot. /boot/loader or loader.efi does not match (is older than > > >and doesn't has the wrong version) the lua scripts. That needs to be > > >updated. > > > > > >Almost always this means 'you didn't update the ESP' which usually isn't > > >a problem, but can be across major (or multiple major) releases. > > > > > >Warner > > > > Hi Warner, > > > > some more context which I'm sorry I forgot to add > > > > source upgrade on a rpi4 (arm64) from n271321-9ae91f59c500 (28th July) to > > n271832-04262ed78d23 > > (today - this machine follows stablisation week) > > > > How is /boot/loader and/or loader.efi updated? > > What is ESP in this context? > > > > man loader.efi has the instructions. > > Warner Some additional explanation. Before, loader.efi itself could not be kicked directly from UEFI firmware and needs boot1.efi to kick loader.efi. In this case, boot code in ESP (uEFI System Partition, formatted with FAT32, 16 or possibly 12) was completely different with /boot/loader.efi. But now (by default for new UEFI installations), loader.efi can be kicked directly by UEFI firmware if it is put with proper directory and name in ESP. This would be what confusing you. With `make installworld` or usual freebsd-update, everything need updating in /boot/ should be updated, but nothing in ESP is updated automatically. This causes what you're experiencing. Unfortunately, how loader.efi should be installed in ESP depends on the environment it is installed. Old or buggy UEFI firmware could force you installing it as, for example for amd64, BOOT/EFI/BOOTx64.EFI in ESP to work, but usually BOOT/FreeBSD/loader.efi would work if UEFI boot manager is properly configured for it. Some would need ESP on all drives and keep all of them in sync. Yes, hard to automate properly for every possible situations, unlike /boot/. -- Tomoaki AOKI