From owner-freebsd-questions@FreeBSD.ORG Sat May 18 12:15:29 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D5E00B43 for ; Sat, 18 May 2013 12:15:29 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id B08C8EC7 for ; Sat, 18 May 2013 12:15:29 +0000 (UTC) Received: from lowell-desk.lan (lowell-desk.lan [172.30.250.41]) by be-well.ilk.org (Postfix) with ESMTP id 490A333C2A; Sat, 18 May 2013 08:15:18 -0400 (EDT) Received: by lowell-desk.lan (Postfix, from userid 1147) id 002C039860; Sat, 18 May 2013 08:15:15 -0400 (EDT) From: Lowell Gilbert To: Tommy Pham Subject: Re: Compiling a lean kernel of 9.1 p3 References: Date: Sat, 18 May 2013 08:15:14 -0400 In-Reply-To: (Tommy Pham's message of "Wed, 15 May 2013 10:47:05 -0700") Message-ID: <447giw8ox9.fsf@lowell-desk.lan> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 May 2013 12:15:29 -0000 Tommy Pham writes: > On Wed, May 15, 2013 at 10:43 AM, Tommy Pham wrote: > >> Hi everyone, >> >> I installed 9.1 from DVD with src only and did 'freebsd-update fetch >> install'. Then I proceed to compile the lean kernel. I'm unable to >> compile a lean (no SCSI, RAID, sound, USB, Firewire, NICs) kernel of 9.1 p3 >> and without lib32 support. I only needed SATA disk and em NIC support. >> The kernel compiled without errors. However, on boot, it freezes after >> the menu screen. My make.conf only have added (from default >> /usr/share/examples/etc): >> >> KERNCONF=custom >> CPUTYPE=?opteron >> >> I have no problem booting from GENERIC built kernel and buildworld with >> that make.conf. Could someone please tell me how can I troubleshoot this? >> >> TIA, >> Tommy >> > > Hi again, > > I said that wrong... I meant that I was able to compile OK but unable to > boot with a lean kernel. I was able to boot buildworld and buildkernel of > GENERIC. The way to do this is to use a binary search. Start with a working (GENERIC) kernel, then add half your changes in. If it fails, then you know the problem is in the set of changes that you included. If it works, the problem is in the set of changes you didn't include. It's a little more complicated because there may well be a dependency, where two options need to both be included or left out, but I'm sure you get the idea. Alternatively, you could include kernel debugging and see where the CPU is executing after the hang. But this requires more programming knowledge.