Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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)
/dev/cdrom /mnt/cdrom auto ro,auto,user,exec 0 0
but i still have to manaully mount the dvd with
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?
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
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
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.
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?
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.
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.
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.