mounting DVD; how to determine a FS on DVD

Title of the thread says it all. I have a workstation without a DVD rom. I use a notebook behind couch FreeBSD machine to export DVD rom via samba to my workstation. Usually I've no problems mounting CD/DVDs with:

# mount -o ro -t cd9660 /dev/cd0 /export/cdrom


Which is a standard ISO-9660 filesystem. But recently I had to mount a DVD which had an udf filesystem on it and I had to specify it manually (mount_udf). It took me some googling to find this out. Unfortunately using fstyp was not helpful at all:

Code:
# fstyp /dev/cd0
/dev/cd0: Invalid argument
#

Which got me wondering .. How should I know what FS has CD/DVD on? Am I missing here something ? Is there a way to determine this either automatically or at least with some command ?
 
Try sysutils/udfclient with udfclientfs via FUSE enabled, also read sourced information in this PR.

Read about udfclient releases:
UDFclient.0.7.5 : After some time being dormant, this new release fixes a lot of small standing bugs and a serious bugfix that prevented it to read Microsoft formatted UDF 2.50 and UDF 2.60 discs. Also, logical volume integrity checking is now fixed, directory handling has been made more robust and UDF 2.50 and UDF 2.60 are now correctly signaled as read-only and won't try to corrupt a disc anymore. cd_disect has been enhanced and extended to also support BluRay recorders.
 
wblock@ said:
Try file(1):
# file -s /dev/cd0

Doesn't help much:

# file -s /dev/cd0
Code:
/dev/cd0: data

Maybe this way:

# strings /dev/cd0 | head
Code:
BEA01
NSR02
TEA01
396F6D1DC69092E2
OSTA Compressed Unicode
OSTA Compressed Unicode
*Nero
*UDF LV Info
OSTA Compressed Unicode
*Nero
But still, that's not ideal.

@cpu82: That seems to be a problem with UDF itself. I didn't run into a problem of a specific UDF version but detection of the filesytem.

For the time being I'll stick to the method: is cd9660 working? If no use UDF.
 
The strings thing is kind of what file(1) does. It has additional tricks. A recent version of file(1) is supposed to be buggy. Can't recall the details, but it might be worth trying the port or the latest version from the FreeBSD repository. Or make your own changes to the magic files.
 
matoatlantis said:
@cpu82: That seems to be a problem with UDF itself. I didn't run into a problem of a specific UDF version but detection of the filesytem.

For the time being I'll stick to the method: is cd9660 working? If no use UDF.

It works, using mount_cd9660 even on UDF file system disk.

As wblock@ recommends, file(1) shows if any file that cannot be identified as having been written in any of the character sets listed is simply said to be `data'.

I did a test with a UDF disk and this is what shows:
Code:
# file -s /dev/cd0
/dev/cd0: # UDF filesystem data (version 1.5) '

A call to test port of NetBSD's UDF file system implementation, I add links:

[1]Read-only port of NetBSD's UDF filesystem.
[2]SummerOfCode2012/UDF Implementation.
 
Back
Top