I've seen other threads reporting issues with kernel panics, but in an effort not to offend anyone, I will not "hijack" them with my own problem.

I've researched high and low for a solution the the "kernel panic" issue that I have encountered with kernel 2.6.20.1, but I have found nothing relevant.

Some developers purport that the issue may lie with how the kernel file systems are configured, whether as a module or built-in. Well here's a snippet of my kernel configuration:

Code:

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT2_FS_XIP=y
CONFIG_FS_XIP=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_EXT4DEV_FS is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
CONFIG_REISERFS_PROC_INFO=y
# CONFIG_REISERFS_FS_XATTR is not set
CONFIG_JFS_FS=m
# CONFIG_JFS_POSIX_ACL is not set
# CONFIG_JFS_SECURITY is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_STATISTICS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_MINIX_FS is not set
CONFIG_ROMFS_FS=m
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
CONFIG_DNOTIFY=y
CONFIG_AUTOFS_FS=y
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_GENERIC_ACL=y

I am attempting to boot Linux from a CD-R, using Grub and El-Torito. The distro boots fine, with no errors, into a busybox Ash shell. When I exit this shell, the kernel panic occurs. My Grub menu.lst file looks like:

What in pray tell could be causing this? I really need some simple (and preferably correct) advice on how to correct this issue.

Also would it be too much to ask the Linux source developers to insert a better kernel panic error message that contained an error code or some useful information?

reddazz

10-04-2007 08:35 AM

Can you post the detailed output of the kernel panic error message.

dwhitney67

10-04-2007 12:29 PM

Kernel panic: sync failed - attempted to kill init.

reddazz

10-04-2007 04:14 PM

You need to post a bit more output than that. You need to post a few lines before and after the message so that others can try to deduce whats causing the kernel panic.

dwhitney67

10-04-2007 08:16 PM

My apologies if I was not clear in my OP. This is what I initially see:

$

Yep, that's the shell prompt.

Then after typing at the shell prompt this command:

$ exit

I see the following:

Kernel panic - sync failed: attempted to kill init

There are no other error messages. The system boots fine. I suspect that it is because I am exiting the one and only shell running on the system that the kernel panic occurs. There is nothing for the system to fall back onto (i.e. there is no getty running on any tty, much less the console).

Can you please confirm if this is a valid assessment?

P.S. I did find a work-around. I run the following script in lieu of /bin/ash (the script name is specified in the Grub init= statement):

Code:

#!/bin/sh

#
# File: do_shell.sh
#

# prevent ctrl-C
trap "" 2

# mount all file systems
mount -a

done="false"
while [ "$done" != "true" ]
do
# launch a shell
/bin/sh

echo ""
echo -n "Eject the CD? [y/n] "
read ans

case "$ans" in
[yY]*) done="true";;
esac
done

echo "Ejecting CD..."
eject /dev/hdb >/dev/null 2>/dev/null

# don't let the script exit; this will mask the "kernel panic" that would
# ensue otherwise.
while true
do
sleep 60;
done

Ungdomspastorn

10-05-2007 06:01 PM

Kernel panic - not syncing: Attemted to kill init!

I have the same problem. Had winXP installed, and it died. Not able to reinstall, I thougt i might try Isolinux 3.11 Ubuntu (Debian dated march 03 2007, H. Peter Anvin) and when I try to boot from the CD I get the
Kernel panic - not syncing: Attemted to kill init!
message

I believe this may be caused by a logical or physical disk error.. or a problem with the motherboard or BIOS..
The computer shuts down after aprox 1 minute, so it took me about 10 restarts to write the above.. That's allso why some lines are a bit short... besides the 82.nnnnnn numbers changed, propably because I tried to use different languages to see if it helped. The rest of the lines remained the same, so I guess that part of the lines ar not of interrest..

osor

10-05-2007 08:28 PM

Quote:

Originally Posted by dwhitney67
(Post 2913696)

I suspect that it is because I am exiting the one and only shell running on the system that the kernel panic occurs. There is nothing for the system to fall back onto (i.e. there is no getty running on any tty, much less the console).

