LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (http://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Kernel panic - not syncing: Attempted to kill init! (http://www.linuxquestions.org/questions/linux-kernel-70/kernel-panic-not-syncing-attempted-to-kill-init-589245/)

dwhitney67 10-03-2007 08:44 PM

Kernel panic - not syncing: Attempted to kill init!
 
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

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
...
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_RAMFS=y
CONFIG_CONFIGFS_FS=m

Other developers say that it could possibly be the file system table (/etc/fstab). Here's that:
Code:

# Used only when booting from CD-ROM
#
# file system  mount-point    type            options        dump    fsck
#                                                                      order
proc            /proc          proc            defaults        0      0
sysfs          /sys            sysfs          defaults        0      0
devpts          /dev/pts        devpts          gid=4,mode=620  0      0

/dev/hdb        /              iso9660        defaults        0      0

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:
Code:

default 0
timeout 10

title install
root (cd)
kernel /boot/vmlinuz-2.6.20.1 quiet root=/dev/hdb init=/to_install/do_install_wrapper

title shell
root (cd)
kernel /boot/vmlinuz-2.6.20.1 root=/dev/hdb init=/bin/ash

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 09:35 AM

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

dwhitney67 10-04-2007 01:29 PM

Kernel panic: sync failed - attempted to kill init.

reddazz 10-04-2007 05: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 09: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 07: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

not able to make screenshot, but i wrote down what the screen said..

82.484224 Call Trace:
82.484290 <c0188207> d_alloc+0x107/0x190
82.484364 <c017ee8d> __lookup_hach+0xbd/0x100
82.484450 <c017f399> lookup_one_len_nd+0x89/0x90
82.484534 <c01b8106> create_dir+0x46/0x1e0
82.484616 <c01b89dc> sysfs_create_dir+0x2c/0x70
82.484698 <c01ed94a> kobject_add+0x8a/0x1a0
... <c01edb7f> subsystem_register+0xf/0x30
... <c03ea621> param_sysfs_init+0x11/0x1e0
... <c01b7924> sysfs_add_file+0x
mca_init
c0100511 init+0x111/0x300
ret_from_fork
c0100400 init+0x0/0x330 (this line appears twice)
c01044c7 kernel_thread_helper+0x7/0x10
========================
code: 83 ed 04 8b 45 04 0f 18 00 90 8d 45 04 39 d8 0f 84 bc 00 00
00 f6 45 18 2c 74 e2 89 e8 e8 4b ea ff ff 89 c6 8b 44 24 10 8b 78 24 <ac> ae 75
00 84 c0 75 f8 31 c0 eb 04 19 c0 0c 01 85 c0 75 be 8b
EIP: <c01b83de> sysfs_lookup+0x5e/0x200 SS:ESP 0068:df905e94
<0>Kernel Panic - not syncing: Attempted to kill init!

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 09: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 01: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-09-2007 12:55 AM

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 10: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 02: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 10: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 01: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 09: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

not able to make screenshot, but i wrote down what the screen said..

82.484224 Call Trace:
82.484290 <c0188207> d_alloc+0x107/0x190
82.484364 <c017ee8d> __lookup_hach+0xbd/0x100
82.484450 <c017f399> lookup_one_len_nd+0x89/0x90
82.484534 <c01b8106> create_dir+0x46/0x1e0
82.484616 <c01b89dc> sysfs_create_dir+0x2c/0x70
82.484698 <c01ed94a> kobject_add+0x8a/0x1a0
... <c01edb7f> subsystem_register+0xf/0x30
... <c03ea621> param_sysfs_init+0x11/0x1e0
... <c01b7924> sysfs_add_file+0x
mca_init
c0100511 init+0x111/0x300
ret_from_fork
c0100400 init+0x0/0x330 (this line appears twice)
c01044c7 kernel_thread_helper+0x7/0x10
========================
code: 83 ed 04 8b 45 04 0f 18 00 90 8d 45 04 39 d8 0f 84 bc 00 00
00 f6 45 18 2c 74 e2 89 e8 e8 4b ea ff ff 89 c6 8b 44 24 10 8b 78 24 <ac> ae 75
00 84 c0 75 f8 31 c0 eb 04 19 c0 0c 01 85 c0 75 be 8b
EIP: <c01b83de> sysfs_lookup+0x5e/0x200 SS:ESP 0068:df905e94
<0>Kernel Panic - not syncing: Attempted to kill init!

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..



All times are GMT -5. The time now is 05:16 AM.