# kernel panic on 2.6.39-gentoo-r3 [SOLVED]

## dvh

just updated from 2.6.36-gentoo-r5.  I'm seeing a kernel panic during boot, because the process cannot find my root device.  here is the grub menu.lst entry from my working 2.6.36 kernel:

```

kernel /boot/gentoo-64/kernel-2.6.36-gentoo-r5 root=/dev/sdb1 video=vesafb:ywrap vga=0x31a rootdelay=10 ro
```

here is the new entry for 2.6.39:

```

kernel /boot/gentoo-64/kernel-2.6.39-gentoo-r3 root=/dev/sdb1 video=vesafb:ywrap vga=0x31a rootdelay=10 ro
```

2.6.35 boots just fine, while the 2.6.39 cannot find sdb for some reason.  any ideas?

-dvhLast edited by dvh on Sun Aug 07, 2011 12:55 am; edited 1 time in total

----------

## Jaglover

Having the exact error message would help.

I suspect you used make oldconfig and that borked your .config.

----------

## dvh

i'll be happy to try to get it, but I don't know how to capture the output at that point in the process.  how can i capture that?

I do recall this part:

```

VFS: Cannot open root device "sdb1" or unknown-block(x,x) 

[   11.557310] Please append a correct "root=" boot option; here are the available partitions: 
```

then it goes on to list my sda partitions...like it cannot fine the sdb at all.  sdb is a usb external drive.

----------

## dvh

indeed.  i did use make oldconfig.  is that no longer allowed?

----------

## Jaglover

VFS: Cannot open root device "sdb1" or unknown-block(x,x) 

Well, that (x,x) thingy would give the clue, (0,0) would mean your HDD controller has no correct driver.

----------

## dvh

it is not 0,0.  it is either 2,0 or 0,2.  i cannot recall.  i will need to reboot again to find out.  when I do, is there a way to capture the text?

----------

## Jaglover

 *dvh wrote:*   

> indeed.  i did use make oldconfig.  is that no longer allowed?

 

It is OK when upgrading between patches (2.6.39-something), but is known to fail when upgrading versions (2.6.something).

----------

## dvh

oh.  ok.  been doing it that way for years without an issue.  I am happy to learn...I know there must be a better way than manually creating another .config.  can you help me with a reference to the correct way?

----------

## Jaglover

 *dvh wrote:*   

> it is not 0,0.  it is either 2,0 or 0,2.  i cannot recall.  i will need to reboot again to find out.  when I do, is there a way to capture the text?

 

(2.0) would mean it tries floppy because it cannot handle the HDD controller. Check your kernel config to make sure your controller support is built in, not as module. Visit  http://kmuto.jp/debian/hcl/ if in doubt.

This covers upgrading pretty well http://www.gentoo.org/doc/en/kernel-upgrade.xml

----------

## dvh

i will investigate.  as I said, it worked fine for 2.6.36...so I know the .config was OK then.  Seems odd that "make oldconfig' would switch something to module from built in, though.

----------

## Jaglover

Not exactly, make oldcofig cannot cope if something is moved in kernel config tree as it may happen between versions. It won't change built-in to module.

----------

## dvh

so, following the directions for bringing forward an old .config (from the gentoo link provided above), I used "make menuconfig" to create my new .config.  unfortunately, same result.  still getting the kernel panic at boot time.  here is more info from the console output (retyping, so this may not be perfect).

the process seems to go through the discovery of USB devices, including finding a mouse and keyboard, and finally a "new full speed USB device number 3".  then, it says

```
NFS: no NFS server address

unable to mount root fs via NFS, trying floppy

cannot open root device "sdb1" or unknown-block(2,0)
```

if this "NFS" reference is the same NFS I am familiar with (network file system), then I am very confused as to why an NFS mount is being attempted.  again, here is my grub entry:

```
kernel /boot/gentoo-64/kernel-2.6.39-gentoo-r3 root=/dev/sdb1 video=vesafb:ywrap vga=0x31a rootdelay=10 ro
```

