This is probably trivial to check using cfdisk on a UDF-formatted CD/DVD/Blu-Ray, but I have neither of them at hand.
I have created an UDF formatted partition on a USB hard drive to share data between Linux and Windows computers (FAT doesn't handle 4GB files, NTFS access rights support is not stable under Linux). I have only one problem now - Windows refuses to mount the partition as the file system type id is set to '83' ('Linux'). I have looked quite extensively and can not find what number should I put there?
(follow-up: "With what tool should I format a hard drive as UDF?")
The answer is partition type 06 (FAT16). Don't ask me why, ask Microsoft.
It turns out there is no partition table for UDF and there is no partition ID assigned to it. This filesystem has to span the whole disk in oder to be recognized by Windows. Formatting a hard drive as UDF does not touch the existing partition table (be careful - it will contain stale information, and if you mount your drive using it, you will destroy the data!).
As a curiosity - UDF 2.5 and newer creates separate partitions (one or two per disk) for metadata. However, those partitions are also not visible in the standard DOS partition table.
Short answer: I would suggest to use MBR id 0x07 for UDF partitions.
Long answer:
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:
And also meaning by Microsoft:
On Wikipedia can be found also some recommendations:
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.
Conclusion:
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:
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.
Sources:
(*) 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.
On the CD's and DVD's I deal with, there is no partition table. On your USB hard drive, you've written a partition table to the media. I suspect if you format the entire drive as a UDF disk without the partition table, Windows will have no problem mounting it.
You don't say what size your USB drive is, and you might be reluctant to dedicate the whole drive as UDF, you could try setting the partition type with fdisk as NTFS or one of the other MS 'supported' types.
I have got the same problem. My USB hard disk is 320GB. Partition table looks like this:
Partition sda5 is a UDF rev. 1.5 and shoulb be readable by Windows XP and above. Linux reads it properly of course. Windows however is confused. It recognise partition as NTFS and then it assumes it is raw partition.
My experiment with UDF on pendrive showed me that systems tend to mistake UDF with FAT. They interpret UDF as FAT. It must be quite large similarities because i can see directory stucture of random characters. Linux says that disk is corrupted but it don't refuse to use it.
I think UDF (at least rev 1.5) is not well supported on USB drives.