Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jul 2010 17:07:03 +0200
From:      Polytropon <freebsd@edvax.de>
To:        claudiu vasadi <claudiu.vasadi@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: how does freebsd know which kernel to boot ?
Message-ID:  <20100725170703.2ca935d9.freebsd@edvax.de>
In-Reply-To: <AANLkTindiTejP4e-Rt0rPXmX-7gMsJ8x%2BwJoUjPkdQGb@mail.gmail.com>
References:  <AANLkTindiTejP4e-Rt0rPXmX-7gMsJ8x%2BwJoUjPkdQGb@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 25 Jul 2010 16:21:38 +0200, claudiu vasadi <claudiu.vasadi@gmail.com> wrote:
> hello ppl,
> 
> 
> I was wondering about the following:
> 
> After I do "make build|install kernel" and reboot, the new kernel is
> automatically booted but the old one is still on the disk. Therefore, how
> does FreeBSD know which one to boot ?
> 
> I'm guessing it's writing this info somewhere but I do not know where or
> how.
> 
> 
> 
> Can anyone give me some short description ?

The kernel is booted by the kernel loader. Its configuration is
in /boot/loader.conf and /boot/default/loader.conf. It will default
to "kernel" (the name of the kernel to boot) by default, but you
can specify another name, too. You can also interrupt the boot and
request a different than the default kernel; using the "nextboot"
can achieve similar results.

Upon kernel installation by "make installkernel", the existing
kernel will be moved to kernel.old; the newly installed kernel
will then be kernel, and the loader will load exactly this name
as before.

Interesting man pages are:
	% man loader
	% man loader.conf
	% man nextboot
	% man boot
	% less /boot/defaults/loader.conf





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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