# Kernel Panic on boot after upgrade [Solved/Aborted]

## bLanark

Hi,

(What a day yesterday was. The washing machine broke (we knew it was on the way out) and fused the house. My server failed to reboot. After buying and installing a new washing machine (which wants to waltz around the room when on "spin" cycle) I got to look at the server. Root partition had errors and failed to boot, but once I fixed that, udev failed to load as it said I needed a more recent kernel - I can't remember upgrading udev, but I must have done. Anyway, I chose the oldest kernel I had sources for (also no networking) that was above udev's requirement and ... well , read on...)

I upgraded from 2.6.13 to 2.6.27, using gentoo-sources. I copied my .config from the old kernel to the new one, did a make oldconfig, accepted all the defaults, then built and installed. 

It fails on boot with this message:

```
Cannot open root device "sda8" or unknown-block(0,0)

Please append a correct "root=" boot option; here are a list of the available partitions:

1600   78125000 hdc driver: ide-disk

  1601      77261 hdc1

  1602     441787 hdc2

  1603          1 hdcc

2100  245117376 hde driver: ide-disk

  2101  245111706 hde1

2200 245117376  hdg driver: ide-disk

  2201  245111706 hdg1

0340    4194302 hdb driver:ide-cdrom

0900  245111616 md0 (driver?)

```

Now, I googled (gentoo forums were down last night?) , checked I had various things set in my .config, rebuild a few times, but without success.

My boot drive is SATA, and has always been sda (root partition *is* sda8). I have ext3 built into the kernel, scsi block devices, I wish I could have gotten the .config off the machine last night to post, but all my boot disks were at work, and the network doesn't come up on the nde machine. 

BUT, if I read the kernel panic, is it possible that my sata disk is appearing as IDE, and coming up as hdc? In the machine there is the SATA boot disk, an IDE DVD/RW, and two IDE drives that make a software raid. But the list above has no sd* devices, the hde and hdg correspond to the drives for RAID, the hdb is the DVD/RW, so hdc *must* be the SATA drive. 

If so, any ideas what's wrong in my kernel? 

(I'm *so* close to just rebuilding the machine, it's so old. But it's been a good friend over the years. So I thought I'd try to bring it back to life first.)

----------

## bLanark

I read here: http://www.gentoo-wiki.info/SATA that I should turn off generic IDE support (or use as a module)

```

Device Drivers  --->

    <*> ATA/ATAPI/MFM/RLL support  ---> 

        < >     generic/default IDE chipset support  

```

So I'll try that when I go home at lunchtime.

----------

## bLanark

 *bLanark wrote:*   

> I read here: http://www.gentoo-wiki.info/SATA that I should turn off generic IDE support (or use as a module)
> 
> ```
> 
> Device Drivers  --->
> ...

 

Well, that failed! All that happened was that the hdc options were not mentioned at all in the kernel panic.

I managed to mount a USB stick and have the outpit from lspci -n

```
00:00.0 0600: 8086:3590 (rev 09)

00:00.1 ff00: 8086:3591 (rev 09)

00:02.0 0604: 8086:3595 (rev 09)

00:03.0 0604: 8086:3596 (rev 09)

00:04.0 0604: 8086:3597 (rev 09)

00:1d.0 0c03: 8086:24d2 (rev 02)

00:1d.1 0c03: 8086:24d4 (rev 02)

00:1d.2 0c03: 8086:24d7 (rev 02)

00:1d.3 0c03: 8086:24de (rev 02)

00:1d.7 0c03: 8086:24dd (rev 02)

00:1e.0 0604: 8086:244e (rev c2)

00:1f.0 0601: 8086:24d0 (rev 02)

00:1f.1 0101: 8086:24db (rev 02)

00:1f.2 0101: 8086:24d1 (rev 02)

00:1f.3 0c05: 8086:24d3 (rev 02)

01:00.0 0604: 8086:0329

01:00.2 0604: 8086:032a

02:0c.0 0300: 1002:474f (rev 27)

03:0d.0 0180: 105a:4d68 (rev 02)

03:0e.0 0200: 8086:1026 (rev 04)

06:0d.0 0c00: 11c1:5811 (rev 04)

```

Which the Debian hardware list (http://kmuto.jp/debian/hcl/index.rhtmlx) makes into (apologies for formatting)

```

PCI ID      Works?   Vendor      Device                  Driver      Kernel

80863590   Yes   Intel Corporation   E7520 Memory Controller Hub         e752x_edac   v2.6.25-

80863591      Intel Corporation   E7525/E7520 Error Reporting Registers      

80863595      Intel Corporation   E7525/E7520/E7320 PCI Express Port A      

80863596      Intel Corporation   E7525/E7520/E7320 PCI Express Port A1      

80863597      Intel Corporation   E7525/E7520 PCI Express Port B      

808624d2   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1   usb-uhci,uhci-hcd   

808624d4   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2   usb-uhci,uhci-hcd   

808624d7   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3   usb-uhci,uhci-hcd   

808624de   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4   usb-uhci,uhci-hcd   

808624dd   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller   ehci-hcd   

8086244e   Yes   Intel Corporation   82801 PCI Bridge   i810_rng   

808624d0   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) LPC Interface Bridge      intel-rng,iTCO_wdt   v2.6.25-

808624db   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) IDE Controller      ata_piix      v2.6.25-

808624d1   Yes   Intel Corporation   82801EB (ICH5) SATA Controller         ata_piix      v2.6.25-

808624d3   Yes   Intel Corporation   82801EB/ER (ICH5/ICH5R) SMBus Controller      i2c-i801      v2.6.25-

80860329      Intel Corporation   6700PXH PCI Express-to-PCI Bridge A      

