Solved

Kernel panic - not syncing: Attempted to kill init!

Posted on 2007-11-13
9
6,831 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

632 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