LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cant open cd drive(after mounted) after changing fstab (https://www.linuxquestions.org/questions/linux-newbie-8/cant-open-cd-drive-after-mounted-after-changing-fstab-929281/)

Adol 02-14-2012 07:59 AM

cant open cd drive(after mounted) after changing fstab
 
Hello,

I changed my fstab so that I can mount my cds and dvds but now I cant open the cd drive without manualy unmounting from the command line.

Here is my fstab:

Code:

/dev/sda1              /boot          ext2            noatime        1 2
/dev/sda2              /              ext4            noatime        0 1
/dev/sda3              none            swap            sw              0 0
/dev/sda4              /home          ext4            noatime        0 0
/dev/mapper/storage-working    /bigdrive      xfs    noatime        0 0
/dev/sr0                /media/dvdrw    auto            auto,user,exec  0 0
/dev/sr1                /media/blueray  auto            auto,user,exec  0 0
proc                    /proc          proc            defaults        0 0
shm                    /dev/shm        tmpfs          nodev,nosuid,noexec    0 0

sr0 and sr1 are my drives.

Before, I didnt have them in my fstab but could access them with my programs(handbreak a video ripping program) but I couldnt browse the drives when a dvd was inserted.

Now I can browse the drives and access them with my programs but it wont auto unmount when I press the eject button on the drives.

Am I missing an option in my fstab? Or do I need to do something with udev?

Im using gentoo.

Thank you

amani 02-14-2012 09:24 AM

eject /dev/sr0


fstab is not needed
AFAIK, in gentoo there are no defaults
so you may need scripts + udev rules
read about udev rules
http://www.reactivated.net/writing_udev_rules.html

https://wiki.archlinux.org/index.php/Udev has details

A script: https://help.ubuntu.com/community/EjectCDLauncher

Adol 02-15-2012 06:01 AM

Quote:

Originally Posted by amani (Post 4602120)
eject /dev/sr0


fstab is not needed
AFAIK, in gentoo there are no defaults
so you may need scripts + udev rules
read about udev rules
http://www.reactivated.net/writing_udev_rules.html

https://wiki.archlinux.org/index.php/Udev has details

A script: https://help.ubuntu.com/community/EjectCDLauncher

Thank you. eject /dev/sr0 works.

I want to be able to eject the cd without running a script. I want to press the button on the cd and then have it unmount and eject.

Is that done with the udev rule? I see the script is to unmount it but it looks like its something I need to run every time.


All times are GMT -5. The time now is 11:41 AM.