Subject: Re: Hardware detection and custom kernel build
To: Matthew Orgass <darkstar@city-net.com>
From: Sean Davis <spd@envescent.com>
List: tech-kern
Date: 03/06/2004 18:55:14
On Sat, Mar 06, 2004 at 04:25:19PM -0500, Matthew Orgass wrote:
> On 2004-03-06 tlaronde@polynum.com wrote:
> 
> > 1) What are the limits people want to put on the bootloader? The natural
> > tendancy is (for GRUB and others) to add more and more feature but this
> > will simply make the bootloader another kernel. But the ability to list
> > the hardware, access ressources via the network are useful one, since
> > this will allow to use machines with small memories, when a kernel with
> > a bunch of useless drivers will be unable to fit in this very memory.
> 
>   I am not a NetBSD developer and do not speak for anyone else.  That
> being said, I believe the general NetBSD philosophy on bootloaders is to
> do as little as is necessary to get to the kernel.  However, I think there
> is interest in making the kernel itself more useful as a bootloader.
> Some MIPS ports have a "kloader" that makes it possible to load a new
> kernel (currently used mostly to reboot to a new kernel when a real reboot
> would cause unfriendly ROM code to be executed).  Using a real kernel as a
> bootloader opens up many more boot possibilities, and efforts made to
> reduce the memory consumption of the kernel when used this way may have
> other uses as well.  I suspect that even on low memory machines the memory
> needed to run the system when up finally is likely to be greater than the
> memory needed to find and load a new kernel.
> 
>   The sysutils/adjustkernel package can create a custom kernel config from
> the boot log (I haven't actually used this so I don't know how good it
> is), although the only reasonable method of generating the final kernel at
> present is to compile a new one.


adjustkernel does work, to a point. It has some very severe flaws, such as
leaving in every pseudo-device in whatever template kernel config you give
it, and (last i used it) not putting the floppy drive in the config.

it'll get you a better-than-GENERIC kernel, but it is by far better to
create one on your own, with only what you need.

-Sean

--
/~\ The ASCII
\ / Ribbon Campaign                   Sean Davis
 X  Against HTML                       aka dive
/ \ Email!