# [SOLVED]Kernel panic with software RAID

## choucete

Hi again,

Just an initial heads up, this is a fresh installation on which I was having issues with the fakeraid, that was finally solved on this thread.

Now the problem is that when I boot I get a kernel panic which I am almost certain is related to the fact that the kernel is not loading the raid drivers correctly, thus being unable to recognize the right partition it needs to boot.

This is how my disk looks with raid:

```
isw_chcgebbdc_Raid00  --> RAID device

isw_chcgebbdc_Raid001 --> efi

isw_chcgebbdc_Raid002 --> windows main

isw_chcgebbdc_Raid005 --> boot

isw_chcgebbdc_Raid006 --> /

isw_chcgebbdc_Raid007 --> swap

isw_chcgebbdc_Raid008 --> /home
```

This is the error:

```
VFS: Cannot open root device "mapper/isw_chcgebbdc_Raid006"
```

And then it offers me the partitions to load as /sda1 and sda2.

So, I was exploring possible solutions, but found different ways to approach the issue and got kind of lost. 

BTW, I added the dodmraid option to grub, but it did not have any effect, this is how grub.conf looks right now:

```
title Gentoo

root (hd0,4)

kernel /boot/kernel root=/dev/mapper/isw_chcgebbdc_Raid006 dodmraid
```

Also, I have following the wiki for RAID configuration and I think the kernel is correctly configured, or at least I don't know where else to look. The following are some of the options I have included, I must have missed some since I added many just in case they might be needed.

```
--- Block devices

  <*>   Mylex DAC960/DAC1100 PCI RAID Controller support --> added just in case

SCSI device support  --->

  <*> RAID Transport Class

--- Multiple devices driver support (RAID and LVM)                       

  -*-   RAID support       

    [*]     Autodetect RAID arrays during kernel boot                        

    < >     Linear (append) mode                                             

    <*>     RAID-0 (striping) mode                                           

    -*-     RAID-1 (mirroring) mode                                          

    < >     RAID-10 (mirrored striping) mode                                 

    -*-     RAID-4/RAID-5/RAID-6 mode                                        

    [ ]       RAID-4/RAID-5/RAID-6 Multicore processing (EXPERIMENTAL)       

    <*>     Multipath I/O support                                            

     < >     Faulty test module for MD                                        

    <*>   Device mapper support                                              

    [*]     Device mapper debugging support                                  

    <*>     Crypt target support                                             

    <*>     Snapshot target                                                  

    <*>     Mirror target    

    <*>     RAID 1/4/5/6 target (EXPERIMENTAL)                               

    <*>   Mirror userspace logging (EXPERIMENTAL)                            

    <*>   Zero target        

    <*>   Multipath target   

    <*>     I/O Path Selector based on the number of in-flight I/Os          

    <*>     I/O Path Selector based on the service time                      

    <*>   I/O delaying target (EXPERIMENTAL)                                 

    [*]   DM uevents (EXPERIMENTAL)                                          

    <*>   Flakey target (EXPERIMENTAL)
```

So I have a couple of questions:

Should the dodmraid grub option have any effect?

Do I need to create an initrd?

Thanks in advance!Last edited by choucete on Fri Feb 17, 2012 1:45 am; edited 1 time in total

----------

## Kaso_da_Zmok

if you cloud pastebin 

kernel config 

lspci

mount (just to see what fs you have on boot and root )

----------

## greyspoke

Also on the other thread you said: 

 *Quote:*   

> This is how my disks look now:
> 
> Code:
> 
> Disk /dev/md126: 1000.2 GB, 1000210432000 bytes
> ...

 

If this is still the case then you could try  using the /dev/md126p6 device name in your grub.conf.  Why do you think the /dev/mapper device should exist?

----------

## choucete

 *Kaso_da_Zmok wrote:*   

> if you cloud pastebin 
> 
> kernel config 
> 
> lspci
> ...

 

The kernel config and mount output is from the chrooted environment, the lspci output is from the livecd without chrooting into the installed system.

kernel config --> http://pastebin.com/1Ce7FMz0

lspci -k

