Short answer: I would suggest to use MBR id 0x07 for UDF partitions.
Linux does not care about MBR partition ids and ignores it (*).
Windows 2000 and newer can assign a drive letter to the some partition with id PartitionType if and only if IsRecognizedPartition(PartitionType) is true. Moreover for non-FT partitions must hold that IsFTPartition(PartitionType) is false (otherwise that partition is detected as FT and not as ordinary FAT/NTFS/UDF/...).
Condition IsRecognizedPartition(PartitionType) && !IsFTPartition(PartitionType) apply for these MBR partition ids: 0x01, 0x04, 0x06, 0x07, 0x0B, 0x0C, 0x0E (**). Which means that Windows 2000 (and new) can recognize and use UDF partition if MBR partition id is one of those. There are probably no other restrictions and any supported file system accepts partition with any of those MBR id. Which means those MBR ids are not used for detection of file system.
But there are some recommendation by Microsoft when particular PartitionType should be used:
- 0x01 - FAT12 primary partition or logical drive (fewer than 32,680 sectors in the volume)
- 0x04 - FAT16 partition or logical drive (32,680–65,535 sectors or 16 MB–33 MB)
- 0x06 - BIGDOS FAT16 partition or logical drive (33 MB–4 GB)
- 0x07 - Installable File System (NTFS partition or logical drive)
- 0x0B - FAT32 partition or logical drive
- 0x0C - FAT32 partition or logical drive using BIOS INT 13h extensions (***)
- 0x0E - BIGDOS FAT16 partition or logical drive using BIOS INT 13h extensions (***)
And also meaning by Microsoft:
- 0x01 - Specifies a partition with 12-bit FAT entries.
- 0x04 - Specifies a partition with 16-bit FAT entries.
- 0x06 - Specifies an MS-DOS V4 huge partition.
- 0x07 - Specifies an IFS partition.
- 0x0B - Specifies a FAT32 partition.
- 0x0C - Windows 95/98: Specifies a partition that uses extended INT 13 services.
On Wikipedia can be found also some recommendations:
- 0x01 - CHS/LBA - DOS 2.0+ - FAT12 as primary partition in first physical 32 MB of disk ... (else use 0x06 instead)
- 0x04 - CHS/LBA - DOS 3.0+ - FAT16 with less than 65536 sectors (32 MB) ... (else use 0x06 instead)
- 0x06 - CHS/LBA - DOS 3.31+ - FAT16B with 65536 or more sectors. It must reside in first physical 8 GB of disk ... (else use 0x0E instead). Also used for FAT12 and FAT16 volumes in primary partitions if they are not residing in first physical 32 MB of disk.
- 0x07 - CHS/LBA - OS/2 1.2+, Windows NT/CE - IFS/HPFS/NTFS/exFAT/QNX
- 0x0B - CHS/LBA - DOS 7.1+ - FAT32 with CHS addressing
- 0x0C - LBA - DOS 7.1+ - FAT32 with LBA
- 0x0E - LBA - DOS 7.0+ - FAT16B with LBA
To complete list of ids, here is some information about older systems which do not support UDF formatted hard disk partition.
Windows NT 4.0 and older can assign a drive letter only to partitions with MBR id: 0x01, 0x04, 0x06, 0x07.
DOS-based Windows (95, 98 and ME) can assign a drive letter only to partitions with MBR ids: 0x01, 0x04, 0x06, 0x0B, 0x0C, 0x0E. MS-DOS itself can access only partitions with MBR ids: 0x01, 0x04, 0x06. Note that these systems uses MBR partition id for detection of file system. MBR partition id must match with file system on partition.
Look at partition size: 0x01 and 0x04 should be used only for partitions in first 32MB of disk. 0x06 only in first 8GB of disk. 0x0B is for CHS addressing which has limit for 8GB disks. So without such limits are only ids: 0x07, 0x0C and 0x0E. As 0x0C and 0x0E are used for FAT partitions I would suggest to choose 0x07. It is mean for IFS (Installable File System) partitions and according to Wikipedia, Microsoft added support for UDF into Windows 2000 IFS API. Usage of 0x0C or 0x0E would cause DOS-based systems to show that partition as FAT, even it would be formatted as UDF. Partitions with MBR id 0x07 are hidden on those systems. They do not support UDF, therefore it is better choice as 0x0C or 0x0E.
GPT partition layout is out of of this question, but it has similar problem as MBR. There is no partition GUID (GPT equivalent for MBR id) assigned for UDF. Because Windows XP x64 supports UDF and can recognize GPT data partition only with GUID EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft Basic Data Partition), it is the only possible choice for GPT.
(*) There is one exception: MBR Ids 0x05, 0x0F and 0x85 are used for detection of extended MBR partitions.
(**) Definitions of those two calls can be found in WinIoCtl.h file as they are declared as C macros.
(***) BIOS INT 13h extensions means usage of LBA instead CHS.