WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] pygrub fails to read single partition with grub bootsect

To: M A Young <m.a.young@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] pygrub fails to read single partition with grub bootsector in 4.1.0-rc
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Mon, 31 Jan 2011 19:50:37 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Mon, 31 Jan 2011 11:51:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.GSO.2.00.1101311129170.23730@xxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <alpine.LFD.2.02.1101301935090.5024@xxxxxxxxxxxxxxx> <1296473059.4037.49.camel@xxxxxxxxxxxxxxxxxxxxxx> <alpine.GSO.2.00.1101311129170.23730@xxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, 2011-01-31 at 11:59 +0000, M A Young wrote: 
> On Mon, 31 Jan 2011, Ian Campbell wrote:
> 
> > Thanks Michael.
> >
> > On Sun, 2011-01-30 at 19:57 +0000, M A Young wrote:
> >> I have a single partition (actually under lvm) which starts with a grub
> >> boot sector.
> >
> > Do you mean an unpartitioned disk (but with an MBR) as opposed to a disk
> > with a single partition?
> 
> Yes. It is what you get if have grub installed on a partition rather than 
> in an MBR, and then tell xen to map that partition to a partition in the 
> guest.

oh, so you are using the "split disk" scheme where xvda1, xvda2 etc are
configured for the guest separately, as opposed to the "whole disk"
scheme where xvda (possibly including a partition table) is configured,
but you are also doing "grub-install /dev/xvda1" or something similar.

In this scheme I don't really see the benefit of installing grub into
the partition in this way -- nothing will ever be able to make use of
it. Note that installing grub to the partition is not a prerequisite for
having a valid grub configuration under /boot, the latter being all
pygrub requires.

I generally recommend people use the whole disk configuration anyway,
and I would redouble that in cases where pygrub is in use. About the
only time I would recommend the split disk configuration is where you
have the guest kernels etc stored in domain 0's filesystem.

I think that the correct solution would be for pygrub to be passed an
option by the toolstack which indicates that it is being asked to
operate explicitly on a split disk partition and not a whole disk, and
therefore skip all the partition detecting stuff. I don't know if pygrub
can infer this from the existing options it gets and I suspect that
adding it would be a rather intrusive patch. Your patch seems like a
viable workaround.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>