_write_pmbr in libparted/labels/gpt.c and stuff that into the pmbr we're going to write, shouldn't be too complicated. My C is beyond rusty but I think I could come up with something if necessary. best regards, Michael