# HG changeset patch # User Michael Young # Date 1319566554 -3600 # Node ID 85d7b207fabcd1cbda8f93e3937c5990f42a2cf9 # Parent f273bce1fc265b9f71879705639a0b14da03f6e1 pygrub: check all GPT partitions On Fedora 16 the first GPT partition is a boot partition for grub2 with the grub2 configuration in the second partition. Check all GPT partitions for grub configuration, not just the first. [ Also remove now-inaccurate comment. -iwj ] Signed-off-by: Michael Young Tested-by: Paolo Bonzini Signed-off-by: Ian Jackson Committed-by: Ian Jackson diff -r f273bce1fc26 -r 85d7b207fabc tools/pygrub/src/pygrub --- a/tools/pygrub/src/pygrub Tue Oct 25 17:04:41 2011 +0100 +++ b/tools/pygrub/src/pygrub Tue Oct 25 19:15:54 2011 +0100 @@ -77,10 +77,17 @@ def get_fs_offset_gpt(file): fd = os.open(file, os.O_RDONLY) - # assume the first partition is an EFI system partition. - os.lseek(fd, SECTOR_SIZE * 2, 0) + os.lseek(fd, SECTOR_SIZE, 0) buf = os.read(fd, 512) - return struct.unpack("0: + buf = os.read(fd, partsize) + offsets.append(struct.unpack("