From owner-freebsd-questions@FreeBSD.ORG Sun Jul 25 15:07:06 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A7FA106567A for ; Sun, 25 Jul 2010 15:07:06 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id E7DEF8FC20 for ; Sun, 25 Jul 2010 15:07:05 +0000 (UTC) Received: from r55.edvax.de (port-92-195-179-206.dynamic.qsc.de [92.195.179.206]) by mx01.qsc.de (Postfix) with ESMTP id D75FA3D7A2; Sun, 25 Jul 2010 17:07:03 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o6PF73Sn002180; Sun, 25 Jul 2010 17:07:03 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 25 Jul 2010 17:07:03 +0200 From: Polytropon To: claudiu vasadi Message-Id: <20100725170703.2ca935d9.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: how does freebsd know which kernel to boot ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 15:07:06 -0000 On Sun, 25 Jul 2010 16:21:38 +0200, claudiu vasadi 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, ...