sdb is an external USB drive, which I think was detected just prior to this issue.  when I boot my older kernel (2.6.36-r5) I don't see any of these NFS references.  why would NFS be here?

-dvh

----------

## Hu

If the root device cannot be found as requested, the kernel may try other ways to get a root device before it gives up.  This is probably why it tried to use a floppy.

Have you tried running the rootdelay value up to some large number, such as a minute?  If yes, does the kernel wait that full minute before it panics?

----------

## NeddySeagoon

dvh,

Aroud 2.6.26 there were some new menu options introduced to the SATA menu of device drivers.  If you turned those off, you may well have removed your SATA driver from the kernel.

What does lspci say about your hardware?

----------

## dvh

Hu:  I upped the rootdelay to 100, and indeed, the kernel waited for the 100 seconds before panic.

Neddy: 2.6.36-r5 works fine for me, so I don't think that I messed up the SATA drivers in the kernel.  also, my kernel is resident on an internal drive along with grub, but my root directory is on an external USB drive.  again, this works fine with the earlier kernel, but panics here.  seems clear that something is amiss with my kernel config, but I cannot figure out what.  here is the lspci output:

```
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

00:07.0 Performance counters: Intel Corporation Device 27a3 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 02)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 02)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 02)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 02)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 02)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 02)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 02)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 02)

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

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 02)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 02)

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Controller (rev 02)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 02)

01:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 22)

02:00.0 Ethernet controller: Atheros Communications Inc. AR5001 Wireless Network Adapter (rev 01)

03:03.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 61)

```

of course, this is from the working 2.6.36 kernel, not the unbootable 2.6.39

again, thanks for all your help

-dvh

----------

## dvh

just in case this helps, here are some of the boot sequence messages from the working 2.6.36 kernel boot:

```
[    1.769649] Waiting 10sec before mounting root device...

[    2.337043] usb 4-1: new low speed USB device using uhci_hcd and address 2

[    2.527851] input: Logitech USB Laser Mouse as /devices/pci0000:00/0000:00:1d.2/usb4/4-1/4-1:1.0/input/input3

[    2.529857] generic-usb 0003:046D:C069.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB Laser Mouse] on usb-0000:00:1d.2-1/input0

[    2.737052] usb 4-2: new low speed USB device using uhci_hcd and address 3

[    2.872318] ieee1394: Node added: ID:BUS[0-00:1023]  GUID[0030a002e0454ac5]

[    2.872751] ieee1394: Host added: ID:BUS[0-01:1023]  GUID[001d4ffffe649b28]

[    2.890459] scsi4 : SBP-2 IEEE-1394

[    2.915829] input: Microsoft Natural Keyboard Elite as /devices/pci0000:00/0000:00:1d.2/usb4/4-2/4-2:1.0/input/input4

[    2.917843] generic-usb 0003:045E:000B.0002: input,hidraw1: USB HID v1.10 Keyboard [Microsoft Natural Keyboard Elite] on usb-0000:00:1d.2-2/input0

[    3.125041] usb 5-1: new full speed USB device using uhci_hcd and address 2

[    3.324833] input: HID 05ac:1000 as /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input5

[    3.326928] generic-usb 0003:05AC:1000.0003: input,hidraw2: USB HID v1.11 Keyboard [HID 05ac:1000] on usb-0000:00:1d.3-1/input0

[    3.353834] input: HID 05ac:1000 as /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.1/input/input6

[    3.356076] generic-usb 0003:05AC:1000.0004: input,hidraw3: USB HID v1.11 Mouse [HID 05ac:1000] on usb-0000:00:1d.3-1/input1

[    3.564039] usb 5-2: new full speed USB device using uhci_hcd and address 3

[    3.745747] generic-usb 0003:05AC:8240.0005: hiddev0,hidraw4: USB HID v1.11 Device [Apple Computer, Inc. IR Receiver] on usb-0000:00:1d.3-2/input0

[    4.188544] ieee1394: sbp2: Logged into SBP-2 device

[    4.192556] ieee1394: sbp2: Node 0-00:1023: Max speed [S400] - Max payload [2048]

[    4.199441] scsi 4:0:0:0: Direct-Access     Ext Hard  Disk                 PQ: 0 ANSI: 4

[    4.202096] sd 4:0:0:0: Attached scsi generic sg2 type 0

[    4.206606] sd 4:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/465 GiB)

[    4.211961] sd 4:0:0:0: [sdb] Write Protect is off

[    4.214185] sd 4:0:0:0: [sdb] Mode Sense: 10 00 00 00

[    4.216729] sd 4:0:0:0: [sdb] Cache data unavailable

[    4.218931] sd 4:0:0:0: [sdb] Assuming drive cache: write through

[    4.231162] sd 4:0:0:0: [sdb] Cache data unavailable

[    4.233315] sd 4:0:0:0: [sdb] Assuming drive cache: write through

[   10.435205]  sdb: sdb1 sdb2 sdb3 sdb4 < sdb5 sdb6 >

[   10.445897] sd 4:0:0:0: [sdb] Cache data unavailable

[   10.448066] sd 4:0:0:0: [sdb] Assuming drive cache: write through

[   10.450103] sd 4:0:0:0: [sdb] Attached SCSI disk

[   11.814501] EXT3-fs: barriers not enabled

[   11.817077] kjournald starting.  Commit interval 5 seconds

[   11.817122] EXT3-fs (sdb1): mounted filesystem with journal data mode

[   11.817141] VFS: Mounted root (ext3 filesystem) readonly on device 8:17.

```

