import struct, zlib, uuid P = open("../gpt/gpt-primary-34sectors.bin", "rb").read() # LBA 0..33 B = open("../gpt/gpt-backup-33sectors.bin", "rb").read() # entries (32 sectors) + header (last LBA) def entries_of(buf, off, n, esz): return bytearray(buf[off: off + n*esz]) hdrP = bytearray(P[512:1024]); ent_lba, n, esz = struct.unpack(" %s" % (i, name(i), struct.unpack("