Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Booting a NetBSD-amd64 kernel with "grub"



Robert Swindells wrote:
Christoph Egger wrote:
Matthias Scheler wrote:
On Mon, May 19, 2008 at 11:17:01PM +0200, Christoph Egger wrote:
What part of multiboot would it have to support? Just passing the
arguments to the kernel? Or does the Xen kernel also use grub to
load the dom0 kernel?
Yes. You specify the dom0 via grubs "module" directive.
I know that part.

From there, Xen knows the dom0 binary and boots it.
But how? My guess is that the Xen kernel uses grub to load the dom0 kernel
via some kind of call. Can somebody confirm that?

No. From Grub, Xen gets the information where the dom0 binary is and which parameters to pass.

Xen itself loads the binary and runs it.

Grub loads the dom0 binary and passes the address of it to Xen as part
of the multiboot structure. The Xen kernel doesn't contain any
filesystem or network code.

We have code in boot(8) to load the new NetBSD kernel modules, I don't
think it would be all that much work to add an extra command that will
load something into memory and call into it with a multiboot struct as
a parameter. You would do something like:

  modules enable
  load hd0a:netbsd-DOM0
  multiboot hd0a:xen.gz dom0_mem=65536 -- bootdev=wd0a ro console=pc

I'm for it to get rid of grub. But there is more: If you had a longer uptime before, you ask yourself "which boot options did I use the last time?"

The options become indeed very long when you boot with root on nfs.

I spent a fair bit of time looking into this today as the two machines
that I would like to run Xen on would need their disks reformatting in
order to use Grub. I will have a bit more of a play tomorrow.

You can install grub into wd0d (or sd0d whatever your disk is) and you
can still use the netbsd bootloader with this grub entry:

title NetBSD (chainloader)
  root (hd0,0,a)
  chainloader +1




Home | Main Index | Thread Index | Old Index