From 8dda1f560d36c4ce2d91b6514d830e4280748226 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 15 Jul 2010 18:18:16 +0100 Subject: 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 --- tools/pygrub/src/pygrub | 97 +++++++++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 35 deletions(-) (limited to 'tools/pygrub') 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("