Can you please confirm if this is a valid assessment?

Yes this is a valid assessment.

What I donít understand is why you are killing init (when I say init, I mean whatever process runs with PID 1 and PPID 0). I mean, what did you expect to happen? If you are done with a session, why not just halt or reboot? Or perhaps, you want a minimal init?

dwhitney67

10-06-2007 12:06 AM

Osor -

Thanks for confirming what I surmised. I tried the 'halt' command for grins. With BusyBox 1.1.0, the only option this command allows is for one to specify a delay (in seconds) before the system is supposedly halted. I got the following "error":

Code:

halt: no process killed

... and my shell is still active. No worries, I will just continue using the script I posted above.

Thank you for your comments.

Vegetaman

10-08-2007 11:55 PM

Quote:

Originally Posted by Ungdomspastorn
(Post 2914754)

I have the same problem. Had winXP installed, and it died. Not able to reinstall, I thougt i might try Isolinux 3.11 Ubuntu (Debian dated march 03 2007, H. Peter Anvin) and when I try to boot from the CD I get the

Kernel panic - not syncing: Attemted to kill init!

I believe this may be caused by a logical or physical disk error.. or a problem with the motherboard or BIOS..

I too had Win XP SP2 installed, and then it suddenly died on me just a few days ago. And now I am unable to install any OS to it without having some sort of "problem". And yet, I don't think there's anything physically wrong with my drive...

I get the Kernel Panic with Ubuntu 7.04...

I'm going to try the Western Digital Diagnostic utility. I will try to write zeroes to my HDD, and then try to install Linux again, and pray that it works. Otherwise, I'll have to put a new HDD in it, I guess.

I just hope there's no motherboard or bios issues...

jayjwa

10-13-2007 09:11 PM

You probably have an uncommon setup. Installers for distros like Ubuntu I'd imagine handle a certain number of default cases, but can't be prepared for everything. First I'd try to get a booting kernel. You might have to build one, if you're using uncommon hardware/devices. Get a kernel booting from something like a floppy, then use a boot/root disk combo to start building a system. Wipe the partition table, make new partitions. Verify those took. Make some filesystems, copy your kernel and start loading programs. Linux is really able to run on alot of things, getting it setup right is the tricky part.

CaptainPedro

10-31-2007 01:58 PM

I am having the same problem as Ungdomspastorn. I have tried lots of distributions (Ubuntu, Kubuntu, Fedora, Gentoo, and some others) all on live CD's and none of them have worked. Im wondering if this could be because my computer is an HP, and not one I built myself.

robertwolfe

11-02-2007 09:12 AM

I am also getting this error after building and installing a new kernel under Debian 4.0 'Etch' on a SuperServer box. Not using anything like BusyBox, etc. Just the plain Jane linux kernel.

tc21931

11-02-2007 12:07 PM

worked for me

I simply added the selinux=0 parameter at boot. (Thats a zero.) Worked perfectly. Let me know how it works for you.

Tim

sanami

09-26-2009 08:27 AM

Kernel panic - not syncing: Attemted to kill init! message

My problem is exactly like this problem but I have tried everything possible and not getting results. There must be someone here who can walk a beginner thru the steps to solving this error. Please help.

Quote:

Originally Posted by Ungdomspastorn
(Post 2914754)

I have the same problem. Had winXP installed, and it died. Not able to reinstall, I thougt i might try Isolinux 3.11 Ubuntu (Debian dated march 03 2007, H. Peter Anvin) and when I try to boot from the CD I get the
Kernel panic - not syncing: Attemted to kill init!
message

I believe this may be caused by a logical or physical disk error.. or a problem with the motherboard or BIOS..
The computer shuts down after aprox 1 minute, so it took me about 10 restarts to write the above.. That's allso why some lines are a bit short... besides the 82.nnnnnn numbers changed, propably because I tried to use different languages to see if it helped. The rest of the lines remained the same, so I guess that part of the lines ar not of interrest..