Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2018 04:36:17 -0800
From:      David Wolfskill <david@catwhisker.org>
To:        kevans@freebsd.org
Cc:        imp@freebsd.org, current@freebsd.org
Subject:   Kernel selection in Lua loader
Message-ID:  <20180221123617.GD1212@albert.catwhisker.org>

next in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180221123617.GD1212>