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

Hello everyone!
Like in: old post from '21

After the last update, only the following information appears:
Loading Linux …
Loading initial …
error: file ‘/boot/initramfs-linux.img’ not found
Press any key …

Unfortunately, the solution from the thread I have provided does not work in my case. Other attempts to solve the problem via ArchWiki to chroot also failed.

Sendlog:
https://clbin.com/wGSup

From the image that you’ve posted on that thread, you can’t chroot because you didn’t mount correctly:

mount /dev/sda1 /mnt

You’ve got an error because you should run mount commands as root:

sudo mount /dev/sda1 /mnt

Take note that arch wiki (and many tutorials) use $ as first character to indicate commands that can be run with “normal” user and # for commands that should be run as root.

This can be run with normal user;

$ systemctl status firewalld

This one should be run as root:

# mount /dev/sda1 /mnt

For chroot-ing, it’s easier to run first sudo su, so all the next commands will be executed as root.

How can I run “su” when I have the system running from “[liveuser@es-2022.08.28 ~]”?

In the terminal just type

sudo su

Then you’ll get access as root.
liveuser has no password

1 Like
[liveuser@eos-2022.08.28 ~]$ su
Password: 
su: Authentication failure
[liveuser@eos-2022.08.28 ~]$ su
Password: 
su: Authentication failure
[liveuser@eos-2022.08.28 ~]$ sudo su
[root@EndeavourOS liveuser]# mount dev/sda1 /mnt
mount: /mnt: special device dev/sda1 does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS liveuser]# sudo mount /dev/sda1 /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
[root@EndeavourOS liveuser]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
     Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; preset: disabled)
     Active: active (running) since Mon 2022-10-10 00:17:39 UTC; 7min ago
       Docs: man:firewalld(1)
   Main PID: 468 (firewalld)
      Tasks: 2 (limit: 9325)
     Memory: 42.6M
        CPU: 3.588s
     CGroup: /system.slice/firewalld.service
             └─468 /usr/bin/python /usr/bin/firewalld --nofork --nopid

Oct 10 00:17:36 EndeavourOS systemd[1]: Starting firewalld - dynamic firewall daemon...
Oct 10 00:17:39 EndeavourOS systemd[1]: Started firewalld - dynamic firewall daemon.
[root@EndeavourOS liveuser]# mount /dev/sda1 /mnt
mount: /mnt: /dev/sda1 already mounted on /run/archiso/bootmnt.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS liveuser]# arch-chroot /mnt
mount: /mnt/proc: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
==> ERROR: failed to setup chroot /mnt
[root@EndeavourOS liveuser]# 

Please don’t post screenshots. Post the terminal output as text in code blocks like this
```
output
```

Text in screenshots aren’t readable

Now that you know how to run commands as root, just follow this guide:

https://discovery.endeavouros.com/system-rescue/arch-chroot-for-efi-uefi-systems/2021/03/

If you ran sudo su at first, just ignore the sudo part on next commands.

1 Like

Yes thank you. I used this guide before. Until now, I have always solved all problems on my own, but in this case, when the system has crashed, I cannot. I was on the forum for the first time. Please forgive me as a novice, but since I switched to “root” and typed “sudo” and got a different information than without, that was the reason I typed it this way. Otherwise, I would get an error message.

nvme0n1                                                                           
├─nvme0n1p1
│       vfat   FAT32          D112-3F82                                           
├─nvme0n1p2
│       ext4   1.0            b2017856-f381-48ea-aa2d-5e40161171bd                
└─nvme0n1p3
        swap   1     swap     6afae030-a796-4efd-967c-350feb47bea2                