8086032a      Intel Corporation   6700PXH PCI Express-to-PCI Bridge B      

1002474f      Yes   Advanced Micro Devices [AMD] nee ATI   Rage XL         atyfb      v2.6.27-

105a4d68   Yes   Promise Technology, Inc.   PDC20268 [Ultra100 TX2]         pata_pdc2027x   v2.6.25-

80861026   Yes   Intel Corporation   82545GM Gigabit Ethernet Controller         e1000      v2.6.25-

11c15811      Yes   Agere Systems   FW322/323               ohci1394

```

I also have my .config - is it considered rude to post the whole 1500 lines? The important ones (I think) are present:

SATA controller 

CONFIG_BLK_DEV_PIIX=y

# CONFIG_BLK_DEV_IDE_SATA is not set

So now that I've finished talking to myself, any ideas?

----------

## ultraincognito

 *bLanark wrote:*   

> I should turn off generic IDE support (or use as a module)

 

I doubt it will help but you can.

 *bLanark wrote:*   

> I also have my .config - is it considered rude to post the whole 1500 lines?

 

Yes, it is. I personally like to show options from some category of configuring the kernel so on my example:

--- ATA/ATAPI/MFM/RLL support (DEPRECATED)

      *** Please see Documentation/ide/ide.txt for help/info on IDE drives ***

[ ]   Support for SATA (deprecated; conflicts with libata SATA driver)

<*>   generic ATA/ATAPI disk support

[*]     ATA disk support

[ ]     ATAPI floppy support

<M>   Include IDE/ATAPI CDROM support

< >   Include IDE/ATAPI TAPE support  

[ ]   IDE ACPI support

[ ]   IDE Taskfile Access

[*]   legacy /proc/ide/ support  

      *** IDE chipset support/bugfixes ***

< >   generic/default IDE chipset support

< >   Platform driver for IDE interfaces

< >   CMD640 chipset bugfix/support  

< >   PNP EIDE support

      *** PCI IDE chipsets support ***

[*]   Probe IDE PCI devices in the PCI bus order (DEPRECATED) 

< >   Generic PCI IDE Chipset Support

< >   OPTi 82C621 chipset enhanced support (EXPERIMENTAL)  

< >   RZ1000 chipset bugfix/support 

< >   AEC62XX chipset support 

< >   ALI M15x3 chipset support

<*>   AMD and nVidia IDE support

< >   ATI IXP chipset IDE support

< >   CMD64{3|6|8|9} chipset support

< >   Compaq Triflex IDE support

< >   Cyrix CS5510/20 MediaGX chipset support (VERY EXPERIMENTAL)

< >   Cyrix/National Semiconductor CS5530 MediaGX chipset support

< >   AMD CS5535 chipset support 

< >   CS5536 chipset support 

< >   HPT36X/37X chipset support  

< >   JMicron JMB36x support

< >   National SCx200 chipset support

< >   Intel PIIX/ICH chipsets support

< >   IT8172 IDE support

< >   IT8213 IDE support

< >   IT821X IDE support  

< >   NS87415 chipset support 

< >   PROMISE PDC202{46|62|65|67} support 

< >   PROMISE PDC202{68|69|70|71|75|76|77} support

< >   ServerWorks OSB4/CSB5/CSB6 chipsets support

< >   Silicon Image chipset support 

< >   SiS5513 chipset support

< >   SLC90E66 chipset support 

< >   Tekram TRM290 chipset support 

< >   VIA82CXXX chipset support 

< >   Toshiba TC86C001 support

----------

## ultraslinky

Judging by the error, you somehow switched to the old ATA layer? Your hard disks should all be /dev/sd*, not /dev/hd*. As far as i know the old layer must not be used, it is deprecated, and the new one works with older devices too. I have used the new layer without problems with my old 2004 laptop with an IDE hard disk and IDE dvd drive.

My suggestion is to get rid of that whole ATA/ATAPI support section. The only ones you need are the SCSI section and "Serial Ata and Parallel Ata drivers", where you should select your motherboard driver. Maybe you should go over that section and make sure your driver hasn't changed name in the kernel config (i have no idea if that is possible at all...) or make oldconfig screwed up something? It is quite a big jump, from 2.6.13 to 2.6.27, so double check those sections  :Smile: 

I'm a newbie here, but i hope it helped a tiny bit  :Smile: 

----------

## Jaglover

 *Quote:*   

> I upgraded from 2.6.13 to 2.6.27, using gentoo-sources. I copied my .config from the old kernel to the new one, did a make oldconfig ...

 

That's a known good way to bork things, make oldconfig is safe to use only between patchlevels, see http://www.gentoo.org/doc/en/kernel-upgrade.xml .

----------

## bLanark

 *Jaglover wrote:*   

> 
> 
> That's a known good way to bork things, make oldconfig is safe to use only between patchlevels, see http://www.gentoo.org/doc/en/kernel-upgrade.xml .

 

Ah well, you live and you learn, I suppose. 

I've decided that I'm gonna rebuild the machine from scratch tonight. It's had more versions of gcc than I've had cups of coffee today, I looked in one of my cron jobs and it was still trying to call eupdatedb after a daily sync! Now on boot, most services obviously need their config files updating - warnings about deprecated stuff (yes, I know about etc-update). It'll be good to start with a modern kernel and profile.  

I was sensible and have separated into *many* filesystems when I first built it, so /home, /var, /tmp are all on different partitions. Some of them will be nuked, of course. I even have a spare partiton on the disk "just in case" I needed more space for something unforseen. And there is space on my raid for a backup of all my config files as a reference.

Thank you all for your replies to date.

----------

