[parted-devel] GPT and editing the filesystem-type uuid

Dan Knapp dankna at gmail.com
Fri Nov 23 00:34:36 UTC 2007


  Okay, so long story short, I accidentally rendered my EFI-based Mac
unbootable.  I don't blame parted, I blame my own carelessness, but parted
didn't have the ability to repair the broken partition table for me, and
since I just spent a week writing code to do so by hand, I'd like to do what
it takes to make sure parted has this capability in future. :)

   Unfortunately I haven't got a lot of time to contribute to this so I'm
really hoping somebody else can take my existing code and use it to see what
needs to be done and add that to parted...  You may view my darcs repository
at http://www.accela.net/~dankna/software/darcs/gpt-tweak/, and I hereby
release that code into the public domain.  At least, the portion of it which
is mine; it also includes the file efi_crc32.c, but that's already in parted
anyhow.

  The problem centers around the UUID in the GPT label that identifies the
filesystem type of each partition.  Right now parted doesn't explicitly
recognize the existence of this UUID; it sets it heuristically, based on the
flags.  This is sort-of-correct behavior in the sense that there's a
particular ID which means "fat16, fat32, ntfs, ext2, ext3, or reiserfs", for
reasons that make some sense but that I lack the patience to go into just at
this moment.  This works fine as long as all the world is either Windows or
Linux, but unfortunately there are other OSes that actually care about the
value, and in particular the EFI bootloader on Intel Macs will not recognize
a partition as HFS+ unless this field has the UUID that means "HFS+".
  By the way, Andrew?  If you're still active on here?  I'm certain you
don't remember me, but like eight years ago we talked briefly and I promised
to write some code for parted and then never did.  Hey, I was a highschool
student at the time, that's what happens. :)  But anyway you impressed me so
much that I've sworn by parted in all the intervening years and I just
thought I'd say hi and stuff, as long as I'm posting to the list anyway.

  Let me know whether (as I hope) you all agree that parted should
incorporate this feature.  Let me know if people need more details to work
on this, as I can explain the problem and terminology in more detail... and
can point you towards various references and resources.  Right now I've
spent all the time I really have for tonight just on writing this email,
so... get back to me? :)

-- 
Dan Knapp
"An infallible method of conciliating a tiger is to allow oneself to be
devoured." (Konrad Adenauer)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20071122/a223b780/attachment.htm 


More information about the parted-devel mailing list