Need help mounting UDF filesystem

Hello everyone.
I have a hard disk drive which contains a single partition formatted with a UDF filesystem. I have problems mounting the filesystem onto my FreeBSD system. What do I do as a superuser:

# mount_udf /dev/da0p1 /mnt

I get:

mount_udf: /dev/da0p1: Invalid argument

The file definitely exists:

# ls /dev/da0*
/dev/da0 /dev/da0p1

I also do this:

# gpart show da0

And get:

=> 34 976773101 da0 GPT (466G)
34 2014 - free - (1.0M)
2048 976771072 1 ms-basic-data (466G)
976773120 15 - free - (7.5K)

I do that mostly because I did not really get acquainted with FreeBSD well (but long time OpenBSD and Linux user), and do not know your variant of disklabel/lsblk. As you can see, the system does not even see the filesystem as UDF. My FreeBSD is version 14.2 fresh installed. If I replace mount_udf with mount_msdosfsor mount -t udf, the result is the same. I have thoroughly read bouth mount(8) and mount_udf(8) man pages.

The formatting of the partition I did myself via GNOME Disks utility on Fedora 41. The utility says that the UDF is version 2.01. The filesystem mounts OK inside Fedora and Windows 10. It does not on OpenBSD with a problems of the same nature (FS seen as MSDOS + Invalid argument error message).

I am connecting the drive to the system via SATA-USB adapter. On connecting the drive I get these lines in system console:

usb_msc_auto_quirk: UQ_MSC_NO_GETMAXLUN set for USB mass storage device JMicron External USB 3.0 (0x152d:0x0570)
usb_msc_auto_quirk: UQ_MSC_NO_PREVENT_ALLOW set for USB mass storage device JMicron External USB 3.0 (0x152d:0x0570)
ugen0.7: <JMicron External USB 3.0> at usbus0
umass0 on uhub0
umass0: <JMicron External USB 3.0, class 0/0, rev 3.00/2.04, addr 6> on usbus0
umass0:12:0: Attached to scbus12
da0 at umass-sim0 bus 0 scbus12 target 0 lun 0
da0: <External USB3.0 0204. Fixed Direct Access SPC-4 SCSI device
da0: Serial Number 201703310007F
da0: 400.000MB/s transfers
da0: 476940MB (976773168 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

What is the core problem here? Am I doing everything correctly? Should I create UDF filesystems via some other tool? Thank you.
 
With which operating system and version was the partition & file-system on /dev/da0p1 made ?
Are you very certain the file-system is UDF and not FAT32 ?
 
The partition and the filesystem on it were created on Fedora 41 OS via a base utility called Disks.

The About page of the OS reads the following.
OS Name: Fedora Linux 41 (Workstation Edition)
OS Type: 64-bit
GNOME Version: 47
Kernel Version: Linux 6.12.4-200.fc41.x86_64

The About page of the Disks utility reads the following.
gnome-disk-utility 46.1
UDisks 2.10.1 (built against 2.10.1)

I am certain that the filesystem is UDF and not FAT32. My assumption is based on the fact that an external OS — Windows 10 — also sees the filesystem as UDF type. I could check the type of the filesystem via any authoritative software of your choice, if you aware of one.
 
What does file -s /dev/da0p1 tell you?

Partition info says it's a ms-basic-data partition, that's usually NTFS. But the partition type doesn't really enforce the filesystem though, it's perfectly fine to create a freebsd-ufs partition and format it with FAT32 for example. Confusing but not invalid.
 
I seem to remember the UDF support was read only, so maybe adding that to the mount would help. The man page should know.
 
mount_udf: /dev/da0p1: Invalid argument
This generally indicates that the system doesn't recognize the file system. It means that, from its point of view, it's not udf formatted.

You can see what output gives: file -s /dev/da0p1.

The partition type isn't the same thing than the file system inside. The partition type is ms-basic-data (GUID: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7) maybe because there is nothing defined in the GPT standard about udf?

udf has several versions and each OS has freely implemented the format with some limitations or others specifities.

In the idea of data exchange between OSes, I will use rather msdosfs.
 
1. Backup all data.
2. Maybe recovery GPT [CORRUPT]:
gpart recover da0
3. Mount again.
It did not help:
# gpart recover /dev/da0
da0 recovering is not needed
Trying to mount the filesystem after that gives the same error message as in #1 post.

What does file -s /dev/da0p1 tell you?
Not much:
# file -s /dev/da0p1
/dev/da0p1: data

I seem to remember the UDF support was read only, so maybe adding that to the mount would help. The man page should know.
Adding the read-only option did not help.

Partition info says it's a ms-basic-data partition, that's usually NTFS. But the partition type doesn't really enforce the filesystem though, it's perfectly fine to create a freebsd-ufs partition and format it with FAT32 for example. Confusing but not invalid.
The partition type isn't the same thing than the file system inside. The partition type is ms-basic-data (GUID: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7) maybe because there is nothing defined in the GPT standard about udf?
Interesting. Do I understand correctly that if the partition type and the filesystem do not match, then it still should not prevent the filesystem from mounting? Given the correct filesystem was provided to mount(8).

And if I recall correctly, UDF on FreeBSD is upto 1.5. So newer version of UDF shouldn't be mounted/read.
Interesting. Where did you get this information from? Today I tried creating UDF filesystem via a utility called mkudffs. It provides an option to create UDF filesystems of a specific revision. I tried the following revisions to no avail: 1.01, 1.02, 1.50. The utility's manual says that it is the part of the udftools package version 2.3.
 
Interesting. Where did you get this information from? Today I tried creating UDF filesystem via a utility called mkudffs. It provides an option to create UDF filesystems of a specific revision. I tried the following revisions to no avail: 1.01, 1.02, 1.50. The utility's manual says that it is the part of the udftools package version 2.3.
Sorry, I've lost track of it (just in my memories).
But when I've tried before to read dvd-rom burnt on other OS (maybe any of Linux distro or Windoze) could be mounted with mount_udf(8) and could be read (not 100% sure but DVD-RAM [non-VR-mode], too), but BD-R couldn't.
DVD-R requires 1.02, DVD-RAM requires 1.50 and BD requires 2.50 or above.

Cf. Universal Disk Format (WIKIPEDIA).
 
Back
Top