Messed up defaults for boot after a mid-update loss of power

Hello,

I’m struggling to find a solution to my problem which I think is partly down to me not quite understanding the boot system I’ve set up. It’s a dual boot with the original Windows partition.

The problem began after an unexpected power loss during an update. The laptop was unbootable saying that EFI partition could not be booted because format ‘vfat’ unknown. I booted up a Live-USB and followed some instructions to rebuild the kernels. So I mounted my main as /mnt and the efi partition as /mnt/boot/efi. This solved the boot issue but it returns every time the linux kernel gets and update. The updates are running without error but on reboot the issue is the same (I did have some issues with it running out of space but I solved that making EFI partition bigger).

I think I’ve changed some default location of dracut/the boot partition so now the new boot image doesn’t get found so it tried to use the old and gives the ‘vfat’ error. Repeating the process of using the live usb reinstalling kernels always works. With the most recent linux kernel update I tried to do the work before the update but it still failed in the same way and needed the live-usb.

I’m aware part of the problem is my lack of understanding of how the boot process works. Any suggestions for reading material and/or commands I can use to understand what’s going wrong.

Thanks in advance!

1 Like

Please post the output of the following commands:

cat /etc/fstab

efibootmgr

sudo parted -l

https://wiki.archlinux.org/title/Arch_boot_process

https://wiki.archlinux.org/title/EFI_system_partition

https://wiki.archlinux.org/title/GRUB

https://wiki.archlinux.org/title/Systemd-boot

Result of cat /etc/fstab

UUID=1D0C-5931                            /efi           vfat    fmask=0137,dmask=0027 0 2
UUID=42f7c478-aad2-4fec-940e-e39673976a1c /              ext4    noatime    0 1
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

efibootmgr

BootCurrent: 0007
Timeout: 5 seconds
BootOrder: 0007,0004,0003,0001,0000,0005
Boot0000* UEFI PM981a NVMe Samsung 1024GB S4GXNX0NB21730 1      PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,GPT,3d74ac7a-b864-4c89-a6b6-d56a9d1a2456,0x800,0x9f000)/\EFI\Boot\BootX64.efi{auto_created_boot_option}
Boot0001* UEFI PM981a NVMe Samsung 1024GB S4GXNX0NB21730 1 2    PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(5,GPT,12411b55-e8f7-4b55-8b83-b71823a3d66e,0x134c4000,0x1f4000)/\EFI\Boot\BootX64.efi{auto_created_boot_option}
Boot0003* Windows       PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(1,GPT,3d74ac7a-b864-4c89-a6b6-d56a9d1a2456,0x800,0x5f000)/\EFI\Microsoft\Boot\en-GB\bootmgr.efi.mui
Boot0004* Windows Boot Manager  HD(1,GPT,3d74ac7a-b864-4c89-a6b6-d56a9d1a2456,0x800,0x9f000)/\EFI\Microsoft\Boot\bootmgfw.efi57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d000000ffff0100000010000000040000007fff0400
Boot0005* UEFI PM981a NVMe Samsung 1024GB S4GXNX0NB21730 1 3    PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-00-00-00-00-00-00-00)/HD(9,GPT,40557fa5-26e5-4bd3-b37f-6c690f2282af,0x74f77800,0x9f000)/\EFI\Boot\BootX64.efi{auto_created_boot_option}
Boot0007* Linux Boot Manager    HD(1,GPT,3d74ac7a-b864-4c89-a6b6-d56a9d1a2456,0x800,0x5f000)/\EFI\systemd\systemd-bootx64.efi

and of sudo parted -l

Model: PM981a NVMe Samsung 1024GB (nvme)
Disk /dev/nvme0n1: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                  Flags
 1      1049kB  334MB   333MB   fat32           EFI system partition  boot, esp
 3      336MB   131GB   131GB   ntfs            Basic data partition  msftdata
 4      131GB   166GB   34.4GB  linux-swap(v1)                        swap
 5      166GB   167GB   1049MB  fat32                                 boot, esp
 6      167GB   1004GB  837GB   ext4            endeavouros
 2      1004GB  1005GB  134MB                                         msftres
 9      1005GB  1005GB  333MB   fat32                                 msftdata
 7      1005GB  1023GB  17.5GB  ntfs                                  hidden, diag
 8      1023GB  1024GB  1444MB  ntfs                                  hidden, diag

Thank you for the links: I should have known to start at the arch wiki!

1 Like

This indicates that you are using systemd-boot as bootloader which is the default in EnOS.
When using systemd-boot, your ESP is mounted at /efi as can be seen in your fstab.

In EnOS, the mountpoint /boot/efi is used when using Grub as bootloader.

