GPT support
GreatEmerald opened this issue · 4 comments
While for the most part it's better to maximise compatibility, there may be cases (and probably increasingly more cases) where the disk in question is larger than 2 TiB. The MBR solution won't be able to handle anything past that size. (UDF at 512 block size seems to not be able to handle it either, so this only matters when the block size is higher than that.) So it would be nice if there was a way to use GPT instead of MBR.
On that note, the MBR trick, while interesting, seems to confuse some tools, such as GPartEd. Maybe there should be a switch controlling whether to use it or not? In my case, the drive won't be used in OS X, so the trick isn't needed.
Thanks, @GreatEmerald. While I haven't done the work to add GPT support just yet, 107cf1c adds a new option -p PARTITION_TYPE
can can be used to select what partition type you desire. Currently, only mbr
and none
are supported, but this is where GPT will show up if my later efforts are successful.
Thanks for the tip!
Discussion in #13 indicates that GPT will yield minimal benefit. (UDF itself limits block numbers to 32 bits, so GPT doesn't buy you anything in this case.)
I'm closing this issue for now, but will reopen if we can come up with a good case for GPT support.
Well, one use case is for making UDF the fifth partition on a device. MBR can't handle that many. But that's probably out of scope for this project and mkudffs
is just fine in that case.
That's a perfectly fine use case, but would probably need features from a robust partition manager.
format-udf's current MBR support overwrites the entire partition table, as well as all partitions. For that reason, it requires that -p none
be used when formatting a single partition. The same would be true if GPT support were added to format-udf.
If you're looking to make the 5th partition a UDF partition (and it's already governed by GPT), today's format-udf should be able to handle that scenario. Just specify -p none
(which is nearly equivalent to just calling mkudffs
directly).