Subject: Re: booting netbsd as domain0?
To: Hubert Feyrer <email@example.com>
From: Christian Limpach <firstname.lastname@example.org>
Date: 03/13/2004 15:37:19
> I'm interested in booting Xen with NetBSD as domain0 OS (replacing my
> native NetBSD installation, and running other domains later).
> How do I do this?
you don't, at least not right now...
> I played a bit with the xendemo-1.2 CD, and reading the instructions it
> seems like booting the boot/xen.gz on it is the way to go.
> Trying to boot an uncompressed version of that, I just get:
> Invalid magic number: 0xfe6c
> from our (native NetBSD, not grub) boot loader. I haven't looked what that
> means, maybe Linux binary where a NetBSD binary is expected? No idea.
You have to boot Xen from grub because Xen needs the boot loader to also
load the domain0 image. Also the domain0 image needs to be in the Xenogues
format. I've written a tool to convert a netbsd kernel into Xenogues format
but then added an ELF loader to the domain build tools. The tool is
available in http://lola.pin.lu/netbsd/xen/old/tools12-040203.tgz and the
source is somewhere in the xen_sys-arch-xen-040206.tar.gz archive in the
same dir. You can give this a try but I don't think it's worth the effort.
In the long run Xen will support regular ELF binaries as domain0 images.
Have you tried starting a NetBSD domain from a Xenolinux domain? That's the
supported setup as described below...
You have to get Xen 1.2 and install it. Then you need to do:
- prepare and export a nfs root filesystem for the domain using the i386
- build a NetBSD/xen kernel
- boot Xen with Xenolinux in DOM0
- start the NetBSD domain from the Xenolinux domain with the
xc_dom_create.py utility and the netbsd config file included with Xen:
xc_dom_create.py -f netbsd -D
MEM_MB -k /path/to/netbsd
e.g.: xc_dom_create.py -f netbsd -D
'vmid=1;ip=172.20.4.17;nfsserv=172.20.4.13;nfsroot=/netboot/qube' -m 32 -k
- alternatively modify the config file (/etc/xc/netbsd) to match your