From owner-freebsd-questions Fri Oct 29 9:11:38 1999 Delivered-To: freebsd-questions@freebsd.org Received: from yana.lemis.com (yana.lemis.com [192.109.197.140]) by hub.freebsd.org (Postfix) with ESMTP id 35B1C15112 for ; Fri, 29 Oct 1999 09:11:26 -0700 (PDT) (envelope-from grog@lemis.com) Received: from mojave.worldwide.lemis.com ([199.103.141.157]) by yana.lemis.com (8.8.8/8.8.8) with ESMTP id BAA23803 for ; Sat, 30 Oct 1999 01:38:55 +0930 (CST) (envelope-from grog@lemis.com) Message-ID: <19991025102051.16442@mojave.worldwide.lemis.com> Date: Mon, 25 Oct 1999 10:20:51 -0600 From: Greg Lehey To: bill slaybaugh , FreeBSD Questions , Jeff Gray , "Jason C. Wells" Subject: Re: newbie kernel question- References: <3810879B.EC8F4DB3@bright.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <3810879B.EC8F4DB3@bright.net>; from bill slaybaugh on Fri, Oct 22, 1999 at 11:49:47AM -0400 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 22 October 1999 at 11:49:47 -0400, bill slaybaugh wrote: > I am a recent entry to the FreeBSD realm, having used several > versions and distributions of Linux. > Using 3.2, I just built my first custom kernel. Nothing fancy; > pretty much just turning off devices and options that weren't > needed. I was pretty surprised when the size of the new kernel > came back as 5980783, when the generic kernel had been 2329748. > It does load faster, what with skipping unnecessary probing. > Why so much larger than the generic? > This is probably a classic newbie misunderstanding - - > and I'm in new territory. On Friday, 22 October 1999 at 11:41:58 -0700, Jeff Gray wrote: >> >> You probably have a debug kernel with symbols built into it. I think you >> can "strip -g kernel" but it has been a while. > > Have never tried this so I wish to be a bit careful. > > Looking at man strip and the archives, for ELF kernels > cd / > strip -g --strip-debug kernel Use one option or the other. They're equivalent. > Nothing else required, this will reduce the size of the object file > /kernel > > This is a real good thing if it is safe, for those with / partitions that > are too small. > > Safe? Any other steps? It's safe, and that's all you need to do. But. The real purpose of a debug kernel is to have information needed for debugging a system if you have a crash. A lot of people say "but FreeBSD never crashes", and they're almost right. When it does, however, it's almost impossible to find out why if you don't have a debug kernel. On the face of it, the best idea is to have a larger root file system which can take a debug kernel. A typical debug kernel weighs in at round about 10MB, compared to about 2.2 MB for a non-debug kernel. Expect both values to grow; I'd guess that a 50 MB root file system will do for the foreseeable future. If you leave the kernel in the root file system as a debug kernel, you don't have to worry about wiping away your sys/compile/MYKERNEL directory, which would save about 30 MB per kernel. Don't worry about the size of the kernel; the bootstrap loads only the parts which are needed, not including 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