Rodney W. Grimes
freebsd-rwg at pdx.rh.CN85.dnsmgr.net
Thu Dec 14 18:19:11 UTC 2017
> On Thu, Dec 14, 2017 at 09:17:36AM -0800, bob prohaska wrote:
> > On Thu, Dec 14, 2017 at 01:47:13PM +0800, blubee blubeeme wrote:
> > > When you boot into FreeBSD and you can select kernels, there's only 2
> > > options:
> > > default and kernel.old
> > >
> > > Is there a way to have better output and support multiple kernels without
> > > having to login to the system and running uname -v or something like that?
> > >
> > > Would it be possible to add options for more kernels from that boot menu?
> > Unless I've been fooling myself, it's possible now. Just stop the boot
> > loader during loading by hitting the spacebar and type
> > boot kernelname
> > at the loader prompt
> > ....
> As Allan Jude pointed out earlier in the thread, it's a lot easier than
> that: just set the "kernels" variable in /boot/loader.conf.
> For example, I update, build, boot, and run FreeBSD on my laptop daily.
> That process installs /boot/kernel (after moving the previous one to
> /boot/kernel.old). I like to keep a "recent known-working" kernel
> around that isn't automagically replaced, so:
> g1-252(11.1-S) grep kernel /boot/loader.conf
> # Experiment to see if kernel.save can be an option from the boot menu
> kernels="kernel kernel.old kernel.save"
> (And yes, it does work -- verified empirically.)
And you can also do an
while at a loader prompt to see all the kernels you have
laying around you might want to choose from.
Rod Grimes rgrimes at freebsd.org
More information about the freebsd-current