diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub index 3ec52fd486..00cf77e1a0 100755 --- a/tools/pygrub/src/pygrub +++ b/tools/pygrub/src/pygrub @@ -157,6 +157,11 @@ def get_partition_offsets(file): else: part_offs.append(offset) + # We thought we had a DOS partition table, but didn't find any + # actual valid partition entries. This can happen because an MBR + # (e.g. grubs) may contain the same signature. + if not part_offs: part_offs = [0] + return part_offs class GrubLineEditor(curses.textpad.Textbox):