You are not logged in.

#1 2022-07-05 11:45:11

sv-cheats-1
Member
Registered: 2022-02-15
Posts: 47

/boot/initramfs-linux.img not found after a reboot

Hi, I was in the process of updating my Arch installation with sudo pacman -Syyu and then a lightning struck nearby and tripped my breaker, powering down my house. After the storm have cleared I booted the system, but now I get this message:

error: file `/boot/intramfs-linux.img` not found.

And it doesn't go any further with booting past this. Any ideas how can I fix it all without re-installing Arch?

Offline

#2 2022-07-05 12:23:30

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 264

Re: /boot/initramfs-linux.img not found after a reboot

Do you have "fallback initramfs" menu entry in bootloader? If yes, boot fallback and rebuild initramfs with

# mkinitcpio -p linux

Offline

#3 2022-07-05 12:29:26

sv-cheats-1
Member
Registered: 2022-02-15
Posts: 47

Re: /boot/initramfs-linux.img not found after a reboot

dimich wrote:

Do you have "fallback initramfs" menu entry in bootloader? If yes, boot fallback and rebuild initramfs with

# mkinitcpio -p linux

I do have this option under "Advanced options for Arch Linux", but it boots with the exact same message. I have a USB stick flashed with Arch, can I use it to fix the issue?

Offline

#4 2022-07-05 12:57:18

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 264

Re: /boot/initramfs-linux.img not found after a reboot

sv-cheats-1 wrote:

I have a USB stick flashed with Arch, can I use it to fix the issue?

Yes, you can. Boot with USB stick, mount your rootfs, run arch-chroot to mount point of rootfs and rebuild initramfs. It's hard to provide exact commands without knowing your filesystems layout.

Offline

#5 2022-07-05 12:59:04

sv-cheats-1
Member
Registered: 2022-02-15
Posts: 47

Re: /boot/initramfs-linux.img not found after a reboot

dimich wrote:
sv-cheats-1 wrote:

I have a USB stick flashed with Arch, can I use it to fix the issue?

Yes, you can. Boot with USB stick, mount your rootfs, run arch-chroot to mount point of rootfs and rebuild initramfs. It's hard to provide exact commands without knowing your filesystems layout.

Thank you for a suggestion! Can you please link some Wiki page so that I can figure out what commands to use? I don't know what "roofs" is.

Offline

#6 2022-07-05 13:24:53

sv-cheats-1
Member
Registered: 2022-02-15
Posts: 47

Re: /boot/initramfs-linux.img not found after a reboot

Yes! It all worked! Here's a step-by-step guide for anyone who encounters the same issue:

1. Get a USB stick with Arch Linux on it
2. Boot into it
3. Run fdisk -l and figure out on what partition you have your linux installation
4. Mount this partition with: mount /dev/path/to/partition /mnt
5. arch-chroot into it: arch-chroot /mnt
6. Rebuild initramfs: mkinitcpio -p linux

Reboot and that's it!

Offline

#7 2022-07-05 13:53:02

JoeyCorleone
Member
Registered: 2022-01-22
Posts: 88

Re: /boot/initramfs-linux.img not found after a reboot

Glad you were able to solve your issue. It's also very thoughtful to add a step-by-step guide.

Consider marking your thread as [SOLVED] by editing the title.

Offline

#8 2024-03-21 14:35:45

fablb
Member
Registered: 2024-03-21
Posts: 1

Re: /boot/initramfs-linux.img not found after a reboot

I had to take a few extra steps which I want to document here for others having the same problem:


1. Get a USB stick with Arch Linux on it
2. Boot into it
3. Run fdisk -l and figure out on what partition you have your linux installation
3a. Also figure out what your EFI partition's name is.
4. Mount this partition with: mount /dev/path/to/partition /mnt
4.a After mounting your linux partition, mount the EFI partiton: mount /dev/path/to/EFI /mnt/boot
5. arch-chroot into it: arch-chroot /mnt
6. Rebuild initramfs: mkinitcpio -p linux

The additional steps were required for the new initramfs file to be installed properly to the EFI partition.

Also, in my case step 6 (mkinitcpio) failed because of unconsistent kernel versions.
This was easily fixed by running: pacman -S linux.

This installed the proper kernel version and also runs mkinitcpio as post installation hook.

After this, my problems were solved. Hope this may help anyone in the future.

Edit: typo

Last edited by fablb (2024-03-21 14:38:34)

Offline

#9 2024-11-16 11:50:41

beki
Member
Registered: 2024-03-04
Posts: 5
Website

Re: /boot/initramfs-linux.img not found after a reboot

fablb wrote:

I had to take a few extra steps which I want to document here for others having the same problem:


1. Get a USB stick with Arch Linux on it
2. Boot into it
3. Run fdisk -l and figure out on what partition you have your linux installation
3a. Also figure out what your EFI partition's name is.
4. Mount this partition with: mount /dev/path/to/partition /mnt
4.a After mounting your linux partition, mount the EFI partiton: mount /dev/path/to/EFI /mnt/boot
5. arch-chroot into it: arch-chroot /mnt
6. Rebuild initramfs: mkinitcpio -p linux

The additional steps were required for the new initramfs file to be installed properly to the EFI partition.

Also, in my case step 6 (mkinitcpio) failed because of unconsistent kernel versions.
This was easily fixed by running: pacman -S linux.

This installed the proper kernel version and also runs mkinitcpio as post installation hook.

After this, my problems were solved. Hope this may help anyone in the future.

Edit: typo

I know this is a late post, but THANKS A LOT because what you wrote was EXACTLY was fixed it for me. A BIG HUG!!

Offline

#10 2024-11-16 12:35:50

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,939

Re: /boot/initramfs-linux.img not found after a reboot


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB