Error: file '/boot/initramfs-linux.img' not found

So I was pretty stupid today in that I started the update to 5.8.3-arch(?) and a few other things, but after 45+ minutes the complete bar in Discover was at 100% but not actually complete (i.e. the bar vanishes altogether), so I figured it was being buggy and the UI got stuck since it was in the state for a while so I did a physical power cycle. Now booting into the partition or using the failback option gives a:

Loading Linux linux …
Loading initial ramdisk …
error: file ‘/boot/initramfs-linux.img’ not found

Press any key to continue…

Unfortunately pressing any key does nothing nor does Ctrl+C to try to exit out of whatever. Is there any way to recover to this or should I resign to reinstalling the partition from a flash drive?

Do you have the backup kernel as an option in grub to boot from? If so, do that and try reinstalling the kernel update.

1 Like

Unfortunately no back up anything to my knowledge beyond what is on the SSD w/ the messed .img as my external HDD I use for easy weekly backups fell to the floor at the beginning of COVID and wasn’t able to find an open store at the time to try to recover and transfer to a new HDD. Fun situation altogether, but at least I have a semi-fresh copy my KeePass DB in the cloud I guess.

You could try to repair the update in terminal in a live session. Mount your root and do a arch-chroot:

mount /dev/sdXY /mnt
arch-chroot /mnt

where XY is your root partition. If you have additional partitions (e.g. separate boot or an efi partition) mount them accordingly before the arch-chroot:

mkdir -p /mnt/boot/efi
mount /dev/sdXZ /mnt/boot
mount /dev/sdXA /mnt/boot/efi

Then check if the update was ok by

pacman -Syyu

If this was ok then do a

mkinitcpio -p linux

and

grub-mkconfig -o /boot/grub/grub.cfg

Then cross fingers and reboot…

8 Likes

You are an absolute savior!

It was luks encrypted so I had to tweak things w/ what I found online, but overall it worked:

sudo cryptsetup luksOpen /dev/nvme0n1p1 encryp
sudo mkdir /mnt
sudo mount /dev/mapper/encryp /mnt
sudo arch-chroot /mnt
pacman -Syyu

(unable to lock db so rm /var/lib/pacman/db.lck)

mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg

Found the linux and fallback image, but then output at the very end:

grub-probe: cannot find a GRUB drive for /dev/sda
done

That probably isn’t a concern as I use nvme so I don’t think I should have anything on /dev/sda, but Grub removed the boot into Windows option which is on /dev/nvme1n1 (so can only select Endeavour image+failback on /dev/nvme0n1, which I’m mildly concerned about as I use Windows every two weeks or so, but nowhere near as much as the heavy daily usage of Endeavour! :slight_smile: I’m hoping the boot selection will refind/self-repair the missing Windows option as part of some upgrade soon given how much upgrades happen on Arch.

2 Likes

You could try running

sudo os-prober

from EOS. If it finds your Windows then:

grub-mkconfig -o /boot/grub/grub.cfg

Actually you could run only the second command since it will call os-prober.

2 Likes

Thanks, that did the trick, perhaps it was because it was originally ran on a live stick that it couldn’t find it. Any who, you all are truly amazing! Your right off the bat correct and quick responses saved me a great deal of hair loss today. :slight_smile:

3 Likes

This message is related to the USB stick you used with the live system. It can be ignored.

2 Likes

No. Looking at your commands in the post above you missed to mount the EFI-partition before the chroot. If you do not mount the EFI-partition, grub can not include Windows in the boot menue.

1 Like

Hello everyone. Following this thread and others on the forum related to this topic, I found that it was most appropriate to post my problem here.
Screenshot_2022-10-09_23-07-04

Similar to the author of the thread. after the last update, only the following information appears:
Loading Linux …
Loading initial …
error: file’ boot …’
Press any key …

unfortunately, the solution given by “csteinforth” from 1 Aug '20, does not work in my case. Other attempts to solve the problem via ArchWiki to chroot also failed

Welcome to :enos: !!
Please create a new post with proper logs as per:
https://discovery.endeavouros.com/forum-log-tool-options/how-to-include-systemlogs-in-your-post/2021/03/

Don’t necrobump a 2 year old thread.

1 Like

you can link to this thread if needed…