```
livecd ~ # lspci -k

00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)

        Kernel driver in use: pcieport

00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)

        Subsystem: Giga-byte Technology Device 1c3a

00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 05)

        Subsystem: Giga-byte Technology Device 5006

        Kernel driver in use: ehci_hcd

        Kernel modules: ehci-hcd

00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 05)

        Subsystem: Giga-byte Technology Device a102

        Kernel driver in use: snd_hda_intel

        Kernel modules: snd-hda-intel

00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b5)

        Kernel driver in use: pcieport

00:1c.3 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 (rev b5)

        Kernel driver in use: pcieport

00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 (rev b5)

        Kernel driver in use: pcieport

00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 6 (rev b5)

        Kernel driver in use: pcieport

00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 7 (rev b5)

        Kernel driver in use: pcieport

00:1c.7 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 8 (rev b5)

        Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 (rev 05)

        Subsystem: Giga-byte Technology Device 5006

        Kernel driver in use: ehci_hcd

        Kernel modules: ehci-hcd

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

00:1f.0 ISA bridge: Intel Corporation P67 Express Chipset Family LPC Controller (rev 05)

        Subsystem: Giga-byte Technology Device 5001

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

        Subsystem: Giga-byte Technology Device b000

        Kernel driver in use: ahci

        Kernel modules: ahci

00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller (rev 05)

        Subsystem: Giga-byte Technology Device 5001

01:00.0 VGA compatible controller: NVIDIA Corporation GF110 [GeForce GTX 580] (rev a1)

        Subsystem: eVga.com. Corp. Device 1580

01:00.1 Audio device: NVIDIA Corporation GF110 High Definition Audio Controller (rev a1)

        Subsystem: eVga.com. Corp. Device 1580

        Kernel driver in use: snd_hda_intel

        Kernel modules: snd-hda-intel

03:00.0 PCI bridge: Integrated Technology Express, Inc. Device 8892 (rev 10)

05:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

        Subsystem: Giga-byte Technology Device 5007

06:00.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host Controller (rev 04)

        Subsystem: Giga-byte Technology Device 5007

07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

        Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard

        Kernel driver in use: r8169

        Kernel modules: r8169

08:00.0 IDE interface: Marvell Technology Group Ltd. Device 91a3 (rev 11)

        Subsystem: Giga-byte Technology Device b000

        Kernel driver in use: ahci

        Kernel modules: ahci
```

mount:

```
livecd / # mount

rootfs on / type rootfs (rw)

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=112125,mode=755)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)

tmpfs on / type tmpfs (rw,relatime)

/dev/sr0 on /mnt/cdrom type iso9660 (ro,relatime)

/dev/loop0 on /mnt/livecd type squashfs (ro,relatime)

rc-svcdir on /mnt/livecd/lib/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)

fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)

tmpfs on /mnt/livecd/lib/firmware type tmpfs (rw,relatime)

tmpfs on /mnt/livecd/usr/portage type tmpfs (rw,relatime)

usbfs on /proc/bus/usb type usbfs (rw,nosuid,noexec,relatime,devgid=85,devmode=664)

/dev/mapper/isw_chcgebbdc_Raid006 on / type ext3 (rw,relatime,errors=continue,barrier=1,data=writeback)

/dev/mapper/isw_chcgebbdc_Raid005 on /boot type ext2 (rw,relatime,errors=continue)

proc on /proc type proc (rw,relatime)

udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=112125,mode=755)

devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)

shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
```

Thanks again!

----------

## choucete

 *greyspoke wrote:*   

> If this is still the case then you could try  using the /dev/md126p6 device name in your grub.conf.  Why do you think the /dev/mapper device should exist?

 

This doesn't work because the only offerings I have from the kernel are sda1, sda2 or sdb (I omitted sdb before, my bad), meaning the physical disk devices. Even for the system to see md126 as a device it would mean that it is somehow working with fakeraid, which it is not.

Thanks anyway.

----------

## Kaso_da_Zmok

You are missing initramfs:

```
# emerge device-mapper

# emerge genkernel

# genkernel --dmraid all

```

The initramfs with dmraid support is a must.

Otherwise the kernel config looks fine, not exactly to my taste as there is a lot of stuff i would leave out but nothing that should interfere with the boot.

----------

## choucete

 *Kaso_da_Zmok wrote:*   

> You are missing initramfs:
> 
> ```
> # emerge device-mapper
> 
> ...

 

Sorry for the delayed reply.

It worked and I am right now writing from my newly installed system.

I created the initramfs following the instructions from the wiki using the Compromise Solution

And then added dodmraid to grub, which now looks like this:

```
title Gentoo

root (hd0,4)

kernel /boot/kernel root=/dev/mapper/isw_chcgebbdc_Raid006 dodmraid

initrd /boot/initramfs-genkernel-x86-3.1.10-gentoo-r1
```

Thanks a lot for all your help!

----------

