Unbootable - Failed to mount EFI!

I am on BTRFS, systemd-boot.
My system was working fine for long time. But as I was playing with python for a few days, I found Calibre unable to convert PDF files to AZW.
So I thought I restore to a previous snapshot 18 March (used BTRFS Assistant), which I did and rebooted instantly.

Rebooting I get the black screen with a message saying Failed to mount EFI, and an option to either enter root password or CTL-D.

Now I am booted from the previous ISO (USB),

System:
  Host: EndeavourOS Kernel: 5.19.4-arch1-1 arch: x86_64 bits: 64
    compiler: gcc v: 12.2.0 Desktop: Xfce v: 4.16.1 tk: Gtk v: 3.24.34
    info: xfce4-panel wm: xfwm v: 4.16.1 vt: 1 dm: LightDM v: 1.32.0
    Distro: EndeavourOS base: Arch Linux

How can I fix that to boot normally?

you need to chroot into your installation and fix it.
Looking at that:

it seems like you haven’t updated in a long time (arch-kernel is at 6.2.8 now) and somehow got a partial update situation, so maybe chrooting in and installing updates MIGHT already do the trick

Thanks @BS86
No, I am sure I am updated up to just a few minutes before having this issue.
It was strange for me that restoring the system to previous snapshot broke it as described.

So, what can I do? I will appreciate step by step instructions from that screen I mentioned. (sorry, I am not that techie!)
Thank you

Kernel is outside of your Btrfs system when using Systemd-boot, this is why simply restoring the snapshot does not help you and fixing is not enough. We warned you long ago.

You need to chroot to your system and mount /efi, then reinstall correct Kernel version that should match the snapshot.

1 Like

Thank you @Zesko

Sure! Whatever happens to my system is my fault anyway. It is me who does it!
So, with systemd-boot I should forget about BTRFS Assistant and snapshotting the system as it it pointless?

I will appreciate simple step by step instructions to do it if possible.

  1. You need to use other computer to download EOS ISO.
  2. Flash the EOS ISO into your USB stick.

There are two ways to fix your system to boot normally:

  1. Mount /mnt with your system
  2. Use Btrfs-Assistant → Subvolumes tab
  3. Restore back “the latest backup” as your current system including “broken” Calibre .

OR

  1. See how to chroot
  2. Reinstall Kernel via pacman
1 Like

well, 5.19.4 was the up-to-date kernel in August 2022 - so the snapshot you used must have been created several months ago or you did not update regularly. There were several breaking changes since then.

I am not used to btrfs, and using btrfs with systemd-boot is not recommended, so I can’t help with that.

I wonder if I am getting this correct. Can I reboot, then at the prompt I get I enter the root password then yay lts?
Or I do both?
Sorry if am not that techie. I never tried chroot before!
I do it from the already booted from USB or reboot and enter root password and do the commands?
Update:

[liveuser@eos-2022.08.28 ~]$ sudo lsblk -f
NAME FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
     squash 4.0                                                    0   100% /run/archiso/airootfs
sda  iso966 Jolie EOS_202208
                        2022-08-28-20-55-34-00                              
├─sda1
│    iso966 Jolie EOS_202208
│                       2022-08-28-20-55-34-00                     0   100% /run/archiso/bootmnt
└─sda2
     vfat   FAT16 ARCHISO_EFI
                        A2D6-6CDF                                           
nvme0n1
                                                                            
├─nvme0n1p1
│    vfat   FAT32 NO_LABEL
│                       F93D-1E42                                           
└─nvme0n1p2
     btrfs              39326df8-bcf7-4bef-b8b7-23fa3e95f8ed  171.2G    25% /run/media/liveuser/39326df8-bcf7-4bef-b8b7-23fa3e95f8ed
[liveuser@eos-2022.08.28 ~]$ 

He uses the old EOS ISO in his USB stick to show 5.19.4 on live system.

