|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] pygrub fails to read single partition with grub bootsector in 4.1.0-rc
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.
I don't know whether it is actually needed for a bootable partition or not, but it does seem to be common practice to stick aa55 at the end of the first 512 byte sector of a bootable partition (I have just checked a Windows XP partition and it does the same though with text in what would be the partition table so 4.0.1 pygrub probably does something weird with it). That said I'm inclined to think that we should be reasonably tolerant in what we accept as input and that there is little harm in trying to treat things as a whole disk image if we would have otherwise failed anyway (worst case is we simply fail a bit later on). pygrub is read-only so its probably not going to eat anything. So I think it is acceptable that when get_partition_offsets() detects this specific situation it behaves as if the is_disk_image test had succeeded, i.e. returns [0] (which I presume is what part_offs.append(0) you add effectively means since part_offs ==[] at this point). So: Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> However we need a signed-off-by from you too before we can consider applying the patch.
The patch in my previous email is
Signed-off-by: Michael Young <m.a.young@xxxxxxxxxxxx>
Michael Young
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |