# Gentoo won't mount cdrom!!

## BoxDude

I can't access my cd's because gentoo says it cannot mount the cdrom drive.  How can I fix this?

/etc/fstab:

```
# /etc/fstab: static file system information.

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $

#

# noatime turns off atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail and tail freely.

# <fs>             <mountpoint>    <type>     <opts>            <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda1      /boot      ext2      noauto,noatime      1 2

/dev/hda3      /      xfs      noatime         0 1

/dev/hda2      none      swap      sw         0 0

/dev/cdroms/cdrom0   /mnt/cdrom   auto      noauto,user      0 0

#/dev/fd0      /mnt/floppy   auto      noauto         0 0

# NOTE: The next line is critical for boot!

none         /proc      proc      defaults      0 0

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink). 

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will

#  use almost no memory if not populated with files)

# Adding the following line to /etc/fstab should take care of this:

none         /dev/shm   tmpfs      defaults      0 0

```

If you need any more info just let me know, Thanks![/b]

----------

## andrewy

Your fstab looks ok, what is Gentoo's exact output?

The output of "ls /dev/cdroms/" would also help.

----------

## BoxDude

"no such file or directory"

----------

## Earthwings

hehe, did you create /mnt/cdrom?

```
mkdir /mnt/cdrom
```

----------

## BoxDude

```
mkdir: cannot create directory `/mnt/cdrom': File exists

```

then for good measure i did:

mount /mnt/cdrom

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

```

----------

## nyteryda

do you have /dev/cdroms/cdrom0 ?

I could be showing my stupidity but is the device in a differnt place depending on weather you have scsi-emulation or not? ie if its IDE and acesses as such is the device not either hdb,hdc or hdd ?

----------

## andrewy

As I said, the output of "ls /dev/cdroms/" would be helpful.

Also, what user are you running this as?

----------

## BoxDude

 *andrewy wrote:*   

> As I said, the output of "ls /dev/cdroms/" would be helpful.
> 
> Also, what user are you running this as?

 

```
ls: /dev/cdroms/: No such file or directory

```

im running as my everyday user w/ su privileges

----------

## nyteryda

also can you 

```
 dmesg | grep -e hd 
```

and print output here

please

----------

## BoxDude

```
dmesg | grep -e hd

    ide0: BM-DMA at 0xf000-0xf007, BIOS settings: hda:pio, hdb:pio

    ide1: BM-DMA at 0xf008-0xf00f, BIOS settings: hdc:pio, hdd:pio

hda: ST360021A, ATA DISK drive

hdc: CD-RW IDE5224, ATAPI CD/DVD-ROM drive

hda: max request size: 128KiB

hda: 117231408 sectors (60022 MB) w/2048KiB Cache, CHS=65535/16/63, UDMA(100)

 hda: hda1 hda2 hda3

hdc: ATAPI 52X CD-ROM CD-R/RW CD-MRW drive, 2048kB Cache, UDMA(33)

Adding 2008116k swap on /dev/hda2.  Priority:-1 extents:1

EXT3 FS on hda3, internal journal

```

----------

## nyteryda

what happens if you

```
mount /dev/hdc /mnt/cdrom
```

?

----------

## BoxDude

```
mount /dev/hdc /mnt/cdrom

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

mount: No medium found

```

Also does that when I am logged in as root.

----------

## nyteryda

ok first of i think you need a disk in  :Smile: 

second i think you can use /dev/hdc in your fstab instead of /dev/cdroms/cdrom0

try changing

```
/dev/cdroms/cdrom0   /mnt/cdrom   auto      noauto,user      0 0 
```

to:

```
/dev/hdc  /mnt/cdrom   auto      noauto,user      0 0 
```

----------

## BoxDude

OK, now I think that works.  Now Gnome says I dont have necessary permissions to view the contents (under my everyday user), so how can I go about fixing that?

----------

## nyteryda

under your normal user you don't have permission to view the conent ?

if thats the case then it will be a permission problem

do a 

```
  ls -l 
```

 in /dev 

and tell me what permissions the /dev/hdc has

also do the same in /mnt and tell me what cdrom has

----------

## nyteryda

Just a thought 

 You do had DEVFS compiled into your kernel ? don't you ?

      filesystem => /dev file system support (EXPERIMENTAL)

Because i was under the impression  that it makes the devices and sets up the correct permissions for you?

----------

## BoxDude

Haha, no I don't have support for that right now; I get the error message that I need it on every boot.

for /mnt:

```
bash-2.05b$ ls -l

total 8

drwx------  2 root root 4096 Apr 12 21:28 cdrom

drwx------  2 root root 4096 Apr 12 21:28 floppy
```

for /dev:

```
brw-------  1 jordan cdrom   22,   0 May 27 00:30 hdc
```

