From owner-freebsd-questions@FreeBSD.ORG Thu Mar 10 14:17:58 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80CA916A4CE for ; Thu, 10 Mar 2005 14:17:58 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7F6C43D1D for ; Thu, 10 Mar 2005 14:17:56 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226])j2AEHbvJ000832; Thu, 10 Mar 2005 16:17:37 +0200 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) j2AEHstq055859; Thu, 10 Mar 2005 16:17:54 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost)j2AEHsWI055858; Thu, 10 Mar 2005 16:17:54 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 10 Mar 2005 16:17:53 +0200 From: Giorgos Keramidas To: regnans@gmail.com Message-ID: <20050310141753.GA55092@orion.daedalusnetworks.priv> Mail-Followup-To: freebsd-questions@freebsd.org References: <68b3483d050310012555c067f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <68b3483d050310012555c067f@mail.gmail.com> cc: freebsd-questions@freebsd.org Subject: Re: Configuration of current kernel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2005 14:17:58 -0000 # Redirected to freebsd-questions, from freebsd-newbies. # Please do NOT post technical questions to the freebsd-newbies list. # Followups set to freebsd-questions. On 2005-03-10 10:25, h p wrote: > I'd like to recompile my kernel for disk encryption support (options > GEOM_BDE). I am right now running an out-of-the-box 5.3-RELEASE > kernel. > > I noticed that some kernel modules I use are missing in the GENERIC > kernel configuration file (such as ext2fs and snd_emu10k1). The GENERIC kernel is just what the name suggests: a generic kernel configuration. It's also the one that is distributed with the FreeBSD release CD-ROMs as the default kernel. You can always add whatever you want to a custom kernel configuration file, say LOCAL, and use the kernel built from that config file. > I am worrying that these features will not work if I install a new > kernel. Of course, I could just try and restore the old kernel, if > not. With Linux, there is a solution to get the current kernel > configuration (in /proc/config.gz). Is there such a thing under > FreeBSD? The kernel installation process, if you follow the instructions from /usr/src/UPDATING or the Handbook, should be: # cd /usr/src # make KERNCONF=LOCAL installkernel This will keep a backup of the GENERIC kernel in: /boot/kernel.old You can also make a backup copy of the GENERIC kernel, if you want to keep it safe from continuous "installkernel" runs, by manually copying /boot/kernel to /boot/kernel.GENERIC right after FreeBSD has been installed: # cd /boot # cp -Rp kernel kernel.GENERIC Then, if anything does wrong, you can always interrupt the boot loader before a broken kernel boots and boot into kernel.GENERIC. This is as easy as hitting ESC or any key that is not ENTER, and writing at the OK prompt of the loader: OK unload OK boot kernel.GENERIC > I admit I haven't yet quite understood how the kernel recompilation > works. How do I configure features as a module? Anything that is not compiled in the kernel by the kernel config file is built as a module and installed as a *.ko file in /boot/kernel. > Also, there are some features, which don't seem to be documented... > at least not in the NOTES file. You're looking at the wrong NOTES file. There are two NOTES files on any given architecture that FreeBSD supports: 1) The architecture-independent NOTES file, listing options common to all the possible architectures: /usr/src/sys/conf/NOTES. 2) The architecture-dependent NOTES in /usr/src/sys/ARCH/conf/NOTES, where ARCH is one of: i386, sparc64, amd64, alpha, powerpc, etc. > ext2fs is an example. Is there a comprehensive list anywhere? The two NOTES files (architecture independent and architecture dependent) should be all you need. - Giorgos