Could you post the output of:

tree /boot

tree /efi

and

sudo blkid

?

tree /boot
/boot
├── efi
├── initramfs-6.9.3-arch1-1.img
├── initramfs-6.9.4-arch1-1.img
├── initramfs-6.9.6-arch1-1.img
├── initramfs-linux.img
├── initramfs-linux-lts.img
└── intel-ucode.img

tree /efi Not sure if expected but interestingly only succesfully runs as root. Says error opening dir if as user.

/efi
├── 7b9d644f2bdd4b8e884b54e9d7d0fa85
│   └── 6.9.7-arch1-1
│       ├── initrd
│       ├── initrd-fallback
│       └── linux
├── EFI
│   ├── BOOT
│   │   └── BOOTX64.EFI
│   ├── Dell
│   │   ├── logs
│   │   │   ├── diags_current.xml
│   │   │   └── diags_previous.xml
│   │   └── SOS
│   │       └── bootx64.efi
│   ├── Linux
│   ├── Microsoft
│   │   ├── Boot
│   │   │   ├── BCD
│   │   │   ├── BCD.LOG
│   │   │   ├── BCD.LOG1
│   │   │   ├── BCD.LOG2
│   │   │   ├── bg-BG
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── bootmgfw.efi
│   │   │   ├── bootmgr.efi
│   │   │   ├── BOOTSTAT.DAT
│   │   │   ├── boot.stl
│   │   │   ├── CIPolicies
│   │   │   │   └── Active
│   │   │   │       ├── {5DAC656C-21AD-4A02-AB49-649917162E70}.cip
│   │   │   │       ├── {82443e1e-8a39-4b4a-96a8-f40ddc00b9f3}.cip
│   │   │   │       └── {CDD5CB55-DB68-4D71-AA38-3DF2B6473A52}.cip
│   │   │   ├── cs-CZ
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── da-DK
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── de-DE
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── el-GR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── en-GB
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── en-US
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── es-ES
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── es-MX
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── et-EE
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── fi-FI
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── Fonts
│   │   │   │   ├── chs_boot.ttf
│   │   │   │   ├── cht_boot.ttf
│   │   │   │   ├── jpn_boot.ttf
│   │   │   │   ├── kor_boot.ttf
│   │   │   │   ├── malgun_boot.ttf
│   │   │   │   ├── malgunn_boot.ttf
│   │   │   │   ├── meiryo_boot.ttf
│   │   │   │   ├── meiryon_boot.ttf
│   │   │   │   ├── msjh_boot.ttf
│   │   │   │   ├── msjhn_boot.ttf
│   │   │   │   ├── msyh_boot.ttf
│   │   │   │   ├── msyhn_boot.ttf
│   │   │   │   ├── segmono_boot.ttf
│   │   │   │   ├── segoen_slboot.ttf
│   │   │   │   ├── segoe_slboot.ttf
│   │   │   │   └── wgl4_boot.ttf
│   │   │   ├── fr-CA
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── fr-FR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── FveTcg_0.log
│   │   │   ├── FveTcg_1.log
│   │   │   ├── FveTcg_2.log
│   │   │   ├── hr-HR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── hu-HU
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── it-IT
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── ja-JP
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── kd_02_10df.dll
│   │   │   ├── kd_02_10ec.dll
│   │   │   ├── kd_02_1137.dll
│   │   │   ├── kd_02_14e4.dll
│   │   │   ├── kd_02_15b3.dll
│   │   │   ├── kd_02_1969.dll
│   │   │   ├── kd_02_19a2.dll
│   │   │   ├── kd_02_1af4.dll
│   │   │   ├── kd_02_8086.dll
│   │   │   ├── kd_07_1415.dll
│   │   │   ├── kd_0C_8086.dll
│   │   │   ├── kdnet_uart16550.dll
│   │   │   ├── kdstub.dll
│   │   │   ├── ko-KR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── lt-LT
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── lv-LV
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── memtest.efi
│   │   │   ├── nb-NO
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── nl-NL
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── pl-PL
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── pt-BR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── pt-PT
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── qps-ploc
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── Resources
│   │   │   │   ├── bootres.dll
│   │   │   │   ├── de-DE
│   │   │   │   │   └── bootres.dll.mui
│   │   │   │   ├── en-US
│   │   │   │   │   └── bootres.dll.mui
│   │   │   │   ├── fr-FR
│   │   │   │   │   └── bootres.dll.mui
│   │   │   │   ├── it-IT
│   │   │   │   │   └── bootres.dll.mui
│   │   │   │   └── nl-NL
│   │   │   │       └── bootres.dll.mui
│   │   │   ├── ro-RO
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── ru-RU
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── sk-SK
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── sl-SI
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── sr-Latn-RS
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── sv-SE
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── tr-TR
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   ├── uk-UA
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   └── bootmgr.efi.mui
│   │   │   ├── winsipolicy.p7b
│   │   │   ├── zh-CN
│   │   │   │   ├── bootmgfw.efi.mui
│   │   │   │   ├── bootmgr.efi.mui
│   │   │   │   └── memtest.efi.mui
│   │   │   └── zh-TW
│   │   │       ├── bootmgfw.efi.mui
│   │   │       ├── bootmgr.efi.mui
│   │   │       └── memtest.efi.mui
│   │   └── Recovery
│   │       ├── BCD
│   │       ├── BCD.LOG
│   │       ├── BCD.LOG1
│   │       └── BCD.LOG2
│   └── systemd
│       └── systemd-bootx64.efi
├── loader
│   ├── entries
│   │   ├── 7b9d644f2bdd4b8e884b54e9d7d0fa85-6.9.7-arch1-1.conf
│   │   └── 7b9d644f2bdd4b8e884b54e9d7d0fa85-6.9.7-arch1-1-fallback.conf
│   ├── entries.srel
│   ├── loader.conf
│   └── random-seed
└── System Volume Information

