# Failing to mount both DVD-RAM and CD-ROM Drives

## gpeangel

I'm having trouble getting Linux to recognize my DVD-RAM and CD-ROM drives.  The commands I've executed are as follows:

DVD-RAM:

```
# mount /dev/hdc /mnt/dvd/

mount: you must specify the filesystem type

# mount -t auto /dev/hdc /mnt/dvd/

mount: you must specify the filesystem type

```

CD-ROM:

```
# mount /dev/hdd /mnt/cdrom/

mount: you must specify the filesystem type

# mount -t iso9660 /dev/hdd /mnt/cdrom

mount: special device /dev/hdd does not exist

```

The kernel seems to recognize the drives at boot:

```
# dmesg | grep CD

hdc: MATSHITADVD-RAM LF-D521, ATAPI CD/DVD-ROM drive

hdd: CDU5211, ATAPI CD/DVD-ROM drive

  Type:   CD-ROM                             ANSI SCSI revision: 02

  Vendor: SONY      Model: CD-ROM CDU5211    Rev: YYS7

  Type:   CD-ROM                             ANSI SCSI revision: 02
```

Below are the relevent entries from fstab:

```
/dev/hda1               /boot           ext3            noauto,noatime          1 2

/dev/hda2               none            swap            sw                      0 0

/dev/hda3               /               ext3            noatime                 0 1

/dev/hda4               /home           ext3            noatime                 0 1

/dev/hdb1               /archives       ext3            noatime                 0 1

/dev/hdc                /mnt/dvd        auto            user,noauto,ro          0 0

/dev/hdd                /mnt/cdrom      iso9660         noauto,ro,user          0 0

none                    /proc           proc            defaults                0 0

none                    /dev/shm        tmpfs           defaults                0 0
```

I've confirmed that /dev support is compiled into the kernel.  On boot, I pass the following parameters to the kernel (via grub):

```
kernel (hd0,0)/boot/kernel-2.4.20-gentoo-r6 root=/dev/hda3 hdc=ide-scsi hdd=ide-scsi
```

KDE hasn't been able to mount the drives either.  Searching the forum yielded a few obscure suggestions, but no help to my situation.  What am I missing in the config?

Many thanks,

Greg

----------

## MasterX

In /dev there should be the folder cdroms. In that folder there should be two files: cdrom0, cdrom1.

These are the entries that you should have (I copy my fstab)  in the fstab. i.e.,

```

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

/dev/sr0                /mnt/cdrom1     iso9660         noauto,ro,user          0 0

```

Since you have enabled scsi emulation for your dvd and cdrw, the files /dev/sr0 and /dev/sr1 are also created (I have enabled scsi emulation only for the cdrw). You can use these instead of /dev/cdroms/cdrom0(1).

One last thing. The number 0 or 1 indicates which device is master and which one is slave. The Master device takes 0 and the slave takes 1.

----------

## gpeangel

 *MasterX wrote:*   

> In /dev there should be the folder cdroms. In that folder there should be two files: cdrom0, cdrom1.
> 
> These are the entries that you should have (I copy my fstab)  in the fstab. i.e.,
> 
> ```
> ...

 

Well, at least I'm discovering something new by what ISN'T there.

```
# ls -al /dev/cdroms/

total 0

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

drwxr-xr-x    1 root     root            0 Dec 31  1969 ..
```

There isn't a "/dev/cdroms/cdrom0" or "/dev/cdroms/cdrom1" entry under /dev/cdroms.  Neither are there any "sr" entries:

```
# ls -al /dev/sr*

ls: /dev/sr*: No such file or directory
```

You point out something I hadn't noticed.  The CD isn't a CDRW, just a ROM so I don't need the scsi emulation as a boot parameter for /dev/hdd.

How are these entries created?  Can they be created manually?

Greg

----------

## MasterX

OK, my mistake. I moved a step ahead.

There is a file devfsd.conf in /etc

Uncomment the lines which talk about /dev/cdrom and /dev/dvd.

That should make a symbolic link for your dvd and cdrom.

Then you should run a command as a root. I think it is devfsd, but I do not know the syntax. So, what I do it to reboot. Not the best choice, but it works

----------

## gpeangel

 *MasterX wrote:*   

> OK, my mistake. I moved a step ahead.
> 
> There is a file devfsd.conf in /etc
> 
> Uncomment the lines which talk about /dev/cdrom and /dev/dvd.
> ...

 

This still hasn't solved my problem.  I've changed fstab to contain...

```
/dev/cdroms/cdrom0      /mnt/dvd        auto            user,noauto,ro          0 0

