Manjaro automatically boots in 5.13 emergency mode after new kernel

To make a long story short, because of vmware-issues I switched to Kernel 5.10 (LTS). Before that, I used 5.15.7_rt23-1 and also had an install of 5.13.19-2 (unsupported). While on version 5.15, I installed 5.10 and uninstalled 5.15 & 5.13.

After I rebooted, manjaro automatically booted in 5.13 emergency mode. I now have to specifically select 5.10 every time I boot into manjaro with advanced options.

The weird thing is that I do not even have 5.13 installed any more. When I run mhwd-kernel -li, the output is as follow: (after that, I also installed 5.4 but that is not of the issue here)

Currently running: 5.10.89-1-MANJARO (linux510)
The following kernels are installed in your system:
   * linux510
   * linux54

How can I remove 5.13 from my system or how can I prevent manjaro from automatically booting into 5.13?
Any help is appreciated, thank you!

Looks like you had yourself in some sort off partial-upgrade state and did not manage to fully remove 5.13 or generate proper initramfs …

I am looking for the thread where I walked someone else through it so I dont have to type it again …

OK. Here is a giant one-line command … just copypaste into terminal and hit enter, then share the output:

find /usr/lib/modules -type d -name "*5.13*" 2> /dev/null && find /boot /etc -type f \( -name "*5.13*" -o -name "*513*" \) 2> /dev/null

[edited for a better command for you]

But I am going to guess you will find some 5.13 remnants … that you would then want to remove, like example:

sudo rm /boot/vmlinuz-5.13-x86_64
sudo rm /boot/initramfs-5.13-x86_64.image
sudo rm /boot/initramfs-5.13-x86_64.fallback.image
sudo rm /etc/mkinitcpio.d/linux513.preset
sudo rm -r /usr/lib/modules/extramodules-5.13-MANJARO
sudo rm -r /usr/lib/modules/5.13*

Then reinitialize the things:

sudo mkinitcpio -P 
sudo update-grub

On a side note, this is rather dangerous. Like, if you remove a chair while you’re sitting on it, you may not stay in that position for long…

1 Like

After executing your find-command, I did find some 5.13 remnants, but after executing the rm-commands and re-initialization, the issue was fixed.
Thank you very much!

Glad it worked out.
(PS - I polished up the command slightly, so maybe check again … it might find some old module directory you dont need too.)

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.