Can not reinstall kernel due to ghost kernel

Hello,

I updated my computer last week, but i suspect that since my wifi connection was unstable, this is probably why this problem occurs.

I have a dual boot. My grub did not show an entry for Manjaro so I tried grub-install grub-mkconfig again but now this showed a grub command line.

I entered boot, and it told me that there wasn’t a kernel.

I tried booting using a manjaro livecd usb. I did manjaro-chroot -a, and pacman -Syyu. Then reinstalled the grub like before. Still no luck, it told me there wasn’t a kernel.

I booted back into the livecd usb, entered in mhwd-kernel -li
This is the output:
Currently running: 5.6.15-1-MANJARO (linux56) The following kernels are installed in your system:

It shows that I am running linux56, but why isn’t it listed?

I tried: sudo mhwd-kernel --install linux54
output:
error: no targets specified (use -h for help)

I saw this: mhwd-kernel -i only works when you boot with a Manjaro kernel · Issue #49 · manjaro/mhwd · GitHub which makes me think that I don’t have a kernel installed.

I also saw other people who tried re-installing their kernel, but they always had other kernels installed from the mhwd-kernel -li command but I don’t.

pacman -Syyu has nothing else to update. I already tried that several times.

I also searched for my kernel using pacman -Q | grep linux
output:
archlinux-appstream-data 20210125-1
archlinux-keyring 20210110-1
lib32-util-linux 2.36.1-1
linux-api-headers 5.10.13-1
linux-firmware 20210208.r1828.b79d239-1
util-linux 2.36.1-4
util-linux-libs 2.36.1-4

From above, there is no linux package.

Help please.

mhwd-kernel doesn’t work to install a kernel in chroot.
I don’t know why or whether this is documented in wikis.
I know this from experience.

Use pacman instead of mhwd-kernel to install a kernel while inside the chroot environment.
watch the output - whether the initrd is created in the process or not
depending on that do or do not do:
mkinitcpio -P
and
update-grub

Install what using pacman?

… the kernel? :wink:

… I just edited/amended my previous post …

yes sorry I still thought mwhd-kernel was still going to be used. What is the point of mhwd-kernel -i if pacman is just as sufficient?

I successfully installed linux510 using pacman, and grub properly displays. I can now boot into manjaro. Thank you so much!

But, now my windows 10 partition is not showing. Why is this?

it saves you the possibly needed additional steps of creating the initial ram fs
mkinitcpio -P
and
update-grub
to make the procedure … I was going to say idiot proof but that’s not meant in a demeaning way - it just makes the procedure less complex for novice users who know nothing about the command line or the inner workings of the system.

… if in chroot - and mhwd-kernel doesn’t work
use the original procedure …

I have no experience with this - as I don’t have a dual boot system,
it should be easy,
once you are able to boot again,
from inside your linux system.
Consult the wiki.
Probably just run update-grub again - to re-check and probe for the Windows partition which may not have been visible from chroot.

Okay, yeah ill do that. Thanks again for replying so quickly to my post.

Edit: yup update-grub truly did update my grub and found my windows boot

awesome
(I expected that, but still: nice that it now all seems to work again)

I was just wondering. Why is it that even after I do pacman -Syu, it still did not install the linux kernel? And I had to manually install it.

not sure what you mean
pacman -Syu
just does update the already installed packages
If a kernel isn’t installed - it won’t (can’t) get updated.
It seems you somehow managed to not have a kernel installed … :wink:

now you do

… better install at least two - to have a fallback in case one doesn’t work as expected …

can you report

inxi -MCx
sudo ls /etc/mkinitcpio.d/*.preset
sudo mhwd-kernel -li

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