Difficulty: ★★☆☆☆
So you couldn’t wait until the update process had completed and you went for the reset/power button, didn’t you? And now you’re getting the message that you don’t have a kernel installed. Well, you’re not the only one — we’re seeing it happen all the time.
So, here’s how to fix it, you impatient n00b.
If you don’t happen to have a recent Manjaro installer USB/DVD/CD handy, direct your browser to this wonderful page, download the .iso
of your choice, put it on a USB stick in the proper manner — Ventoy is a great way of creating bootable USB sticks, and it’s available for Microsoft Windows too if that is what you’re currently using — and then boot up from it in live mode.
Once the desktop has loaded, open up a terminal window. In this window, issue the following command…
sudo su -
From here on, the methodology will differ depending on whether you have ext4
or btrfs
.
To determine which filesystem is being used, simply run…
lsblk --fs
… and look at the FSTYPE
column.
If your filesystems are ext4
, then it’s as simple as issuing the following command…
manjaro-chroot -a
If you have more than one GNU/Linux system on your machine, select the number that corresponds to the Manjaro installation that needs to be repaired. manjaro-chroot
will then automatically mount all of the pertinent filesystems.
If on the other hand you are using btrfs
with the default setup, then you’re going to need a number of extra steps. In the instructions below, I will for the sake of this tutorial assume that…
- your machine boots in native UEFI mode;
- your EFI system partition is on
/dev/sda1
; and… - your root filesystem is on
/dev/sda2
and uses the default subvolume layout as installed bycalamares
(i.e. the Manjaro installer).
It is of course important that you adapt the instructions below to your actual situation — i.e. you should use the actual block devices for the EFI partition and the btrfs
volume on your machine — but with the default configuration in mind, here’s how you would chroot
into your btrfs
installation…
mount -t btrfs -o subvol=@ /dev/sda2 /mnt
mount -t btrfs -o subvol=@home /dev/sda2 /mnt/home
mount -t btrfs -o subvol=@log /dev/sda2 /mnt/var/log
mount -t btrfs -o subvol=@cache /dev/sda2 /mnt/var/cache
mount -t vfat /dev/sda1 /mnt/boot/efi
mount --bind /dev /mnt/dev
mount -t proc proc /mnt/proc
mount -t sysfs sysfs /mnt/sys
mount -t efivarfs efivarfs /mnt/sys/firmware/efi/efivars
chroot /mnt /bin/bash
After chroot
ing — regardless of whether you used manjaro-chroot
with ext4
or a manual chroot
with btrfs
— you must now issue the following commands to repair your installation…
[ -f /var/lib/pacman/db.lck ] && rm -f /var/lib/pacman/db.lck
pacman-mirrors -f && pacman -Syyu
update-grub
exit
Be sure to let all of the above commands take their time and finish up. When prompted for the replacement of certain packages, be sure to answer Y
.
After all of the above has been done, cleanly reboot your machine and remove the USB stick.
Useful sites…