LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 10-03-2007, 08:44 PM   #1
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,523

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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?

Last edited by dwhitney67; 10-03-2007 at 08:46 PM.
 
Old 10-04-2007, 09:35 AM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Can you post the detailed output of the kernel panic error message.
 
Old 10-04-2007, 01:29 PM   #3
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,523

Original Poster
Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Kernel panic: sync failed - attempted to kill init.
 
Old 10-04-2007, 05:14 PM   #4
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
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.
 
Old 10-04-2007, 09:16 PM   #5
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,523

Original Poster
Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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

Last edited by dwhitney67; 10-04-2007 at 09:19 PM.
 
Old 10-05-2007, 07:01 PM   #6
Ungdomspastorn
LQ Newbie
 
Registered: Oct 2007
Posts: 2

Rep: Reputation: 0
Post 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..
 
Old 10-05-2007, 09:28 PM   #7
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by dwhitney67 View Post
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?
 
Old 10-06-2007, 01:06 AM   #8
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,523

Original Poster
Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
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.

Last edited by dwhitney67; 10-06-2007 at 01:15 AM.
 
Old 10-09-2007, 12:55 AM   #9
Vegetaman
LQ Newbie
 
Registered: Oct 2007
Posts: 15

Rep: Reputation: 0
Quote:
Originally Posted by Ungdomspastorn View Post
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...

Last edited by Vegetaman; 10-09-2007 at 12:57 AM.
 
Old 10-13-2007, 10:11 PM   #10
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: None (src & compile)
Posts: 253

Rep: Reputation: 36
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.
 
Old 10-31-2007, 02:58 PM   #11
CaptainPedro
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
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.
 
Old 11-02-2007, 10:12 AM   #12
robertwolfe
Member
 
Registered: Apr 2005
Location: Grand Island, NY
Distribution: Ubuntu and Debian
Posts: 57

Rep: Reputation: 16
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.
 
Old 11-02-2007, 01:07 PM   #13
tc21931
LQ Newbie
 
Registered: Nov 2007
Posts: 1

Rep: Reputation: 0
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
 
Old 09-26-2009, 09:27 AM   #14
sanami
LQ Newbie
 
Registered: Sep 2009
Location: Japan
Distribution: Ubuntu 9.04
Posts: 2

Rep: Reputation: 0
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 View Post
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..
 
  


Reply

Tags
kernel panic


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel panic - not syncing: Attempted to kill init! k5knt Linux - General 39 07-18-2007 01:47 AM
kernel panic - not syncing: attempted to kill init! asif2k Fedora 3 02-14-2007 09:44 AM
Kernel panic - not syncing: Attempted to kill init! Wocky Linux - Kernel 6 01-26-2007 10:25 PM
Kernel panic -not syncing:Attempted to kill init! vengadesan Linux - Server 1 10-31-2006 08:39 AM
Kernel panic -not syncing:Attempted to kill init! vengadesan Linux - Server 1 10-28-2006 12:17 PM


All times are GMT -5. The time now is 11:52 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration