MacOS – Cannot mount UDF formatted hard disk in OSX

macosmountunix

I have formated a 2TB external disk with UDF filesystem in Ubuntu. The way I formatted it was:

   sudo dd if=/dev/zero of=/dev/sdc bs=2048 count=1
   sudo mkudffs --media-type=hd --vid=myDisk --blocksize=2048 /dev/sdc

Now I plug the disk in OSX and nothing is automount. The disk is recognized, but nothing else, it's not mounted. I am in OSX Snow Leopard 10.6.8.

diskutil list shows:

 /dev/disk2
 #:                       TYPE NAME                    SIZE       IDENTIFIER
 0:                                                   *2.0 TB     disk2

So first problem is that it doesn't recognize the TYPE NAME is defined in format option (–vid=myDisk). Anyway….

I tried to mount the disk manually:

   sudo mkdir /Volumes/myDisk
   sudo mount -v -t udf /dev/disk2 /Volumes/myDisk/

And I get:

 mount_udf: /dev/disk2 on /Volumes/myDisk: Device not configured

If I try:

 diskutil mount  -mountPoint /Volumes/myDisk /dev/disk2

I get

 Volume on disk2 failed to mount; if it has a partitioning scheme, use "diskutil mountDisk"

If I try:

 sudo mount_udf -b 2048  /dev/disk2 /Volumes/myDisk/

I get

   mount_udf: /dev/disk2 on /Volumes/myDisk/: Device not configured

Any ideas?
Thanks in advance

Best Answer

Details:

I have formated a 2TB external disk with UDF filesystem in Ubuntu. The way I formatted it was:

sudo mkudffs --media-type=hd --vid=myDisk --blocksize=2048 /dev/sdc

This UDF partition on your external disk would not be readable by any non-Linux system. Requirement of UDF filesystem is that disk's logical block size must match UDF filesystem block size.

All hard disks and SSD, including external disks have logical block size of 512 bytes. Note that new disks have physical block size of 4096 bytes, but here is relevant just logical. CD/DVD/BD optical discs have logical block size of 2048 bytes, so you probably thought that settings for optical discs would work also for hard disks...

So first problem is that it doesn't recognize the TYPE NAME is defined in format option (--vid=myDisk).

Volume label for UDF filesystem is defined by Logical Volume Identifier which is configured by --lvid option in mkudffs.

What you need is to re-format your disk again with correct --blocksize and ideally specify also --lvid for label.

New version 2.0 of mkudffs now automatically set --blocksize to the logical block size. And it also supports option --label which sets correct parameters for volume label.

For more information about compatibility of UDF, mkudffs and other operating systems looks into mkudffs 2.0+ manpage into section COMPATIBILITY and BLOCK SIZE.

Summary:

To format hard disk correctly with mkudffs prior to 1.1 you should do:

sudo dd if=/dev/zero of=/dev/sdc bs=1M count=10
sudo mkudffs --blocksize=512 --lvid="label" --vid="label" /dev/sdc

With mkudffs version 1.1+ you should just do:

sudo mkudffs --label="label" /dev/sdc

If you want your hard disk to be readable also by Windows systems then you need to use at least mkudffs version 2.0.