[root@EndeavourOS liveuser]# mount /dev/sda2 /mnt
[root@EndeavourOS liveuser]# mount /dev/sda1 mnt
mount: mnt: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS liveuser]# mount /dev/sda1 /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
[root@EndeavourOS liveuser]# mount /dev/sda2 /mnt
[root@EndeavourOS liveuser]# mount /dev/sda2 /mnt/boot/efi
mount: /mnt/boot/efi: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS liveuser]# mount /dev/sda1 /mnt/boot/efi
mount: /mnt/boot/efi: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS liveuser]# arch-chroot /mnt
mount: /mnt/proc: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
==> ERROR: failed to setup chroot /mnt
[root@EndeavourOS liveuser]# 

I have 3 laptops at home. On 2 of them this problem appeared, but on one of them my son disregarded the fire and tubalized the system by command: “sudo pacman -Syu”

:: Synchronizowanie baz danych z pakietami…
 core is up to date
 extra                1719,0 KiB   679 KiB/s 00:03 [----------------------] 100%
 community               7,0 MiB  1214 KiB/s 00:06 [----------------------] 100%
 multilib is up to date
 endeavouros            34,3 KiB   203 KiB/s 00:00 [----------------------] 100%
błąd:  nie udało się pobrać pliku 'extra.db' z mirror.mangohost.net : Failed to connect to mirror.mangohost.net port 443 after 113 ms: Połączenie odrzucone
błąd:  nie udało się pobrać pliku 'community.db' z mirror.mangohost.net : Failed to connect to mirror.mangohost.net port 443 after 113 ms: Połączenie odrzucone
błąd:  nie udało się pobrać pliku 'multilib.db' z mirror.mangohost.net : Failed to connect to mirror.mangohost.net port 443 after 113 ms: Połączenie odrzucone
ostrzeżenie: too many errors from mirror.mangohost.net, skipping for the remainder of this transaction
błąd:  nie udało się pobrać pliku 'core.db' z mirror.mangohost.net : Failed to connect to mirror.mangohost.net port 443 after 123 ms: Połączenie odrzucone
:: Rozpoczynanie pełnej aktualizacji systemu…
rozwiązywanie zależności…
szukanie sprzecznych pakietów...

ostrzeżenie: niewystarczająca szerokość okna, aby wyświetlić tabelę
Pakiety (57) alsa-card-profiles-1:0.3.59-2  cairomm-1.14.4-1
             dhclient-4.4.3.P1-1  eos-bash-shared-1.33-1  eos-quickstart-1.3-4
             eos-rankmirrors-2.6-1  eos-translations-1.18-1
             f2fs-tools-1.15.0-2  firefox-105.0.3-1  firefox-i18n-pl-105.0.3-1
             flac-1.4.1-2  foomatic-db-3:20221004-1
             foomatic-db-nonfree-3:20221004-1
             foomatic-db-nonfree-ppds-3:20221004-1
             foomatic-db-ppds-3:20221004-1  git-2.38.0-1  glibc-2.36-6
             grub-2:2.06.r334.g340377470-1  gspell-1.12.0-1
             gst-plugin-pipewire-1:0.3.59-2  hwdata-0.363-1
             imagemagick-7.1.0.50-1  inxi-3.3.22.1-1  iproute2-6.0.0-1
             libbpf-1.0.1-1  libcdio-2.1.0-3  libgpg-error-1.46-1
             libical-3.0.15-1  libpeas-1.34.0-1  libphonenumber-1:8.12.56-1
             libreoffice-fresh-7.4.1-4  librsvg-2:2.55.1-1
             linux-5.19.13.arch1-1  linux-headers-5.19.13.arch1-1
             ostree-2022.6-1  pango-1:1.50.11-1  pangomm-2.46.3-1
             perl-alien-build-2.71-1  perl-http-message-6.39-1  perl-uri-5.13-1
             pipewire-1:0.3.59-2  pipewire-alsa-1:0.3.59-2
             pipewire-audio-1:0.3.59-2  pipewire-jack-1:0.3.59-2
             pipewire-pulse-1:0.3.59-2  poppler-22.10.0-1
             poppler-glib-22.10.0-1  python-termcolor-2.0.1-1
             qt6-declarative-6.4.0-2  r8168-8.050.03-30  systemd-251.5-1
             systemd-libs-251.5-1  systemd-sysvcompat-251.5-1  vi-1:070224-6
             wireplumber-0.4.12-1  xkeyboard-config-2.37-1  xz-5.2.7-1

