# Installing a CD-R/RW and CD/DVDROM

## oboypt

Ok I know this is a probably a n00b problem but I am a n00b so hopefully some of you would like to share your knowledge. I installed gentoo last week and everything is working GREAT except my cdroms. I have a CD-R/RW and a CD/DVDROM which are on hdc and hdd respectively. I was wondering if someone could tell me exactly how to get these to work and how to setup the CD-R so that I can burn CDs. If you need me to post anything just let me know and I gladly will but I don't know how to even start on this problem.

----------

## whatalotta

Hi oboypt,

From one noob to another who just went through this, here's roughly how you do it:

1) modprobe ide-scsi (if it goes to the prompt, the module is there and you are in good shape).

2) If you get an error with number 1, scsi support is either compiled in to your kernel, or hasn't been compiled as a module.  Let me know the outcome of 1 and we can go from there.

3) Next nano -w /etc/fstab.  Here are the pertinent lines from my fstab.  They will probably work for you.

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         user,noexec,noauto,ro   0 0

/dev/cdroms/cdrom1      /mnt/cdrom1     iso9660         user,noexec,noauto,ro   0 0

/dev/dvd                /mnt/dvd        iso9660         ro,user,noexec,noauto   0 0

/dev/cdaudio            /mnt/cdaudio    iso9660         ro,user,noexec,noauto   0 0

4) Save those lines in your fstab and reboot.

If all went well, you should have your cd and dvd drives available.

Let me know how that works.  If all works, and you have KDE, we'll work on getting you some icons on your desktop for the CD and DVD players.

----------

## whatalotta

oops- don't forget to add hdc=ide-scsi hdc=ide=scsi to the end of the kernel line in your /boot/grub/grub.conf file in addition to all of the above.

----------

## oboypt

 *Quote:*   

> whatalotta: 1) modprobe ide-scsi (if it goes to the prompt, the module is there and you are in good shape). 
> 
> 2) If you get an error with number 1, scsi support is either compiled in to your kernel, or hasn't been compiled as a module. Let me know the outcome of 1 and we can go from there. 
> 
> 3) Next nano -w /etc/fstab. Here are the pertinent lines from my fstab. They will probably work for you. 
> ...

 

