# New kernel doesnt want to mount root partition

## Kosmo

My new kernel (gentoo-sources-2.6.22-r3) won't recognize my SATA drives for some reason. 

Since i am unable to log anything, i've written it down, but i have only written down the parts i think are most important

```

ATA1.00: qc timeout (cmd 0x27)

ATA1.00: ata_hpa_resize 1

ATA1.00: hpa sectors (0) is smaller than sectors (some big number here)

ATA1.00: failed to set xfermode (err_mask = 0x40)

ATA1.00 disabled

```

This is not letter by letter unfortunatly, but i think it covers the important stuff. This section is repeated several times, and then it is repeated again a couple of times for ATA2.00, but in those messages, it actually says something about SAMSUNG, which is my hard drive.

This is my lspci output:

```
00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a2)

00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a2)

00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)

00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)

00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)

00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)

00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev a2)

00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a2)

00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a2)

00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)

00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a2)

00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a2)

00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a2)

00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a2)

00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a2)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

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

01:0b.0 FireWire (IEEE 1394): Agere Systems FW323 (rev 61)

05:00.0 VGA compatible controller: ATI Technologies Inc RV370 5B60 [Radeon X300 (PCIE)]

05:00.1 Display controller: ATI Technologies Inc RV370 [Radeon X300SE]

```

My kernel configuration can be found on http://lumumba.uhasselt.be/~kos/kernelconf.txt

If you need any further information, please say so and help me how to obtain it.

Thank you very much,

Kosmo

----------

## kiksen

You should remove GENERIC IDE support as it gets loaded before your SCSI drives and hence your disks are recognized as hda, hdb etc. insted of sda, sdb... as you expect. 

HTH

/kiksen

----------

## humanthing

 *kiksen wrote:*   

> You should remove GENERIC IDE support as it gets loaded before your SCSI drives and hence your disks are recognized as hda, hdb etc. insted of sda, sdb... as you expect. 

 

Did that solve the problem? I'm recently trying to upgrade from 2.6.22 kernel to 2.6.23 and I'm getting quite simillar errors while booting.

First it loads a few things, including IDE devices (my two DVD drives) which are named correctly. Then while starting the ATA devices (my harddisks) it gives these errors

```

scsi0 : sata_nv

scsi1 : sata_nv

ata1: SATA max UDMA/133 (- some long numbers here -)

ata2: SATA max UDMA/133 (- same numbers as above -)

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300 )

_here it hangs about half a minute_

ata1.00: qc timeout (cmd 0x27)

ata1.00: ata_hpa_resize 1: hpa sectors (0) is smaller than sectors (234493056)

ata1.00: ATA-7: SAMSUNG SP1213C, SV100-34, max UDMA7 _<- this is my harddisk_

ata1.00: 234493056 sectors, multi 16: LBA48

ata1.00: failes to set xfermode (err_mask=0x40)

ata1: failes to recover some devices, retrying in 5 secs

ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300 )

```

This is the point where I just rebooted to get my old kernel which is working flawlessly.

I just hope someone can give me a hint how to solve this.

PS: I already deactiveted GENERIC_IDE and PATA stuff, although I did not run make clean or make mrpropper prior to recompiling the kernel...

----------

## kiksen

Hi.

Have you enabled support for your sata chipset? If in doubt, post the result of lspci here, and I'll be happy to take a look.

/kiksen

----------

## humanthing

Thanks for your reply. Sure I have!  :Smile: 

I googled for the error message and found on some ubuntu forums a similar problem. They solved it by appending "irqpoll" to the kernel line in grub.conf. Seems to be a workaround, but it works for me!

Do you know what this option does? Can this be a hint how to really solve the problem? Is this a bug?

----------

## kiksen

From the docs

 *Quote:*   

>   irqpoll         [HW]
> 
>                         When an interrupt is not handled search all handlers
> 
>                         for it. Also check all handlers each timer
> ...

 

