Kernel panic in Manjaro after updating the system

I tried to reinstall the grub through the live CD but the grub is still missing..... I ran the update-grub and nothing happens, I have read a lot and I am almost to give up, if you see the image that I posted, there is not boot ... and when i temporarily install it, it is located in a the different partition.... and I have even tried the mhwd-chroot and the kernel panic still continues every reboot....

let me know if you need more info for helping me.

Not good, best way to bork a system is for an update to crash part way through for whatever reason (segfault, power failure, etc). How recoverable a system is depends on what it was updating when it failed.

Only ways to recover is to either attempt to complete the update from a live environment, chrooting into your actual installed system ... or restore from backup, assuming you have your system backed up.

Boot a live ISO, mount your installed system's root partition, manjaro-chroot into this mount and sudo pacman -Syyu.

"Boot a live ISO, mount your installed system's root partition, manjaro-chroot into this mount and sudo pacman -Syyu." I did it and it update the system and then when I rebooted....the same., I mounted the partition install the grub but everytimne I restart is like if I had not done anything

Did the update complete successfully in chroot?

If you have a separate /boot partition make sure it is mounted within your chroot environment, if /boot is on the root partition then you are fine.

From chroot you may need to regenerate initramfs with sudo mkinitcpio -P.

How many kernels do you have installed? Do they all kernel panic?

If only one kernel you may want to install another, for example sudo mhwd-kernel -i linux414, and see if that boots.

Good practice to always have at least 2 kernels installed.

Why are you re-installing grub? Do you mean updating grub with sudo update-grub?

the grub is missing, I just see the grub through my grub rescue Cd, (that's why I reinstall it. without success) I have just 1 kernel.

i Will try to generate the mkinitcpio -P .
if I choose Kali for starting = kernel panic
if I choose manjaro. = kernel panic.

I will do it tomorrow (it is night here) if you need any screenshot of something,let me know, I think images help too much....

Try this.

1 Like

I suspect several misconceptions...
To make clear what others suggested already:

  • Boot to Live Manjaro installer
  • Use manjaro-chroot to get into your installed Manjaro
  • Run
mhwd-kernel -i linux50
  # or this, whichever you have not already installed
mhwd-kernel -i linux419
mkinitcpio -P
update-grub
exit
  • Reboot

If it still fails, use @gohlip 's link to restore grub

when I type

  1. boot up livecd in the right mode, uefi or bios-legacy
  2. Do not boot up to live OS, but press ‘c’ at the menu and we’ll get to the grub prompt (grub>).
grub> search.file /etc/manjaro-release  root
grub> configfile /boot/grub/grub.cfg

those commands (mentioned above)in grub> show me my Grub with everything in order but when I choose manjaro for starting I have the kernel panic and when I choose kali
the console says:
gave up waiting for root file system device.
Alert! /dev/sdc5 does not exist dropibg to a Shell

(initranmfs) _

how do I get into my manjaro with manjaro-chroot,
the live Cd menus just let me use a terminal with *grub> I can not enter in anyway to my OS

then when I tried:

Blockquote You may want to check out this link first if the ‘comprehensive’ details here are confusing.
Warning: the link is not that easy either.

Install media versions 17.0.1 and above is using grub as boot mechanism.
Therefore we can use this grub to boot our installed OS’s in case our OS bootloader fail for whatever reason. To do this…

  1. Take the manjaro livecd and start it up in the same mode as your installation (uefi or bios-legacy).
  2. Do not boot up to live OS, but press ‘c’ at the menu and we’ll get to the grub prompt (grub>).
  3. To be sure you’ve started up livecd in the right mode, at grub prompt, check output of
grub> echo $grub_platform

If output is pc , you’ve booted up in bios-legacy.
If output is efi , you’ve booted up in uefi.
If you’re in the wrong mode, reboot livecd in the right mode.

  1. If there are multiple Manjaro’s or if there is a separate boot partition,
    See sections below for required command changes, otherwise proceed right here.

And if the bootloader is broken due to a messed up manjaro grub.cfg itself,
the configfile method won’t work as configfile will just bring up the bad grub.cfg itself.
Then we will need to boot to the kernels directly.

grub> search.file /etc/manjaro-release  root
grub> probe -u $root --set=abc
grub> ls ($root)/boot/

  1. copy down kernel and initrd file, say vmlinuz-4.14-x86_64 and initramfs-4.14-x86_64.img
    Use the right kernel below like 4.18 or 4.19 or…
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
grub> initrd /boot/initramfs-4.19-x86_64.img
grub> boot

Blockquote
at the end the kernel panic apperas again saying that failed to execute /init (error -2)
kernel panic - not syncing: no working init found

I thought it was clear enough, but.. you can never know how/if what you write, others will read.

  • Boot to Manjaro Live environment (don't press C to go to grub prompt)
  • Start a terminal and run manjaro-chroot -a(press enter after writing this in terminal command-line)
    If it lists one installation with (0) number, press number 1 and enter.
    Then the rest of the commands, pressing Enter after each one.
    :man_shrugging:
3 Likes

Just to note, if following these sorts of instructions is not working then reinstalling is a quick and easy solution.

2 Likes

I did what you suggest:

  • Boot to Manjaro Live environment (don't press C to go to grub prompt)
  • Start a terminal and run manjaro-chroot -a (press enter after writing this in terminal command-line)
    If it lists one installation with (0) number, press number 1 and enter.
    Then the rest of the commands, pressing Enter after each one.

but the system show me kernel panic instead of a terminal is there anyway to acces terminal in my installed system from the live Cd running?

could I just reinstall the system without loosing my data?

Depends how you partitioned your drives and if you have a backup of your data.

I separate my / and /home onto different partitions so reinstallation is trivial.

1 Like

Did you select "Boot to Manjaro" at the main screen (where there are choices like "free" drivers, Timezone etc?

yes, I did it, after pressing "e" it sends me to a edit the manjaro line, and then I press Crtl+C or F2 and I enter to the GRUB> not to the Terminal /console.

grub> manjaro-chroot -a

does not work.

You're not reading the instructions correctly. Read them again, carefully.

1 Like

ok, I boot to Manjaro Live enviroment and I see options:
the hour
time zone
keytable
language
driver=free
boot Manjaro.x86_64 gnome
help
memtest
install BIOS-system on hd0,msdos5
reboot.

press enter to boot selected OS
up and down arrows navigation
(E) edit selection
(C) GRUB command line


how do I start a terminal from this point?

Select "Boot Manjaro.x86_64 Gnome" using the arrow keys and press enter. When the live system has booted start a terminal as usual.

1 Like