Mounting CDs/DVDs via HAL under a specific mountpoint?
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[SOLVED] Mounting CDs/DVDs via HAL under a specific mountpoint?
Hello again. I'm trying to make HAL mount my CD and DVD discs under a specific mountpoint (such as "/media/optical_disc", rather than "/media/<disc_label>". I understand from the Arch Linux Wiki it's possible for the media which gets recognized by it's uuid.
If someone could help me do it with optical disks, I'd be very grateful.
Thanks in advance!
Last edited by Wintershade; 04-07-2010 at 03:29 PM.
Reason: solved
Whenever I connect the ipod thing or put a data disc in the tray and close it, gnome-volume-manager, working over HAL, mounts them in the places specified in the fstab.
The only think is you have to know the device names: in my case, the optical discs are /dev/sr0. You should check yours and use it accordingly.
As far as I understand it, you shouldn't use /media for that, but /mnt instead.
If you really need /media, which I'm not sure would be good practice, or even work, you could make a symbolic link there pointing to /mnt/cdrom, for instance.
user@host:path$ cd /mnt
user@host:path$ # create your mount point folders
user@host:path$ sudo mkdir mntPnt1
user@host:path$ ...
user@host:path$ sudo mkdir mntPnt99
user@host:path$ # if they will not be mounted all the time, you might
user@host:path$ # forget why these folders exist ... especially when you
user@host:path$ # put them somewhere other than /mnt
user@host:path$ ...
user@host:path$ sudo touch mntPnt1/_THIS_IS_A_MOUNT_POINT_.txt
user@host:path$ ...
user@host:path$ sudo mkdir mntPnt99/_THIS_IS_A_MOUNT_POINT_.txt
In really complex situations, I even put remarks into the text file to explain what I use each mount point for.
Another aspect of this trick shows up if the mount fails for whatever reason. Any time I list the folder content and see this file (and maybe
others) I know immediately that something went haywire during the mount
request or there was some other forced umount.
Hi everyone... sorry for the delay and for resurrecting the old topic. I've been away for a while, and now I've managed to get what I want.
I've created a new HAL policy file (in /etc/hal/fdi/policy on Arch Linux, elsewhere on other distros TTBOMK) called 20-disc.fdi, which contains the follwing configuration:
From now on, every optical disc I insert into my computer will be mounted under /media/disc. Voila, desired effect achieved!
Thanks everyone for the help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.