Subject: linux domU's and partitioning
To: None <port-xen@netbsd.org>
From: Daniel Carosone <dan@geek.com.au>
List: port-xen
Date: 12/04/2006 14:23:52
--1agNgAJj+CsQhLbC
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

http://www.netbsd.org/Ports/xen/howto.html says:

   A virtual block device can't be partitioned in the Linux domain as
   it is in the NetBSD domain. This means that each partition that
   will be available in the Linux system have to be exported from the
   domain0 system.

This appears to be untrue, at least for gentoo xen kernels.

I have a disk image file that I can dual-boot using both a normal
linux i386 kernel with hvm, and using a domU xen kernel.  It was
installed as the former and 'upgraded' to xen native, pretty much just
by adding the xen kernel (also building with -mno-tls-direct-seg-refs,
but that's only a performance issue).

All that was necessary was mapping the image as the linux 'hda'
device, and then linux finds hda1 etc partitions as normal:

 disk = [ 'file:/home/xen/gentoo/gentoo.img,0x300,w' ]
 root = "/dev/hda3 ro"

I have no reason to suspect this is particular to gentoo kernels, but
no real inclination to test other distributions right now to confirm
it either.  If someone else can provide that confirmation, I'll fix
the page accordingly.

--
Dan.

--1agNgAJj+CsQhLbC
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iD8DBQFFc5TIEAVxvV4N66cRAkTnAJ4qhoZF+YVC7d5lFMifE9GQu0w8qgCfWKNr
39whuBv7HT2aqpcTNEoaKmc=
=MwNV
-----END PGP SIGNATURE-----

--1agNgAJj+CsQhLbC--