SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-03-13 21:24:08

olliraa
Member
Registered: 2009-02-28
Posts: 16

How to set the Cdrom not locked?

How can I set the cdrom NOT to be locked, so that I can get the disc out anytime I push the eject button? I added "options cdrom lockdoor=0" (without quotes)  to /etc/modprobe.d/options, but when I press the eject button, nothing happens.

I have my crunchbang on a htpc, so this "feature" is kinda crucial wink

Any clues?

Offline

Be excellent to each other!

#2 2009-03-13 23:27:16

flicck
#! Member
Registered: 2008-12-26
Posts: 88

Re: How to set the Cdrom not locked?

This ( somewhat old, but perhaps still relevant ) thread from the Ubuntu forums MAY help you out. Read it all the way through ( not long, just a few posts ) before trying anything, then try one thing at a time, hope it helps :

http://ubuntuforums.org/showthread.php?t=30509

Offline

#3 2009-03-15 11:04:40

olliraa
Member
Registered: 2009-02-28
Posts: 16

Re: How to set the Cdrom not locked?

Unfortunately is doesn't help. This is kinda frustrating, because everything really complex stuff (dvb-t etc etc) with my htpc is working and now this sad

I can eject the cdrom my running the pcmanfm and clicking eject, when the cdrom IS mounted. I can also open the cdrom by pressing the eject button when the cdrom IS NOT mounted. This problem also relates to (at least t my knowledge) the fact that cdrom is NOT automounted if I insert a disc in. So it seems a problem with mounting or "not having enough priviledges to unmount/mount" the drive.

Any clues?

Last edited by olliraa (2009-03-15 11:12:31)

Offline

#4 2009-03-15 13:28:08

flicck
#! Member
Registered: 2008-12-26
Posts: 88

Re: How to set the Cdrom not locked?

In days of old, I'd have suggested looking at /etc/fstab and making sure any cd or dvd devices were properly listed, but nowadays the HAL daemon ( Hardware Abstraction Layer ) is supposed to automagically take care of all that.

A possibility from the Arch Linux wiki :

Inserted CD/DVD doesn't get recognized by HAL

If inserted CDs/DVDs are not recognized by HAL (no icon on the desktop), check /etc/fstab and remove the lines for the optical drives.

If that does not work, it may be because your device is not "checked" for automount by HAL. I am not sure why but you may have a file under /etc/hal/fdi/information/media-check-disable-storage_model_$YOUR_DEVICE.fdi which should have a content similar to:

<deviceinfo version="0.2">
  <device>
    <match key="info.udi" string="/org/freedesktop/Hal/devices/storage_model_DV$
      <merge key="storage.media_check_enabled" type="bool">false</merge>
    </match>
  </device>
</deviceinfo>

If the key is set to false (it was in my case), all you have to do is to change the value of the key to true.

Last edited by flicck (2009-03-15 13:28:35)

Offline

#5 2009-03-15 14:37:54

olliraa
Member
Registered: 2009-02-28
Posts: 16

Re: How to set the Cdrom not locked?

If inserted CDs/DVDs are not recognized by HAL (no icon on the desktop), check /etc/fstab and remove the lines for the optical drives.

Thanks, that helped with the "locking problem" smile Now I can open the drive anytime smile

But, now the next problem... For certain reasons I have to have a symlink for cdrom to /dev/dvd. Iused to to create the symlink in the autostart.sh like this:

sudo -u root ln -s /media/cdrom0 /dev/dvd &

...but now as the cdrom is not mounted automatically by fstab my script doesn't work. I figured that I have to make an udev-rule, but as I read some ubuntu docs they tols me to use the 10-local.rules -file. Unfortunately there's no such file. I then created it, but no avail. The content of the file is the following:

KERNEL=="dvd", SYMLINK+="cdrom cdrom0"

I really don't know if my syntax is correct.

Is there something Crunchbang specific considering the udev rules?

Now we're pretty close to the solution smile

*edit*
It still seems no to automount the cdrom and unfortunately there's no such file as this:

/etc/hal/fdi/information/media-check-disable-storage_model_$YOUR_DEVICE.fdi

but of course I can create it smile Unfortunately the archwiki doesn't say what $YOUR_DEVICE actually means.
*edit*

Last edited by olliraa (2009-03-15 14:49:32)

Offline

#6 2009-03-15 17:33:47

olliraa
Member
Registered: 2009-02-28
Posts: 16

Re: How to set the Cdrom not locked?

SUCCESS!! I had an stupid mistake in the udev.rule, now it works smile Rule is like this

KERNEL=="sr0", SYMLINK+="cdrom cdrom0 dvd"

1. I can eject the drive anytime smile
2. It is automounted (accessible) smile

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo