# ATA/SATA drivers

## Boczkowski_D

Hi all,

I am trying to upgrade kernel from 2.6.24-r8 to 2.6.29-r5 but facing the problem with ATA drivers. I have an old ATA disc and previous kernel used hda names for disc partitions. In the new kernel libata is preferred but I cannot set my kernel not using libata to make booting work.

I get:

```
VFS: Cannot open root device "303" or unknown-block(3,2)
```

My question has to variants:

1) How shall I setup my kernel to force it work with old driver?

A little hint:

```
panda linux # lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge

00:01.0 PCI bridge: VIA Technologies, Inc. VT8235 PCI Bridge

00:0c.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)

00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge

00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

01:00.0 VGA compatible controller: nVidia Corporation NV15DDR [GeForce2 Ti] (rev a4)

```

2) If I change my lilo.conf and fstab entries to sda variants, how will I manage to swich to old kernel (not using Live CD) just in case?

----------

## jburns

For 2) You could label the partitions and reference by label in fstab or you can use the partitions UUID identifier and reference the partitions by UUID identifiers.

----------

## erik258

Or, you can switch to the new drivers, if necessary, and change 'hda' to "sda" in lilo and /etc/fstab.  But be sure that you've got the right support in the kernel!  Somewhere above that kernel panic you should see a kernel message about initialization of your drives; this should provide the name of the drive if it;s been found.  if not, you might have omitted support for your hardware by mistake.  

using lilo has the drawback that you must reinstall lilo to the MBR whenever you make a configuration change.  for that reason I switched to grub as soon as possible and never looked back.  So, if you need more help with lilo you won't get it from me.  (Of course I'd be happy to help you replace it with grub : ) but somewhere in the lilo boot configuration there should be a kernel command line; root=/dev/hdaX.  Changing that to sdaX should solve the problem. 

You'll probably have to switch to the new drivers at some point, but the old driver's still there, at least in 2.6.29.1, under Device Drivers->ATA/ATAPI/MFM/RLL support-> VIA82CXXX chipset support.  If you turn it on i'd think you'd also want to turn off  Device Drivers->Serial ATA (prod) [...] ->VIA PATA support as I'd imagine they can't  both be used at once.  

I think you must have both turned on or just the libata ones, because if you had just the old pata ones I don't think you'd be getting the kernel panic.

----------

## cach0rr0

if you post lspci -n, we should be able to tell you exactly what drivers you need

as well you may even luck out and have somebody do a config *for* you  :Smile: 

----------

## erik258

Pappy, I've been wondering why you always ask for lspci -n.  I always match up the driver to the text in the output of lspci.  What do you do with the device IDs that is different from the default output of lspci?  

I am also curious whether you have a default config you use as a starting point for the custom configs you provide. If you do, I'd like to look through it. 

See you on the forums!

----------

## cach0rr0

I'm assuming his reasoning is similar to my own - it's a time saver, and can be pasted into here:

http://kmuto.jp/debian/hcl/

(link is also mentioned on his page)

EDIT: of course at this point there's a reasonable chance he doesn't even have to look the suckers up any more. Mere mortals like myself do!     

This tells you *exactly* which drivers to build into the kernel. No guess work. No "I think this looks right, but I'm not positive". You know exactly what you need,  you find some things you didn't realize you needed, as well it makes the vim-style search using /somestring  within menuconfig much easier and quicker when you have the exact driver name there to give you a starting point. 

Of course that page lists the driver name by its module name, and obv some things need to be built in 100% of the time (e.g. disk interface drivers), but if you find one you *think* looks like it may be it, you can hit Help and have it show you what the name would be if built as a module; if it matches the output on that page, you can know it's supported, know that you're selecting the right driver. 

That helps people like me who often find a version number listed on a piece of hardware that *kinda* looks like it might be one driver for that vendor, but also *kinda* looks like it might be another, leading you to build in support for both drivers as the version number isn't an exact match of either; of course this is a bad thing, not only for reasons of bloat, but because  you'll oft end up with screwy conflicts that are difficult as all hell to troubleshoot. 

Anyway, that's my take on it. I can't speak for pappy, but his page pointed me to that site, and that's how *I* use the lspci -n output, and prefer it over -v or no args

----------

## swimmer

Keep in mind 

```
lspci -k
```

  :Smile: 

It's a possibility to find the drivers used as well if you are able to boot from a live-cd ...  :Wink: 

Greetz

swimmer

----------

## Boczkowski_D

 *Quote:*   

> I think you must have both turned on or just the libata ones, because if you had just the old pata ones I don't think you'd be getting the kernel panic.

 

Not exaclty. I have tried with only new libata driver on right after emerging kernel and only with old ata driver as well and the result was the same all the time.

----------

## cach0rr0

 *Boczkowski_D wrote:*   

>  *Quote:*   I think you must have both turned on or just the libata ones, because if you had just the old pata ones I don't think you'd be getting the kernel panic. 
> 
> Not exaclty. I have tried with only new libata driver on right after emerging kernel and only with old ata driver as well and the result was the same all the time.

 

if you post lspci -n we should be able to tell you exactly which driver you need

specifically

```

cat /proc/cpuinfo

cat /etc/fstab

lspci -n

```

post this and we'll   have all the info we need.

----------

## erik258

Hi.   in addition to supplying the requested lspci output, you might also want to look into your kernel command line. You might have the wrong config but from what I saw there's only 1 via driver. 

I have a feeling you might have missed an option there. Namely root=/dev/hdX or root=/dev/sdX as the case may be. 

Finally I wanted to suggest Grub. It makes it easy to add new kernels to your boot loader and select the kernel you want - even modify the boot parameters - from the boot loader. I don't know anyone who prefers . Lilo to grub. It is really easy to add kernels and select an older kernel if the new one fails, if you use grub.

----------

## Boczkowski_D

I have finally succeeded! I went through all the menuconfig calmly and after that the system started to boot. Now the problem is getting work xorg-1.5 with nvidia-drivers 71.86.09 (with nv is ok) - the issue for different thread, but if someone had a valuable link, I would be gratefull to read. Thanks for your support.

----------

## erik258

Hi, and congratulations.   Getting your own kernel to boot is always nice.  

I can't help so much with nvidia + xorg 1.5, and besides I'm getting somewhat off topic, but I will say that I managed xorg 1.5 with nvidia-drivers-180.29 from gentoo without too much of a problem (just make sure hal is running!).  Please let us know what the story with your nvidia+xorg setup is if you need some help.

----------

## Boczkowski_D

 *Quote:*   

> Please let us know what the story with your nvidia+xorg setup is if you need some help.

 

I think xorg-1.5 doesn't support nvidia-drivers-71.86.09 but don't know why. When I try to downgrade the driver it also requires xorg to be downgraded to xorg-1.3 so I stayed with 71.86.09. Startx reports that it cannot find nvidia_drv.ko (why .ko?) when new driver is used. Maybe something in the kernel must be turned off. Do you have a step list how do detect what's going on? If needed I will open a different thread for this issue. Thanks in advance!

----------

## rrbrussell

you probably need to reinstall the nvidia driver after you have booted into the new kernel.

----------

## Boczkowski_D

I did. But the result was the same.

----------

## lucapost

```
#> lspci -n

00:00.0 0600: 10b9:1647 (rev 04)

00:01.0 0604: 10b9:5247

00:02.0 0c03: 10b9:5237 (rev 03)

00:04.0 0101: 10b9:5229 (rev c4)

00:05.0 0401: 13f6:0111 (rev 10)

00:06.0 0c03: 10b9:5237 (rev 03)

00:07.0 0601: 10b9:1533

00:09.0 0200: 10ec:8139 (rev 10)

00:0a.0 0401: 1102:0002 (rev 07)

00:0a.1 0980: 1102:7002 (rev 07)

00:11.0 0680: 10b9:7101

01:00.0 0300: 10de:0185 (rev c1)
```

what driver I need?

----------

## erik258

plugging into the form cach0rr0 listed above we get this:

(heavily clipped) 

http://spore.ath.cx/~dan/yourdev.html

In the future, you should start a new thread for new topics.  This doesn't have anything to do with the subject of this particular post.  But that table should tell you what you need as far as kernel drivers.

----------

## cach0rr0

alim15x3

"ALI M15x3 chipset support "

```

CONFIG_BLK_DEV_ALI15X3:                                                                                                                    │  

  │                                                                                                                                            │  

  │ This driver ensures (U)DMA support for ALI 1533, 1543 and 1543C                                                                            │  

  │ onboard chipsets.  It also tests for Simplex mode and enables                                                                              │  

  │ normal dual channel support.                                                                                                               │  

  │                                                                                                                                            │  

  │ Please read the comments at the top of                                                                                                     │  

  │ <file:drivers/ide/pci/alim15x3.c>.                                                                                                         │  

  │                                                                                                                                            │  

  │ If unsure, say N.                                                                                                                          │  

  │                                                                                                                                            │  

  │ Symbol: BLK_DEV_ALI15X3 [=n]                                                                                                               │  

  │ Prompt: ALI M15x3 chipset support                                                                                                          │  

  │   Defined at drivers/ide/Kconfig:383                                                                                                       │  

  │   Depends on: IDE && PCI                                                                                                                   │  

  │   Location:                                                                                                                                │  

  │     -> Device Drivers                                                                                                                      │  

  │       -> ATA/ATAPI/MFM/RLL support (IDE [=m])                                                                                              │  

  │   Selects: IDE_TIMINGS && BLK_DEV_IDEDMA_PCI 
```

----------

