# Kernel panic on a new install.

## manu_leo

Hi Experts, I am getting Kernel panic when installing gentoo on a fresh box. The last line says   *Quote:*   

> end trace 2c17e492843aa7e2

  if that makes any sense.

 *Quote:*   

> (chroot) livecd linux # lspci -vv | grep -i sata
> 
> lspci: Unable to load libkmod resources: error -12
> 
> 00:1f.2 SATA controller: Intel Corporation C600/X79 series chipset 6-Port SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])
> ...

 

 *Quote:*   

> (chroot) livecd linux # lspci -vv | grep -i raid
> 
> lspci: Unable to load libkmod resources: error -12
> 
> 02:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 05)
> ...

 

 *Quote:*   

> (chroot) livecd / # lspci -vv | grep -i sas
> 
> lspci: Unable to load libkmod resources: error -12
> 
> 02:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 05)
> ...

 

Kernel config :-

 *Quote:*   

> http://pastebin.com/MLhsmnsA

 

Appreciate all your help in advance. Thanks

----------

## NeddySeagoon

manu_leo,

The panic message might say something like .... unknown-block(x,y) 

Where X and Y are numbers.  If that's there, what are the numbers?

Which disc controller is your root filesystem attached to?

CONFIG_SATA_AHCI=y covers

00:1f.2 SATA controller: Intel Corporation C600/X79 series chipset 6-Port SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])

CONFIG_MEGARAID_SAS=y covers

02:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 05) 

The text of the panic message will tell more.

----------

## manu_leo

Thanks Neddy, is there a way I can attach screen shot here for the kernel panic?

The panic message does not say anything line unknown block which it did before, so I am also little confused.

When I do lspci -vv for sata and sas, I see ahci and megaraid respectively, so I configured both in the kernel.

Please suggest if I am missing something here. Thanks.

----------

## NeddySeagoon

manu_leo,

You can put a photo on a free photo site and put a link here.

There are a few things you need to get right in the kernel to boot.

The partition table code.  Its usually MSDOS or GPT.

Block device support

SCSI Disk Support. Thats the top layer

The individual chip set drivers AHCI, megaraid ...

The root filesystem driver.  

There are probably more.  We need to know all of those things to check your kernel settings.

----------

## manu_leo

Hi Neddy, here are the details :-

Partition table code is msdos and the partition is as below :-

 *Quote:*   

> /dev/sdc1   /         xfs  noatime   0 1
> 
> /dev/sdc2   /boot     xfs  noatime   0 0 
> 
> /dev/sdc3   /var      xfs  noatime   0 2
> ...

 

SCSI Disk is  *Quote:*   

> SCSI controller: LSI Logic / Symbios Logic SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)

 

 *Quote:*   

>  Symbol: SCSI_MPT2SAS [=y]                                                                                                                                                                           │  
> 
>   │ Type  : tristate                                                                                                                                                                                    │  
> 
>   │ Prompt: Legacy MPT2SAS config option                                                                                                                                                                │  
> ...

 

File System is XFS and it is added in the kernel and compiled.

AHCI and Megaraid is also configured in kernel and compiled.

 *Quote:*   

>  Symbol: SCSI_MPT3SAS [=y]                                                                                                                                                                           │  
> 
>   │ Type  : tristate                                                                                                                                                                                    │  
> 
>   │ Prompt: LSI MPT Fusion SAS 3.0 & SAS 2.0 Device Driver                                                                                                                                              │  
> ...

 

Appreciate all your help.

----------

## NTU

For an example on what we'd need to help you solve your problem: https://www.youtube.com/watch?v=9_Qj-KY62yU

Without seeing the exact message and the entire stack trace we won't know what's causing the panic. Thanks!

----------

## manu_leo

Hi NTU,

I tried capturing the entire o/p as shown in the video, however I donot have the privileage to capture the entire stuff. I took the error screen shot which is attached.