Do pobrania:              332,24 MiB
Do zainstalowania:       1396,29 MiB
Zmiana po aktualizacji:     1,34 MiB

you are mounting the wrong partitions. Your root partition is nvme0n1p2 and boot partition is nvme0n1p1 not sda2 and sda1. So you need to reboot your ISO and perform these steps for mounting

sudo su
mount /dev/nvme0n1p2 /mnt
mount /dev/nvme0n1p1 /mnt/boot/efi

and then you can arch-chroot

arch-chroot /mnt

Thank you. Another trouble emerged. Unfortunately, I do it all like a blind man.

root@EndeavourOS liveuser]# mount /dev/nvme0n1p2 /mnt
[root@EndeavourOS liveuser]# mount /dev/mvme0n1p1 /mnt/boot/efi
mount: /mnt/boot/efi: special device /dev/mvme0n1p1 does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS liveuser]# arch-chroot /mnt
[root@EndeavourOS /]# ls
bin   dev  home  lib64	     mnt  proc	run   srv  tmp	var
boot  etc  lib	 lost+found  opt  root	sbin  sys  usr
[root@EndeavourOS /]# cd home
[root@EndeavourOS home]# ls
dominiksz  olenka
[root@EndeavourOS home]# cd ..
[root@EndeavourOS /]# ls
bin   dev  home  lib64	     mnt  proc	run   srv  tmp	var
boot  etc  lib	 lost+found  opt  root	sbin  sys  usr
[root@EndeavourOS /]# cd mnt
[root@EndeavourOS mnt]# ls
[root@EndeavourOS mnt]# mkdir -p /mnt/boot/efi
[root@EndeavourOS mnt]# ls
boot
[root@EndeavourOS mnt]# mount /dev/sd^C /mnt/boot
[root@EndeavourOS mnt]# mount /dev/mvme0n1p1 /mnt/boot
mount: /mnt/boot: special device /dev/mvme0n1p1 does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS mnt]# mount /dev/sda1 /mnt/boot
mount: /mnt/boot: /dev/sda1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS mnt]# mount /dev/sda2 /mnt/boot
[root@EndeavourOS mnt]# mount /dev/sda1 /mnt/boot/efi
mount: /mnt/boot/efi: /dev/sda1 already mounted or mount point busy.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS mnt]# mount /dev/sda2 /mnt/boot/efi
[root@EndeavourOS mnt]# pacman -Syyu
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
[root@EndeavourOS mnt]# mount /dev/mvme0n1p1 /mnt/boot/efi
mount: /mnt/boot/efi: special device /dev/mvme0n1p1 does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS mnt]# mount /dev/mvme0n1p2 /mnt/boot/efi
mount: /mnt/boot/efi: special device /dev/mvme0n1p2 does not exist.
       dmesg(1) may have more information after failed mount system call.
[root@EndeavourOS mnt]# mkinitcpio -p linux
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
==> Starting build: 5.19.13-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [autodetect]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux.img
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
  -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
==> Starting build: 5.19.13-arch1-1
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [modconf]
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: wd719x
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qla1280
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: aic94xx
==> WARNING: Possibly missing firmware for module: xhci_pci
  -> Running build hook: [keyboard]
  -> Running build hook: [keymap]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [resume]
  -> Running build hook: [filesystems]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> Image generation successful
