When trying to reboot my system an error occurs : "error: file `/boot/vmlinuz-linux' not found

It happened when I was updating my OS and suddenly my system froze so I had to force shutdown my system after when I tried to reboot my system I met with this error.

If that is your only kernel, boot off the live ISO, use arch-chroot to access your system. Then use this to resolve the issue from within the chroot.

pacman -Syu linux linux-headers
1 Like

And if your machine still having single kernel then, now would be a good time to install lts kernel.

Keep it around for just in case.

2 Likes

how to enter chroot by the way
should I use “chroot /mnt” command

No, you need a fully functional chroot. Follow the guide above.

1 Like

i did but at one place its giving me this error when i tried this command
mount /dev/sdXn /mnt/boot/efi

Blockquote mount: /dev/sda8/boot/efi: can’t find in /etc/fstab.

Blockquote

Can you share the output of:

lsblk -o name,type,fstype,size

root@EndeavourOS /]# lsblk -o name,type,fstype,size
NAME TYPE FSTYPE SIZE
loop0 loop squashfs 1.7G
sda disk 931.5G
├─sda1 part vfat 260M
├─sda2 part 16M
├─sda3 part ntfs 667.5G
├─sda5 part swap 977M
├─sda6 part ntfs 1000M
└─sda8 part ext4 261.8G
sdb disk 28.7G
└─sdb1 part vfat 28.7G

It probably should be

sudo mount /dev/sda8 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
sudo arch-chroot /mnt
1 Like

second command throws an error
root@EndeavourOS liveuser]# sudo mount /dev/sda1 /mnt/boot/efi
mount: /mnt/boot/efi: mount point does not exist.

Better to arch-chroot into the root partition first, then mount the efi partition within to /boot/efi.

I don’t get it
i am not so new to linux so

First mount your root partition, then chroot into it.

sudo mount /dev/sda8 /mnt
sudo arch-chroot /mnt

Once that succeeds mount your efi partitiion from the chroot prompt.

mount /dev/sda1 /boot/efi
``
2 Likes

What do these commands show:

ls /mnt
ls /mnt/boot

[root@EndeavourOS liveuser]# ls /mnt
bin dev home lib lost+found opt root sbin sys usr
boot etc install-script.sh lib64 mnt proc run srv tmp var
[root@EndeavourOS liveuser]# ls /mnt/boot
bin dev home lib lost+found opt root sbin sys usr
boot etc install-script.sh lib64 mnt proc run srv tmp var

Ahh…that is messed up.

Can we see the output of

findmnt --real

[root@EndeavourOS liveuser]# findmnt --real
TARGET SOURCE FSTYPE OPTIONS
/run/archiso/bootmnt /dev/sdb1 vfat ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=a
/run/archiso/airootfs /dev/loop0 squashfs ro,relatime,errors=continue
/mnt /dev/sda8 ext4 rw,relatime
└─/mnt/boot /dev/sda8 ext4 rw,relatime

You mounted /dev/sda8 twice.

sudo umount /mnt/boot
sudo mount /dev/sda1 /mnt/boot/efi

same error
root@EndeavourOS /]# pacman -Syu linux linux-headers
:: Synchronizing package databases…
error: failed to synchronize all databases (unable to lock database)

but this command
sudo mount /dev/sda1 mnt/boot/efi

didn’t give anye error

That is a totally different error :slight_smile:

From within the chroot:

rm /var/lib/pacman/db.lck
pacman -Syu linux linux-headers

As a side note, this issue was almost definitely caused by an update being interrupted in the middle.

1 Like