Ronald G Minnich <[EMAIL PROTECTED]> writes:

> I've just hacked a little dialog into the kernel, right before mount_root.
> 
> Basically it does a chrdev_open of (5,1) (i.e. console). (note you can't
> just open "/dev/console" -- no root mounted!)
> 
> It then waits 5 seconds for input. The input is a series of cmdline
> parameters i.e.
> 
> root=/dev/hda1 s
> 
> or whatever.
> 
> It works. I want to add another parameter:
> kernel=<path>
> so you can pick a kernel to boot.
> 
> But I need to pick an in-kernel linux-boots-linux that works on 2.4.x.
> and can load and boot arbitrary kernel images (i.e. .gz, etc.)
> 
> Don't have one yet ... or do I? (eric?)

Ron my 2.4.2 kexec stuff works well.  I'm very dubious about a bootloader
in the kernel though.  I can squeeze a network bootloader into 8KB of
user space so space is not super precious.  I suspect anything in the
kernel will be a maintenance nightmare.
 
> This will nicely allow us to boot arbitrary drives, partitions, file
> system types, and even kernels.
> 
> Doing the open of (5,1) (i.e. /dev/console) is a real good deal. Whatever
> you set as console is used -- serial, graphics, whatever. Things like
> backspace work.
> 
> The patch is trivial, I will post it to the list as soon as it is cleaned
> up. It's about 20 lines.

O.k.  You might be able to convince me.

Just to get the feel for what you can do in user space check out:
ftp://download.linuxnetworx.com/pub/src/nbc

I don't have a prebuilt example running straight from linuxBIOS,
but I do have an example running straight from a floppy.
nbc-1.4.i386.serial.floppy.img.  

The code also works on the alpha.  I really need to publish my patch
to uclibc to make it work there as well.  I also open /dev/console.

If nothing else please give me a reason why the bootloader needs to
go into kernel space, and can't sit right on top of the kernel.

Eric

Reply via email to