[PATCH] fdisk: Add support for GPT partition type codes

Jody Bruchon jody at jodybruchon.com
Sun Nov 27 12:41:02 UTC 2016


On 11/27/2016 12:11 AM, Denys Vlasenko wrote:
 > I looked at these "type codes of GPT partitions" and they seem to be
 > a figment of imagination of "GPT fdisk" people: they are not stored 
on disk,
 > fdisk authors just assigned them to some GUIDs.
 >
 > How do you find them useful?

I use gptfdisk tools for disk imaging and information scripts. The 
made-up partition types from gptfdisk are an extremely handy mnemonic 
device because I can actually remember them and they make for cleaner 
code that has to embed these known GUIDs. Off the top of my head, I know 
that 0700 is "Microsoft basic data", af00 is "Apple HFS+", ef00 is "EFI 
system", and IIRC af01 is "Apple Core Storage." If you asked me to tell 
you the corresponding GUIDs, I have no clue at all. The usefulness is 
like programming in assembly instead of banging in raw hex codes.

On a somewhat related note, I have started working on implementing the 
'-t' switch in fdisk; having BB fdisk automatically pick my GPT 
partition table makes me unable to use fdisk to modify the protective MBR.

-Jody


More information about the busybox mailing list