Systemd-boot - Linux/endeavouros boot option suddenly disappeared, only Windows 10 option remains

Hi, I am dual-booting Windows and EndeavourOS and everything has been working fine thus far. However, when I booted up my computer this morning, the only option available in systemd-boot is Windows, as can be seen below. I have no idea why this happened, perhaps Windows updated and ruined the boot partition or something.

When looking at the partitons in Windows, I can see that the partitions still seem to be intact (Disk 1, 512 MB boot partiton, 2 GB Swap, 100 GB root).

Does anyone know a good way to solve this? I feel like this should be pretty easy to solve but I am not well versed in bootloaders and how they work. I don’t know if I can access and look into the bootloader files from Windows either, so right now I am thinking of booting Linux on a usb to try and fix it.

Does anyone have any suggestions? I feel like there is an automated way of detecting bootable partitions and updating the systemd-boot config that I am missing

That is typcially caused by an update not finishing for some reason. To fix it, you need to boot off our live USB, arch-chroot in by following the instructions here:

https://discovery.endeavouros.com/system-rescue/arch-chroot/2022/12/

Then run the command reinstall-kernels from the chroot.

1 Like

Hi, I’ve done chroot with the partitions mounted so it acts like I’m root under /mnt with both my data and efi mounted there. However, the reinstall-kernalscommand does not seem to exist.

I noticed this thread and ran the command you supplied: pacman -Q | grep -E "(dracut|mkinitcpio)" and got the output:

dracut 059-1
kernel-install-for-dracut 1.7-5

It is reinstall-kernels not reinstall-kernals

Whoops, my bad…

Running it I get an error:

Installing kernel 6.4.1-arch1-1
mkdir: cannot create directory ‘/efi/3690eb269c5148009b215f3193003ce6/6.4.1-arch1-1’: Input/output error

Can you share the output of findmnt --real

[root@EndeavourOS /]# findmnt --real
TARGET SOURCE         FSTYPE OPTIONS
/      /dev/nvme0n1p6 ext4   rw,relatime
└─/efi /dev/nvme0n1p4 vfat   ro,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,er

Looked around a bit and ran the command dmesg and got a part of this output:

...
[  121.997859] logitech-hidpp-device 0003:046D:4074.000B: HID++ 4.2 device connected.
[  364.831596] EXT4-fs (nvme0n1p6): mounted filesystem ab55f3d4-1b68-4133-b2bb-e049094ca118 with ordered data mode. Quota mode: none.
[  912.891872] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  912.891879] FAT-fs (nvme0n1p4): Filesystem has been set read-only
[  912.891888] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1315.915403] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1315.915442] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1317.709142] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1317.709157] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.195962] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.195971] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.442982] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.443039] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.618935] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.618975] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.019258] fat_get_cluster: 4 callbacks suppressed
[ 1321.019265] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.019303] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.168227] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.168236] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1327.365613] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)

So I guess the EFI partition is read only

It looks like your EFI partition might need repair.

1 Like

Yeah I seem to be able to remount the EFI partition and then it is read/write. I can create files and remove files, but after running reinstall-kernels and getting that previous error it seems the partition switches to a read-only partition (with more messages in dsmeg output):

...
[  364.831596] EXT4-fs (nvme0n1p6): mounted filesystem ab55f3d4-1b68-4133-b2bb-e049094ca118 with ordered data mode. Quota mode: none.
[  912.891872] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[  912.891879] FAT-fs (nvme0n1p4): Filesystem has been set read-only
[  912.891888] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1315.915403] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1315.915442] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1317.709142] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1317.709157] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.195962] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.195971] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.442982] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.443039] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.618935] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1318.618975] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.019258] fat_get_cluster: 4 callbacks suppressed
[ 1321.019265] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.019303] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.168227] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1321.168236] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1327.365613] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1951.978680] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)
[ 1951.978686] FAT-fs (nvme0n1p4): Filesystem has been set read-only
[ 1951.978694] FAT-fs (nvme0n1p4): error, fat_get_cluster: invalid cluster chain (i_pos 0)

How do I repair it?

Something does seem wrong with the “6.4.1-arch1-1” thing. I think it supposed to be a folder, but I cannot cd into it and when running ls -ltrI get this weird output and the partition changes to read-only:

[root@EndeavourOS 3690eb269c5148009b215f3193003ce6]# ls -ltr
ls: cannot access '6.4.1-arch1-1': Input/output error
total 0
d????????? ? ? ? ?            ? 6.4.1-arch1-1
[root@EndeavourOS 3690eb269c5148009b215f3193003ce6]# cd ..
[root@EndeavourOS efi]# touch wow
touch: cannot touch 'wow': Read-only file system

I managed to fix it! I copied the files I could access from the EFI partition as a backup and reformatted the partition as FAT32 and readded the flags “boot” and “esp”. I then changed the UUID in /etc/fstab corresponding to the /efi partition to the newly assigned UUID.

I chrooted to /mnt after mounting both partitions as before and ran bootctl --path=/efi install" to reinstall systemd-boot. I finally ran reinstall-kernels and it added back files to the efi partition and a loader configuration. I tried restarting and I got back into my EndeavourOS installation! :smiley:

However, there was no boot menu. But I fixed this by copying over configuration from my backup (adding timeout etc). I also copied over the old directory in /etc/ETC/Microsoft since Windows 10 had disappeared from the boot partition this time, and now both are there.

For future reference, my current loader.conf file is:

default 3690eb269c5148009b215f3193003ce6*
timeout 5
console-mode auto
reboot-for-bitlocker 1
2 Likes

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