2001-12-31 00:48:34

by Bryce Nesbitt

[permalink] [raw]
Subject: Why would a valid DVD show zero files on Linux?

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


2001-12-31 00:56:24

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> 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

2001-12-31 02:11:13

by Bryce Nesbitt

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

Lionel Bouton wrote:
>
> Bryce Nesbitt wrote:
>
> > 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

2001-12-31 13:03:46

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> 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.

2001-12-31 14:24:34

by Bryce Nesbitt

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

Alan Cox wrote:
>
> > 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.

2001-12-31 14:48:57

by Marius Gedminas

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

On Mon, Dec 31, 2001 at 09:21:24AM -0500, Bryce Nesbitt 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 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
--
Thus spake the master programmer:
"After three days without programming, life becomes meaningless."
-- Geoffrey James, "The Tao of Programming"

2001-12-31 15:11:12

by Vitaly Lipatov

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

On 31 December 2001 17:21, Bryce Nesbitt wrote:
> 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. :(
--
Lav
Vitaly Lipatov
GNU! Linux! LaTeX! LyX!

2001-12-31 23:38:18

by Cameron Simpson

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

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.
--
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.

2002-01-01 05:37:59

by Bryce Nesbitt

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

Cameron Simpson wrote:
>
> 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.

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

2002-01-01 10:02:45

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> 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.

2002-01-01 10:30:07

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> 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"

2002-01-01 10:31:17

by Ryan Cumming

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

On January 1, 2002 02:12, Alan Cox wrote:
> 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

2002-01-01 10:33:17

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> > 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

2002-01-01 10:36:07

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> 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

2002-01-01 14:26:05

by Bryce Nesbitt

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

Alan Cox wrote:
>
> > 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" *.


> > 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 :-)!

2002-01-01 15:13:56

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> 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.

> 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

2002-01-01 23:31:21

by Grahame Jordan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

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


On Wed, 2002-01-02 at 02:24, Alan Cox wrote:
> > 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.
>
> > 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/
--
Grahame Jordan
TheForce

2002-01-01 23:43:51

by Alan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

> 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.

> 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

2002-01-01 23:52:51

by Bryce Nesbitt

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

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.


Grahame Jordan wrote:
>
> 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
>
> On Wed, 2002-01-02 at 02:24, Alan Cox wrote:
> > > 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.
> >
> > > 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/
> --
> Grahame Jordan
> TheForce

--
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.

2002-01-02 08:00:47

by Grahame Jordan

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

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

I will look into util-linux.

Thanks

Grahame Jordan


On Wed, 2002-01-02 at 10:53, Alan Cox wrote:
> > 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.
>
> > 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
--
Grahame Jordan
TheForce

2002-01-30 15:08:36

by Bryce Nesbitt

[permalink] [raw]
Subject: Re: Why would a valid DVD show zero files on Linux?

Alan Cox wrote:
> Bryce wrote:
> > 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