Solved

Kernel panic - not syncing: Attempted to kill init!

Posted on 2007-11-13
9
6,814 Views
Last Modified: 2013-12-16
I upgraded my Red Hat enterprise version 3.9 to version 4.3 and now I get the following error when trying to boot.

Creating root device
mkrootdev: label / not found
Mounting root filesystem
mount: error 2 mounting ext3
mount: error 2 mounting none
Switching to new root
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!


Anyone have any ideas on how to fix this??  I tried a few diff. things but nothing is working so far.
0
Comment
Question by:bbarac
9 Comments
 
LVL 14

Expert Comment

by:arrkerr1024
ID: 20275532
Sounds like either your hard drives aren't found or the label is screwed up.

What hard drive controller do you have?

If you boot from the 4.3 CD drive do you see hard drives?  If you do you could either try re-writing the label on the partition, or edit grub.conf and fstab to use the actual partition (something like /dev/sda1 instead of LABEL=/).
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 20276957
Hi,

Are you using any ATA drives? If this is the case then it is likely that your previous release was using it in PATa compatiblity mode and now th kernel thinks it is a SATA drive hence looking for /dev/sdx while th setup was for /dev/hdx.

Please reboot from a rescue disk and mount your /boot volume and edit  your grub/device list file and correct it if id displays a wrong drive there.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 20276958
Sorry for the mistake the file is named: grub/device.map
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 6

Expert Comment

by:remeshk
ID: 20277475
Go to rescue mode , try to mount  / partition automatically . If its not possible  , check your partition label using e2label command  . If its correct , mount / partition manually  and  boot partition is there that also . Check your grub.conf entry and /etc/fstab .
0
 

Author Comment

by:bbarac
ID: 20279897
I should mention that that this is running on ESX so this is a virtual machine.  The hard drvies are detected fine, when going into rescue mode the original installation is found and i've done an upgrade from 3.9 to 4.3 so the original install was OK.  Currently if I go into rescue mode and do a df I see the following

/dev/sda1   /
/dev/sda2    /boot
/dev/sda3     /home

if I go into fstab file I see

LABEL=/      /
LABEL=/boot    /boot
none     /dev/pts
LABEL=/home     /home
none     /proc
none    /dev/shm
/dev/sda4    swap
......


If I go into grub.conf file then I see.

title red hat.......
root (hd0,0)
kernel /vmlinuz-2... ro  root=dev/sda5
initrd /initrd-2.4.9-e.72.smp.img


I tried changing the fstab and grub file to point to sda1 and sda2 but it made no difference.
0
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 500 total points
ID: 20281332
Hi from what you post here I see thet yout gru.bconf trying to boot /dev/sda5 which is non-existent.

Just confitm that /boot/grub/device.map points to /dev/hda
then edit your /etc/grub.conf to change your
kernel /vmlinuz-2.... root=/dev/sda5
to
kernel /vmlinuz-2.... root=/dev/sda1

save and reboot. Thats it.
0
 
LVL 10

Expert Comment

by:elf_bin
ID: 20298250
Probably due to initrd either:
1) Being corrupt
2) Missing some drivers
3) Not actually being there.

mkinitrd (redhat) will solve that problem for you :o)
0
 

Author Comment

by:bbarac
ID: 20298407
I have it fixed, had to make quite a few changes to the grub.config, it was pointing to a wrong kernel and initrd version, also had to change some sym links.  So basically the grub.config was completely wrong.  
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 20302679
Congratulations. But what do you think might caused that?
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question