Subject: Re: linux domU's and partitioning
To: None <port-xen@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: port-xen
Date: 12/04/2006 10:57:04
On Mon, Dec 04, 2006 at 02:23:52PM +1100, Daniel Carosone wrote:
> 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.
It's possible that this has changed with Xen3. With Xen2 I'm sure using
0x300 didn't work; the linux kernel simply didn't read the partition table
from the virtal disk.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
NetBSD: 26 ans d'experience feront toujours la difference
--