From: Ian Jackson Date: Thu, 15 Jul 2010 17:18:16 +0000 (+0100) Subject: pygrub: look in every partition for something to boot X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11774 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8dda1f560d36c4ce2d91b6514d830e4280748226;p=xen.git pygrub: look in every partition for something to boot pygrub: look in every partition for something to boot, in case the OS installer (SLES 10 sp1 in particular) forgets to mark the boot partition as active. Signed-off-by: Tim Deegan Acked-by: David Markey --- diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index 952b73f398..df58f813bc 100644 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -50,21 +50,6 @@ def is_disk_image(file): return True return False -def get_active_partition(file): - """Find the offset for the start of the first active partition " - "in the disk image file.""" - - fd = os.open(file, os.O_RDONLY) - buf = os.read(fd, 512) - for poff in (446, 462, 478, 494): # partition offsets - # active partition has 0x80 as the first byte - if struct.unpack("