LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2017, 11:58 AM   #1
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,358
Blog Entries: 4

Rep: Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822
(RFC #2) "Kernel panic - not syncing - attempted to kill init!"


We've all seen this message as our Linux systems stopped dead:
Code:
"Kernel panic - not syncing - attempted to kill init!"
But what does it mean?

The message is actually in three parts. Let's consider each one in turn:
  • Kernel panic:
    A "kernel panic" is an unrecoverable error condition in, or detected by, the Linux kernel. It represents a situation where Linux literally finds it impossible to continue running, and stops dead in its tracks. (There is also a so-called "Oops" facility for recoverable errors.) Linux prints messages on the console and halts. Very often, the root cause of the problem will be indicated by some of these immediately-preceding messages.
  • not syncing:
    This part of the message indicates that the kernel was not in the middle of writing data to disk at the time the failure occurred. This is a supplemental piece of information that is not directly related to the panic message itself.
  • attempted to kill init:
    This is the situation that Linux actually detected, and this message is somewhat misleading. It actually means that "Process #1" either terminated or, just as likely, failed to start.

So, what's init and why is it so important?
When Linux starts, it manually creates one (privileged) user process, which is always "Process #1." (Traditionally, this process was named init, although today it might be systemd or something else.) Linux depends on this special process to do certain things, such that Linux literally cannot continue running without it. If the process terminates for any reason, or does not start, Linux has no alternative but to halt with a "kernel panic."

So, what can I do?
In spite of the message referring to "kill init," the most likely reason is that the process failed to start. For instance, there could be a binary library (such as glibc) which it needs, but that is now broken due to a recent update to the system software that did not complete correctly. Or, the file-system could have become corrupt, or a required disk driver failed to load. Messages which immediately precede the actual panic will suggest its likely causes. You will probably need to boot the system from a recovery disk (or a disk-based distro such as Knoppix) in order to analyze and resolve the underlying problem.
 
Old 09-13-2017, 08:16 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,813
Blog Entries: 13

Rep: Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875
I like the organization of your draft, and feel it is well written.

In the last section where you cite "So, what can I do?", you mention booting from a recovery disk to analyze the underlying problem.

I feel you should consider providing additional insight as to how to analyze the problem.

Are there any general guide steps which can be added to show them how to diagnose, and possibly resolve, this type of problem?

Because the first question they may ask is "How do I do that?", once they see the comments about a recovery disk or disk-based distribution.
 
Old 09-13-2017, 09:09 AM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,358

Original Poster
Blog Entries: 4

Rep: Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822
(Section rewrite – for comments.)

So, what can I do?
In spite of the message referring to "kill init," the most likely reason is that the process failed to start. Process #1 is an ordinary user process, running as root, and so it has the same basic requirements as any other process. Messages will usually be found in the log, immediately preceding the panic, which tell you more about exactly what went wrong.

For instance, a disk-driver that is needed to access the hard drive might have failed to load, because of a recent update to Linux that somehow went wrong. A menu of installed kernel versions usually appears briefly when you start the machine: try booting from the previous version of the Linux kernel.

Another distinct possibility is that the file system has become corrupt. In this case, you may need to try to boot the machine into a "recovery mode" (depending on your distro), or boot from a DVD or memory-stick. For instance, the startup menu on the installation disk for most Linux distros contains a "recovery" option which will attempt to check for and fix errors on the boot drive. Boot the system from that DVD and select this option. Any unexplained mis-behavior of a disk drive is also a strong indication that the drive may very soon need to be replaced.
 
1 members found this post helpful.
Old 09-14-2017, 11:26 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,813
Blog Entries: 13

Rep: Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875
I will admit to plagiarizing my own post from the Kali sticky thread discussion.

I think it is an excellent draft, and will give some time to let other comments come in before taking the actions to make it a sticky.

Open to title suggestions. Mine would be, "How to diagnose a kernel panic"

Open to forum suggestions. I'll suggest Linux - Kernel. If there are other suggestions, please do share.

@sundialsvcs: Great work!

For when the draft is final, I'll suggest you post a clean copy here in this thread. Because what we will do, is to move that single post to create the sticky. This will maintain you as the author, as it should be.

Best Regards,

- RT
 
1 members found this post helpful.
Old 09-15-2017, 09:13 AM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,358

Original Poster
Blog Entries: 4

Rep: Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822
I suggest that "attempted to kill init!" is the title that we should continue to use, since this post is not intended to say "how to diagnose a kernel panic in general." (I'm not sure that such a post could be written.) This, in my experience, is easily the most-common kernel panic that anyone encounters, usually while trying to boot Linux after an update.

I also suggest "Newbie" because s are the ones who are most likely to encounter it and to be blown-out-of-the-water by it, although it might be a good idea to post the same sticky in two places.

(I am completely unconcerned about author attribution, and it would be perfectly fine with me if the finished "sticky" included other contributor's comments. "Newbies" are welcome to chime in. Let's just all make this the best "sticky" it can be, because nothing's worse than ...
Quote:
Originally Posted by AAaauuugghh!:
" my Linux just crashed before it even got off the ground! "

Last edited by sundialsvcs; 09-15-2017 at 09:14 AM.
 
Old 09-15-2017, 10:27 AM   #6
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth, unfortunately...
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881

Rep: Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063Reputation: 2063
Well done sundialsvcs, your sticky has my vote! VERY well written!

Thanks for the knowledge!! I'm sure it will help a lot of newbies (and others).
 
Old 09-15-2017, 10:50 AM   #7
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,813
Blog Entries: 13

Rep: Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875
Quote:
Originally Posted by sundialsvcs View Post
...
I also suggest "Newbie" because s are the ones who are most likely to encounter it and to be blown-out-of-the-water by it, although it might be a good idea to post the same sticky in two places.

(I am completely unconcerned about author attribution, and it would be perfectly fine with me if the finished "sticky" included other contributor's comments. "Newbies" are welcome to chime in. Let's just all make this the best "sticky" it can be, because nothing's worse than ...
Quote:
Originally Posted by AAaauuugghh!:
" my Linux just crashed before it even got off the ground! "
No problem placing it in the Newbie forum as well as Kernel or other.

My continued feedback about sticky's are that people need to cite them when they do see the inevitable Newbie posting your above example. Because they will continue to fail to prepare in advance, forever. Much like the LQ Rules and the Site FAQ, many people will not read them and instead just forge ahead and post their inadequate thread.
 
Old 09-18-2017, 06:39 AM   #8
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,813
Blog Entries: 13

Rep: Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875Reputation: 4875
attempted to kill init!

[Excepting the text here, is this final version the agreed upon sticky?]

We've all seen this message as our Linux systems stopped dead:
Code:
"Kernel panic - not syncing - attempted to kill init!"
But what does it mean?

The message is actually in three parts. Let's consider each one in turn:
  • Kernel panic:
    A "kernel panic" is an unrecoverable error condition in, or detected by, the Linux kernel. It represents a situation where Linux literally finds it impossible to continue running, and stops dead in its tracks. (There is also a so-called "Oops" facility for recoverable errors.) Linux prints messages on the console and halts. Very often, the root cause of the problem will be indicated by some of these immediately-preceding messages.
  • not syncing:
    This part of the message indicates that the kernel was not in the middle of writing data to disk at the time the failure occurred. This is a supplemental piece of information that is not directly related to the panic message itself.
  • attempted to kill init:
    This is the situation that Linux actually detected, and this message is somewhat misleading. It actually means that "Process #1" either terminated or, just as likely, failed to start.

So, what's init and why is it so important?
When Linux starts, it manually creates one (privileged) user process, which is always "Process #1." (Traditionally, this process was named init, although today it might be systemd or something else.) Linux depends on this special process to do certain things, such that Linux literally cannot continue running without it. If the process terminates for any reason, or does not start, Linux has no alternative but to halt with a "kernel panic."

So, what can I do?
In spite of the message referring to "kill init," the most likely reason is that the process failed to start. Process #1 is an ordinary user process, running as root, and so it has the same basic requirements as any other process. Messages will usually be found in the log, immediately preceding the panic, which tell you more about exactly what went wrong.

For instance, a disk-driver that is needed to access the hard drive might have failed to load, because of a recent update to Linux that somehow went wrong. A menu of installed kernel versions usually appears briefly when you start the machine: try booting from the previous version of the Linux kernel.

Another distinct possibility is that the file system has become corrupt. In this case, you may need to try to boot the machine into a "recovery mode" (depending on your distro), or boot from a DVD or memory-stick. For instance, the startup menu on the installation disk for most Linux distros contains a "recovery" option which will attempt to check for and fix errors on the boot drive. Boot the system from that DVD and select this option. Any unexplained mis-behavior of a disk drive is also a strong indication that the drive may very soon need to be replaced.
 
Old 09-18-2017, 08:01 AM   #9
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,358

Original Poster
Blog Entries: 4

Rep: Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822Reputation: 3822
That's it. The original post #1 with the revised tail from post #3. "Stick(y) it, good sir!"

Post it to whatever forum(s) you see fit. "Newbie" and "Kernel," maybe ... "Newbie" because it happens to s, and "Kernel" because people might look there.

Last edited by sundialsvcs; 09-18-2017 at 08:05 AM.
 
  


Reply


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
(RFC) New "Sticky" Draft: "Kernel Panic (not syncing): attempted to kill init!" sundialsvcs Linux - Newbie 13 09-01-2017 09:02 AM
"Kernel panic - not syncing - Attempted to kill init!" voidgere Linux - Server 5 05-03-2017 04:32 PM
[SOLVED] What went wrong? "Kernel panic - not syncing: Attempted to kill init!" Michal Krzyz Linux - Embedded & Single-board computer 3 12-29-2011 04:47 AM
Explained: "kernel panic - not syncing - attempted to kill init" sundialsvcs Linux - Software 36 04-24-2010 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:42 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