Compiling a lean kernel of 9.1 p3

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Sat May 18 12:15:29 UTC 2013


Tommy Pham <tommyhp2 at gmail.com> writes:

> On Wed, May 15, 2013 at 10:43 AM, Tommy Pham <tommyhp2 at gmail.com> 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.


More information about the freebsd-questions mailing list