Subject: Re: Thoughts about wedges
To: None <M.Drochner@fz-juelich.de>
From: Eduardo E. Horvath <eeh@one-o.com>
List: tech-kern
Date: 09/25/1999 08:44:56
On Fri, 24 Sep 1999, Matthias Drochner wrote:
>
> frank@wins.uva.nl said:
> > All the kernel needs to know is <device,start,end> for the root
> > partition. It would be trivial to add this to, for example, the i386
> > bootblocks for passing it along to the kernel. I rather like the
> > notion of having no knowledge of partitioning in the kernel
> > whatsoever.
>
> While this is an interesting approach, I'm afraid it will
> be at the expense of robustness. Let's say I've messed up
> my /netbsd and load a rescue kernel from floppy, DOS or
> network, but still want my normal root fs (ie, "boot -a"
> on i386). The bootloader doesn't know about the hard disk
> filesystem, doesn't have disk support at all or the
> root disk controller is not supported by the firmware.
>
> Further, if some work can be done in the bootloader or
> in the kernel, I'd always prefer to do it in the kernel.
> It has less size restrictions, a bigger set of support
> functions and debugging support. Debugging a boot loader
> is a PITA.
I don't like the idea of moving the partition reading code into the
bootloader.
First of all, it precludes the use of 3rd party or native bootloaders that
do not provide this information. At present I can `dd' a miniroot to the
swap partition and use whatever version of solaris happens to be running
on that machine to boot a NetBSD kernel. I really do not want to lose
that ability.
Secondly, what happens when you boot with `-a' and specify a different
root partition than the one the bootloader is on? I do that quite often
when testing out new kernels and I want to provide a sandbox root for the
new kernel to play in so my standard root won't get corrupted, or I have a
64-bit root and a 32-bit root, etc.
Now I do agree that the code to write disklabels does not need to be in
the kernel and probably should not be there. But the code to probe
all disks and filesystems definitely does not belong in the bootblock.
=========================================================================
Eduardo Horvath eeh@one-o.com
"I need to find a pithy new quote." -- me