(RFC #2) "Kernel panic - not syncing - attempted to kill init!"
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(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 "killinit," 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.
So, what can I do?
In spite of the message referring to "killinit," 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.
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.
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.
...
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.
[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 "killinit," 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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.