I haven't been able to play DVD's and was able to determine it is because the DVD isn't being mounted. I was able to mount it manually by creating the folder /mnt/dvd and executing

Code:

mount -t auto /dev/sr0 /mnt/dvd/

.

Of course I would like to be able to just insert a dvd into the drive an have it auto mount but when researching about fstab entries I read that it is no longer necessary with the new kernels.

Is this true?

How do I get my DVD/RW Player to auto mount?

If I do have to add it to fstab what would the syntax be?

This is my current fstab:

Quote:

# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

You do not need to mount a DVD to play it. I assume we are discussing video DVDs, not data DVDs?

DVD players use raw device access and retrieve block lists to determine what order to play the data blocks so you see the movie.
Indeed, many filesystem blocks are deliberately corrupt, so you cannot use cp -a to copy a video.

Your normal user needs to be in the cdrom group to be permitted raw device access, then all should be well.
mplayer is a good test.

If your symlinks are set up properly,

Code:

mplayer dvd://1

will play the first video on a dvd. Be aware that it might only be a single frame, so you may need to try other numbers too. You might need the -dvd-device option too. I think its -dev-device=/dev/sr0 for the first cdrom but check the man page.

Hint: when mplayer starts, it recovers all the keys for the videos on the DVD and shows the sizes of each video. The biggest one is normally the one you want._________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.

You do not need to mount a DVD to play it. I assume we are discussing video DVDs, not data DVDs?

DVD players use raw device access and retrieve block lists to determine what order to play the data blocks so you see the movie.
Indeed, many filesystem blocks are deliberately corrupt, so you cannot use cp -a to copy a video.

Your normal user needs to be in the cdrom group to be permitted raw device access, then all should be well.
mplayer is a good test.

If your symlinks are set up properly,

Code:

mplayer dvd://1

will play the first video on a dvd. Be aware that it might only be a single frame, so you may need to try other numbers too. You might need the -dvd-device option too. I think its -dev-device=/dev/sr0 for the first cdrom but check the man page.

Hint: when mplayer starts, it recovers all the keys for the videos on the DVD and shows the sizes of each video. The biggest one is normally the one you want.

Thanks for the info Neddy.

Yes I was speaking of video DVD's not data. I'll test data and reading/writing this week.

I was in the cdrom, plugdev, and cdrw groups when having this problem. The reason I thought it was a mount issue is because, although I could see the disc, I couldn't access it from a file manager or CLI as well.

However, now the problem has "gone away". I am not sure why so perhaps you can help me. The only thing I did post problem was issue the mount command that I indicated, which then allowed me to access and play the dvd. But I assume upon re-boot that would no longer be in effect.

Even if the DVD was mounted, raw access still works, so playing the DVD should work.

Are you testing with the same DVD that caused the issue?
It could be a scratch or dirt on the DVD.

I have a few optical discs, CDs and DVDs that are very fussy about how they are placed in the drive, so there are several possible intermittent causes.

Hi. I have no idea what is going on but would like to try to understand. Haha.

OK so after some playing around it is indeed reproducible. I am not sure why but if I comment out the two lines I referenced in fstab the DVD will auto mount and play in VLC. If I leave those two lines in the fstab, not only will it not play, it won't mount the DVD thus denying me access in any file manager.

The file manager gives a rather generic "can't mount" error. But I can see the DVD label.

I suspect that /dev/dvd and all the other symlinks to /dev/sr0 no longer exist.
The only symlink I have is /dev/cdrom, which I also don't use. Over the years, the symlinks have proven to be more trouble than they are worth.

You are right, it was an decision of udev upstream to drop everything else than the /dev/cdrom symlink, it always points to /dev/sr0.

So if anyone is seeing an application defaulting to /dev/dvd, it's an actual bug and the default should be changed in the source code to /dev/cdrom.

Last edited by ssuominen on Tue Mar 19, 2013 7:05 pm; edited 1 time in total

The entries in /etc/fstab will conflict with sys-fs/udisks:0 but not anymore with sys-fs/udisks:2, so if user has gnome-base/gvfs built using UDisks2 (USE="udisks udev") instead of UDisks1 then both GNOME and Xfce will be fine even with the entries in /etc/fstab, however if it's built with UDisks1 (USE="gdu udev"), then the conflict will still be there.

The conversation went a bit over my head. So what does this mean for me. Do I leave those two lines commented out or should I be doing something else. You indicated I should set it up to fail?

We got a bit off-topic. My bad.

Well, if you don't use old sys-fs/udisks:0, then having line for /dev/cdrom which will always point to /dev/sr0 in /etc/fstab is OK.
However if you still use sys-fs/udisks:0, then make sure you don't have lines in /etc/fstab for removable medias, like optical drives, like /dev/cdrom, as with old udisks it's either handled by fstab OR udisks.

I'd run some media player with `strace` and once it fails, also look at `dmesg`.

The conversation went a bit over my head. So what does this mean for me. Do I leave those two lines commented out or should I be doing something else. You indicated I should set it up to fail?

We got a bit off-topic. My bad.

Well, if you don't use old sys-fs/udisks:0, then having line for /dev/cdrom which will always point to /dev/sr0 in /etc/fstab is OK.
However if you still use sys-fs/udisks:0, then make sure you don't have lines in /etc/fstab for removable medias, like optical drives, like /dev/cdrom, as with old udisks it's either handled by fstab OR udisks.

I'd run some media player with `strace` and once it fails, also look at `dmesg`.

Thanks. So how do I determine that? This is a relatively new install. Is it safe to assume that since the behaviour "out of the box" was to not play the media until I commented out those two lines that I am using sys-fs/udisks?

If I am not using udisks how do I get get the fstab to always point to /dev/sr0? Can you point me to a how to or wiki. I did a quick search but didn't have much luck.

That was addressed earlier by ssuominen. In short, if you are using sys-fs/udisks:0 leaving them uncommented could cause conflicts with the automounter, but with sys-fs/udisks:2 no such conflicts are present. So just check which slot you are using and go from there, if you are even using the automounter, if you are not then leave them active.

That was addressed earlier by ssuominen. In short, if you are using sys-fs/udisks:0 leaving them uncommented could cause conflicts with the automounter, but with sys-fs/udisks:2 no such conflicts are present. So just check which slot you are using and go from there, if you are even using the automounter, if you are not then leave them active.

OK. So I umnerged sys-fs/udisks:0, emerged sys-fs/udisks:2, and uncommented the 2 lines in fstab in question.

Now my DVD does not mount at all nor is it recognized by any media player. What's up?

All I want is to be able to stick a disc in the box, have it automount,and be able to play it.

You are missing the point. DVDs are not mounted to be able to play them.
If they are mounted, the filesystem found at the mount point is ignored, since the filesystem is deliberately corrupt as a means of copy protection.

You either need to configure your DVD player of choice to use /dev/sr0 as the place to look for DVDs, or give the correct options on the DVD player command line. Most players the at provide a GUI also have a setup option. For mplayer, you need to edit its configuration file._________________Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.