# [SOLVED] Kernel panic on 3.3.8 - VFS: Cannot open root dev

## thomasn

Upgrading an amd64 box from a 2.6.38 to a 3.3.8 gentoo-sources kernel I'm getting

VFS: Cannot open root device "sdb5" or unknown-block(0,0) 

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

kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

...which IIUC implies I don't have the correct SATA drivers built into my kernel (?). My lspci is

```

00:00.0 Host bridge: Intel Corporation 5520/5500/X58 I/O Hub to ESI Port (rev 13)

00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 13)

00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 13)

00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 13)

00:14.0 PIC: Intel Corporation 5520/5500/X58 I/O Hub System Management Registers (rev 13)

00:14.1 PIC: Intel Corporation 5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 13)

00:14.2 PIC: Intel Corporation 5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 13)

00:1a.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #4

00:1a.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #5

00:1a.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #6

00:1a.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #2

00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller

00:1c.0 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 1

00:1c.5 PCI bridge: Intel Corporation 82801JI (ICH10 Family) PCI Express Root Port 6

00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1

00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2

00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3

00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1

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

00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller

00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode]

00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller

02:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV730 [FirePro V5700]

05:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761 Gigabit Ethernet PCIe (rev 10)

06:05.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 70)

```

This is on an Acer Aspire 5336.

The grub kernel params are

```

kernel /boot/vmlinuz root=/dev/sdb5 rootfstype=ext4 radeon.modeset=1 splash=silent,theme:default console=tty1 quiet 

```

Using grub tab completion shows me that /boot/vmlinuz is present, and by changing grub root to (hd1,4) and messing about with TAB I've confirmed that /dev/sdb5 is indeed my root partrition. I've tried enabling SATA / PATA / SCSI / RAID options in various combinations without success. My currenrt .config is here:

http://pastebin.com/NA9XzN7f

Is there enough info here to see what I'm doing wrong? Ifanyone could point me to relevant docs I'd be most grateful.

--ThomasLast edited by thomasn on Thu Jul 05, 2012 5:17 pm; edited 1 time in total

----------

## mvaterlaus

hi,

since you are using a laptop, is there really a second harddrive in it? you are using sdb, which points to the second harddrive. if you have a usb harddisk connected to that computer, try unpluging it. also, if you try to boot from a usb hdd, you can append a rootdelay option, or an initramfs with the usb support in it. this is because the usb subsystem gets loaded after the mount of the root filesystem.

for the kernel, try to use kernel-seeds.org [1]. it has an instruction on how to work with it. when you are in menuconfig, you can find the drivers by writing a slash "/" and then part of the driver name. the debian hardware site [2] uses the lspci -n output to show you, which drivers you really need.

[1]http://www.kernel-seeds.org/working.html

[2]http://kmuto.jp/debian/hcl/

----------

## thomasn

hi mvaterlaus,

Thanks, these were useful links. This laptop has two disks, sdb is partitioned for both Windows and Linux, at the moment I've left sda untouched as Windows-only:

```

tapir ~ # fdisk -l /dev/sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes

255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x259d4594

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1              63     4209029     2104483+  de  Dell Utility

/dev/sda2   *     4210688    20836351     8312832    7  HPFS/NTFS/exFAT

/dev/sda3        20836352  1953521663   966342656    7  HPFS/NTFS/exFAT

tapir ~ # fdisk -l /dev/sdb

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes

255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x33eacfb6

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1            2048  1052772352   526385152+   7  HPFS/NTFS/exFAT

/dev/sdb2   *  1052772353  1056966656     2097152   83  Linux

/dev/sdb3      1056966657  1953525167   448279255+   5  Extended

/dev/sdb5      1056968705  1266683904   104857600   83  Linux

/dev/sdb6      1266685953  1283463168     8388608   82  Linux swap / Solaris

/dev/sdb7      1283465217  1702895616   209715200   83  Linux

```

So sdb2 is /boot, sdb5 is /, sdb6 is swap, sdb7 is /home, in the (working) system booted with  2.6.38. Output of lspci -v for the SATA device shows:

```

00:1f.2 RAID bus controller: Intel Corporation 82801 SATA Controller [RAID mode]

        Subsystem: Dell Device 0293

        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 66

        I/O ports at fe00 [size=8]

        I/O ports at fe10 [size=4]

        I/O ports at fe20 [size=8]

        I/O ports at fe30 [size=4]

        I/O ports at fec0 [size=32]

        Memory at f0400000 (32-bit, non-prefetchable) [size=2K]

        Capabilities: [80] MSI: Enable+ Count=1/16 Maskable- 64bit-

        Capabilities: [70] Power Management version 3

        Capabilities: [a8] SATA HBA v1.0

        Capabilities: [b0] PCI Advanced Features

        Kernel driver in use: ahci

        Kernel modules: ahci

```

... so using driver ahci. The driver-seeds site shows I need ata_piix for this device. Both are set =y in the config for the new 3.3.8 kernel:

```

tapir ~ # grep AHCI /usr/src/linux/.config

CONFIG_SATA_AHCI=y

CONFIG_SATA_AHCI_PLATFORM=y

# CONFIG_SATA_ACARD_AHCI is not set

tapir ~ # grep PIIX /usr/src/linux/.config                                      

CONFIG_ATA_PIIX=y

CONFIG_PATA_OLDPIIX=y

CONFIG_PATA_MPIIX=y

# CONFIG_I2C_PIIX4 is not set

```

I'm building this kernel with make menuconfig && make && make modules_install instead of using genkernel; I'm not using an initramfs. Support for ext2 and ext4, the only fs I'm using here, is built in.

Thanks for the tip about using / to search in menuconfig, I only found that a few months ago and it's been a huge timesaver. Right now, though, I'm stuck. Mygoogle-fu suggests the same drivers are needed (ahci or ata-piix) so I'm not sure what else to try. Any suggestions would be very welcome.

Thanks for your attention,

Thomas

----------

## thomasn

Solved! I needed to drop PATA_OLDPIIX, there's some conflict between that and the ATA_PIIX code.

Oh, and I was talking rubbish about the "Acer Aspire 5336", it's actually a Dell Precision T3500 ... The Aspire is the machine I'm using to ssh onto the Dell... brain death.

Thanks so much for your help.

Best,

Thomas

----------

