Skip to content

Instantly share code, notes, and snippets.

@reytech-dev
Created August 22, 2020 18:23
Show Gist options
  • Save reytech-dev/9ff4f4f71205f0efa2d4b972477ea62b to your computer and use it in GitHub Desktop.
Save reytech-dev/9ff4f4f71205f0efa2d4b972477ea62b to your computer and use it in GitHub Desktop.
Steps to fix 'error file /boot/vmlinuz-x.x not found'

Steps to fix "error file '/boot/vmlinux-x.x-x86_64' not found (Manjaro)

  1. Create Live Stick with Manjaro
  1. Change UEFI Settings on your broken system: Boot > Secure Boot > Other OS (You can also disable UEFI, but make sure to re-enable it after you are done here!!)
  2. Boot broken system with the live-system
  3. Open a terminal

Option A (your main hdd is encrypted)

  • Decrypt and mount it
  • Mount your decrypted hdd to /mnt
$ mount /dev/dm-x /mnt

Option B (no encryption)

$ sudo manjaro-chroot -a
  • If you get an error "Can't find mount point 0!", your hdd might be encrypted? Try Option A
  1. Run a package database update
$ pacman -Syy
  1. Install package updates
$ pacman -Syu
  • If you face any errors, cause you enabled timeshift backups. Run following command instead
$ SKIP_AUTOSNAP= pacman -Syu
  1. Exit and reboot

  2. Turn on your UEFI if you disabled it, or change it back to its original setting, to enable a proper check during startup!

@BlackAce21
Copy link

BlackAce21 commented Jan 25, 2023

Just want to add to this for the next guy that accidentally nukes their kernel mid package update on accident.

These steps are largely helpful but if you dive the forum post above it goes much more in depth.

In a nutshell, find your current kernel version either by checking /boot after you root into your broken system with the steps above or check your grub boot menu for the boot script to find the current kernel version. (hint: it's probably the version number after vmlinuz on the missing file)

Then it's just a matter of forcing pacman to update your kernel so it will remake the missing files properly.

$ pacman -Syu linux[Version]

This worked well for me and was able to restart with no errors. I think the guy on the forum post was recommended to just install linux57 but was actually running linux56 and had to manually change the grub boot to match the new kernel version. I didn't want to do that so I just found a way to get pacman to reinstall my current kernel. Hope this helps someone else :)

::edit:: Just wanted to note that I am not running an encrypted hard drive so your mileage may vary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment