From owner-freebsd-current@freebsd.org Wed Feb 21 12:36:28 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34796F26CF4 for ; Wed, 21 Feb 2018 12:36:28 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id ADE547711D for ; Wed, 21 Feb 2018 12:36:27 +0000 (UTC) (envelope-from david@catwhisker.org) Received: by mailman.ysv.freebsd.org (Postfix) id 72455F26CE9; Wed, 21 Feb 2018 12:36:27 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3547CF26CE8 for ; Wed, 21 Feb 2018 12:36:27 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83BC777118; Wed, 21 Feb 2018 12:36:26 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.15.2/8.15.2) with ESMTP id w1LCaHom074363; Wed, 21 Feb 2018 12:36:17 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id w1LCaHqW074362; Wed, 21 Feb 2018 04:36:17 -0800 (PST) (envelope-from david) Date: Wed, 21 Feb 2018 04:36:17 -0800 From: David Wolfskill To: kevans@freebsd.org Cc: imp@freebsd.org, current@freebsd.org Subject: Kernel selection in Lua loader Message-ID: <20180221123617.GD1212@albert.catwhisker.org> Reply-To: current@freebsd.org Mail-Followup-To: current@freebsd.org, kevans@freebsd.org, imp@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ROA1rv1+fHr2QGor" Content-Disposition: inline User-Agent: Mutt/1.9.3 (2018-01-21) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Feb 2018 12:36:28 -0000 --ROA1rv1+fHr2QGor Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable The Lua loader appears to be using a mechanism other than the "kernels=3D..." specification in /boot/loader.conf to slect potential kernels to load. I'm not claiming this is "bad" -- just "different." I noticed because I sometimes build a kernel that ... panics, or some such thing, so I hve had occasion to make use of kernel.old. But in the process of engaging a developer and trying patches, the default behavior is that kernel.old gets overwritten next time I build a kernel. So I had taken to copying /boot/*.old to /boot/*.save manually as the occasion warrants; I modified /boot/loader.conf to include: kernels=3D"kernel kernel.old kernel.save" and the Forth loader presented (precisely) those kernels as the available options for selecting a kernel to load and boot. Usually, if I manually copy/move kernels around, I also save the kernel that misbehaved (in case further poking around in its internals may be warranted); a typical name for such a beast is "kernel.panic" (as I usually have at most a single such misbehaving kernel around). Thus, I noticed when I did my smoke-test boot after freshily building: FreeBSD g1-215.catwhisker.org 12.0-CURRENT FreeBSD 12.0-CURRENT #108 r3297= 03M/329706:1200058: Wed Feb 21 04:04:36 PST 2018 root@g1-215.catwhisker= =2Eorg:/common/S3/obj/usr/src/amd64.amd64/sys/CANARY amd64 with the Lua loader, I was being offered a choice among 4 kernels (rather than the expected 3). Cycling through them (twice; I wanted to be sure the behavior was reproducible), I noted that the presented options were: * default/kernel * kernel.old * kernel.save * kernel.panic (in that sequence). I did not attempt to select any of the non-default options, however. :-) Nor did I remove the 'kernels=3D"kernel kernel.old kernel.save"' specificaton from /boot/loader.conf to see what would happen. Peace, david --=20 David H. Wolfskill david@catwhisker.org Yes, the indictments don't "prove" guilt; that's what trials are for. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --ROA1rv1+fHr2QGor Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEzLfO+ReoAfQwZNd7FTnMQKBJ7hcFAlqNZ8FfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEND QjdDRUY5MTdBODAxRjQzMDY0RDc3QjE1MzlDQzQwQTA0OUVFMTcACgkQFTnMQKBJ 7hfbkAf/a50GwLoUifQDBDmPTOApgf6VNLMzpyi+//xrhiyH34mM6lLGMYEN2fz2 TXM3GJEsqlZncw2VpmsDcca7PVBpsIYPXJGs5TmK4/6WkwmBO+TSTbnMjcgLIKqW nzETRMW/p9ifXWEaMwdytCdfxjBQcHzYxAKsdK4/YcqA1JOiIJ+e8CB3OhZYGXPs 0QoAwfo6q3DFIPUNuFdxyduC1W5ZSsqhjbyi6DlayhgN+dLYqVlRNEo3dc8B9lHB dfkYCMCJl8GcG7hBJ+PCPtOdD3NRGXwrgZbzuQ45Gkcn5aaP+2HE9P7/vNTewI8q cKSRYORty6/oAsP3ggAV8ug9NWb+ug== =a0h9 -----END PGP SIGNATURE----- --ROA1rv1+fHr2QGor--