Difference between revisions of "UDF 2.01 on Linux"

From ThinkWiki
Jump to: navigation, search
(UDF Vista on Linux)
m
Line 1: Line 1:
=== Mounting DVDs created by Windows Vista with UDF 2.01 Filesystem ===
+
=== Mounting DVDs created by Windows Vista with UDF 2.01 or 2.50 filesystem ===
 +
 
 +
While UDF 2.01 filesystems created with '''mkudffs''' work fine with Linux, UDF media created on different platforms may cause a lot of trouble.
  
 
To make Vista UDF DVDs work with Linux, you'll need to patch your kernel with the following patches to your 2.6.24 kernel:
 
To make Vista UDF DVDs work with Linux, you'll need to patch your kernel with the following patches to your 2.6.24 kernel:

Revision as of 18:03, 12 February 2008

Mounting DVDs created by Windows Vista with UDF 2.01 or 2.50 filesystem

While UDF 2.01 filesystems created with mkudffs work fine with Linux, UDF media created on different platforms may cause a lot of trouble.

To make Vista UDF DVDs work with Linux, you'll need to patch your kernel with the following patches to your 2.6.24 kernel:

--akw 17:55, 12 February 2008 (CET)

<diff> diff -Nur linux-2.6.24-udf/fs/udf/super.c linux-2.6.24-udf-akw/fs/udf/super.c --- linux-2.6.24-udf/fs/udf/super.c 2008-02-12 17:32:51.000000000 +0100 +++ linux-2.6.24-udf-akw/fs/udf/super.c 2008-02-12 17:22:01.000000000 +0100 @@ -1015,9 +1015,9 @@

			  UDF_SB_PARTMAPS(sb)[i].s_partition_num, le16_to_cpu(p->partitionNumber));
 		/* workaround problems caused by Vista */
 		if (UDF_SB_PARTMAPS(sb)[i].s_partition_num >= UDF_SB_NUMPARTS(sb)) {

- udf_debug("Changing parition# from %d to ", UDF_SB_PARTMAPS(sb)[i].s_partition_num); + int old_partnum = UDF_SB_PARTMAPS(sb)[i].s_partition_num;

 			UDF_SB_PARTMAPS(sb)[i].s_partition_num %= (UDF_SB_NUMPARTS(sb));

- udf_debug("%d\n", UDF_SB_PARTMAPS(sb)[i].s_partition_num); + udf_debug("Changing partition# from %d to %d\n", old_partnum, UDF_SB_PARTMAPS(sb)[i].s_partition_num);

 		} else {
 			udf_debug("Keeping partition# %d out of %d partitions\n",
 					UDF_SB_PARTMAPS(sb)[i].s_partition_num, UDF_SB_NUMPARTS(sb));

@@ -1148,6 +1148,7 @@

					UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP15;
					UDF_SB_PARTFUNC(sb,i) = udf_get_pblock_virt15;
				} else if ((le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0200) ||

+ (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0201) ||

 					 	  (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0250) ||
 						  (le16_to_cpu(((__le16 *)upm2->partIdent.identSuffix)[0]) == 0x0260)) {
					UDF_SB_PARTTYPE(sb,i) = UDF_VIRTUAL_MAP20;

</diff>