You need to learn chroot that is very useful. How to chroot, isn’t it easy for you?


  1. sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
  2. sudo mount /dev/nvme0n1p1 /mnt/efi
  3. sudo mount -o subvol=@log /dev/nvme0n1p2 /mnt/var/log
  4. sudo mount -o subvol=@cache /dev/nvme0n1p2 /mnt/var/cache
  5. sudo arch-chroot /mnt
  6. pacman -S linux-lts
  7. exit
  8. Reboot.
1 Like

Thanks a billion @Zesko for giving me step by step commands.

[liveuser@eos-2022.08.28 ~]$ sudo mount /dev/nvme0n1p2 /mnt
mount: /mnt: /dev/nvme0n1p2 already mounted on /run/media/liveuser/39326df8-bcf7-4bef-b8b7-23fa3e95f8ed.
       dmesg(1) may have more information after failed mount system call.
[liveuser@eos-2022.08.28 ~]$

Is this OK? should I do the next command?
(I wonder why removed detailed commands!)

[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
mount: /mnt: /dev/nvme0n1p2 already mounted on /run/media/liveuser/39326df8-bcf7-4bef-b8b7-23fa3e95f8ed.
       dmesg(1) may have more information after failed mount system call.
[liveuser@eos-2022.08.28 ~]$ sudo mount /dev/nvme0n1p1 /mnt/efi
mount: /mnt/efi: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
[liveuser@eos-2022.08.28 ~]$

mount point does not exist!

You have to unmount it

$ sudo umount /run/media/liveuser/39326df8-bcf7-4bef-b8b7-23fa3e95f8ed

Then try to follow:

1 Like
[liveuser@eos-2022.08.28 ~]$ sudo umount /run/media/liveuser/39326df8-bcf7-4bef-b8b7-23fa3e95f8ed
[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
mount: /mnt: /dev/nvme0n1p2 already mounted on /mnt.
       dmesg(1) may have more information after failed mount system call.
[liveuser@eos-2022.08.28 ~]$ sudo mount /dev/nvme0n1p1 /mnt/efi
mount: /mnt/efi: mount point does not exist.
       dmesg(1) may have more information after failed mount system call.
[liveuser@eos-2022.08.28 ~]$ 

Is this OK to say mount point does not exist?

Try to unmount /mnt again: $ sudo umount /mnt.
Then:

1 Like

Almost done but:

[liveuser@eos-2022.08.28 ~]$ sudo umount /mnt
[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
[liveuser@eos-2022.08.28 ~]$ sudo mount /dev/nvme0n1p1 /mnt/efi
[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@log /dev/nvme0n1p2 /mnt/var/log
[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@cache /dev/nvme0n1p2 /mnt/var/cache
[liveuser@eos-2022.08.28 ~]$ sudo arch-chroot /mnt
[root@EndeavourOS /]# pacman -S linux-lts
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck
[root@EndeavourOS /]# sudo pacman -S linux-lts
error: failed to init transaction (unable to lock database)
error: could not lock database: File exists
  if you're sure a package manager is not already
  running, you can remove /var/lib/pacman/db.lck
[root@EndeavourOS /]# 

Did you read it?

# rm /var/lib/pacman/db.lck

1 Like

Done hopefully correct this time. Rebooting now.

[liveuser@eos-2022.08.28 ~]$ rm /var/lib/pacman/db.lck
rm: cannot remove '/var/lib/pacman/db.lck': No such file or directory
[liveuser@eos-2022.08.28 ~]$ sudo umount /mnt
umount: /mnt: not mounted.
[liveuser@eos-2022.08.28 ~]$ rm /var/lib/pacman/db.lck
rm: cannot remove '/var/lib/pacman/db.lck': No such file or directory
[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@ /dev/nvme0n1p2 /mnt
[liveuser@eos-2022.08.28 ~]$ sudo mount /dev/nvme0n1p1 /mnt/efi
[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@log /dev/nvme0n1p2 /mnt/var/log
[liveuser@eos-2022.08.28 ~]$ sudo mount -o subvol=@cache /dev/nvme0n1p2 /mnt/var/cache
[liveuser@eos-2022.08.28 ~]$ sudo arch-chroot /mnt
[root@EndeavourOS /]# pacman -S linux-lts
warning: linux-lts-6.1.20-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Package (1)     Old Version  New Version  Net Change

core/linux-lts  6.1.20-1     6.1.20-1       0.00 MiB

Total Installed Size:  164.03 MiB
Net Upgrade Size:        0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                               [--------------------------------] 100%
(1/1) checking package integrity                             [--------------------------------] 100%
(1/1) loading package files                                  [--------------------------------] 100%
(1/1) checking for file conflicts                            [--------------------------------] 100%
:: Running pre-transaction hooks...
(1/1) Performing snapper pre snapshots for the following configurations...
==> root: 5530
:: Processing package changes...
(1/1) reinstalling linux-lts                                 [--------------------------------] 100%
:: Running post-transaction hooks...
(1/6) Arming ConditionNeedsUpdate...
(2/6) Updating module dependencies...
(3/6) Running kernel-install...
:: Running kernel-install for kernel 6.1.20-1-lts
dracut: Executing: /usr/bin/dracut --hostonly --no-hostonly-cmdline -f /efi/a9d690a5d1c144ee81cbb0b9de665c13/6.1.20-1-lts/initrd 6.1.20-1-lts
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: i18n ***
dracut: *** Including module: btrfs ***
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: Skipping udev rule: 70-persistent-net.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    766
dracut: Linked:                   1 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 45 files
dracut: Saved:                    692 B
dracut: Duration:                 0.003229 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Using microcode found in '/boot/intel-ucode.img' ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/efi/a9d690a5d1c144ee81cbb0b9de665c13/6.1.20-1-lts/initrd' ***
dracut: dracut: using auto-determined compression method 'gzip'
dracut: *** Creating initramfs image file '/efi/a9d690a5d1c144ee81cbb0b9de665c13/6.1.20-1-lts/initrd' done ***
dracut: Executing: /usr/bin/dracut --no-hostonly --force /efi/a9d690a5d1c144ee81cbb0b9de665c13/6.1.20-1-lts/initrd-fallback 6.1.20-1-lts
dracut: dracut module 'dash' will not be installed, because command 'dash' could not be found!
dracut: dracut module 'mksh' will not be installed, because command 'mksh' could not be found!
dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found!
dracut: dracut module 'dbus-broker' will not be installed, because command 'dbus-broker' could not be found!
dracut: dracut module 'rngd' will not be installed, because command 'rngd' could not be found!
dracut: dracut module 'network-wicked' will not be installed, because command 'wicked' could not be found!
dracut: dracut module 'dmraid' will not be installed, because command 'kpartx' could not be found!
dracut: dracut module 'multipath' will not be installed, because command 'multipath' could not be found!
dracut: dracut module 'tpm2-tss' will not be installed, because command 'tpm2' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoemon' could not be found!
dracut: dracut module 'fcoe' will not be installed, because command 'fcoeadm' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'dcbtool' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'fipvlan' could not be found!
dracut: dracut module 'fcoe-uefi' will not be installed, because command 'lldpad' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsi-iname' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsiadm' could not be found!
dracut: dracut module 'iscsi' will not be installed, because command 'iscsid' could not be found!
dracut: dracut module 'nvmf' will not be installed, because command 'nvme' could not be found!
dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found!
dracut: dracut module 'memstrack' will not be installed, because command 'memstrack' could not be found!
dracut: memstrack is not available
dracut: If you need to use rd.memdebug>=4, please install memstrack and procps-ng
dracut: dracut module 'squash' will not be installed, because command 'mksquashfs' could not be found!
dracut: dracut module 'squash' will not be installed, because command 'unsquashfs' could not be found!
dracut: *** Including module: bash ***
dracut: *** Including module: systemd ***
dracut: *** Including module: systemd-initrd ***
dracut: *** Including module: modsign ***
dracut: *** Including module: dbus-daemon ***
dracut: *** Including module: dbus ***
dracut: *** Including module: i18n ***
dracut: *** Including module: network-manager ***
dracut: *** Including module: network ***
dracut: *** Including module: btrfs ***
dracut: *** Including module: crypt ***
dracut: *** Including module: dm ***
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 60-persistent-storage-dm.rules
dracut: Skipping udev rule: 55-dm.rules
dracut: *** Including module: kernel-modules ***
dracut: *** Including module: kernel-modules-extra ***
dracut: *** Including module: kernel-network-modules ***
dracut: *** Including module: lvm ***
dracut: Skipping udev rule: 64-device-mapper.rules
dracut: Skipping udev rule: 56-lvm.rules
dracut: Skipping udev rule: 60-persistent-storage-lvm.rules
dracut: *** Including module: mdraid ***
dracut: Skipping udev rule: 64-md-raid.rules
dracut: *** Including module: nvdimm ***
dracut: *** Including module: qemu ***
dracut: *** Including module: qemu-net ***
dracut: *** Including module: cifs ***
dracut: *** Including module: lunmask ***
dracut: *** Including module: nbd ***
dracut: *** Including module: nfs ***
dracut: *** Including module: resume ***
dracut: *** Including module: rootfs-block ***
dracut: *** Including module: terminfo ***
dracut: *** Including module: udev-rules ***
dracut: Skipping udev rule: 40-redhat.rules
dracut: Skipping udev rule: 50-firmware.rules
dracut: Skipping udev rule: 50-udev.rules
dracut: Skipping udev rule: 91-permissions.rules
dracut: Skipping udev rule: 80-drivers-modprobe.rules
dracut: *** Including module: dracut-systemd ***
dracut: *** Including module: usrmount ***
dracut: *** Including module: base ***
dracut: *** Including module: fs-lib ***
dracut: *** Including module: shutdown ***
dracut: *** Including modules done ***
dracut: *** Installing kernel module dependencies ***
dracut: *** Installing kernel module dependencies done ***
dracut: *** Resolving executable dependencies ***
dracut: *** Resolving executable dependencies done ***
dracut: *** Hardlinking files ***
dracut: Mode:                     real
dracut: Method:                   sha256
dracut: Files:                    2476
dracut: Linked:                   9 files
dracut: Compared:                 0 xattrs
dracut: Compared:                 464 files
dracut: Saved:                    1.42 MiB
dracut: Duration:                 0.022233 seconds
dracut: *** Hardlinking files done ***
dracut: *** Generating early-microcode cpio image ***
dracut: *** Constructing AuthenticAMD.bin ***
dracut: *** Using microcode found in '/boot/intel-ucode.img' ***
dracut: *** Store current command line parameters ***
dracut: *** Stripping files ***
dracut: *** Stripping files done ***
dracut: *** Creating image file '/efi/a9d690a5d1c144ee81cbb0b9de665c13/6.1.20-1-lts/initrd-fallback' ***
dracut: dracut: using auto-determined compression method 'gzip'
cp: error writing '/efi/a9d690a5d1c144ee81cbb0b9de665c13/6.1.20-1-lts/initrd-fallback': No space left on device
dracut: dracut: creation of /efi/a9d690a5d1c144ee81cbb0b9de665c13/6.1.20-1-lts/initrd-fallback failed
Running in a chroot, skipping cmdline generation
(4/6) Check if user should be informed about rebooting after certain system package upgrades.
(5/6) Checking which packages need to be rebuilt
(6/6) Performing snapper post snapshots for the following configurations...
==> root: 5531
[root@EndeavourOS /]# exit
exit
[liveuser@eos-2022.08.28 ~]$ 

Rebooted but still having same error!

My guess is you need to run reinstall-kernels after pacman -S linux-lts.

Maybe @dalto can help.

I will try again and report back.
Thanks a lot @zesko for your kind and really generous help to an old man who is not that techie.!