From owner-freebsd-questions@FreeBSD.ORG Wed Jan 14 15:25:16 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 393BE1065670 for ; Wed, 14 Jan 2009 15:25:16 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id B25208FC2A for ; Wed, 14 Jan 2009 15:25:15 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LN7cG-0005J5-MR for freebsd-questions@freebsd.org; Wed, 14 Jan 2009 15:25:13 +0000 Received: from pool-141-156-171-233.esr.east.verizon.net ([141.156.171.233]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Jan 2009 15:25:12 +0000 Received: from nightrecon by pool-141-156-171-233.esr.east.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 14 Jan 2009 15:25:12 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: Michael Powell Followup-To: gmane.os.freebsd.questions Date: Wed, 14 Jan 2009 10:25:48 -0500 Lines: 75 Message-ID: References: <94136a2c0901132313ga018517idd21cf7a784aae7f@mail.gmail.com> <94136a2c0901140553i405b455fv342b8f145e87b02b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-141-156-171-233.esr.east.verizon.net Sender: news Subject: Re: updating to 7.1 with a small root slice X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: nightrecon@verizon.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2009 15:25:16 -0000 Zbigniew Szalbot wrote: > Hello, > > On Wed, Jan 14, 2009 at 08:13, Zbigniew Szalbot > wrote: >> Dear all, >> >> I am looking for your advice. Due to a very stupid design decision my >> / slice is only 256 MB. It seems too little so whenever I compile a > Actually it is 242MB I have one box with only 200MB for /. I had already displaced out GENERIC with highly stripped down kernel which made for space. I did at one point run out of space and the stuff mentioned further down saved the day for me. >> new kernel, I need to move the kernel.old to a different slice to >> install the new one. Then I pray, hope for the best and reboot. >> However, I read that if I want to update to 7.1 I will need to boot a >> generic kernel at some point. What option do I have? > > I found the problem. My oh my - I had > makeoptions DEBUG=-g > uncommented. > > When I commented it out, the new compiled kernel is only 32MB whereas > the old one was 128 or so MB. > > So I am happy about it now. However, I do not have a GENERIC kernel in > /boot and I will need it to do nextboot when I upgrade to 7.1. > > I thought I'd use the procedure described here > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html > to compile a generic kernel > > # cd /usr/src > # env DESTDIR=/boot/GENERIC make kernel > # mv /boot/GENERIC/boot/kernel/* /boot/GENERIC > # rm -rf /boot/GENERIC/boot Never tried any of that. I do the make buildkernel KERNCONF=xxxxxxx. Realize you should not be running out of space on / during this procedure as the build is occurring in /usr/obj. You will only run out of space on / if the make installkernel KERNCONF=xxxxxx won't fit. > When I make the GENERIC kernel, I again run out of space (I still have > about 60MB free in /). So I guess the system is probably using the > same "makeoptions DEBUG=-g" settings for the generic kernel. So my > question is where is the kernel conf file based on which the generic > kernel is compiled? > > Is it in /usr/src/sys/i386/conf/GENERIC ? > Yes - and it has in it by default: makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols So if you're not building a developer kernel you can comment this out. I don't remember for sure if this truly matters, or not, but I seem to recall the size of my kernel directories decreased dramatically when I placed STRIP= -s in /etc/make.conf. It seemed a favorable thing to do once upon a time and it's been there ever since. I thought the system variables had migrated to src.conf and the make.conf only applied to ports. In addition I also have in make.conf NO_PROFILE= true and in src.conf is WITHOUT_PROFILE= true. My stripped down kernels are 3.1MB for a 1 NIC driver and 3.4MB for a 2 NIC kernel. Of course, you won't get these small sizes for GENERIC! -Mike