at around 4.18 seconds into the boot, you can see that it finds the ieee1394 (firewire) internal hub.  then, labeled "scsi" at 4.199 seconds into the sequence, it finds my external USB drive.  following the rootdelay of 10 seconds, you can see that it finds my partitions on the external (sdb) device.  booting the 2.6.39 kernel, I don't see any of the messages shown here from 4.0 seconds and forward...instead, this is replaced with the panic message

-dvh

----------

## NeddySeagoon

dvh,

I missed your root on USB.

Please put your /usr/src/linix/.config file on a pastebin.  wgetpaste is your friend.

----------

## dvh

after looking at the boot messaging closer, it appeared that this might have something to do with IEEE-1394 drivers, for which startup messages are in the same vicinity of the log.  so I did a "diff" between the old .config from 2.6.36 and the new config from 2.6.39.  of course, i had to fight through a lot of legitimate differences, but I found and interesting difference...IEEE-1394 drivers present [*] in the old .config, but NOT in the new .config.  so I used menuconfig and put them [*] into the new .config.  and to my surprise...IT NOW BOOTS just fine!

this is stange, I thought.  I have two of these external drives, and ONE is connected via firewire.  I had forgotten all about this, but after the boot worked, I looked at the hookup and of course, the external drive that I needed is indeed firewire, for which the drivers were missing.

not sure why they were missing, as I updated using the recommended menuconfig method (in addition to the make oldconfig method) and they both failed to bring these options forward.  is this normal?

in any case, I am a little embarassed about not knowing my HW setup like I thought I did, but at least I have solved the immediate problem.  anyone have a better recommendation for upgrading a kernel to avoid such dropouts in the future?

----------

## NeddySeagoon

dvh,

If things move in the kernel tree, or new menus are added on the path to the drivers you need, make oldconfig does not  always get it right.

The further you jump between kernel versions, the bigger the risk.

After make oldconfig, its always good to check the basics with make menuconfig.  I do remember a few horrors myself.

One that stands out in my mind is a kernel with no PCI support. I swear it wasn't me too.

----------

## dvh

thanks, Neddy.  Live and learn, I guess.  never been bitten by this one before, but I will certainly be aware of it now...

-dvh

----------

## paziu

after copying a good .config to the new tree...

make menuconfig & exit / save - even better if you check and verify ... and see what's (NEW)...

oldconfig might be good if you go from -r2 to -r3, but you made quite a big jump...

----------

