how does freebsd know which kernel to boot ?
freebsd at edvax.de
Sun Jul 25 15:07:06 UTC 2010
On Sun, 25 Jul 2010 16:21:38 +0200, claudiu vasadi <claudiu.vasadi at 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
> 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
Interesting man pages are:
% man loader
% man loader.conf
% man nextboot
% man boot
% less /boot/defaults/loader.conf
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions