LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-24-2005, 02:00 PM   #1
k5knt
LQ Newbie
 
Registered: Feb 2005
Location: San Angelo, TX USA
Distribution: Fedora Core 3
Posts: 9

Rep: Reputation: 0
kernel panic - not syncing: Attempted to kill init!


I'm currently running Fedora Core 3 with the 2.6.10.770_FC3 kernel.
I wanted to take a look at Zen Linux, so I downloaded the Zen Linux Gnome live CD iso.
After burning the cd, I tried it and it failed to start X. I rebooted and now I get a kernel panic when I boot FC3. Here are the last few lines of the boot process:
Code:
Mounting root filesystems 
ReiserFS: dm-0: found reiserfs format "3.6" with standard journal 
ReiserFS: dm-0: using ordered data mode 
ReiserFS: dm-0: journal params: device dm-0, size 8192 journal first block 18,
max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: dm-0: checking transaction log (dm-0) 
ReiserFS: dm-0: Using r5 hash to sort names 
Switching to new root 
exec of init (/bin/sh) failed!!!: 13 
umount /initrd/dev failed: 13 
kernel panic - not syncing: Attempted to kill init!
It then hangs.

How do I fix this?

Thanks.

Kent, K5KNT
 
Old 03-26-2005, 06:17 AM   #2
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
Have you checked the md5 checksum for the ISO image? From the output I'd suggest checking that - if it's fine the reburn the image, if not the redownload the ISO then reburn.
 
Old 03-26-2005, 04:27 PM   #3
k5knt
LQ Newbie
 
Registered: Feb 2005
Location: San Angelo, TX USA
Distribution: Fedora Core 3
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by brundles
Have you checked the md5 checksum for the ISO image? From the output I'd suggest checking that - if it's fine the reburn the image, if not the redownload the ISO then reburn.
I didn't check the md5 checksum, but I think you may have misunderstood my post. The kernel panic is when I tried to boot my installed Fedora Core 3, not the Zen Linux live CD.

Anyway, the CD is now in my growing pile of "useless" CD's and I have reinstalled Fedora Core 3.

Kent
 
Old 03-26-2005, 08:34 PM   #4
brundles
Member
 
Registered: Nov 2003
Location: UK
Distribution: SUSE 9.2
Posts: 77

Rep: Reputation: 15
Sorry about that Kent - you're right, having reread the original post I got the boot up the wrong way around
 
Old 04-22-2007, 02:07 AM   #5
mr805newbie
Member
 
Registered: Aug 2004
Posts: 78

Rep: Reputation: 15
FYI I'm getting this error in Mandriva 2007 also.
 
Old 06-25-2007, 12:48 PM   #6
fire-tick
LQ Newbie
 
Registered: May 2007
Distribution: openSUSE, Manjaro, Fedora, Debian (and in theory Arch)
Posts: 16

Rep: Reputation: 1
I am also having this problem with Fedora 7. I went to the Fedora-specific forum first for help, but received none. I always check my md5sums. I know the CD boots fine. It installed fine. But when booting, I get kernel panic.

If anyone could offer some possible reasons for this, that would be very helpful.
 
Old 06-25-2007, 04:05 PM   #7
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
You get kernel panic but for which reason?
It is important to know what is displayed before the kernel panic.
Are you using LVM? Which file system are you using?
Please post more information.

Anyway, you can try to make a new initrd file with the correct setup from the boot CD (try rescue, chroot to your system and run mkinitrd)
 
Old 06-26-2007, 07:24 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
This message is misleading, because it implies that the problem you should be focusing upon is here, when in fact the root cause of the problem occurred earlier. The "attempted to kill 'init'" message is actually the last piston that the machine will typically cough-up before it dies ... a death caused by a message that will have occurred sooner.

The actual problem in this case is:
Code:
 exec of init (/bin/sh) failed!!!: 13