and finally sudo blkid

/dev/nvme0n1p9: LABEL_FATBOOT="ESPBACKUP" LABEL="ESPBACKUP" UUID="C053-8F53" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="40557fa5-26e5-4bd3-b37f-6c690f2282af"
/dev/nvme0n1p7: LABEL="Image" BLOCK_SIZE="512" UUID="920624C00624A767" TYPE="ntfs" PARTUUID="a6236e72-0136-4066-98ed-652dccb13a86"
/dev/nvme0n1p5: UUID="1D0C-5931" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="12411b55-e8f7-4b55-8b83-b71823a3d66e"
/dev/nvme0n1p3: LABEL="OS" BLOCK_SIZE="512" UUID="88AE56CFAE56B582" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="620875cc-bbdb-462b-8773-9cbb63b1d0f7"
/dev/nvme0n1p1: LABEL_FATBOOT="ESP" LABEL="ESP" UUID="473B-394C" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="3d74ac7a-b864-4c89-a6b6-d56a9d1a2456"
/dev/nvme0n1p8: LABEL="DELLSUPPORT" BLOCK_SIZE="512" UUID="06C04953C04949DF" TYPE="ntfs" PARTUUID="5ef99fc2-1982-4408-9bb7-ecaaea30bcef"
/dev/nvme0n1p6: LABEL="endeavouros" UUID="42f7c478-aad2-4fec-940e-e39673976a1c" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="endeavouros" PARTUUID="ee1c54ac-6bca-42e7-b932-a5baa3851be9"
/dev/nvme0n1p4: UUID="8b64e2f1-b318-4a74-a6bf-befebc46a2ec" TYPE="swap" PARTUUID="f07d1646-c1cd-4ca5-81b9-810bad111c04"
/dev/nvme0n1p2: PARTUUID="3164e11b-9711-4d83-8c53-59af62d0bf13"

Thanks

1 Like

Thanks!

When using systemd-boot, your kernel images and initramfs are housed in ESP mounted at /efi.

You have some kernel images and initramfs at /boot/efi. That is the wrong location. I suspect that having mounted ESP at /boot/efi and attempting to restore your boot has been the cause that they have ended in there.

:warning:
in the continuation, if you you get any error messages at any step, stop and post the whole of the command and its output including the error message

This is what I would do in a similar situation:

  1. make sure that ESP ( /dev/nvme0n1p5, UUID=1D0C-5931) is mounted at /efi (look at the output of lsblk -f for example)

  2. reinstall systemd-boot’s efi bootloader: bootctl install

  3. reinstall your kernels: sudo pacman -S linux linux-lts linux-headers linux-lts-headers

  4. check with tree /efi and make sure that the kernel images and initrds are present

  5. remove /boot/efi and its content: sudo rm -r /boot/efi

  6. better safe, than sorry, run the following command to regenerate your initrds and systemd-boot loader entries: sudo reinstall-kernels

  7. cross fingers and reboot.

  8. report back in case of success or failure

1 Like

Thank you for this. I will have to wait until tonight to try it but I shall report back!

1 Like

I followed each of these and it seems to have worked.

Thank you so much! I think I realise my mistake now: when I initially fixed I think I reinstalled the bootloader onto the Windows bootloader nvme0n1p1 which is also why I ran out of space.

Thanks again!

1 Like

You are welcome! Glad to hear that things worked out fine!

1 Like

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