LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-04-2005, 09:24 PM   #1
QzarBaron
Member
 
Registered: Oct 2003
Distribution: Ubuntu 4.10
Posts: 76

Rep: Reputation: 15
Help setting up my CDRW and my DVD Rom drive


Ok here is the deal. I know my CDRW drive is /dev/hdc and my DVD drive is /dev/hdd. The problem is my cdrom symlink is set to /dev/hdd and my dvd symlink is set to /dev/hdd also. I tried creating a link called cdrw that would point to /dev/hdc and it would get erased every time I rebooted(and it also wouldn't work)

My fstab looks like this

Code:
/dev/hda7        swap             swap        defaults                0   0
/dev/hda5        /                ext3        defaults                1   1
/dev/hda6        /home            ext3        defaults                1   2
/dev/hda2        /mnt/win-c       ntfs        auto,ro,umask=000       1   0
/dev/hda8        /mnt/shared      vfat        auto,rw,umask=000       1   0
/dev/cdrw        /mnt/cdrom       iso9660     noauto,user,ro,unhide   0   0
/dev/dvd         /mnt/dvd         iso9600     noauto,user,ro,unhide   0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner            0   0
devpts           /dev/pts         devpts      gid=5,mode=620          0   0
proc             /proc            proc        defaults                0   0
right now oddly enough I have 3 devices... cdrom(which points to my dvd drive), cdrw(which gives me an error which I will post at the end), and dvd(which points to nothing)

it's really odd.

the error I get when I try to run cdrw is:

mount: wrong fs type, bad option, bad supermount on /dev/cdrw... etc.

Any ideas?
 
Old 02-04-2005, 11:11 PM   #2
tw001_tw
Member
 
Registered: Mar 2003
Location: St. Louis, MO
Distribution: kubuntu-current
Posts: 551
Blog Entries: 4

Rep: Reputation: 31
You know, I've always wondered why I get a /dev/cdrom after an install.

But I change my fstab to:
/dev/hdc - > /mnt/dvdburner
&
/dev/hdd -> /mnt/dvd
(i.e. - I don't use /dev/cdrom or /dev/dvd )

Maybe theres an advantage I am not getting from doing it this way. If there is,
I'de like to know. But so far, it works for me.
-tw
 
Old 02-05-2005, 12:09 PM   #3
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
Hey guys. Are you using a 2.6.x kernel? Are you using UDEV? If so, you'll see this happen. The last optical drive gets the cdrom symlink. This is due to /etc/udev/scripts/make_extra_nodes.sh wqhich looks something likie this:

Code:
# If we can, add a default /dev/cdrom and /dev/dvd link:
#if /bin/ls -l /dev | grep -w cdrom 1> /dev/null 2> /dev/null ; then
#  ( cd $udev_root
#    /bin/ls -l * | grep -w cdrom | cut -f 2 -d : | cut -f 2 -d ' ' | while read optical_device ; do
#      # It has to be a cdrom.  Last one wins.
#      ln -sf $optical_device cdrom
#      # If it's a DVD, set that link as well:
#      if grep -i dvd /proc/ide/$optical_device/model 1> /dev/null 2> /dev/null ; then
#        ln -sf $optical_device dvd
#      fi
#    done
#    unset optical_device
#  )
#fi
Note that I have it all commented out. If you want solid naming of your devices, use udev rules. Create a file /etc/udev/rules.d/local.rules . You can google for how to write them, but here is mine if you want something to give you an idea how it's done: (hope it doesn't wrap. If it does, there are four lines, two commented out, and two that start with "BUS=")


Code:
# Optical Devices
# Added by Shilo 09/12/2004
BUS="ide", KERNEL="hdc", NAME="%k", SYMLINK="dvd dvdrw cdroms/dvdrw cdroms/cdrom0", GROUP="cdrom", MODE="0660"
BUS="ide", KERNEL="hdd", NAME="%k", SYMLINK="cdrom dvdrom cdroms/dvdrom cdroms/cdrom1", GROUP="cdrom", MODE="0660"
A quick guide:

BUS="ide" "Hey, Mr. UDEV. If you come across an IDE drive..."

KERNEL="hdc" "...who's kernel name is hdc..."

NAME="%k" "... I want you to make a device and name it the same as the kernel (/dev/hdc)."

SYMLINK="dvd dvdrw cdroms/dvdrw cdroms/cdrom0" "Please also make four symlinks to /dev/hdc. Call them /dev/dvd, /dev/dvdrw, /dev/cdroms/dvdrw, and /dev/cdroms/cdrom0."

GROUP="cdrom" "When you make this device and symlinks, please put them in the cdrom group..."

MODE="0660" "... and give them permissions 0660 (same as 660)."

You'll see that I have two optical drives. With my rule, each are assigned the symlinks that I want. As a note, I chose the symlinks that I did in order to make set up of some programs easier. Totem, gxine, most cd-players, etc look for things like /dev/dvd or /dev/cdrom by default. The old way of doing things was to manually make a symlink in /dev to the appropriate device. If you do that with udev, the symlinks are wiped out at reboot. Also, I like using the cdrom group with 660 permissions. Then, when I use k3b, I set it up to use a burning group, called cdrom. Just make sure that the users you want using the optical drives are in the cdrom group.

Last edited by shilo; 02-06-2005 at 01:50 AM.
 
Old 02-05-2005, 11:03 PM   #4
tw001_tw
Member
 
Registered: Mar 2003
Location: St. Louis, MO
Distribution: kubuntu-current
Posts: 551
Blog Entries: 4

Rep: Reputation: 31
shilo comes through again.
Great explination - thanks

-tw
 
  


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
recommend CDRW/DVD ROM for MDK10.1? AlaskaLass Mandriva 3 03-07-2005 12:50 PM
cdrw+DVD rom in mandrake-10.1? greythorne Mandriva 2 12-13-2004 01:45 AM
Cdrw/dvd rom SouthernGal Linux - Laptop and Netbook 14 05-03-2004 08:35 AM
newbie: how to install dvd/cdrw combo rom? sirpelidor Linux - Hardware 4 11-16-2003 06:02 AM
cdrw/dvd rom is missing riddlebox80 Linux - Hardware 1 05-04-2003 04:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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