When the init process (which is "the origin of all things" in a Linux system) was unable to do that, it died. But... the init process is not allowed to "die." The message really should have been:
Code:
Oh, my!  'init' died!  
But 'init' is not allowed to die!  Oh dear... I can't possibly continue.  
All I can think of to do right now is to panic! 
(Koff! Koff! Ka-pooie!  I'm comin', Martha! It's the big one!  Aaack!)
(System halted.)
 
Old 06-27-2007, 03:56 AM   #9
Jeiku
Member
 
Registered: Jul 2005
Posts: 64

Rep: Reputation: 18
Have you tried booting into single user mode from a CD and testing the init binary and/or the /bin/sh binary? It may be something like a missing library for example.

Try booting via a CD, mount your Fedora partition and try running the /sbin/init (and also /bin/sh) on that partition to see if it gives any errors - post them here if you get any.

(Just an hunch that's all! )
 
Old 06-27-2007, 09:09 AM   #10
fire-tick
LQ Newbie
 
Registered: May 2007
Distribution: openSUSE, Manjaro, Fedora, Debian (and in theory Arch)
Posts: 16

Rep: Reputation: 1
Q: is there a way to copy the text that comes up during boot (without having to manually write it)?
 
Old 06-27-2007, 10:09 PM   #11
Jeiku
Member
 
Registered: Jul 2005
Posts: 64

Rep: Reputation: 18
Use the dmesg command
 
Old 06-28-2007, 07:36 AM   #12
fire-tick
LQ Newbie
 
Registered: May 2007
Distribution: openSUSE, Manjaro, Fedora, Debian (and in theory Arch)
Posts: 16

Rep: Reputation: 1
I was able to copy the following text from the boot screen:

Code:
Waiting for driver initialization.
Trying to resume from /dev/sdb1
No suspend signature on swap, not resuming.
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: moving /proc failed: No such file or directory
setuproot: moving /sys failed: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Booting has failed.
Kernel panic - not syncing: Attempted to kill init!
Then the computer freezes, and the keyboard lights blink. Though this is not the exact same path to kernel panic as what k5knt posted, but the common thread appears to be: 'switching to new root', and 'unmount failed'.

Quote:
Code:
Switching to new root 
exec of init (/bin/sh) failed!!!: 13 
umount /initrd/dev failed: 13 
kernel panic - not syncing: Attempted to kill init!
I hope this helps. Thanks too for any help I can get.

f-t

Last edited by fire-tick; 06-28-2007 at 07:40 AM.
 
Old 06-28-2007, 11:41 AM   #13
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
Unfortunately, the problem dates back from before the part of log you provided.
Indeed, "mount: could not find filesystem '/dev/root'" means that linux can not mount the root filesystem, most probably because it was not able to create the dev file, probably because some modules are missing.
Could you please try to post more of the log?

Also please try this :
Boot from CD and select rescue mode at grub screen. Answer questions and do :
Code:
chroot /mnt/sysimage
mkdir /tmp/initrd
cp /boot/initrd* /tmp/initrd
cd /tmp/initrd
gunzip<initrd* | cpio -i -d
cat init
This will display the init script that linux is executing at boot.
near the end of it, you will see something like that :
Code:
echo Creating root device.
mkrootdev -t something -o defaults,ro somewhere
It will be interesting to know what something and somewhere are, so as to know which filesystem it is trying to mount for your root partition and see if the somewhere indeed contains the something file system and if all the modules are insmoded for this file system.

Regards

Edit : note that you can boot your kernel in quiet mode (option quiet) ; it will reduce the output only to errors, so you can actually see them.

Last edited by Agrouf; 06-28-2007 at 11:47 AM.
 
Old 06-28-2007, 12:58 PM   #14
fire-tick
LQ Newbie
 
Registered: May 2007
Distribution: openSUSE, Manjaro, Fedora, Debian (and in theory Arch)
Posts: 16

Rep: Reputation: 1
Thanks Agrouf. I'll try booting from the CD and checking out the init file. I'll also try Jeiku's suggesiton of:
Quote:
try running the /sbin/init (and also /bin/sh)
I saw your EDIT to boot in quiet mode -- I'll try that. If you need to see more of the boot log, I don't know how to get that. Jeiku suggested the "dmesg" command, but I am not familiar with that, nor how to use/execute it. If someone could explain, that would be great.

Also, I should note that I installed with both the Fedora 7 Live CD, and the Fedora 7 Installation CD, and got kernel panic both times I tried to boot directly after installation. I can't be sure that the errors were the same, but the end result was.

Last edited by fire-tick; 06-28-2007 at 01:08 PM.
 
Old 06-28-2007, 02:12 PM   #15
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

Rep: Reputation: 80
IMHO, /sbin/init won't help you because your system didn't mount the root partition, therefore it didn't access the init file, therefore the problem can't be there.
The program that isn't working is the init in the initrd file.
With all respect, I don't think dmesg can help you either, since the log files are written nowhere (since the partitions are not mounted linux can't access any file, but those in the initrd because it is copied to ram by grub).
If you have a live CD, you can mount your boot partition and check your initrd file.
It is located at /boot ; the command :
gunzip<initrd_file | cpio -i -d
extracts the initrd file.
We just need to know which file system (ext2? ext3? reiserfs?) you are using and on which kind of hardrive it is installed (USB? SATA? LVM? RAID? IDE?)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel Panic -- not syncing: attempted to kill idle task oraclerg Linux - Distributions 16 11-25-2018 01:32 PM
Kernel panic - not syncing: Attempted to kill init! potsilui Linux - Kernel 28 05-09-2012 11:46 AM
Explained: "kernel panic - not syncing - attempted to kill init" sundialsvcs Linux - Software 36 04-24-2010 08:58 AM
Kernel Panic - Not Syncing: Attempted To Kill Init! tegralens Linux - Software 13 06-23-2008 03:15 PM
Updated = Kernel panic - not syncing: Attempted to kill init! potsilui Fedora 4 04-18-2005 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration