Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Dec 2017 10:19:09 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
To:        current@freebsd.org
Cc:        bob prohaska <fbsd@www.zefox.net>, blubee blubeeme <gurenchan@gmail.com>,  FreeBSD current <freebsd-current@freebsd.org>
Subject:   Re: kernel names
Message-ID:  <201712141819.vBEIJ9fL098153@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <20171214174637.GQ1179@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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)[1] 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"
> g1-252(11.1-S)[2] 
> 
> (And yes, it does work -- verified empirically.)

And you can also do an
	ls /boot
while at a loader prompt to see all the kernels you have
laying around you might want to choose from.


-- 
Rod Grimes                                                 rgrimes@freebsd.org



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