Subject: Adding Multiboot support (or not)
To: None <>
From: Julio M. Merino Vidal <>
List: tech-kern
Date: 12/28/2005 17:25:34
Hi all,

[ I'm not sure if this is the correct list to send this message or if it
  should have gone to port-i386... ]

The GRUB [1] developers came up with the idea of designing a
"standard" protocol between boot loaders and OS kernels, known
as the Multiboot Specification [2] (I'll use MB for simplicity).  The
idea behind this protocol is to enable any MB-compliant boot loader
to execute a MB-compliant kernel without knowing any of its
internal details.  (This way, you'd install your boot loader of choice
and have it load any OS without "dirty tricks".)

I think the idea is quite interesting and it could simplify the boot
process on machines with multiple OSes installed in them (think of
chainloading several bootloaders, one after the other).  This is
why I've spent the last two days trying to adapt the NetBSD kernel
to support MB.

Basically, the following is needed:

- Add a little header within the first 8K of the kernel.
- Add some new code to process the MB information structure passed
  by the loader and generate the appropriate information required by
  the NetBSD kernel (aka, bootinfo structures and such).
- Fix a bug in GRUB, heh.

Note that this does not change the traditional boot process at all and
that it's completely optional based on a kernel option.  Also note that,
at the moment, it is i386 specific; however, GRUB 2 will possibly work on
more platforms, so it'd be possibly extended to them in a future, too.

I've uploaded a proof of concept to:

but keep in mind that there is still a lot of work to do before this
can be considered "good" or "correct".  It currently lacks multiple feature=
but it already allows GRUB (or, theorically, any other MB-compliant boot
loader) to boot a NetBSD kernel directly.

I'm sending this mail because I'd like to know if this will be accepted or
not before I spend too much time on it (I'll certainly have to spend severa=
more days to get it right).



Julio M. Merino Vidal <>
The Julipedia -
The NetBSD Project -