You are not logged in.

#1 2018-04-04 16:41:01

SuperGeniusZeb
Member
Registered: 2018-04-04
Posts: 5

[SOLVED] "Kernel panic - not syncing: No working init found."

I am using a Samsung laptop (model NP350V5C-A01US) running Arch Linux 64-bit with the latest version of KDE Plasma installed, and using Grub. Recently, I tried installing a package from my package management app, Pamac. However, it gave an error, saying "invalid package name" "package filename not valid". I had previously run out of memory while trying to install some packages from the AUR, and had to force-kill my computer several times. Actually, this has happened many times in the past.

But anyway, after noticing this installation error, I thought perhaps this was an issue caused by an AUR package being half-installed. So, I ran `sudo pacman -Qnq | sudo pacman -S -` in a terminal emulator to reinstall all non-AUR packages to fix any broken installation of packages. (See https://wiki.archlinux.org/index.php/Pa … l_packages) It finished without a problem. I did not reinstall any of the AUR packages, though, which in hindsight may have been a mistake. I tried installing a package again, but it still gave the "invalid package name" error.

I then proceeded to shutdown the computer, thinking that the error might go away after restarting the computer. I then booted the computer up and I got a kernel panic, and was unable to boot the computer past that point. I tried using the fallback kernel but it gave the same error. Here is everything that is displayed on the screen (except the timestamps) when I try to boot it up after getting past the Grub screen:

Failed to execute /init (error -13)
Starting init: /sbin/init exists but couldn't execute it (error -13)
Starting init: /bin/init exists but couldn't execute it (error -13)
Starting init: /bin/sh exists but couldn't execute it (error -13)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.15.14-1-ARCH #1
Hardware name: SAMSUNG ELECTRONICS CO., LTD. 350V5C/351V5C/3540VC/3440VC/MP350V5C-A01-US, BIOS P09ABE 07/04/2013
Call Trace:
 dump_stack+0x5c/0x85
 ? rest_init+0x50/0xd0
 panic+0xe4/0x252
 ? rest_init+0xd0/0xd0
 kernel_init+0xe6/0x100
 ret_from_fork+0x35/0x40
Kernel Offset: 0x9000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.

Note that this is a manually-typed recreation of the message based off of a photo I took of the screen when it showed the error. I am actually using the laptop right now by booting into an Antergos live USB I had, so I do have access to be able to chroot into the system and do other tasks to repair the installation. I just do not know what exactly the problem is and how I can fix it. I have my /home directory on a separate partition from the root directory, so I can reinstall Arch Linux (or switch to Antergos) if necessary, but I would prefer not to since it would mean I have to reinstall all my applications.

Also posted on r/linuxquestions.

Last edited by SuperGeniusZeb (2018-04-04 22:11:02)

Offline

#2 2018-04-04 21:03:56

robg
Member
Registered: 2015-03-05
Posts: 218

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

Sounds like a terrible mess. Begin by posting the output of `pacman -Q --foreign` and `stat /usr/bin`.

Offline

#3 2018-04-04 22:06:03

SuperGeniusZeb
Member
Registered: 2018-04-04
Posts: 5

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

Here are all of my foreign packages: https://pastebin.com/1n3KQTNV

And here is the output of "stat /usr/bin", though it may not be useful since I ran the command after I ended up fixing the problem just now:

  File: /usr/bin
  Size: 122880          Blocks: 248        IO Block: 4096   directory
Device: 806h/2054d      Inode: 264206      Links: 6
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-04-04 16:40:33.611853273 -0500
Modify: 2018-04-04 16:40:24.388110028 -0500
Change: 2018-04-04 16:40:24.388110028 -0500
 Birth: -

So yeah... I ended up fixing the problem. After doing some more research and checking some of the suggestions on Reddit, I took a look at "/var/log/pacman.log". Here is a section of it from yesterday when I did the stuff that appears to have led to the issue:
https://pastebin.com/Uf4FGxM3

In the "pacman.log" file I noticed some errors relating to running out of space. I checked, and of my 3 partitions ("/boot", "/", and "/home"), the one that was closest to being full was "/boot". I removed some old directories and files left over from Windows 10 (which I used to have on my laptop before I removed it in favor of using Arch Linux exclusively) to free up space on the partition. I also uninstalled "virtualbox", which I read somewhere had caused issues for someone else at some point when it required a certain kernel version that was out-of-date. I then ran "pacman -Syyu linux intel-ucode syslinux systemd" to try and fix any broken installations of those packages. I then ran "pacman -Qk" to check for any more broken packages, but it appeared that they were all fine, so I went ahead and rebooted the laptop. And... it worked! Everything is back to normal now. I guess the issue was that my "/boot" partition was small (300MiB) and I made the mistake of not cleaning it out after removing Windows 10 from my computer, so eventually the size of the files in there got too big and caused errors when updating the kernel and other things with files in that partition.

So lesson learned. Do not make your boot partition too small.

EDIT:
It looks like I am still getting the "package filename is not valid" error, though. But I will make a separate thread for that if I can not figure it out on my own.

Last edited by SuperGeniusZeb (2018-04-04 22:10:29)

Offline

#4 2018-04-04 23:00:31

robg
Member
Registered: 2015-03-05
Posts: 218

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

Good to hear that you resolved your issue. My suspicion was that you had pulled parts of the kernel from the AUR. Before possibly moving into a new thread, regarding your issue with the AUR packages: Build the package manually and observe the output during the process. This should give you more fine-grained information to work with.

Last edited by robg (2018-04-04 23:03:59)

Offline

#5 2018-04-05 00:40:46

SuperGeniusZeb
Member
Registered: 2018-04-04
Posts: 5

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

Actually, my installation problem was not just with AUR packages, but rather with all packages. I was unable to install any new packages. (I was able to do it from the chroot on my live USB, though.) But anyway, I ended up fixing that problem, too. After going back into a chroot from my live USB and reinstalling all packages again using "sudo pacman -Qnq | sudo pacman -S -", I noticed a warning message:

Warning: /etc/group or /etc/gshadow are inconsistant
Run 'grpck' to correct this.

I then ran "grpck" and removed some duplicate entries when prompted to. I then noticed that my standard user account was not in the "users" group (though it was in the "wheel" group). I then added my user to the users group using this command: "usermod -aG users MY_USERNAME". I then rebooted my computer, and the app installation problem was fixed! I am not sure what exactly it is that fixed it, but I thought I would post my findings here anyway in case anyone else happens to have a similar issue in the future.

Last edited by SuperGeniusZeb (2018-04-05 00:41:11)

Offline

#6 2018-04-05 01:12:13

SuperGeniusZeb
Member
Registered: 2018-04-04
Posts: 5

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

Or not. I just checked and apparently the installation errors are still happening. I just thought it was fixed. hmm I will have to investigate this further, I guess.

Offline

#7 2018-04-05 08:43:27

robg
Member
Registered: 2015-03-05
Posts: 218

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

First of all, please open a new thread for the package installation issue and include or link to all the information you have provided so far (preferably the former). Next onto the information your post.

SuperGeniusZeb wrote:

After going back into a chroot from my live USB and reinstalling all packages again using "sudo pacman -Qnq | sudo pacman -S -", I noticed a warning message:

Warning: /etc/group or /etc/gshadow are inconsistant
Run 'grpck' to correct this.

I then ran "grpck" and removed some duplicate entries when prompted to. I then noticed that my standard user account was not in the "users" group (though it was in the "wheel" group). I then added my user to the users group using this command: "usermod -aG users MY_USERNAME". I then rebooted my computer, and the app installation problem was fixed!

I don't think it is necessary for your user to be in the users group and what duplicate entries are we talking about?

The "invalid package name" errors might hint at issues with your sync database, a theory supported by your mentioning of a forced shutdown during upgrades. Try running `pacman -Syy` to force an upgrade of your sync database, followed by a `pacman -Su`.

Last edited by robg (2018-04-05 08:44:03)

Offline

#8 2018-04-09 12:42:27

SuperGeniusZeb
Member
Registered: 2018-04-04
Posts: 5

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

Well, I finally figured out what the actual problem was. My "/tmp" directory was out of space. I did not know this before, but apparently the "/tmp" directory is mounted to a special partition that is stored in RAM, and is usually half the amount of RAM. (In my case, I have 8GB of RAM, so the "/tmp" partition had 4GB of space.) Shortly before the issue first occurred, I had tried to install a package from the AUR (I think it was "ungoogled-chromium", which ended up taking more space to build than I had in the "/tmp" directory, so the build failed and because of that, the files added to the "/tmp" folder by the attempted build process were not deleted like they normally would have been. If I had rebooted my computer at that point, everything would have been fine, since the "/tmp" directory is reset upon reboot (since it is stored in RAM). However, I then tried to install some other packages, which failed. I was confused, and I thought that an issue must have been created by my force-shutdown of my laptop that I had done previously. I attempted to reinstall all packages, thinking there was some kind of database error, but since the "/tmp" partition was full, it did not work properly and something happened that caused the kernel panic when I then attempted to reboot the computer.

After finally discovering the actual problem, I increased my "/tmp" size by adding an entry for it in "/etc/fstab" and setting its size to 5GB. I also gave up on installing the "ungoogled-chromium" package because it was taking up way too much space and taking way too long to build. (And the "ungoogled-chromium-bin" package was out-of-date, so I did not want to use that one either.)

Last edited by SuperGeniusZeb (2018-04-09 12:45:04)

Offline

#9 2022-01-15 12:35:03

lvcky
Member
From: innawoods
Registered: 2021-11-25
Posts: 3

Re: [SOLVED] "Kernel panic - not syncing: No working init found."

Hello, I'm having the same issues as SuperGeniusZeb with the (assuming) /tmp folder. I have the identical error code, but I cannot figure out how to get into chroot or grub recovery so I can delete these /tmp files and then do a restart. I also think its the /tmp folders because my LibreWolf installation wouldn't allow me to download PDFs anymore, and I save a lot (student) for research. So, I manually went into the /tmp directory for mozilla and deleted everything, restarted LibreWolf and then relaunched it with the same /tmp is full error code. My boot drive from personal memory has about 180Gb of free space on it, and I have 16gb of RAM so 8gb should be in my /tmp folder according to the post above.I'm not sure if it's necessary but I also have a NVIDIA 2060 Super and an AMD Ryzen 7, I've been on Arch linux for going on 2 years now with a lot of help transitioning from a friend, he has been helping but I need a little more help to get my machine working. He said I should flash an ArchISO on a usb and then reinstall the kernel, he's a smart guy so this would probably be easy for him, but I want to try this /tmp folder solution first before I accidentally destroy all of my data frigging around with downloading a new kernel. I did some pacman -Syu updates, and then yay -Syu updates with some failures, but the computer was on for about a week with only 1 update and after I had my 2nd update attempt that week, following a reboot and not a full shutdown my machine wouldnt turn on again and will populate the Kernel Panic error -13 message that SGZ was getting on his machine.

Thanks for all the volunteer work on Arch, I tell everyone how excellent the system and documentation is - though very very daunting as a beginner to pick up and interpret.


Pr 22:14 - The mouth of a strange woman is a deep pit: he whom the lord is angry with, shall fall into it.

Offline

Board footer

Powered by FluxBB