# [solved] special device /dev/sr0 does not exist

## legolie

Hi

I'm quite new to Gentoo (since sunday actually), but I used ubuntu for many years.

Also, I'm French so I may not use idiomatic expressions  :Laughing: 

So, I'm trying to mount a cdrom and

```
# mount /dev/sr0 /mnt/cdrom/

mount: special device /dev/sr0 does not exist

```

```
# lspci

00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)

00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 02)

00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 05)

00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)

00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)

00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)

00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)

00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)

00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)

00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 05)

00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)

00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)

01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [NVS 3100M] (rev a2)

01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)

03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)

04:00.0 SD Host controller: Ricoh Co Ltd MMC/SD Host Controller (rev 03)

04:00.4 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 PCIe IEEE 1394 Controller (rev 03)

3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)

3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)

3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)

3f:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)

3f:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)

3f:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)
```

dmesg

http://perso.ens-lyon.fr/elie.gedeon/logdmesg

kernel config

http://perso.ens-lyon.fr/elie.gedeon/config

Any idea?

Regards

ElieLast edited by legolie on Wed Apr 11, 2012 4:11 pm; edited 1 time in total

----------

## gorkypl

Is sr_mod loaded? (lsmod)

----------

## legolie

yes it is

```
# lsmod | grep sr_mod     

sr_mod                 11983  0 

cdrom                  28930  1 sr_mod

```

----------

## BillWho

legolie,

For a long shot try setting CONFIG_IDE

----------

## gorkypl

 *BillWho wrote:*   

> legolie,
> 
> For a long shot try setting CONFIG_IDE

 

Never do this! It will make things worse, this interface is so obsolete it should be prohibited.

I have checked your kernel config - you need to set CONFIG_ATA_SFF=y, CONFIG_ATA_BMDMA=y and then select module for your cdrom controller (CONFIG_ATA_PIIX probably).

----------

## legolie

 *Quote:*   

> I have checked your kernel config - you need to set CONFIG_ATA_SFF=y, CONFIG_ATA_BMDMA=y and then select module for your cdrom controller (CONFIG_ATA_PIIX probably).

 

It didn't work

No change on dmesg

----------

## BillWho

legolie,

The only difference I see comparing my .config is CONFIG_SCSI_CONSTANTS is not set on yours. Mine is CONFIG_SCSI_CONSTANTS=y

This is my dmesg:

```
bill@gentoo-gateway /usr/src/linux $ dmesg|grep sr0

[    3.988396] sr0: scsi3-mmc drive: 40x/40x writer dvd-ram cd/rw xa/form2 cdda tray

[    3.988619] sr 1:0:0:0: Attached scsi CD-ROM sr0

```

Not sure if that will make a difference, but   :Question: 

----------

## gorkypl

You need to experiment with options under 'SFF Controlers with custom DMA interface in kernel 'Serial ATA and Parallel ATA drivers' menu or find how it is exactly controlled (manufacturer's page may be a good source). 

Maybe your CDROM uses a SATA to PATA bridge or is purely PATA-driven? You can even try building all SFF modules.

As a fallback option you may also try CONFIG_ATA_GENERIC.

----------

## legolie

I will try

As far as I know, my cdrom drive is sata i guess (Dell Lattitude E6410) but maybe I'm wrong

----------

## gorkypl

If you have any livecd you can check which driver it uses (lspci -vv)

You can also try asking this guy: http://www.cs.bham.ac.uk/~axs/laptop/

----------

## legolie

Bad news + Good news

Bad news :

starting on a gentoo usb key didn't change anything : /dev/sr0 was inexistant

Good news :

Activating in Bios "ATA emulation" for sata controller instead of AHCI solve the problem

Question:

Is it usefull for documentation purpose to leave my kernel configuration and my dmesg, since it isn't related to the problem?

Thanks to every body!

----------

## VoidMage

Given that at this time you haven't really solved it ('Bios "ATA emulation"' is a workaround, not a solution), this will only document a failure.

----------

## legolie

So I will let these two files

Shall I modify the title with a prefix like [workaround]?

----------

## NeddySeagoon

legolie,

Activating in Bios "ATA emulation", allows the SATA chipset to be controlled with a PATA driver.  It does not work properly as many important features are missing, like DMA, so it can be very slow.

Its sole intended purpose is to allow Windows XP users to install the proper AHCI driver before the ATA Emulation mode is disabled forever.

Its a dirty hack - no more and you will hate it.

Your lspci is already posted - please post your current kernel configuration.  wgetpaste is your friend here.

If you want a WAG then you need 

```
# CONFIG_SATA_AHCI_PLATFORM is not set
```

set on in your kernel.

When you reply, please post the output of 

```
uname -a
```

too.

----------

## legolie

It works!

Thank you so much for your "WAG"

As you asked, and for documentation

```

# uname -a

Linux linux-pc 3.3.1-gentoo #1 SMP Thu Apr 12 01:23:14 CEST 2012 x86_64 Intel(R) Core(TM) i5 CPU M 560 @ 2.67GHz GenuineIntel GNU/Linux

```

----------

## NeddySeagoon

legolie,

```
#1
```

 tells that this is your first build of this kernel version

```
Thu Apr 12 01:23:14 CEST 2012
```

 is the kernel build date/time which is close to nowish in your timezone, so we can be confident you are running your newest kernel.

----------

