From owner-freebsd-questions Mon Apr 10 23:28:56 2000 Delivered-To: freebsd-questions@freebsd.org Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by hub.freebsd.org (Postfix) with ESMTP id 4FA2C37B6D9 for ; Mon, 10 Apr 2000 23:28:32 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id PAA28339; Tue, 11 Apr 2000 15:57:07 +0930 (CST) Date: Tue, 11 Apr 2000 15:57:07 +0930 From: Greg Lehey To: Eric Ogren Cc: "James B. Wilkinson" , questions@FreeBSD.ORG Subject: Re: HUGE kernel built from 3.2 CDRom Message-ID: <20000411155707.N26373@freebie.lemis.com> References: <20000410231204.A3861@earthlink.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000410231204.A3861@earthlink.net> WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 10 April 2000 at 23:12:04 -0400, Eric Ogren wrote: > On Mon, Apr 10, 2000 at 10:58:36PM -0400, James B. Wilkinson wrote: >> One of the machines in my networking lab has three Ethernet cards in it. >> This seems to require a rebuild of the kernel. I edited GENERIC and added >> ed1 and ed2 right after ed0. The kernel built fine, and it works ok, but it >> is almost 11 MB, whereas the GENERIC kernel is 2,329,748 bytes. So I ran >> strip on the new kernel, and that made it small allright, 2017520 bytes. It >> still works ok, but dmesg doesn't work with it, and I forgot to try ps, but >> I'll bet that it doesn't work, either. Is there something like a partial >> strip that I need to do? My root filesystem is getting crowded. > > By any chance did you run "config -g KERNEL" or do you have a > "-g" hanging around in your /etc/make.conf somewhere? It looks like you > managed to build a debug kernel, and the debugging symbols are big, as > you've noticed. > You also noticed that stripping a kernel is going to cause Bad > Things(tm) to happen; I wouldn't recommend it. This isn't quite correct. Kernels with full symbols contain two different kinds of symbols: global symbols and debug symbols. Some programs, such as dmesg, need the global symbols. It's the debug symbols which cause the "bloat". Correspondingly, there are different ways to strip a kernel. Use 'strip kernel' to remove all symbols; this will cause some programs to fail. Use 'strip -g kernel' to remove only the debugging symbols. I personally recommend keeping the debug symbols. If you ever have a panic and want to find out why, you'll need the symbols. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message