Kernel missing after update

Hi everyone,

after an update all kernels installed were eliminated on my machine. It’s not such a big problem and I know I have to use a live usb, but I haven’t found any information here nor doing a Google research. Can somebody explain me how to install linux kernel on another machine?

Thanks.

Welcome to the forum! :slight_smile:

That’s because you somehow did not let the update finish. Maybe the connection was lost, or maybe you rebooted the machine in the middle of the update. The update process first removes the kernels and then installs the newer ones.

Boot up from the live medium and open up a terminal window. Then issue the command… :arrow_down:

su -

Next, issue the following command… :arrow_down:

manjaro-chroot -a

It will try to detect the root filesystem of the installed Manjaro system, and if it finds more than one distribution, it’ll let you choose the correct partition.

Then, you select the correct one, and you issue the command… :arrow_down:

pacman-mirrors -f 5 && pacman -Syyu

This will resume or restart the update process. Be sure to let it finish this time, and when you’re done, issue the following two commands… :arrow_down:

exit
systemctl reboot

That should fix it. :crossed_fingers:

2 Likes

Thank you for your answer! I’ll try soon.

1 Like

Everything seems to work well, I had problems to init transaction, but I solved it by issuing the following command:

rm /var/lib/pacman/db.lck

The problem is that it seems like it’s unable to find the kernel package. This the error I received back:

    :: Starting full system upgrade...
    error: could not open file /var/lib/pacman/local/linux57-5.7.14-1/desc: No such file or directory
    resolving dependencies...
    looking for conflicting packages...
    warning: could not fully load metadata for package linux57-5.7.14-1
    error: failed to prepare transaction (invalid or corrupted package)

Yes, that confirms what I said already, i.e. that you had interrupted the update.

Hmm… Try ─ in the chroot environment… :arrow_down:

pacman-mirrors -f && pacman -Syyu

It’s similar, but it’ll check at all the mirrors, not just five of them ─ it’ll also take a while, so be sure to let it finish. It would appear that you had some network glitch at one of the mirrors, or that that particular mirror itself was having a problem ─ it’s rare, but it does happen.

Another thing you could try ─ after the above command has finished ─ is to manually install the kernel. :arrow_down:

mhwd-kernel -i linux57

… or if you want to have the latest stable kernel… :arrow_down:

mhwd-kernel -i linux-latest

Issuing this command gives me the same error.

Even if I’m in the chroot environment it gives me this error:

error: no targets specified (use -h for help)

I’ve also checked in the /mnt directory and I can confirm I’ve mounted the correct partition.

It seems your local database is corrupt. From chroot, remove corresponding database folder:

sudo rm -rf /var/lib/pacman/local/linux57-5.7.14-1

and try again:

sudo pacman -Syyu
1 Like

It seems working, but I can’t find Linux 5.7 in the GRUB menu. Any other kernel doesn’t work either.

So pacman installed the kernel without errors?

If grub doesn’t show the new kernel, again chroot and update-grub (check that it founds your new kernel)

1 Like

I would be even more tenacious and reinstall GRUB ─ within the chroot of course. :wink:

grub-install --recheck --no-rs-codes
update-grub

:wink:

I didn’t want to do that because I’m not sure if we are talking about BIOS or UEFI here and is it USB boot the same type of the Manjaro system

1 Like

This command gave me this error:

Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.

It gave me some error, but the command worked. The problem is that now GRUB doesn’t give me errors about the kernel, but about “fwsetup”. Now the only options available in the list are UEFI firmware settings and Memory test.

It’s UEFI.

Still in the chroot environment… :arrow_down:

mount /the/efi/partition/ /boot/efi

Sorry, can you explain what is the EFI partition?
Are you talking about /dev/sdc1?

The EFI system partition is the partition where your UEFI goes looking for a boot loader. It is usually a FAT32 partition between 256 and 512 MiB, and it’s marked with the boot and esp flags in the partition table. It is normally mounted at /boot/efi.

Thank you. I’ve just tried to find it with parted but it seems like there is just one ext4 partion.

(parted) print                                                            
Model: Unknown (unknown)
Disk /dev/sdc1: 491GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End    Size   File system  Flags
 1      0.00B  491GB  491GB  ext4

If /dev/sdc1 is where your Manjaro system is installed, then your installed system does not boot in UEFI mode but in legacy BIOS compatibility mode, regardless of what mode the USB stick boots in.

But this :arrow_up: isn’t normal. It should say either MBR (or MSDOS) or GPT.

I don’t know. So if there isn’t any EFI partition, what should I do?

Just to make it clear. Now your installed Manjaro system will actually boot and you can log in? In this case, at least one kernel is installed, you can use the uname -a command to view it which one it is.