6

For MBR partitions that hold data that isn't a filesystem, you typically set the type to 0xDA. I looked through various GPT tools' man pages (gpart and GNU Parted), but couldn't find a suitable replacement. The Wikipedia page doesn't mention a good replacement, either; the closest is has is all zeros (00000000-0000-0000-0000-000000000000), but that's for an "unused entry," which this isn't.

What's the GPT GUID that indicates a partition holds data, but nothing more?

3 Answers3

7

AFAIK, there is no generally-accepted exact equivalent of MBR'x 0xDA type code on GPT disks. If you have a specific type of data you want to store, you can always just create your own GPT type code and use it consistently. If you think this type code would be of interest to others (say, if you're writing software that you intend to release and that uses a partition in a particular way), you could add it to the Wikipedia page you referenced; however, I advise against this if you're not releasing new software with specific needs. The trouble, of course, is that most partitioning tools won't recognize random GPT type codes; they usually accept just a limited range of values. (My own GPT fdisk is an exception to this rule.) Alternatively, you could pick something that's rarely used, at least on your system, and use it instead. For instance, you might use the "Linux reserved" code (8DA63339-0007-60C0-C436-083AC8230908), which AFAIK nothing uses; or if your computer doesn't have a Solaris installation, use one of its several codes. Depending on your partitioning software, you might need to use something that's just obscure enough to not be used on your system, but not so obscure that your partitioning software will refuse it.

You're right to avoid the "unused entry" code (00000000-0000-0000-0000-000000000000); doing so will likely remove the entry from visibility in most partitioning tools. Some tools will refuse such a GUID, even if the tool accepts GUIDs at all. (Many tools don't permit use of arbitrary GUID type codes.)

Another point: If you're using Linux, it doesn't care about partition type codes, for the most part. The main exception is during OS installation; some Linux installer tools do pay attention to type codes. Tools like mount and GUI file managers don't care about type codes, though. If you're dual-booting with Windows, AFAIK, Windows only cares about the handful of codes for filesystems it can manage and then ignores everything else. Ditto for macOS. Thus, the need for specialized type codes is limited; you just need one to make it be ignored by OSes, like Windows and macOS, that should ignore your partition.

Note: I'm the author of the GPT fdisk (gdisk, cgdisk, and sgdisk) partitioning tool. This doesn't mean I have perfect knowledge of all things GPT, but I do recall looking into this specific MBR type code long ago when I first wrote GPT fdisk. If you discover that there is an exact GPT equivalent to MBR's 0xDA, please tell me so I can support it in GPT fdisk.

Rod Smith
  • 22,290
1

Maybe this question was not related to RAID setups but, anyway, in https://raid.wiki.kernel.org/index.php/Partition_Types says that there's no equivalent for 0xDA MBR partition type, and the only option for GPT partition tables is 0xFD00:

For GPT partition tables, the author of gdisk made up some 4-digit partition type codes so users wouldn't have to type the full GPT UUID partition type IDs. They are similar to the MBR-equivalent numbers, but that's only for ease-of-use. The on-disk format stores a 16-byte UUID. Use gdisk's 0xFD00 partition type for RAID partitions on GPT. gdisk doesn't have a 0xDA00 partition type, as the author wasn't aware of the reasons for 0xFD being deprecated on MBR.

By the way, I understad that author was Rod Smith, right?

rpet
  • 33
-2

I saw another user post this and I felt it relevant.

How do I disable "you need to format this disk" message in Windows Vista/7?

I managed to achieve it by creating the drive as a GPT and then using diskpart to modify the partition GPT ATTRIBUTES...

list disk select disk # <- your disk number here list partition select partition # <- your partition number here GPT ATTRIBUTES=0xC000000000000001 exit

0x0000000000000001 marks the partition as required.
0x8000000000000000 Prevents the partition from having a drive letter automatically assigned.
0x4000000000000000 Defines the partition's volume as hidden.