So I ran modprobe ide-scsi and it went to the prompt.  So then I go into fstab and put in all four lines (and I'm still not really sure why I need four device lines for two devices) and then I rebooted and it shows CD-ROM(cdrom0)(notmount) and CD-ROM(cdrom1)(notmount).  So I put a CD in both drives and it still said unmounted so I double clicked on the first (cdrom0) and it says:

	mount: special device /dev/cdroms/cdrom0 does not exist

So then I double click on the 2nd (cdrom0) and it says:

	mount: special device /dev/cdroms/cdrom0 does not exist

If you want me to post anything just let me know.

----------

## whatalotta

Okay- We're in good shape.  You don't really need the cdaudio and DVD lines, I snagged those from an fstab created by Knoppix when I was having troubles.  Might be good in the future though.

You may not have the directories you need in the /mnt directory.

Here is a ls -al of mine.  You might want to mkdir to create the directories to match your fstab.

```
drummbox mnt # ls -al

total 73

drwxr-xr-x   12 root     root          288 Nov 15 19:50 .

drwxr-xr-x   18 root     root          416 Nov 14 22:46 ..

drwxr-xr-x    2 root     root           48 Nov  8 18:50 cdaudio

drwxr-xr-x    2 root     root           48 Nov 11 18:55 cdrom

drwxr-xr-x    2 root     root           48 Nov  1 10:34 cdrom1

drwxr-xr-x    2 root     root           48 Nov  8 18:50 dvd

drwx------    2 root     root           72 Nov  2 11:24 floppy

drwxr-xr-x    2 root     root           48 Nov  8 19:33 usbstick

dr-xr-xr-x    1 root     root         8192 Nov 22 04:39 windows

drwxrwxrwx    5 root     root          512 Jan  1  1970 windows1

dr-xr-xr-x    1 root     root        45056 Oct 19 02:12 windows2

drwxr--r--    3 derick   games       16384 Jan  1  1970 zip

```

So the long and short of it is, do this:

```
cd /mnt

mkdir cdrom

mkdir cdrom1

mkdir cdaudio (optional)

mkdir dvd (optional)

```

After you complete the above, you should be good to go.  Let me know how it works out.

Good luck!

----------

## oboypt

I already had those in my /mnt and I installed k3b earlier and it tried to setup the drives itself and somewhat worked because it was able to rip CDs and to write CDs but I can't access the cd drives anyway else. It seems that when k3b was setup it made two other entries in my /mnt which were cdr-rw and dvd-rom so I was guessing that those were setup correctly so I tried to map an icon on my destop to /mnt/dvd-rom and /mnt/cdr-rw but got the same error as before.  Also I hate to make matters worse but I saw that you had a /mnt/usbstick and I was wondering if you could help me figure out how to setup my usb stick or point me in the direction of a howto or something. Thanks for the help.

----------

## whatalotta

Okay-first the easy one-to setup the usbstick go to this link:

https://forums.gentoo.org/viewtopic.php?t=53537

It is a excellent HOW TO on setting up a memory stick.  I had mine working for a period of time and I killed it somehow, so maybe we will be talking on that thread in the future.

As far as your CD and DVD problem, are you using KDE?  If you are, I can walk you through setting up the icons on your desktop.  If you are using Gnome, I will be useless to you.  I have both desktops installed, and can get to Gnome, but my icons from KDE say something like unknown and have the generic Gnome icon associated with them.  If you are using Gnome, maybe we can figure this out together.

As long as your fstab entries match the /mnt entries, you should be able to access your CD and DVD.  Not sure if you have already done this, but if you haven't, make sure that the entries that k3b has made for you in the /mnt directory are what your CD and DVD point to in the /mnt line in your fstab (only thing I can think of).

Good luck!

----------

## oboypt

I'm running KDE and I haven't checked to see if the k3b settings are the same but I think they are different. I'm home on Thanksgiving break from college and left my gentoo box back at school  :Crying or Very sad:  But when I get back I'll check things out and get back to you. Thanks again for your help and once I get this working we can try to go through it on GNOME together.

----------

## whatalotta

Sounds good.  Have a good Thanksgiving and we can move on when you get back.

----------

## oboypt

Ok I'm back finally  :Very Happy:  and I think I might have this figured out but the thing is kb3 is telling me I need to load scsi-ide as a module so that everytime I start it's automatically setup and I don't have to type modprobe ide-scsi. I'm pretty sure I have to do something to /etc/modules.config or /etc/modules.d but I'm not sure which and what I'm supposed to write I would appreciate help.

----------

## whatalotta

Yes, you're right.  Open /etc/modules.autoload.d/kernel-2.4 (assuming you are using the 2.4 kernel), and simply add ide-scsi to the list.  Should work fing.

----------

## whatalotta

Yes, you're right.  Open /etc/modules.autoload.d/kernel-2.4 (assuming you are using the 2.4 kernel), and simply add ide-scsi to the list.  Should work fine.

----------

## oboypt

ok so I went into /etc/modules.autoload.d/kernel-2.4 and added ide-scsi and that works great (thanks)

Now when I start I get two desktop icons and one is a CD-ROM and one is a CD Recorder just like they are supposed to be but they both say they are unmounted and when I try to mount them or double click on them I get this error:

mount: wrong fs type, bad option, bad superblock on /dev/scsi/host0/bus0/target1/lun0/cd,

or too many mounted file systems

The reason that I used this path and the other is the same but target 0 unstead of target1, is because k3b works gereat in every aspect and it said that's where my devices are. Then I did this:

```

bash-2.05b$ ls -la /dev/ | grep cd

lr-xr-xr-x    1 root     root           13 Dec  1 05:12 cdrom -> cdroms/cdrom0

drwxr-xr-x    1 root     root            0 Dec 31  1969 cdroms

lr-xr-xr-x    1 root     root            8 Dec  1 05:12 cdrw -> /dev/hdc

lr-xr-xr-x    1 root     root            8 Dec  1 05:12 ptycd -> pty/m221

lr-xr-xr-x    1 root     root           31 Dec  1 05:12 sr0 -> scsi/host0/bus0/target0/lun0/cd

lr-xr-xr-x    1 root     root           31 Dec  1 05:12 sr1 -> scsi/host0/bus0/target1/lun0/cd

```

...and I thought that I should try sr0 and sr1 since they are pointing at these paths but sr0 and sr1 produce the same error as the full paths did.  So now I'm stuck.  Any help would be awesome. Thanks for everything so far.

----------

## foxtrot

 *oboypt wrote:*   

> 
> 
> Now when I start I get two desktop icons and one is a CD-ROM and one is a CD Recorder just like they are supposed to be but they both say they are unmounted and when I try to mount them or double click on them I get this error:
> 
> 

 

I'd try to ignore desktop icons for now. :) 

 *Quote:*   

> 
> 
> ...and I thought that I should try sr0 and sr1 since they are pointing at these paths but sr0 and sr1 produce the same error as the full paths did.  So now I'm stuck.  Any help would be awesome. Thanks for everything so far.

 

Take a look at what's actually in /dev/cdroms. When I set mine up, I had just the cdrw, but then I added the DVD-ROM later. The first trick I used to sort everything out: liberal use of "eject". Do an "eject cdrom0" and see which one spits a tray out. Do "eject cdrom1" and see what that does. What I found was that even though I have /etc/devfsd.conf set up correctly, something was assigning my /dev/dvd link to the CD-ROM and my /dev/cdrom link to the DVD-ROM. (I'm still not sure what.) One of the nice things about devfsd  is that when I rm'd the symlinks, they got instantly put back correctly.

Once you do the ejects, and you know what /dev/cdroms entry points to which device, you can follow the links down and see what devices the machine really thinks they are. 

Sorry this isn't much of a follow-the-bouncing-balls sort of answer, but hopefully it'll get you pointed in the right direction.  Unfortunately, I've not got a complete answer myself-- every time the machine boots it gets the DVD and CD-ROM drive backward; I wound up putting rm /dev/cdrom and rm /dev/dvd in my rc.local file 'cause I'm still not sure what's screwed up there.

----------

## oboypt

ok this is what I did:

```

bash-2.05b# ls -l | grep cd

lr-xr-xr-x    1 root     root           13 Dec  1 06:51 cdrom -> cdroms/cdrom0

drwxr-xr-x    1 root     root            0 Dec 31  1969 cdroms

lr-xr-xr-x    1 root     root            8 Dec  1 06:51 cdrw -> /dev/hdc

lr-xr-xr-x    1 root     root            8 Dec  1 06:51 ptycd -> pty/m221

lr-xr-xr-x    1 root     root           31 Dec  1 06:51 sr0 -> scsi/host0/bus0/target0/lun0/cd

lr-xr-xr-x    1 root     root           31 Dec  1 06:51 sr1 -> scsi/host0/bus0/target1/lun0/cd

bash-2.05b# ls -l | grep dvd

lr-xr-xr-x    1 root     root            8 Dec  1 06:51 dvdrom -> /dev/hdd

bash-2.05b# eject cdrom

eject: unable to eject, last error: Inappropriate ioctl for device

bash-2.05b# eject cdrw

eject: unable to find or open device for: `cdrw'

bash-2.05b# eject hdc

eject: unable to find or open device for: `hdc'

bash-2.05b# eject dvdrom

eject: unable to find or open device for: `dvdrom'

bash-2.05b# eject hdd

eject: unable to find or open device for: `hdd'

bash-2.05b# eject sr0

bash-2.05b# eject -v sr0

eject: device name is `sr0'

eject: expanded name is `/dev/sr0'

eject: `/dev/sr0' is a link to `/dev/scsi/host0/bus0/target0/lun0/cd'

eject: `/dev/scsi/host0/bus0/target0/lun0/cd' is not mounted

eject: `/dev/scsi/host0/bus0/target0/lun0/cd' is not a mount point

eject: `/dev/scsi/host0/bus0/target0/lun0/cd' is not a multipartition device

eject: trying to eject `/dev/scsi/host0/bus0/target0/lun0/cd' using CD-ROM eject command

eject: CD-ROM eject command succeeded

bash-2.05b# eject -v sr1

eject: device name is `sr1'

eject: expanded name is `/dev/sr1'

eject: `/dev/sr1' is a link to `/dev/scsi/host0/bus0/target1/lun0/cd'

eject: `/dev/scsi/host0/bus0/target1/lun0/cd' is not mounted

eject: `/dev/scsi/host0/bus0/target1/lun0/cd' is not a mount point

eject: `/dev/scsi/host0/bus0/target1/lun0/cd' is not a multipartition device

eject: trying to eject `/dev/scsi/host0/bus0/target1/lun0/cd' using CD-ROM eject command

eject: CD-ROM eject command succeeded

```

sr0 produced CDRW and sr1 produced DVD.

----------

## oboypt

ok I think I finally got this. I had to go in /dev/ and delete basically all of the symbolic links that came up when I did ls -l | grep cd .  Then I went into /etc/devfsd.conf and everywhere on the dvd and cdrom part that said cdroms/cdrom1 and changed it to sr1 and then restarted and to get icons on the desktop I opened up the control center through kde and then went to Desktop -> Appearence and chose to show unmounted and mounted cdroms cdrw and so forth as i wished and then it showed my two unmounted drives and when I put a cd in a drive and double click on the icon it works. (well most of the time sotimes I get an error but I think I was trying to load a blank cd which I'm sure is the problem).

----------

## oboypt

ok so I gues I jumped the gun a little I'm still having a little bit of a problem. When I put a CD that I've burned in either drive it works perfect when I put in pretty much anything else encluding audio cds I get this

```
mount: wrong fs type, bad option, bad superblock on /dev/dvd,

or too many mounted file systems
```

----------

