From owner-freebsd-questions Sun Oct 20 12:12:37 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA08738 for questions-outgoing; Sun, 20 Oct 1996 12:12:37 -0700 (PDT) Received: from seagull.rtd.com (root@seagull.rtd.com [198.102.68.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA08732 for ; Sun, 20 Oct 1996 12:12:34 -0700 (PDT) Received: (from dgy@localhost) by seagull.rtd.com (8.7.5/8.7.3) id MAA01728; Sun, 20 Oct 1996 12:12:05 -0700 (MST) From: Don Yuniskis Message-Id: <199610201912.MAA01728@seagull.rtd.com> Subject: Re: Rebuilding a new kernel. What I should take care? To: donny@ms1.hinet.net (Donny Lee) Date: Sun, 20 Oct 1996 12:12:04 -0700 (MST) Cc: freebsd-questions@freefall.FreeBSD.org (FreeBSD questions) In-Reply-To: <199610201433.WAA02360@ms1.hinet.net> from "Donny Lee" at Oct 20, 96 10:04:59 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Since I have to rebuild a new kernel for my IDE CD-ROM, > I'd like to hear you all in some points: Ah, I assume the ATAPI kernel was not available?? Or, is there some other reason?? > 1) Should I comment out those devices or options I don't need in > MY_KERNEL config file? Here, you need to think a bit about what you're doing. The short answer is "YES". In general, having a smaller kernel is better because the extra memory that it *doesn't* consume can then be used to make your applications run slightly faster, etc. Since building kernels is probably not something you *want* to be doing often (since it wastes your time), look through the descriptions of all of the possible devices in the LINT file (/usr/src/sys/i386/conf/LINT). Do NOT alter the contents of this file. Start with a nice NEW file -- for example, "donny"! (don't mess up GENERIC, either!) Remove things that you are probably NEVER going to have -- like maybe a SCSI WORM drive, etc. And, remove other "choices" for things that you already have and aren't likely to change -- like the BusLogic SCSI controller if you've already got an Adaptec. Toss out things that just don't make sense -- like the PCI support if you are running an ISA machine. Then, think about things that you *don't* have but might want to add later (i.e. in the next millenium! :>) and consider adding them to your configuration so that when you *do* buy them, you can rush home from the store and plug it in without having to wait to rebuild a new kernel :> This might include a sound card, SCSI tape (!), etc. Many of the pseudo-devices are "required" (e.g. "loop") and others are significant or TRIVIAL enough that they *should* be included (for example, I include "speaker" even though I have a sound card). If you don't have any SCSI stuff, "scsi" can probably go away and if you aren't running FDDI, "de" can get tossed. It's kinda like a funny game -- on the one hand, you try to tear out everything that you don't need; but, on the other, you add in all the things you *might* need! > 2) What's good and bad if, for example, I comment out those > scsi devices except the one fits my scsi card? That makes good sense -- assuming you aren't using a really lousy (i.e. slow) SCSI host adapter and are planning on upgrading it shortly to one of those *other* devices! Note, also, that if you run FBSD on more than one machine, you *may* want to come up with a kernel that will run on *any* machine (within reason) just to save yourself the hassle of having to build separate kernels. Finally, consider what you will do when/if you have a key hardware failure. If, for example, your SCSI host adapter *dies* and you have a spare adapter -- but possibly a different model, etc. -- stashed away in the closet, you might want to build the kernel to support the new adapter and the *old* adapter! So, if the adapter *does* fail, you can throw in the old adapter and at least have a system that is functioning while you purchase a new adapter, etc. > 3) Will a smaller kernel speed up ay boot time? if so, how to > make a kernel small? Yes. The more stuff you take out of the kernel configuration file, the smaller the kernel will be. Note some things have a bigger effect on the size of the kernel than other things. Also, the size of the kernel (*text* image) is only one aspect of the amount of memory that it will consume. Tweeking other config file settings can alter the amount of memory consumed for buffers, etc. > BTW, thanks for you all. I can't fine many FreeBSD companions > here in Taipei, and worse no FreeBSD related local news groups, > I then have to post every questions here. --don