/dev/cdroms/cdrom1      /mnt/cdrom      iso9660         noauto,ro,user          0 0
```

...creating the needed links manually, for example...

```
# ls -al /dev/cdroms/cdrom1

lr-xr-xr-x    1 root     root            8 Sep  6 10:31 /dev/cdroms/cdrom1 -> /dev/hdd
```

Yet:

```
# df -h /dev/cdroms/cdrom1

df: `/dev/cdroms/cdrom1': No such file or directory
```

...and...

```
# mount /mnt/cdrom/

mount: special device /dev/cdroms/cdrom1 does not exist
```

I also tried matching the settings to an existing Red Hat 7.1 installation (has a CD-ROM, no DVD) but still no success.  It seems I must be missing some configuration issue, just cannot pin it down.

Greg

----------

## MasterX

Well, a shot in the dark

The file /dev/cdroms/cdrom0(1) is a simlink to 

/dev/ide/host0/bus1/target0/lun0/cd

Do you havd these folders .. 

If you do then you can create these two simlinks, i.e., /dev/cdroms/cdrom0

----------

## gpeangel

 *MasterX wrote:*   

> 
> 
> Do you havd these folders .. 
> 
> If you do then you can create these two simlinks, i.e., /dev/cdroms/cdrom0

 

Interesting.  I don't have these folders.  How do these folders get created?  Did something fail on install?

Thanks,

Greg

----------

## samsnake

Was in the same situation a few minutes ago - I had SCSI-emulation turned on, and a "modprobe ide-scsi" made those /dev/cdroms/* entries appear.  :Smile: 

----------

## MasterX

 *samsnake wrote:*   

> Was in the same situation a few minutes ago - I had SCSI-emulation turned on, and a "modprobe ide-scsi" made those /dev/cdroms/* entries appear. 

 

Greg, please tell me that you have scsi emulation TURNED ON

Or that you removed the ide-scsi entry from grub.

----------

## gpeangel

I do have scsi emulation "turned on", if you mean via the kernel.  Here are what I believe to be the relevant settings as they have been compiled:

```
ATA/IDE/MFM/RLL support  --->

    IDE, ATA and ATAPI Block devices  --->

        <*>  Include IDE/ATAPI CDROM support

        <*>  SCSI emulation support

SCSI support  --->

    <*>  SCSI CD-ROM support

    <*>  SCSI generic support
```

The modprobe command shows:

```
# modprobe ide-scsi

modprobe: Can't locate module ide-scsi
```

I suppose this is to be expected if I've compiled the support into the kernel.

What I have in grub is as follows:

```
title=genkernel

root (hd0,0)

kernel (hd0,0)/boot/kernel-2.4.20-gentoo-r6 root=/dev/hda3 hdc=ide-scsi hdd=ide-scsi

initrd (hd0,0)/boot/initrd-2.4.20-gentoo-r6

```

I'll try removing these, however, previous threads seemed to suggest these had to be included.

Thanks,

Greg[/code]

----------

## gpeangel

Sweet.

Changing the grub line:

```
kernel (hd0,0)/boot/kernel-2.4.20-gentoo-r6 root=/dev/hda3 hdc=ide-scsi hdd=ide-scsi 
```

...to...

```
kernel (hd0,0)/boot/kernel-2.4.20-gentoo-r6 root=/dev/hda3
```

and rebooting generated the following:

```

/dev/ide/host0/bus1/target0/lun0/cd
```

I can now mount the CD-ROM...

```
# mount -t iso9660 /dev/cdroms/cdrom1 /mnt/cdrom

mount: block device /dev/cdroms/cdrom1 is write-protected, mounting read-only

mount: No medium found
```

...(doing this remotely so there's no disk in the CD-ROM), but I'm still working on the DVD.

```
# mount -t auto /dev/cdroms/cdrom0 /mnt/dvd

mount: you must specify the filesystem type
```

I'm definitely farther than I was before.

Thanks,

Greg

----------

## gpeangel

Cool.  I do have a DVD-RAM disk currently in the DVD drive.  I can show the following:

```
# fdisk /dev/hdc

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/hdc: 4580 MB, 4580767744 bytes

255 heads, 63 sectors/track, 556 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes
```

4580 MB looks about right.  I need to do some more reading, but I believe I need to format the DVD-RAM disk before I use it.  Any suggestions?  Insights?

C'ya,

Greg

----------

