Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Apr 2000 09:35:52 -0400 (EDT)
From:      Kenneth Wayne Culver <culverk@wam.umd.edu>
To:        Greg Lehey <grog@lemis.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: HUGE kernel built from 3.2 CDRom
Message-ID:  <Pine.GSO.4.21.0004110932450.3931-100000@rac9.wam.umd.edu>
In-Reply-To: <20000411155707.N26373@freebie.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.
> 
you don't need to do that, just keep a second copy of the kernel, and put
the one with debug symbols someplace safe. You shouldn't run a kernel with
debug symbols in it because it takes a lot of memory and stuff... and it
takes forever to load when you boot... if the kernel panics, you can just
use the saved copy of the kernel to debug the crash dump. At least this is
what the handbook says to do :-) (and who probably wrote that??? heh heh)

Ken



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0004110932450.3931-100000>