LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-15-2006, 06:50 AM   #1
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Rep: Reputation: 30
Automount dvd ROM when dvd is inserted


Hi,

I am trying to configure my system so that when i insert a dvd it will automatically mount it,and i will be able to browse the files wherever i mounted it.I tried this entry in /etc/fstab(I'm using Fedora Core)

Code:
/dev/cdrom   /mnt/cdrom   auto   ro,auto,user,exec   0 0
but i still have to manaully mount the dvd with

Code:
mount /dev/cdrom /mnt/cdrom
the files are there after the above command,but i need it to mount automatically.any idea what to do?

Thanks
 
Old 06-15-2006, 06:53 AM   #2
Lordandmaker
Member
 
Registered: Sep 2005
Location: London, UK
Distribution: Debian
Posts: 258

Rep: Reputation: 39
Rather than /dev/cdrom, i'd have expected to see /dev/hdx, with the x denoting the IDE device (so /dev/hda is primary master, /dev/hdb is primary slave etc.).

Though if it works in the mount command, i'd have expected it to work in fstab.
 
Old 06-15-2006, 07:26 AM   #3
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
i changed the /dev/cdrom to /dev/hdb (the drive is primary slave),but still no luck!any other ideas?i'm setting this up for a client and he won't be able to mount the dvdrom every time,but he really needs to access the dvd drive....thanks
 
Old 06-15-2006, 08:19 AM   #4
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
ok,i've even tried adding the mount command in /etc/rc.local,but still no luck.is there anything i must change somewehere else maybe,like some place in autofs's configuration files maybe?I know that my old Mandrake system used to mount cdroms automatically perfectly,without me changing anything,so i'm sure there's a way to do this,any help would really be appreciated.cheers
 
Old 06-15-2006, 08:48 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Check if Fedora 4 uses udev.

/dev/cdrom /mnt/cdrom auto ro,auto,user,exec 0 0

The first auto in your fstab line means to automatically select the filesystem type.
The second means to mount it when you boot up. Using "noauto" is normal for a dvd, because there may not be a dvd in the drive when booting up.

Code:
/dev/cdrom           /media/cdrom         subfs noauto,fs=cdfss,ro,procuid,nosuid,nodev,exec,iocharset=utf8 0 0
This is how mine is listed in the fstab file.

Your mileage may vary. For reference, here are my /etc/udev.d/65-cdrom.rules.
Code:
# cdrom links generated by YaST2
#
SUBSYSTEM=="block", ENV{ID_PATH}=="pci-0000:00:02.2-usb-0:1:1.0-scsi-0:0:0:0", SYSFS{removable}=="1", SYMLINK+="dvdram cdrom dvd"
SUBSYSTEM=="block", ENV{ID_PATH}=="pci-0000:00:08.0-ide-1:0", SYSFS{removable}=="1", SYMLINK+="cdrecorder"

Last edited by jschiwal; 06-15-2006 at 08:57 AM.
 
Old 06-19-2006, 01:49 AM   #6
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
Thanks for the reply,but I'm not to sure what udev does?i'll do some reading and try to figure out.I know that it's normal to specify noauto for dvdroms,but i want it to automount when dvd is inserted,and i thought that's a requirement for that to happen?i guess i'm just missing something somewhere,but it is possible to have the dvdrom function this way in fedora core am i right?
 
Old 06-19-2006, 05:19 PM   #7
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
Quote:
Originally Posted by baddah
I'm not to sure what udev does?i'll do some reading and try to figure out.
Udev dynamically creates and deletes device nodes based on the current system configuration. So, for example, when you plug a USB thumb drive into your system, udev will create /dev/sda1 (or whatever) and delete it when you remove the drive. For purposes of this question, the relevant feature of udev is the ability to run an arbitrary script when a device node is created. I played around with this in Slackware a while back, but no longer need it with Kubuntu. I wouldn't recommend this method, but it works in a pinch.

Quote:
I know that it's normal to specify noauto for dvdroms,but i want it to automount when dvd is inserted,and i thought that's a requirement for that to happen?
Let me make this crystal clear: /etc/fstab has absolutely nothing to do with setting up the kind of auto-run functionality you're talking about. The auto/noauto options only apply at boot or when 'mount -a' command is issued. For your purposes, it makes no difference whether the drive is set for to auto or noauto.

On modern Linux distributions, the standard way to implement auto-run functionality is using HAL and D-BUS in conjunction with a volume manager like ivman or gnome-volume-manager. Basically, HAL maintains a dynamic list of devices that are attached to the system and their properties. When this list changes, it uses D-BUS to send a message to the volume manager, which then takes appropriate action. So, when you insert a DVD, HAL changes the hardware list and notifies and notifies D-BUS, which notifies the volume manager, which can mount the DVD and open the file browser to the appropriate directory.

I'm not a Fedora user, but I'm pretty sure HAL/D-BUS should work out or the box on recent versions of Fedora. (You can check by seeing if the lshal command gives you any output.) Given that, I'd guess that either something is broken on your system or you're not running a volume manager. You might try checking that gnome-volume-manager is running. KDE 3.5 and greater also has an integrated volume manager configurable under the peripherals->storage media section of KControl. If you're not using GNOME or KDE, then odds are you're not running a volume manager at all, which would certainly explain your problem.
 
Old 06-20-2006, 06:17 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There was an LXer post on this site about a week ago that had a link to a UDEV tutorial.

I just did a search and found it.
http://www.linuxquestions.org/questi...highlight=udev

I hope this helps!

I won't pretend that it is easy to understand. I've only made small tweeks to my setup to change the group that a device is created with. The udev rules on your system may be set up using abstractions and general rules that make it even harder to get a handle on. I've seen where inserting a key drive creates a device where the current user is the owner, which gives the owner full access. On a usb drive that I have plugged in right now, it is mounted to /dev/sda1 with these permissions:
brw-r----- 1 root disk 8, 0 2006-06-18 23:56 sda
brw-rw----+ 1 root disk 8, 1 2006-06-18 23:56 sda1
Since the group owner is "disk", I made myself a member of the "disk" group, giving me read-write access to the drive. This may not be the proper use of this group however, because it gives me the ability to do things like writing to /dev/sda as well. Being the only user, it is OK in my case.

For externel usb or firewire dvd drives, you might want to check if all the kernel modules you need are loaded. If not, I have in the past run my systems hardware display utility so that the system would be rescanned. Then I ran "depmod -a" and "mkinitrd". I don't know if this would help you or not. If your distro already has rules for cdrom or dvd drives, it could be that the udev rules are not being triggered because a needed kernel module doesn't detect it.
 
Old 06-20-2006, 08:12 AM   #9
baddah
Member
 
Registered: Feb 2006
Location: Cape Town,South Africa
Distribution: Fedora Core 8
Posts: 188

Original Poster
Rep: Reputation: 30
Thanks,I'll have a look.did n't think its gonna be this much effort to get it working...
 
Old 06-20-2006, 01:05 PM   #10
tskears
Member
 
Registered: Apr 2005
Location: Ottawa, Canada.
Distribution: PCLinuxOS.
Posts: 122

Rep: Reputation: 15
This is the line from fstab for my DVD, which automounts/autoruns DVDs:

# cdrom: SONY DVD+-RW DW-Q58A
/dev/sr0 /mnt/cdrom auto user,exec,ro,noauto,codepage=850,umask=0 0 0

Any help?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't read data DVD-R on my DVD-ROM/CD-RW combi drive bruceyboy Linux - Hardware 0 11-17-2004 11:25 AM
LG DVD-ROM DRD-8160B not recognized as DVD player on FC2 Wise_Fox Linux - Hardware 1 08-24-2004 12:13 PM
dvd-rom drive won't play movies and dvd burner won't record calble Linux - Hardware 1 08-09-2004 07:35 AM
Automount DVD and playback when DVD installed khurtwilliams Linux - Software 2 05-28-2004 01:28 PM
combo rom won't read/play dvd, no ans from dvd-howto sirpelidor Linux - Hardware 0 12-22-2003 11:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration