From nobody Fri Dec 22 23:01: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 4SxjTl3vX6z54c4b for ; Fri, 22 Dec 2023 23:01:31 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic303-25.consmr.mail.gq1.yahoo.com (sonic303-25.consmr.mail.gq1.yahoo.com [98.137.64.206]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 4SxjTl1HKwz4bXk for ; Fri, 22 Dec 2023 23:01:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1703286088; bh=Sx7J1noqObzLLIWdvB9M4JZR4jSutwlrmmZZbbuTRzc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=DaNoWfh50+nAGktUjZMgM4iz9nYHRZlXl05eUH7lUHt5P2gfv9nvoJ12b42PNuUcgeIFzWG6mhwChM4A1eMVnI5rgkKXLDadFXJm1ewKh95GCcJ3JeNAlB0DYtnyCitr/JuE2QpP4mJONsW2Z9sbDxhnKLgjx9TfEtXrJfuHqTgoVEzuppZKG1HrZb4P4yhATPehm+63X9oGJvFhiRvqNI38GtXXY/1gtigagYXUYxr1+GYTlAsvz07p7G/j2ah52O97hW75gWKeLoEHe0qbE5hsuaWTp907HX34RBXmWvMieOJHlUE3a+JknCaSW017t9imq2XyUdQP8gJMEHSXoA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1703286088; bh=8If5TAw3UYBSIeHQZENg9O6I4Jd+Gzr4XoCGb2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46uENtIjr k1WPL_66lNCJew3YN2NhbDyGDGPYCejVimfwAHT7U_Ldvz4JUbecAcRVHJ4mnLd4bDcFtncNzhdt .n6hrea_Aw1R9G0QiKWKgCajfJfjCGQ0P2nMCuX3a9sYYGVO0mZS5m5te2l_ozSAZzn4tSldDaxG QGBcRTUSfBPRspWyC21KZ5x5o.S1zr36bkWmWJIpViVyEy5Rwkk5FOSOoXs77ROSUS1CdGUfTjgt 7FepraHffRp8CAaqo578UWac5fyKxyoku0W33WjGr3FZyWGEYXsfJnKOE5rNCo7uk_Y00KWOEac2 52ZBNtZGCpH7jjFyrPW2wqAGCjCvBp1vuTAktU13brdZvbBsLNaAqmWiHXCttQYmhBdudBa4nHUG V4RZgyB69wdr4xsFsxUGBeDly1lFLBWFEkUZkhE6dVKTlwzd.gJikF8W_YJ5f9ZIe.EQGneIOLif EvHs9W0ru8rVPYW8xCL5GFxrLCpy55Vf1NFEMp5itngXKqnIA6UNtw0zu_1M3Zlvy5Nl.hMeYLn9 Kkta0ax7oh5oSOu.wLLOybE8S3.0DgdGRnD9tqF3eznueTiETrIVdi.Lmlj4QPcxsL_tz0v9lqXs - X-Sonic-MF: X-Sonic-ID: 7653dfb6-ba04-489a-b1d1-2bb6d30cef40 Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.gq1.yahoo.com with HTTP; Fri, 22 Dec 2023 23:01:28 +0000 Received: by hermes--production-gq1-6949d6d8f9-qkzts (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID efc014cdb74df0c48ce5a51ea0eae392; Fri, 22 Dec 2023 23:01:25 +0000 (UTC) Content-Type: text/plain; charset=us-ascii 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 \(3774.300.61.1.2\)) Subject: Re: symlink to /boot/loader.efi From: Mark Millard In-Reply-To: Date: Fri, 22 Dec 2023 15:01:14 -0800 Cc: Warner Losh , Tomoaki AOKI , Toomas Soome , Current FreeBSD Content-Transfer-Encoding: quoted-printable Message-Id: References: <94C108FE-3D2F-4116-B071-810F64DECEC4@me.com> <5879A778-0522-4E0F-A569-731E5EC85C18@yahoo.com> <8711C4A5-6329-4FB2-9D7A-4C7215595110@me.com> <20231223000015.766b94fe0e3a3b742fd386c5@dec.sakura.ne.jp> To: Konstantin Belousov X-Mailer: Apple Mail (2.3774.300.61.1.2) 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:36647, ipnet:98.137.64.0/20, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4SxjTl1HKwz4bXk On Dec 22, 2023, at 13:49, Konstantin Belousov = wrote: > On Fri, Dec 22, 2023 at 02:03:56PM -0700, Warner Losh wrote: >> Yes. I'd prefer to make this more parameterized, maybe with sanity = checks. >>=20 >> That is, there'd be a tool that would do the right thing, based on = what you >> tell it to do. we'd set the defaults to be a default install. If you = want >> something other than defaults, you'd need to set a make variable (or = a >> command line arg if you ran the tool by hand. >>=20 >> You can know what type of system you are on: if arm, arm64 or = riscv64, then >> it's UEFI. If i386 then it's BIOS (though you can confirm this by = looking >> at machdep.bootmethod to see if it is BIOS, UEFI or something else), = with >> amd64, it's the same check as i386. If it's powerpc, then you someone = with >> powerpc skills will have to fill in the blanks here. >>=20 >> If it is BIOS, we can infer the boot disk from where / lives. This = isn't >> always correct, so that needs to be overiden. kenv might be useful, = but it >> exports loaddev/currdev in the Boot Loader's namespace (disk0, etc) = which >> may or may not match up with anything on FreeBSD. >>=20 >> If it's UEFI, then we can use efibootmgr to find what was booted (or = at >> least locate the ESP). Once we have the ESP, we can look at other = bits of >> the boot variables to know if it's /efi/boot/bootx64.efi or if it's >> /etc/freebsd/loader.efi to update (and optionally, we could to both). = Then >> you also have 'automount vs. fail' if the ESP isn't mounted. >>=20 >> I'd recommend against autodetecting boot1 vs loader, except maybe as = a >> safety measure that can be overriden. It's another reason having = boot1.efi >> around complicates things needlessly. >>=20 >> This is the sort of thing I was hoping to code up. I got bogged down = by >> including 'also update the primary loader (aka the freebsd-boot = partition, >> the u-boot stuff that needs to be dd', etc), so I think we shouldn't = do >> that until phase 2. >>=20 >> So maybe we should write a man page for this tool, and maybe a = paragraph >> for how it would hook into the build system if we wanted to have a = 'make >> installboot' target that lives logically before installkernel. >>=20 >> Comments? >=20 > Can we remove boot1.efi from the picture of the updating tool at all? >=20 > Lets make the boot1 explicitly limited for very simple configuration > where it searches for first UFS GPT partition and loads loader.efi > from there. The autoupdate tool would be not used at all in such > config, by administrator choice. If done, sounds like a good thing for aarch64 and armv7 small arm board snapshots to use. (Similarly if there ever is an analogous amd64 snapshot to dd to, say, USB media: something I'd use for testing activities with such official builds if they existed. I like to avoid submitting notes based on my personal builds if official builds show the behavior of interest. Setting up such an amd64 install the normal way is just busy work for this purpose. I do the same sort of thing for aarch64 and armv7, testing if I can avoid my personal builds that I normally use, including with the HoneyComb and MACCHIATObin Double Shot that are not small arm boards.) =3D=3D=3D Mark Millard marklmi at yahoo.com