# Update to Kernel 3.1.0 - Kernel Panic on RAID [Solved]

## piwacet

Hi.  My system has been running swimmingly for 2 years, with /boot on raid1 /dev/md1, /swap on raid1 /dev/md2, and / on raid10 /dev/md3.  Using Grub 1 with superblock version 0.9.  Most recently using vanilla kernel 3.0.7 without problems.  4 SATA disks in this setup.

I tried to upgrade to the vanilla kernel 3.1.0, and got a kernel panic.  I did check the kernel configuration, and appropriate raid drivers are compiled into the kernel, as well as the "autodetect raid arrays on boot."

The panic looks like this (I've run optical character recognition on a photo of the panic, so some of the numbers are not correct, but I think the pertinent stuff is there):

```
0013 241031227 sdb3 00000000-0000-0000-0000—000000000000

0030 244190504 sdd driver: sd

0031 1000250 sdd1 00000000-0000—0000-0000—000000000000

0032 2104515 sdd2 00000000-0000-0000-0000-000000000000

0033 241031227 sdd3 00000000-0000—0000-0000-000000000000

0020 244190504 sdc driver: sd

0021 1000250 sdc1 00000000—0000—0000—0000-000000000000

0022 2104515 sdc2 00000000—0000-0000—0000—000000000000

 0023 241031227 sdc3 00000000-0000-0000-0000-000000000000

 0000 1040575 sr0 driver: sr

0903 402002000 md3 (driver?)

0902 2104440 md2 (driver?)

0901 1000100 mdl (driver?)

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

Pid: 1, conn: swapper Not tainted 3.1.0 #1

Call Trace:

[<ffffffff0149b0f2>l ? panic•0xa1/0x1ac

(<ffffffff0149b03d>1 ? printk+0x40/0x45

[<ffffffff0100ae51>l ? mount_block_root+0x1c1x0x25c

[<ffffffff0100b00c>1 ? prepare_namespace+0x131/0x15b

[<ffffffff0100abd0>1 ? kernel_init+0x10a/0x113

[<ffffffff014a05?4>1 ? kerncl_thread_helper+0x4/0x10

[<ffffffff0100aace>l ? start_kernel+0xZe0/0¤2e0

[<ffffffff014a05?0>l ? gs_change+0x13/0x13
```

It seems that it's not finding the raid drivers for some reason, even though they're compiled in.  Anyone else notice this?  Anyone successfully using the 3.1.0 with raid and superblock version 0.9? Maybe there's a new raid-related kernel configuration setting I've got wrong, although comparing the configurations in the "device drivers -> multiple device driver support", the raid stuff is all the same in my configuration between 3.0 and 3.1.

Thanks!Last edited by piwacet on Sun Oct 30, 2011 8:24 pm; edited 1 time in total

----------

## frostschutz

Maybe your initramfs is broken or (if not using initramfs) maybe raid autodetect was finally removed in kernel 3.1?

----------

## gentoo_ram

I am running gentoo-sources 3.1 and didn't have an issue with my automatic RAID detection.  My root filesystem is RAID1.

```

Linux gw 3.1.0-gentoo #1 SMP Wed Oct 26 09:58:07 PDT 2011 x86_64 Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz GenuineIntel GNU/Linux

gw:~$ cat /proc/cmdline 

root=/dev/md12 vga=ext rootfstype=ext4
```

```
...

[    8.175011] md: Waiting for all devices to be available before autodetect

[    8.175080] md: If you don't use raid, use raid=noautodetect

[    8.175211] md: Autodetecting RAID arrays.

[    8.358343] md: Scanned 11 and added 11 devices.

[    8.358410] md: autorun ...

...

[    8.362053] md: considering sdb2 ...

[    8.362119] md:  adding sdb2 ...

[    8.362184] md: sdb1 has different UUID to sdb2

[    8.362250] md:  adding sda2 ...

[    8.362316] md: sda1 has different UUID to sdb2

[    8.362429] md: created md12

[    8.362494] md: bind<sda2>

[    8.362561] md: bind<sdb2>

[    8.362628] md: running: <sdb2><sda2>

[    8.362890] md/raid1:md12: active with 2 out of 2 mirrors

[    8.362963] md12: detected capacity change from 0 to 4096065536

```

----------

## piwacet

Thanks.  It's superblock version 0.9, without initramfs, and autodetection is still in the kernel.

gentoo_ram, do you mind posting the output of

```
cat /usr/src/linux/.config | grep "_MD"
```

Thanks!

----------

## gentoo_ram

```
gw:~$ zgrep _MD /proc/config.gz 

# CONFIG_TCP_MD5SIG is not set

CONFIG_SCTP_HMAC_MD5=y

CONFIG_MD=y

CONFIG_BLK_DEV_MD=y

CONFIG_MD_AUTODETECT=y

# CONFIG_MD_LINEAR is not set

CONFIG_MD_RAID0=y

CONFIG_MD_RAID1=y

CONFIG_MD_RAID10=y

CONFIG_MD_RAID456=y

# CONFIG_MD_MULTIPATH is not set

# CONFIG_MD_FAULTY is not set

# CONFIG_MDIO_BITBANG is not set

# CONFIG_USB_MDC800 is not set

CONFIG_CRYPTO_MD4=m

CONFIG_CRYPTO_MD5=y
```

----------

## sisserl

I have the same issue. Kernel 3.0.7 is just running fine, but 3.1 panics with the same error. I am not usng raid at all. I am on a macbook pro 8.2

----------

## piwacet

Thanks.  Huh.  Here's mine:

```
cat /usr/src/linux/.config | grep "_MD"

# CONFIG_TCP_MD5SIG is not set

CONFIG_MD=y

CONFIG_BLK_DEV_MD=y

CONFIG_MD_AUTODETECT=y

# CONFIG_MD_LINEAR is not set

# CONFIG_MD_RAID0 is not set

CONFIG_MD_RAID1=y

CONFIG_MD_RAID10=y

# CONFIG_MD_RAID456 is not set

# CONFIG_MD_MULTIPATH is not set

# CONFIG_MD_FAULTY is not set

# CONFIG_USB_MDC800 is not set

CONFIG_CRYPTO_MD4=y

CONFIG_CRYPTO_MD5=y
```

The only difference in the raid-related stuff seems to be that I don't have raid0 or raid456 compiled in, but I only use raid1 and raid10.

I'll try compiling raid0 and raid456 in kernel, just to see if it makes any unexplainable difference.

Thanks!Last edited by piwacet on Fri Oct 28, 2011 9:51 pm; edited 1 time in total

----------

## piwacet

 *sisserl wrote:*   

> I have the same issue. Kernel 3.0.7 is just running fine, but 3.1 panics with the same error. I am not usng raid at all. I am on a macbook pro 8.2

 

Is it really the same error? Where you're seeing that it's looking for a raid driver just before the panic?

```
0901 1000100 mdl (driver?) 
```

(The numbers to the left aren't so relevant.)

----------

## NeddySeagoon

Kernel 3.1.0 works here for raid1 /boot, raid5 root and everything else in LVM.

I'm using raid superblock ver 0.90 and autoassembly too.

----------

## piwacet

Thanks all.  Well, compiling in raid0 and raid456 didn't help.

Either I'm doing something wrong, in which case a little tinkering should fix it, or there's actually a bug, in which case others will hit this problem too.

I've no urgent need to upgrade to the new kernel, so I'll tinker around and keep an eye on what google searches has to say.

Thanks all!

----------

## sisserl

oh sorry, the "md" error is not part of my error message. but the rest looks like your message

----------

## ttuegel

 *sisserl wrote:*   

> oh sorry, the "md" error is not part of my error message. but the rest looks like your message

 

I'm having the same problem as sisserl. I'm not using RAID, but I have a kernel panic that looks the same but for the "md" part. Is it possible that the RAID/non-RAID problems are linked, and the message about "md" is incidental?

----------

## piwacet

I think a lot of different problems can cause kernel panics.  It would be helpful if you posted what the screen shows.  Some people take a photo of the screen to post the text, but I'm not sure if you can post photos in the gentoo forums.  You could post it to another website and then link to it here.

----------

## piwacet

Fixed.

My problem was I never specified a "root=" device in my grub.conf.  Apparently all the previous kernels could figure out the root device, but 3.1 apparently needs it specified.

So in my case appending the "root=/dev/md3" to the kernel line of my grub.conf was all I needed to do:

```
kernel /boot/vmlinuz root=/dev/md3
```

(Adjust as appropriate for your configuration.)

This may explain why others are getting a kernel panic on update to the 3.1.0 kernel as well, even if they aren't using RAID.

Just FYI, the way I figured this out was to append "vga=ask" to my grub kernel line, which allowed me to set a higher resolution early in boot for the console output, which allowed me to see more of the text output and to get a better handle on the error.

Thanks all!

----------

## sisserl

Thank you. That solved this issue for me, too.

----------

## elvis_

This should be a sticky thread, or have a better name. It just helped me out as well.

The trickiness is in that something breaks without the operator changing anything, and the breakage happens before any logging.

And it will keep hitting people as they upgrade and this thread will be harder to find...

my grub.conf went from 

```
default 0

title Latest

kernel /vmlinuz 
```

```
default 0

title Latest

kernel /vmlinuz root=/dev/sda3
```

fixed.

I made it a little harder for myself because I tried root=sda3 first and forget the /dev/ and thought that wasn't the problem. Also I have had the same error before and fixed it by compiling in a driver to the kernel, it lead me down the wrong path this time.

----------

