Kernel Panic

From Atomicorp Wiki
Jump to: navigation, search

Contents

[edit] Overview

You encounter a Kernel panic on boot up with an ASL kernel.

[edit] Cause

This is almost always caused by a kernel design change. For example, a module required for the system to see your disks is not being loaded in the initrd, which will cause a kernel panic.

Module names change in newer kernels, however not all distributions configure the system to use these new module names. If you experience a kernel panic your distribution is likely configured to use the older and no longer used module name(s). When the system boots it looks for these older deprecated module names and panics because it can not find them. This is a universal design condition of all Linux kernels and not specific to ASL kernels.

[edit] Diagnostics

Send the output from cat /etc/modprobe.conf and lspci to support


[edit] Possible fixes (HARDWARE DEPENDENT)

Example modprobe.conf's from other systems

3ware Inc 9xxx-series SATA-RAID
Intel Corporation 82801FB/FBM/FR/FW/FRW
nVidia Corporation MCP51 IDE (rev f1)
Symbios Logic 53c1030 (vmware)


Step 1) Update your modprobe.conf

You will need to determine what the new module name is for the drive controller in the new kernel. Older Linux distributions will use the older and no longer used names, newer Linux distributions such as the latest Fedora will use the newer names.

 vim /etc/modprobe.conf

Step 2) regenerate your initrd.img

 /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 2.6.23.1-2.art 

Step 3) Set the kernel to boot into your DEFAULT OS KERNEL. NOT THE ASL KERNEL. This is defined by the "default=" value, starting at 0 for the first position. This will set the system to fail "safe" back into the working kernel, without requiring you to power cycle or otherwise cold boot the system if there is a problem.

 vim /etc/grub.conf

example:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/md0
#          initrd /initrd-version.img
#boot=/dev/sda1
default=1
timeout=5
serial --unit=0 --speed=57600
terminal --timeout=5 serial console
title CentOS (2.6.23.1-3.art)
       root (hd0,0)
       kernel /vmlinuz-2.6.23.1-3.art ro root=/dev/md0 console=tty0 console=ttyS0,57600n8 selinux=0 noapic
       initrd /initrd-2.6.23.1-3.art.img
title CentOS (2.6.9-42.0.10.EL)
       root (hd0,0)
       kernel /vmlinuz-2.6.9-42.0.10.EL ro root=/dev/md0 console=tty0 console=ttyS0,57600n8
       initrd /initrd-2.6.9-42.0.10.EL.img


Step 4) Set the "panic" flag on the ASL kernel line

  title CentOS (2.6.23.1-3.art)
       root (hd0,0)
       kernel /vmlinuz-2.6.23.1-3.art ro root=/dev/md0 console=tty0 console=ttyS0,57600n8 selinux=0 panic=5
       initrd /initrd-2.6.23.1-3.art.img

Step 5) Set the ASL kernel to boot once, with the grub command

[root@www2 ~]# grub
grub> savedefault --default=0 --once
grub> quit

Step 6) Reboot

If the module name is still wrong your system will boot into the default kernel you configured, which should be a non-ASL kernel that you know your distribution will boot into.

Personal tools