Skip to contentSkip to conversation

Why would a valid DVD show zero files on Linux?

DISCUSSION Bryce Nesbitt 7 participants 21 messages Dec 31, 2001 – Jan 30, 2002

lore
Share & tools
lore
#0 lore raw

I have a DVD ROM (It's DeLorme Topo USA), which works fine booted in Windows. Under Linux it mounts fine, but shows no files. Everything looks normal, like it should just work.

What's up? And ideas?

[root@HardHat bryce]# df
...
/dev/scd0 326028 326028 0 100% /mnt/cdrom
/dev/hdc 3277426 3277426 0 100% /mnt/dvdrom

[root@HardHat bryce]# uname -a
Linux HardHat 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown

[root@HardHat bryce]# cat /proc/filesystems

nodev   sockfs
nodev   tmpfs
nodev   shm
nodev   pipefs
nodev   proc
        ext2
        iso9660

nodev devpts
nodev usbdevfs
vfat
nodev autofs

[root@HardHat bryce]# dd if=/dev/hdc of=/tmp/A bs=1024 count=200 200+0 records in
200+0 records out
[root@HardHat bryce]# strings /tmp/A
CD001
T3DVD
DELORME ADJ 1999111712541000
2001022814540400
2001022814540400
CD001
9%/E
1999111712541000
2001022814540400
2001022814540400
CD001
BEA01
NSR02
TEA01
T3DVD
00026f70 MTC ForDVD 5.9, March 2000
OSTA Compressed Unicode
OSTA Compressed Unicode
*Multimedia Tech. Cntr.
*UDF LV Info

#1 lore raw
Quoted 3 lines

I have a DVD ROM (It's DeLorme Topo USA), which works fine booted in Windows. Under Linux it mounts fine, but shows no files. Everything looks normal, like it should just work.

Mount it as a DVD not a CD-ROM media (ie udf format not iso9660) at a guess

#2 lore raw
In reply to Bryce Nesbitt
Quoted 11 lines · Lionel Bouton
Quoted 5 lines · Bryce Nesbitt

I have a DVD ROM (It's DeLorme Topo USA), which works fine booted in Windows. Under Linux it mounts fine, but shows no files. Everything looks normal, like it should just work.

What's up? And ideas?

Try udf fs. I don't know the details but I guess a dvd with empty iso9660 meta-data but with correct udf meta-data could show these symptoms.

That does it!

Works:
mount -t udf /dev/hdc /mnt/dvdrom/

Shows no complaints, no log entries, and no files:

	mount -t iso9660 /dev/hdc /mnt/dvdrom/
	mount /dev/hdc /mnt/dvdrom/

Does anyone want the first few K of this DVD to see why the autodetection is not working better? Do you want me to upgrade past Kernel 2.4.2-2 first? Is RedHat 7.2's kernel good enough?

Thanks!

-Bryce

#3 lore raw
Quoted 3 lines

Does anyone want the first few K of this DVD to see why the autodetection is not working better? Do you want me to upgrade past Kernel 2.4.2-2 first? Is RedHat 7.2's kernel good enough?

The autodetection is working. Your DVD has a UDF file system on it and a blank iso9660 one.

#4 lore raw
Quoted 7 lines · Alan Cox
Quoted 4 lines

Does anyone want the first few K of this DVD to see why the autodetection is not working better? Do you want me to upgrade past Kernel 2.4.2-2 first? Is RedHat 7.2's kernel good enough?

The autodetection is working. Your DVD has a UDF file system on it and a blank iso9660 one.

Understood. However, why can't that combination "just work"? Changing
/etc/fstab every time I switch between sticking in a CD-ROM and DVD-ROM is not cool. Certainly that "other operating system" does not make me do that.

A disk with a blank iso9660 plus a full UDF ought to automatically mount UDF, no? How hard would that be to detect?

-Bryce

PS: I manually mount anyway, and only have two DVD-ROMs, so it's not such a big deal for me. But as DVD rom becomes more popular it could get inconvienent.

#13 lore raw
In reply to Alan Cox
Quoted 6 lines · Bryce Nesbitt
Quoted 2 lines

The autodetection is working. Your DVD has a UDF file system on it and a blank iso9660 one.

Understood. However, why can't that combination "just work"? Changing
/etc/fstab every time I switch between sticking in a CD-ROM and DVD-ROM is not cool. Certainly that "other operating system" does not make me do that.

I used to have two lines in my /etc/fstab: one to mount /dev/cdrom on /cdrom as iso9660, another to mount /dev/cdrom on /cdudf as udf. Then it's simply a matter of mount /cdrom or mount /cdudf.

Of course, that "other operating system" does not require you to manually mount CD-ROMs at all.

Marius Gedminas

Signature · 3 lines
Thus spake the master programmer:
        "After three days without programming, life becomes meaningless."
                -- Geoffrey James, "The Tao of Programming"
#15 lore raw
In reply to Alan Cox
Quoted 2 lines · Bryce Nesbitt

A disk with a blank iso9660 plus a full UDF ought to automatically mount UDF, no? How hard would that be to detect?

You have to set type 'auto' in fstab and add 'udf' in first line of /etc/filesystems.

Follow is piece of man mount:
The type iso9660 is the default. If no -t option is given, or if the auto type is specified, the
superblock is probed for the filesystem type
(minix, ext, ext2, ext3, xiafs, iso9660, jfs, reis- erfs, romfs, ufs, ntfs, qnx4, bfs, xfs, cramfs, hfs, hpfs, adfs, vxfs are supported). If this probe fails, mount will try to read the file /etc/filesystems, or, if that does not exist, /proc/filesystems. All of the filesystem types listed there will be tried, except for those that are labeled "nodev" (e.g., devpts, proc and nfs).

Please tell me is you successfully done it.
On my system it do not work. :(

Signature · 3 lines
Lav
Vitaly Lipatov
GNU! Linux! LaTeX! LyX!
#16 lore raw
In reply to Alan Cox

On Mon, Dec 31, 2001 at 09:21:24AM -0500, Bryce Nesbitt <[email protected]> wrote:

| Alan Cox wrote:
| > The autodetection is working. Your DVD has a UDF file system on it and a
| > blank iso9660 one.
| Understood.   However, why can't that combination "just work"?  Changing
| /etc/fstab every time I switch between sticking in a CD-ROM and DVD-ROM is not cool.
| Certainly that "other operating system" does not make me do that.

I do this via autofs, and just say /mnt/dvd when I want UDF and /mnt/cdrom when I want a CDROM. It does depend on having my eyes open when I stick the medium in the drive...

Of course, this merely bypasses the autodetection.

Signature · 7 lines
Cameron Simpson, DoD#743        [email protected]    http://www.zip.com.au/~cs/

Ed Campbell's <[email protected]> pointers for long trips:
7. Be prepared to have at least 1 flat, 2 electrical problems and a
   broken chain. Maybe a broken clutch cable too. The best prevention
   is to be able to fix it on the spot, only things you can't fix
   will break according to the law.
#17 lore raw
In reply to Alan Cox
Quoted 9 lines · Cameron Simpson

On Mon, Dec 31, 2001 at 09:21:24AM -0500, Bryce Nesbitt <[email protected]> wrote:

| Alan Cox wrote:
| > The autodetection is working. Your DVD has a UDF file system on it and a
| > blank iso9660 one.
| Understood.   However, why can't that combination "just work"?  Changing
| /etc/fstab every time I switch between sticking in a CD-ROM and DVD-ROM is not cool.
| Certainly that "other operating system" does not make me do that.
Quoted 5 lines

I do this via autofs, and just say /mnt/dvd when I want UDF and /mnt/cdrom when I want a CDROM. It does depend on having my eyes open when I stick the medium in the drive...

Of course, this merely bypasses the autodetection.

Ok, I admit, I do the same thing. I manually mount. But let's get in the head of a user, why should they care what type of 5 inch round shiny thing they just inserted?

Are there any cases where udf filesystems are present on cdrom's that should be read as iso9660? Someone mentioned it's a hard heuristic to figure out which fake filename the empty iso9660 filesystem uses. How about, instead, pick the larger of the two filesystems if both are present.

-Bryce

#18 lore raw
Quoted 4 lines

Are there any cases where udf filesystems are present on cdrom's that should be read as iso9660? Someone mentioned it's a hard heuristic to figure out which fake filename the empty iso9660 filesystem uses. How about, instead, pick the larger of the two filesystems if both are present.

Now you've made the behaviour effectively random which is even worse. On a standard DVD the two file systems are the same. Some copy protected CD's have a UDF file system on them that isnt interesting. Some DVD's have an ISO fs that isnt interesting.

#14 lore raw
In reply to Marius Gedminas
Quoted 2 lines

Of course, that "other operating system" does not require you to manually mount CD-ROMs at all.

Nor does Linux if you set it up right. Its a case of making proper use of existing interfaces and a bit of userspace magic. And all done without the student fun of leaving "format/u c:" autostart cd-r's around labelled "porn"

#19 lore raw
In reply to Alan Cox
Quoted 4 lines · Alan Cox

Now you've made the behaviour effectively random which is even worse. On a standard DVD the two file systems are the same. Some copy protected CD's have a UDF file system on them that isnt interesting. Some DVD's have an ISO fs that isnt interesting.

It seems like it should be up to userspace to first try UDF for DVDs, and first try iso9660 for CDs.

-Ryan

#20 lore raw
Quoted 5 lines
Quoted 2 lines

have a UDF file system on them that isnt interesting. Some DVD's have an ISO fs that isnt interesting.

It seems like it should be up to userspace to first try UDF for DVDs, and first try iso9660 for CDs.

Guess what. You can tell user space to do that

#5 lore raw
In reply to Bryce Nesbitt
Quoted 3 lines

Understood. However, why can't that combination "just work"? Changing
/etc/fstab every time I switch between sticking in a CD-ROM and DVD-ROM is not cool. Certainly that "other operating system" does not make me do that.

man fstab
man ln

Its not a hard problem to solve that one

#6 lore raw
Quoted 9 lines · Alan Cox
Quoted 4 lines

Understood. However, why can't that combination "just work"? Changing
... every time I switch between sticking in a CD-ROM and DVD-ROM is not cool. Certainly that "other operating system" does not make me do that.

man fstab
man ln

Its not a hard problem to solve that one

My vision of Linux extends to people who don't have the ability, desire or time to "man fstab" *.

Quoted 9 lines
Quoted 4 lines

Are there any cases where udf filesystems are present on cdrom's that should be read as iso9660? Someone mentioned it's a hard heuristic to figure out which fake filename the empty iso9660 filesystem uses. How about, instead, pick the larger of the two filesystems if both are present.

Now you've made the behaviour effectively random which is even worse. On a standard DVD the two file systems are the same. Some copy protected CD's have a UDF file system on them that isnt interesting. Some DVD's have an ISO fs that isnt interesting.

Windows, somehow, detects the difference. Whatever method used by Windows will be the one tested by the makers of most DVD/CDROM's.

Right now the behavior is deterministic from the Kernel's point of view, but random from the users point of view (e.g. "the last 5 DVD-ROM's I bought just worked, this one does not work"). Can detection be automated? How does Windows do it? Can Linux do it even better?

If the distinction is something that can be automated well, then what is the argument against doing it?

-Bryce

* I fit under "desire". Once I learned that udf existed (it's not in "man fstab"), I knew what to do. I'd rather not know or care :-)!

#7 lore raw
Quoted 2 lines

Windows, somehow, detects the difference. Whatever method used by Windows will be the one tested by the makers of most DVD/CDROM's.

Actually half of the copy protected CD thing relies on the fact windows does not get its decisions right.

Quoted 2 lines

If the distinction is something that can be automated well, then what is the argument against doing it?

Certainly relevant - but for the kde file manager and gnome nautilus lists

#8 lore raw

All,

Is this similar to the VCD problem I have where I can mount the cd and read the smaller files but cannot read the mpg file (avseq01.dat)?

I installed mtv which plays the CD OK. But this does not solve the real problem.

I to believe that the user should not need to know the technical intricaties of how to mount it (iso9660 udf XA) etc. It should just work.

The question is where to fix it? If it is possible to do in the kernel it should be done there. If it nees to be done in userspace then where in userspace does this need to be fixed? I am willing to help but know not where to start.

Thanks

Grahame Jordan

Quoted 15 lines · Alan Cox
Quoted 2 lines

Windows, somehow, detects the difference. Whatever method used by Windows will be the one tested by the makers of most DVD/CDROM's.

Actually half of the copy protected CD thing relies on the fact windows does not get its decisions right.

Quoted 2 lines

If the distinction is something that can be automated well, then what is the argument against doing it?

Certainly relevant - but for the kde file manager and gnome nautilus lists -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Grahame Jordan
TheForce
#9 lore raw
Quoted 2 lines

Is this similar to the VCD problem I have where I can mount the cd and read the smaller files but cannot read the mpg file (avseq01.dat)?

Unrelated. The .dat files are not normal ISO9660 files they are indexes into the VCD data which is physical layer stuff and sorted into tracks audio style.

Quoted 3 lines

it should be done there. If it nees to be done in userspace then where in userspace does this need to be fixed? I am willing to help but know not where to start.

Xine seems to play my videocd's nicely.

Alan

#11 lore raw
In reply to Alan Cox

As I'm learning, this is complex. Some DVD's, Alan says, have differing udf and iso9660 filesystems for copy protection reasons. They spoof windows into not allowing easy access to some files. Maybe your VCD issue is similar.

Try mounting the disc both ways (udf and iso9660) and compare the filesystems.

I'm told windows prefers udf to iso9660. Linux does it the other way 'round. Thus a disc that works perfectly on Windows shows zero files on Linux (confusing users and sysadmins alike, since prior to today, the man pages for mount and fstab were silent on the issue).

-Bryce

PS: Thanks for being the first person to also think users should not have to know about the udf vs. iso9660 issue.

It looks like util-linux, mount is the place to fix this:
ftp://ftp.win.tue.nl/pub/home/aeb/linux-local/utils/util-linux/

See also http://www.osta.org/ , the Optical Storage Technology Association.

Quoted 41 lines · Grahame Jordan

All,

Is this similar to the VCD problem I have where I can mount the cd and read the smaller files but cannot read the mpg file (avseq01.dat)?

I installed mtv which plays the CD OK. But this does not solve the real problem.

I to believe that the user should not need to know the technical intricaties of how to mount it (iso9660 udf XA) etc. It should just work.

The question is where to fix it? If it is possible to do in the kernel it should be done there. If it nees to be done in userspace then where in userspace does this need to be fixed? I am willing to help but know not where to start.

Thanks

Grahame Jordan

Quoted 9 lines · Alan Cox
Quoted 2 lines

Windows, somehow, detects the difference. Whatever method used by Windows will be the one tested by the makers of most DVD/CDROM's.

Actually half of the copy protected CD thing relies on the fact windows does not get its decisions right.

Quoted 2 lines

If the distinction is something that can be automated well, then what is the argument against doing it?

Quoted 6 lines

Certainly relevant - but for the kde file manager and gnome nautilus lists -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

--
Grahame Jordan
TheForce

Signature · 2 lines
Hi! I'm a do-it-yourself virus... please delete 4 files at random
from your hard drive.  Pass me on to all your friends.
#10 lore raw
In reply to Alan Cox

We should be able to use cp or read it though.

I will look into util-linux.

Thanks

Grahame Jordan

Quoted 14 lines · Alan Cox
Quoted 2 lines

Is this similar to the VCD problem I have where I can mount the cd and read the smaller files but cannot read the mpg file (avseq01.dat)?

Unrelated. The .dat files are not normal ISO9660 files they are indexes into the VCD data which is physical layer stuff and sorted into tracks audio style.

Quoted 3 lines

it should be done there. If it nees to be done in userspace then where in userspace does this need to be fixed? I am willing to help but know not where to start.

Xine seems to play my videocd's nicely.

Alan

Signature · 2 lines
Grahame Jordan
TheForce
#12 lore raw
In reply to Alan Cox
Quoted 7 lines · Alan Cox
Quoted 3 lines · Bryce

Understood. However, why can't that combination "just work"? Changing
[mount] every time I switch between sticking in a CD-ROM and DVD-ROM is not cool. Certainly that "other operating system" does not make me do that.

man fstab
man ln

Here's the final resolution on this issue:

fstab(5) now mentions "udf".

mount(8) now has the key piece of information - "udf and iso9660 co-exist on many discs".

mount -t auto now automounts udf.
This required scanning the extended area as you can't tell from the first VSD.

Most people will never need to think about the issue again, dvd-rom's will just mount. Poof.

Thanks for the tips and pointers that helped identify the cause.

-Bryce