Port-xen archive

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

Re: Basic questions -> Basic answers.



Hi,

On Mon, Apr 26, 2004 at 03:11:22AM +0200, Juan RP wrote:
> I would like to try out NetBSD/xen, but before I want to know some
> very basic answers, they are:

There have been some significant changes, so that the information I
posted last is quite outdated...

>       o Can I boot NetBSD/Xen without having a NFS root? e.g. from
>            a HD or CDROM.

You don't need an NFS root anymore since I added a block device driver.
With the xen12load loader it is also possible to boot NetBSD as domain0.
The block device driver will hijack the wd/sd/cd major numbers and
should give you access to your IDE/SCSI devices just like regular
NetBSD/i386 (unless Xen probes the devices in a different order).  This
allows you to boot from a NetBSD/i386 root filesystem without having
to change /etc/fstab.

>       o Can NetBSD/Xen run X?

Yes, as of a couple of hours ago.

>       o Does NetBSD/Xen supports NetBSD/i386 binaries?

Yes.

>       o What's the procedure to make a NetBSD/Xen's release? (kernel+sets).

There isn't one yet.  It's also unclear to me how to handle this best.  You
can install NetBSD/i386, install and setup grub and then boot Xen with the
NetBSD/Xen kernel.  There are no extra files for NetBSD/Xen except for the
kernel and Xen itself.
 
> Finally, I've been searching for the Xen tools on the website (the tools to
> admin the domains, etc), but can't find them. If you can point me to them, I
> could try to make a package for pkgsrc.

The tools are part of the Xen source package.  I've already prepared a pkgsrc
package.  But there's one problem with the tools, they need some additional
features from the kernel which I haven't comitted yet since the way I chose
to export the features to userland requires extensions to kernfs.  The Linux
kernel exports these features through nodes in /proc.  It would be possible
to create regular devices but that would then require creating additional
/dev entries which makes it more difficult to just give NetBSD/Xen a try if
you have already NetBSD/i386 installed.

The pkgsrc packages is here:
http://lola.pin.lu/netbsd/xen/xentools12-040426.tgz
A patch to add the missing kernel bits is here:
http://lola.pin.lu/netbsd/xen/dom0-040426.patch

        o How to build a kernel?

Do the usual config/make depend/make:
- change to sys/arch/xen/conf
- config GENERIC
- cd ../compile/GENERIC
- make depend && make

        o How to build xen12load

Run make in sys/arch/xen/stand/xen12load

        o How to setup grub

- install grub from pkgsrc
- create a /grub/menu.lst file like this:

============================================================
default 0
timeout 5

root    (hd0,3,a)

title   NetBSD
        kernel  --type=netbsd /netbsd

title   NetBSD via chain
        rootnoverify (hd0,3)
        chainloader +1
        boot

title   Xen / NetBSD
        kernel  /grub/xen-1.2.gz dom0_mem=65536
        module  /grub/xen12load
        module  /grub/xen12netbsd
============================================================

``root (hd0,3,a)'' selects grub's root filesystem.  ``(hd0,3,a)'' refers
to the ``a'' disklabel-partition in the 4th fdisk partition on the 1st
harddisk.  The 1st entry loads NetBSD/i386 directly from grub.  This
doesn't seem to always work for me, the kernel won't find the root
device and grub doesn't setup the symbol table correctly.  The 2nd entry
chainloads the NetBSD boot sector from the fdisk partition where NetBSD
is installed.  The 3rd entry loads NetBSD/Xen.

You'll have to install Xen (/grub/xen-1.2.gz), xen12load (/grub/xen12load)
and the NetBSD/Xen kernel (/grub/xen12netbsd) in grub's root filesystem.
If your NetBSD root filesystem is not the default root device/partition
(wd0a/sd0a), then you can select a different device/partition like this:
title   Xen / NetBSD  
        kernel  /grub/xen-1.2.gz dom0_mem=65536
        module  /grub/xen12load bootdev=wd1f
        module  /grub/xen12netbsd



That's it for now...  Good Luck!

    christian




Home | Main Index | Thread Index | Old Index