Kernel Panic Link

 *Quote:*   

> https://s27.postimg.org/ouuyyjqzn/Screen_Shot_2016_12_28_at_12_40_40_AM.png

 

Please let me know if this helps you guys.

----------

## NeddySeagoon

manu_leo,

The text we need has scrolled off the top of the console.  Due to the panic, there is no way to get it back.

To do this by analysis we need 

1. 

```
lspci
```

 output.

2. 

```
df -T
```

 output, taken from just before you chroot.

3. Are you using BIOS or UEFI mode?

4. Your kernel .config file.

Items 1, 2 and 3 will fit in a post.

Item 4 must go onto a pastebin.

Another check you can do ... 

Get ready to chroot but don't do the chroot step.  

What is the time and date on the file 

```
/mnt/gentoo/usr/src/linux/.config
```

 make a note of it.

This is the kernel .config file which I asked you to pastebin above.  If all it well, it will be the oldest of the files we will look at.

The kernel binary is at 

```
/mnt/gentoo/usr/src/linux/arch/x86/boot/bzImage
```

if this file really came from the .config file above, it must be newer.  If not, rebuild and reinstall your kernel.  Retest.  You might have fixed your issue without knowing it.

Make a note of the time and date on 

```
/mnt/gentoo/usr/src/linux/arch/x86/boot/bzImage
```

Look at the kernel files in /boot/  There should be one with the same timestamp as bzImage above.  If there are several kernel files, remove all the older ones and reboot.  We need to test that the right kernel is being loaded.

If grub complains that it can't find a kernel to load, its been leading the wrong kernel.  Fix that and try again.

----------

## manu_leo

Thanks Neddy for all the help. Please find the requested o/p below :-

lspci

 *Quote:*   

> livecd ~ # lspci
> 
> 00:00.0 Host bridge: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 DMI2 (rev 04)
> 
> 00:01.0 PCI bridge: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 1a (rev 04)
> ...

 

df -T

 *Quote:*   

> livecd ~ # df -T
> 
> Filesystem     Type      1K-blocks    Used  Available Use% Mounted on
> 
> udev           devtmpfs      10240       4      10236   1% /dev
> ...

 

I am using  *Quote:*   

> BIOS

  mode.

.config o/p

 *Quote:*   

> http://pastebin.com/S5TBGzB8

 

bzImage is newer than .config

 *Quote:*   

> livecd ~ # ls -lth /mnt/gentoo/usr/src/linux/.config
> 
> -rw-r--r-- 1 root root 101K Dec 28 10:53 /mnt/gentoo/usr/src/linux/.config
> 
> livecd ~ # 
> ...

 

Also, there is just 1 kernel which is present and that is the one that is booting.

 *Quote:*   

> (chroot) livecd boot # ls -lth
> 
> total 20M
> 
> drwxr-xr-x 6 root root   93 Dec 28 06:14 grub
> ...

 

----------

## manu_leo

Sometime, I also see error as "Unable to mount root fs on unknow-block(8,1)

Screenshot attached

 *Quote:*   

> https://i.imgsafe.org/60eb4d729b.png

 

Not sure whats going on.

----------

## manu_leo

Any help on this really appreciated. I am stuck with this server and its going no where.

Can somepoint point me in the right direction to get this fixed. Thanks for all the help in advance.

----------

## eccerr0r

 *manu_leo wrote:*   

> 
> 
> bzImage is newer than .config
> 
>  *Quote:*   livecd ~ # ls -lth /mnt/gentoo/usr/src/linux/.config
> ...

 

kernel looks a bit older than your .config.  Make sure it's fresh.

You might want to change your root= around, like try /dev/sda, /dev/sdb, /dev/sdc ..etc.. and see if any of them work.  I don't know what order your machine decides to deal with your RAID controller in terms of what disks are connected to that versus your sata ports, and where your real root disk is connected...

----------