So it seems very much like a workaround. My guess would be that you have a multi-core system? Check that you have enabled "Plug & Play O/S" in your BIOS if you have such an option (if it's disabled the BIOS "protects" you system from a lot of information). This helped for me.

Also, check for a BIOS upgrade.

/kiksen

----------

## humanthing

Well, no... I'm running on a single core amd64. But the part with the BIOS is interesting, I'll look for it next time I boot.

Is there an easy way to update my BIOS with gentoo? For Windows I had a small utility but since I'm not using Windows anymore, I don't really know how to update the BIOS.

----------

## kiksen

BIOS upgrades really dependes on your motherboard manufacturer. Many has ISO images you can burn and boot to upgrade (DELL for one). 

/kiksen

----------

## humanthing

Hi, I now looked for the settings in the BIOS but didn't find anything similar to "Plug & Play O/S". And I have already the latest BIOS upgrade installed, since 2005 there seem to be no new BIOS upgrades.

Strange thing is that everything works perfectly with kernel 2.6.22... Any more ideas?

----------

## kiksen

Not really. How did you upgrade your kernel? Have you compared your .config files for .22 and .23 kernels? There must be something somewhere...

/kiksen

----------

## humanthing

Hmm... Strange enough, but now it works. I wanted to make some little modifications and kernel upgrade all in one and got the error mentioned above. Now I just made a simple make oldconfig and it works... Nice!!

Now I just got to figure out what the problem was... Thank you so far!

----------

## humanthing

Oh shit... I forgot to remove the irqpoll form the kernel line in grub.conf...

Without that it doesn't work... But there seem to be more people with a similar problem.

I found the posts below, and tried some of the methods to solve the problem, but I got quite lost, and nothing seems to really work.

https://forums.gentoo.org/viewtopic-t-631919-highlight-.html

https://forums.gentoo.org/viewtopic-t-629612.html

https://forums.gentoo.org/viewtopic-t-629873.html

Last thing I tried was the following:

```

# CONFIG_IDE is not set

# CONFIG_SATA_AHCI is not set

CONFIG_SATA_NV=y

CONFIG_PATA_AMD=y

```

Here is the output of lspci

```

00:00.0 Host bridge: nVidia Corporation nForce3 250Gb Host Bridge (rev a1)

00:01.0 ISA bridge: nVidia Corporation nForce3 250Gb LPC Bridge (rev a2)

00:01.1 SMBus: nVidia Corporation nForce 250Gb PCI System Management (rev a1)

00:02.0 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.1 USB Controller: nVidia Corporation CK8S USB Controller (rev a1)

00:02.2 USB Controller: nVidia Corporation nForce3 EHCI USB 2.0 Controller (rev a2)

00:05.0 Bridge: nVidia Corporation CK8S Ethernet Controller (rev a2)

00:06.0 Multimedia audio controller: nVidia Corporation nForce3 250Gb AC'97 Audio Controller (rev a1)

00:08.0 IDE interface: nVidia Corporation CK8S Parallel ATA Controller (v2.5) (rev a2)

00:09.0 IDE interface: nVidia Corporation CK8S Serial ATA Controller (v2.5) (rev a2)

00:0a.0 IDE interface: nVidia Corporation CK8S Serial ATA Controller (v2.5) (rev a2)

00:0b.0 PCI bridge: nVidia Corporation nForce3 250Gb AGP Host to PCI Bridge (rev a2)

00:0e.0 PCI bridge: nVidia Corporation nForce3 250Gb PCI-to-PCI Bridge (rev a2)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200] (rev 01)

01:00.1 Display controller: ATI Technologies Inc RV280 [Radeon 9200] (Secondary) (rev 01)

02:08.0 Network controller: RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01)

02:09.0 Multimedia controller: Philips Semiconductors SAA7134/SAA7135HL Video Broadcast Decoder (rev 01)

02:0c.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)

02:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

```

And I must say that I have a 2.6.22-kernel running all fine... But even the most simple make oldconfig doesn't seem to work...  :Sad: 

Can someone help me, please? This is the most annoying thing I ever experienced with gentoo...

Could this have anything to do with it? I don't understand nothing but just stumbled upon it and as the only thing making the kernel work was putting "irqpoll" in the kernel line, I just thought it could be somehow related to my problem...

----------

## kiksen

Hi.

Tough luck. But... You could try using the old ATA/IDE driver for nvidia, not the new PATA stuff (I have no positive experience with the experimental PATA stuff, but haven't invested much time either)

it's named CONFIG_BLK_DEV_AMD74XX.

HTH

/kiksen

----------

## humanthing

Ok, now I think maybe I have a clue.

I was running a 2.6.22-r8 kernel and wanted to upgrade to 2.6.23-r3, but got the errors mentioned above. Then I saw there was a 2.6.22-r9 kernel in the portage tree too. So I configured this kernel the way I wanted to configure the 2.6.23 kernel, and... got the same errors. But after a normal oldconfig it worked. So now I started to reconfigure the 2.6.23 kernel with only little modifications, and... got the errors...

Now I'm actually running my 2.6.22-r9 kernel and compared the configs with Kompare. The main difference is that I removed the ACPI support as I have a desktop system and don't think I have a use for ACPI... Is that right? On the other side there are some ACPI settings that seem to be related to harddisks.

Moreover I removed the SCSI low-level drivers. Don't really know why but I thought I read it somewhere...

Now, the other differences seem not to be related to harddisks.

What do you think is causing the troubles? And do you have an idea why irqpoll helps?

----------

## jburns

One of the uses of ACPI is handling the interrups.

----------

## darkelvenangel

Why is it that we all are having so much problems when we upgrade Kernels?

It took me a week to get my system to boot with 2.6.23-r3 should there not be this hard.

I'm just popping in from https://forums.gentoo.org/viewtopic-p-4603178.html where we have a problem with booting to a SATA drive.  I've managed to solve this on my system but in the process I no longer boot from a ramdrive and boot times are increasing.

Do you use the Genkernel utility?  should that not make it simple?  it doesn't for me.

you need to do a 

```
dmesg | grep ata
```

to find out what drivers your current kernel is using and build them into your new one.  That's how I got my system to boot.

----------

## jburns

I use genkernel and it makes it easy if you use the right options and if you use the configuration data from your current kernel as a baseline for the new kernel.  The other thing that I do is my references to partitions are by UUID numbers and not /dev/hd* or /dev/sd*.  The commands I use are 

```
zcat /proc/config.gz > /usr/share/genkernel/x86_64/kernel-config-2.6

genkernel --gconfig --save-config --disklabel --install --bootloader=grub --splash=livecd-2007.0 all

emerge sys-fs/fuse sys-fs/ntfs3g alsa-driver nvidia-drivers
```

  See https://forums.gentoo.org/viewtopic-t-627464-highlight-uuid.html for how to setup UUID references.

I use the genkernel --gconfig option so that I can check the configuration and make any changes that I want to make.  "--gconfig" works with gnome there are other options depending on your environment.  "--disklabel" adds the ability to reference the root partition by label or UUID.  The emerge adds drivers that are built outside the kernel.

----------

## frosven

I had the same kernel message you posted when I tried using PATA_AMD and was unable to resolve it with the IRQ kernel setting, switching to BLK_DEV_AMD74XX like kiksen suggested fixed everything.

----------

## humanthing

 *jburns wrote:*   

> One of the uses of ACPI is handling the interrups.

 

Oh man how cool is that?! I didn't know this, and as I have no real use for ACPI I thought I could simply deactivate it... But know I compiled a kernel with all the modifications I ever wanted to make and simply kept ACPI selected... And... IT WORKS!!!!!!!!!!! Yeeeeeha!!!!!!!!

Thanks so much!!!  :Very Happy: 

Well, the only thing left is to try if PATA_AMD works, too. But this is not so important...  :Smile: 

Regarding the upgrading the kernel, I never had any real problem... make oldconfig normally works fine, although I always check it using make menuconfig. The only problem is that everytime I use make menuconfig I find something nice to try to modify. Seems I just got lost this time.   :Laughing: 

----------

## FreakWent

Well I have the same Nvidia chipset, as far as I can tell, with PnP on in the bios and the right drivers selected; the kernel boot messages show that the chipset is detected, and so is the drive, but no partitions can be found!!  Harumph!

I'll try harder with ACPI and report back.

Edit:

Nope.  Stuck.  ACPI is all on, including the ASUS laptop options (!!) Can anyone who has a working kernel config for an m2n-vm board (nForce 630 chipset) please post it?

Edit:

defconfig makes a  working kernel easily trimmed back; all good now!

----------

