# Help configuring DVD drive in kernel [SOLVED]

## Despot Despondency

Hi, 

I seem to have missed configuring my DVD-drive when I configured my kernel. I can't find a DVD device in /dev and when I run 

```
dmesg | grep DVD

```

I've looked around but DVD-drives seems to be the one piece of hardware without much support on kernel configuration. What are the options I have to include in my kernel? Do I have to add them as a module or built in?

Here is the output of lspci

```

00:00.0 Host bridge: ATI Technologies Inc RD790 Northbridge only dual slot PCI-e_GFX and HT3 K8 part

00:02.0 PCI bridge: ATI Technologies Inc RD790 PCI to PCI bridge (external gfx0 port A)

00:06.0 PCI bridge: ATI Technologies Inc RD790 PCI to PCI bridge (PCI express gpp port C)

00:07.0 PCI bridge: ATI Technologies Inc RD790 PCI to PCI bridge (PCI express gpp port D)

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]

00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller

00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller

00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller

00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller

00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller

00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)

00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge

00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller

00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control

00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control

02:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. Device 3403

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

04:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce GTS 250] (rev a2)

```

Thanks in advance.Last edited by Despot Despondency on Mon Jan 25, 2010 10:07 am; edited 1 time in total

----------

## VoidMage

Try 'lspci -k'.

CONFIG_ATA (followed by the correct mainboard driver) and CONFIG_BLK_DEV_SR

should be enough for cdrom drive.

----------

## Despot Despondency

Here's lspci -k

```

00:00.0 Host bridge: ATI Technologies Inc RD790 Northbridge only dual slot PCI-e_GFX and HT3 K8 part

        Subsystem: ATI Technologies Inc RD790 Northbridge only dual slot PCI-e_GFX and HT3 K8 part  

00:02.0 PCI bridge: ATI Technologies Inc RD790 PCI to PCI bridge (external gfx0 port A)             

        Kernel driver in use: pcieport-driver                                                       

00:06.0 PCI bridge: ATI Technologies Inc RD790 PCI to PCI bridge (PCI express gpp port C)           

        Kernel driver in use: pcieport-driver                                                       

00:07.0 PCI bridge: ATI Technologies Inc RD790 PCI to PCI bridge (PCI express gpp port D)           

        Kernel driver in use: pcieport-driver                                                       

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]                

        Subsystem: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]                      

        Kernel driver in use: ahci                                                                  

00:12.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller                       

        Subsystem: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller                            

        Kernel driver in use: ohci_hcd                                                              

00:12.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller                             

        Subsystem: ATI Technologies Inc SB700 USB OHCI1 Controller                                  

        Kernel driver in use: ohci_hcd                                                              

00:12.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller                        

        Subsystem: ATI Technologies Inc Device 4397                                                 

        Kernel driver in use: ehci_hcd                                                              

00:13.0 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI0 Controller                       

        Subsystem: ATI Technologies Inc Device 4398                                                 

        Kernel driver in use: ohci_hcd                                                              

00:13.1 USB Controller: ATI Technologies Inc SB700 USB OHCI1 Controller                             

        Subsystem: ATI Technologies Inc Device 4399                                                 

        Kernel driver in use: ohci_hcd

00:13.2 USB Controller: ATI Technologies Inc SB700/SB800 USB EHCI Controller

        Subsystem: ATI Technologies Inc SB700/SB800 USB EHCI Controller

        Kernel driver in use: ehci_hcd

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 3c)

        Subsystem: ATI Technologies Inc SBx00 SMBus Controller

00:14.1 IDE interface: ATI Technologies Inc SB700/SB800 IDE Controller

        Subsystem: ATI Technologies Inc SB700/SB800 IDE Controller

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

        Subsystem: ASUSTeK Computer Inc. Device 8357

        Kernel driver in use: HDA Intel

00:14.3 ISA bridge: ATI Technologies Inc SB700/SB800 LPC host controller

        Subsystem: ATI Technologies Inc Device 4383

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge

00:14.5 USB Controller: ATI Technologies Inc SB700/SB800 USB OHCI2 Controller

        Subsystem: ATI Technologies Inc Device 4396

        Kernel driver in use: ohci_hcd

00:18.0 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] HyperTransport Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Miscellaneous Control

00:18.4 Host bridge: Advanced Micro Devices [AMD] K10 [Opteron, Athlon64, Sempron] Link Control

02:00.0 FireWire (IEEE 1394): VIA Technologies, Inc. Device 3403

        Subsystem: ASUSTeK Computer Inc. Device 8384

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

        Subsystem: ASUSTeK Computer Inc. Device 8385

        Kernel driver in use: r8169

        Kernel modules: r8169

04:00.0 VGA compatible controller: nVidia Corporation G92 [GeForce GTS 250] (rev a2)

        Kernel driver in use: nvidia

        Kernel modules: nvidia

```

Is this the section for the DVD-drive

```

00:11.0 SATA controller: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]                

        Subsystem: ATI Technologies Inc SB700/SB800 SATA Controller [IDE mode]                      

        Kernel driver in use: ahci  

```

----------

## Despot Despondency

OK, so I've added PATA_ATIIXP and BLK_DEV_SR to the kernel. I still can't see a device in /dev for my DVD drive and 

```
 dmesg | grep DVD

```

 still gives nothing. Do I need anything else in the kernel? How can I find the device in /dev that corresponds to the DVD drive?

----------

## VoidMage

Instead of greping dmesg, check full system log, from the boot till

first login, only kernel messages should matter.

(well, perhaps greping for 'ata2.00' gives better results, but putting it in a pastebin

would made things simpler here)

----------

## Despot Despondency

OK, will use pastebin next time. Sorry, I'd never heard of it before.

How do I get the log from the bootup?

----------

## cach0rr0

 *Despot Despondency wrote:*   

> OK, will use pastebin next time. Sorry, I'd never heard of it before.
> 
> How do I get the log from the bootup?

 

should just be /var/log/dmesg

one thing i wanted to point out - do you have a /dev/sr0? This should be your DVD drive, and if atiixp is sorted. it should exist. 

From there udev should make the symlinks at /dev/dvd => /dev/sr0

----------

## Despot Despondency

Hi,

There is no /dev/sr0 no. I have BLK_DEV_ATIIXP and PATA_ATIIXP built into the kernel at the moment.

I've put /var/log/dmesg in pastebin here http://gentoo.pastebin.ca/1760615.

----------

## VoidMage

/dev/sr* are from BLK_DEV_SR. Is it set ?

----------

## Despot Despondency

Yep, that's set. 

Maybe I should just post my kernel config in pastebin. Where is the kernel config file stored?

----------

## VoidMage

Depends. If you set an option, you should have /proc/config.gz,

if not, look for .config in kernel sources dir.

----------

## Despot Despondency

OK, here is my .config file http://gentoo.pastebin.ca/1760834

----------

## cach0rr0

 *Despot Despondency wrote:*   

> OK, here is my .config file http://gentoo.pastebin.ca/1760834

 

okie doke - so, you most definitely have a driver conflict

You have both of these enabled in the kernel

```

CONFIG_IDE=y

CONFIG_ATA=y

```

You do not need CONFIG_IDE, at all. CONFIG_IDE will be labeled ATA/ATAPI/MFM/RLL support - you should uncheck this completely. 

You want *only* CONFIG_ATA enabled, which is labeled as Serial ATA (prod) and Parallel ATA (experimental) drivers

Now within Serial ATA (prod) and Parallel ATA (experimental) drivers is where you select drivers for your hard disk controllers and your CDROM/DVD/etc

You already have PATA_ATIIXP (which is the new, good driver) - you do not need BLK_DEV_ATIIXP (which is the old, unwanted driver); these drivers both cover the same set of hardware, so I would fully expect you would see a conflict. 

SO...untick the ATA/ATAPI/MFM/RLL support completely (which will thusly deselect all sub-items beneath that option), make sure you have PATA_ATIIXP selected (as well any other drivers you may need that are beneath "Serial ATA (prod) and Parallel ATA (experimental) drivers" if you haven't already), rebuild your kernel and install as per usual. 

With only the new drivers from the CONFIG_ATA set, and the CONFIG_IDE set disabled completely, it should work. 

Some links in my signature that should help you if you get stuck as well.

----------

## Despot Despondency

Thanks for all the help. I've managed to get my DVD drive working following cach0rr0's advice.

I must have done something wrong during the installation because I couldn't get it to work, then  I did a fresh install with the same kernel settings it worked. 

Thanks again!  :Very Happy: 

----------