(jordan is my user name)

----------

## nyteryda

You need to recomplile your kernel with it in... I think it will solve all your problems and then you can put your /etc/fstab back to how it was

(I think that it is required for gentoo anyway (or at least thats what it says in the install guide  :Razz:  so you should probably put that in or you will get other problems later on...)

Oh and you probably want to set execute permisions on hdc

as su

```
chmod 555 /dev/hdc
```

although i suspect dev filesystem will sort it all out for you. and you may want to try that first...

----------

## andrewy

even if the chmod command works, you really need devfs.

It's possible to get by without it, but it requires extra work, and there's no reason not to use it.

----------

## BoxDude

OK, thanks alot.   :Very Happy: 

----------

## IronMan

I'm getting a similar problem, but a little different:

```

ironring# dmesg | grep -e hd

Kernel command line: root=/dev/hda5 hdc=ide-scsi acpi=off

ide_setup: hdc=ide-scsi

    ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:DMA

    ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio

hda: MAXTOR 4K040H2, ATA DISK drive

hdb: ST33232A, ATA DISK drive

hdc: CD-RW 52X24, ATAPI CD/DVD-ROM drive

hda: max request size: 128KiB

hda: 78198750 sectors (40037 MB) w/2000KiB Cache, CHS=65535/16/63, UDMA(33)

hdb: max request size: 128KiB

hdb: 6303024 sectors (3227 MB) w/128KiB Cache, CHS=6253/16/63, UDMA(33)

Adding 498004k swap on /dev/hda2.  Priority:-1 extents:1

EXT3 FS on hda5, internal journal

ironring# ls /dev/hd*

/dev/hda  /dev/hda1  /dev/hda2  /dev/hda3  /dev/hda5  /dev/hdb  /dev/hdb1

```

So it looks like I the cdrom is on hdbc, but there is no hdbc in /dev. Any ideas?

-Marc

----------

## andrewy

No such thing as hdbc, your CD is on /dev/hdc

----------

## IronMan

Sorry, I meant hdc. In any case, that one's not there. either.

----------

## andrewy

What about scd?, where ? is any number?

----------

## IronMan

No scd? in /dev. What I don't understand, maybe because I'm still a n00b, is why dmesg shows my CD drive at hdc, yet there's no hdc in /dev.

----------

## andrewy

Do you have DevFS compiled into your kernel?

that could be the problem.

----------

## IronMan

I don't know about devfs. I had my son help with the compilation. How would I check?

----------

## andrewy

Give me the output of this command:

cp /proc/config.gz . && gunzip config.gz && cat config | grep DEVFS_FS

----------

## IronMan

 *Quote:*   

> 
> 
> Give me the output of this command:
> 
> cp /proc/config.gz . && gunzip config.gz && cat config | grep DEVFS_FS
> ...

 

There is no config.gz in /proc, nor anywhere else. However, from another thread I got this:

```
ironring temp # grep DEVFS /usr/src/linux/.config

CONFIG_DEVFS_FS=y

CONFIG_DEVFS_MOUNT=y

# CONFIG_DEVFS_DEBUG is not set

```

It seems as if I have devfs from this, but maybe not?

----------

## Accident

I was having the same problem with mounting my cdrom.  The /dev/cdroms/cdrom0 device was not being created.  I confirmed that DEVFS was compiled into the kernel.  After reading through these posts I decided to try removing the hdb=ide-scsi from the grub.conf file and that fixed the problem.  It remains to be seen if I created any different problems by removing that though.

----------

## really

 *IronMan wrote:*   

>  *Quote:*   
> 
> Give me the output of this command:
> 
> cp /proc/config.gz . && gunzip config.gz && cat config | grep DEVFS_FS
> ...

 you should try mount /dev/cdroms/cdrom0 /mnt/cdrom

otherwise

try mount /dev/cdrom /mnt/cdrom

if this solves things for you, ok, but you should still read up on the basics.

----------

## IronMan

OK, my problem is solved, thanks to you folks and my son. Apparently he initially set me up with SCSI emulation to let me write to the CD. But the ide-scsi module was not loaded. Doing a modprobe ide-scsi loaded the module and devfs added the /dev/cdroms/cdrom0.

Then I changed /etc/fstab to have /mnt/cdrom point to the /dev/cdrom... and I'm back in business.

So thanks to those who helped.

As to reading up on the basics, I do try to read up as I go along. Most times I come out OK, but I couldn't find a "Device Basics" in the docs. I now see DEVFS, but I didn't know a DEVFS from a hole in the ground before.

So if anyone has some recommended basics to read up on, I wouldn't mind hearing about those. You know, things I may run into from time to time.

Thanks again!

--Marc

----------