[root@EndeavourOS mnt]# pacman -Syyu
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
[root@EndeavourOS mnt]# pacman -Sy inxi
:: Synchronizing package databases...
error: failed to synchronize all databases (unable to lock database)
[root@EndeavourOS mnt]# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub/themes/EndeavourOS/theme.txt
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/intel-ucode.img /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  intel-ucode.img initramfs-linux-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
Adding boot menu entry for UEFI Firmware Settings ...
done
[root@EndeavourOS mnt]# ls
boot
[root@EndeavourOS mnt]# cd ..
[root@EndeavourOS /]# ls
bin   dev  home  lib64	     mnt  proc	run   srv  tmp	var
boot  etc  lib	 lost+found  opt  root	sbin  sys  usr
[root@EndeavourOS /]# cd ..
[root@EndeavourOS /]# ls
bin   dev  home  lib64	     mnt  proc	run   srv  tmp	var
boot  etc  lib	 lost+found  opt  root	sbin  sys  usr
[root@EndeavourOS /]# cd dev
[root@EndeavourOS dev]# ls
acpi_thermal_rel  hidraw0	nvme0n1    tpm0    tty27  tty48  ttyS10  ttyS31   vcsa2
autofs		  hidraw1	nvme0n1p1  tpmrm0  tty28  tty49  ttyS11  ttyS4	  vcsa3
block		  hpet		nvme0n1p2  tty	   tty29  tty5	 ttyS12  ttyS5	  vcsa4
bsg		  hugepages	nvme0n1p3  tty0    tty3   tty50  ttyS13  ttyS6	  vcsa5
btrfs-control	  hwrng		nvram	   tty1    tty30  tty51  ttyS14  ttyS7	  vcsa6
bus		  input		port	   tty10   tty31  tty52  ttyS15  ttyS8	  vcsu
char		  kmsg		ppp	   tty11   tty32  tty53  ttyS16  ttyS9	  vcsu1
console		  log		psaux	   tty12   tty33  tty54  ttyS17  udmabuf  vcsu2
core		  loop0		ptmx	   tty13   tty34  tty55  ttyS18  uhid	  vcsu3
cpu		  loop-control	pts	   tty14   tty35  tty56  ttyS19  uinput   vcsu4
cpu_dma_latency   mapper	random	   tty15   tty36  tty57  ttyS2	 urandom  vcsu5
cuse		  media0	rfkill	   tty16   tty37  tty58  ttyS20  usb	  vcsu6
disk		  mei0		rtc	   tty17   tty38  tty59  ttyS21  userio   vfio
dma_heap	  mem		rtc0	   tty18   tty39  tty6	 ttyS22  v4l	  vga_arbiter
dri		  mqueue	sda	   tty19   tty4   tty60  ttyS23  vcs	  vhci
drm_dp_aux0	  mtd0		sda1	   tty2    tty40  tty61  ttyS24  vcs1	  vhost-net
drm_dp_aux1	  mtd0ro	sda2	   tty20   tty41  tty62  ttyS25  vcs2	  vhost-vsock
drm_dp_aux2	  mtd1		shm	   tty21   tty42  tty63  ttyS26  vcs3	  video0
fb0		  mtd1ro	snapshot   tty22   tty43  tty7	 ttyS27  vcs4	  video1
fd		  net		snd	   tty23   tty44  tty8	 ttyS28  vcs5	  watchdog
full		  ng0n1		stderr	   tty24   tty45  tty9	 ttyS29  vcs6	  watchdog0
fuse		  null		stdin	   tty25   tty46  ttyS0  ttyS3	 vcsa	  zero
gpiochip0	  nvme0		stdout	   tty26   tty47  ttyS1  ttyS30  vcsa1
[root@EndeavourOS dev]# 

There is a typo here, you ran the wrong command. so you didn’t mount the boot partition.

Also, don’t blindly run commands. Look for error messages. Don’t continue if you have error messages. The things you do later won’t work.

Try to understand the commands you are running.

1 Like

Not only error in the command but not mounting the efi partition properly.

@nylio

In order to arch-chroot you have to mount the root partition first, then you mount the efi partition and then you can arch-chroot to the /mnt.

Please slow down. Read the wiki, understand what is necessary and how to do it. Please follow what you are instructed to do. It is so much easier.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.