Need help with supposedly broken systemd-boot

Hello everyone, earlier today I was reinstalling Windows, or at least attempting to, until the installer spewed out something about GPT partitions and failed. So, I was like, “Alright, let me hop back on Linux, and I’ll deal with this later today,” just to realize that the Linux boot manager was gone from the boot options in BIOS. The weird thing is that I could find it in the Windows diagnostics tool but not in BIOS. Anyways, I hopped on a live CD of Endeavour to chroot and install bootctl, but I am quite confused about what exactly I am looking to chroot into since I have never encountered such an issue before, and there are a lot of partitions that I had not noticed prior to this problem.

Here are both the outputs of: sudo parted -l and efibootmgr

Model: ADATA LEGEND 710 (nvme)
Disk /dev/nvme0n1: 2048GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      1049kB  106MB   105MB   fat32        EFI system partition          boot, esp, no_automount
 2      106MB   123MB   16.8MB               Microsoft reserved partition  msftres, no_automount
 3      123MB   228MB   105MB   fat32        EFI system partition          boot, esp, no_automount
 4      228MB   332MB   105MB   fat32        EFI system partition          boot, esp, no_automount
 5      332MB   437MB   105MB   fat32        EFI system partition          boot, esp, no_automount
 6      437MB   542MB   105MB   fat32        EFI system partition          boot, esp, no_automount
 7      542MB   647MB   105MB   fat32        EFI system partition          boot, esp, no_automount
 8      647MB   752MB   105MB   fat32        EFI system partition          boot, esp, no_automount
 9      752MB   857MB   105MB   fat32        EFI system partition          boot, esp, no_automount
10      857MB   53.2GB  52.3GB  ntfs         Basic data partition          msftdata
11      53.2GB  53.3GB  105MB   fat32        EFI system partition          boot, esp, no_automount
12      1081GB  1082GB  1049MB  fat32                                      boot, esp
13      1082GB  2048GB  965GB   ext4         endeavouros
14      2048GB  2048GB  707MB   ntfs                                       hidden, diag, no_automount
BootOrder: 0000
Boot0000  Linux Boot Manager    VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0001  Linux Boot Manager    VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0003  Windows Boot Manager  HD(1,GPT,9d267451-f24d-44bf-b95a-dd6b86998034,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000031000100000010000000040000007fff0400
Boot0009* UEFI: Wilk USB DISK 3.0 PMAP, Partition 1     PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/HD(1,GPT,71e64dff-27d5-4d4f-a796-16cf4e7d0739,0x800,0x1cedf98)0000424f
Boot000A* UEFI: Wilk USB DISK 3.0 PMAP, Partition 2     PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/HD(2,GPT,8ee1544b-48c8-49f0-8d74-1d33325a2880,0x1cee798,0x800)0000424f
Boot000E* Windows Boot Manager  HD(1,GPT,9d267451-f24d-44bf-b95a-dd6b86998034,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot000F* Windows Boot Manager  HD(12,GPT,47a3a56c-50e6-42e3-9b49-ad4bee43fc7a,0x7de23000,0x1f4000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)0000424f
Boot0010* UEFI: VerbatimSTORE N GO 1.00 PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/CDROM(1,0x4a0000,0x3ba98)0000424f
Boot0011* UEFI: Wilk USB DISK 3.0 PMAP, Partition 2     PciRoot(0x0)/Pci(0x14,0x0)/USB(16,0)/HD(2,GPT,8ee1544b-48c8-49f0-8d74-1d33325a2880,0x1cee798,0x800)0000424f

According to the boot order, my system should be directly booting into Endeavour, but instead, it is booting into the Windows diagnostic tool now due to the corrupted installation earlier. If anyone has any ideas on what I could do to resolve this issue, it would be much appreciated. Thanks in advance.

Why so many EFI System Partitions?

How did you install EnOS’? Manual partitioning or replace partition? Did you go with the defaults?

Where were you going to install Windows? Are there other disks in the system? If so, please post the whole output of the

sudo parted -l

The many EFI partitions allegedly came from previously bricked systems, which occurred due to frequent blackouts in my neighborhood last year. Each time a blackout happened during a system update, Endeavour would either stop working or start experiencing major issues. I simply never bothered to clean them up until now. As for the installation of the system itself, I do not recall how i installed it since it was well over a year ago, but I most likely did manual partitioning. I was planning to reinstall Windows on the same partition it was installed on prior to the issue. As for other disks, there weren’t any other drives connected to this system during that period, as of now i connected an external one since I had to back up all my data because I am considering doing a full wipe and reinstalling both due to the hassle of dealing with the many EFI partitions. Although I did manage to get systemd-boot working again however, it does not seem to detect Linux itself. The only options I am getting is to either boot into Win 11 which got corrupted during the install and the second option being booting into an EFI shell.

1 Like

Understandable if you want a fresh start and a nicely laid partition scheme.

I would personally consider the following if I were to redo my dual-boot Win-Linux system

  • install Windows first

  • once installed, shrink the Windows system partition from within Windows using its disk manager tool

  • if I’m not mistaken, EnOS’ installer (Calamares) cannot install to an unallocated space when choosing replace partition option. You would need to format that unallocated space prior to launching the installer. You could use the included partition manager. I wouldn’t think that the format is relevant at this stage (Btrfs or ext4) since you can choose the filesystem later in the installer

The system may still be fixable.

If you want you could try using your live usb and chroot into your system and running the command

reinstall-kernels

This should, in principle, if nothing else is broken or misconfigured, generate the systemd-boot entries.

If you need further assistance for how to chroot, please let us know.

I am still at a loss to understand how they have actually been created. Did you create them in an attempt to rescue your broken system?

I do want a fresh start indeed. Earlier, I accidentally ran an executable that contained a meterpreter without sandboxing it. If it wasn’t for the software I am using on that system, I wouldn’t even bother with Windows. Although I could virtualize and make it work on Linux, I am at risk of receiving an automated hardware ID ban from the given software company for virtualizing their products.

As for the installation process itself, I’ve always installed Windows first, and that has caused numerous problems for me regarding booting Linux. So, I thought I could try installing Linux first this time for a change.

The system itself, I am more than positive that it is still fixable, i’ve already tried doing everything possible to my knowledge. But due to a major lack of sleep lately, I just want to deal with the given issue as fast as possible and get some sleep. Since it would be faster for me to backup and format my entire drive to install both systems rather than reading documentation all day figuring out how to fix the issue. I’ve already reinstalled kernels earlier, and I’ve tried a few different approaches, including going through each EFI partition created previously and installing systemd-boot on them. I’ve also tried manually configuring each one since none of them detected Linux, and only a single one detected Windows 11.

As for the numerous created EFI partitions, it is quite unfathomable to me as well. I’ve never created those myself. As mentioned above, from around December 2022 up until February 2023, there were blackouts in the area. Whenever I was running an update using Yay, if a blackout occurred during the update, the entire system would break. So, I honestly have no idea when and how those were created although i do suspect it has something to do with the blackouts.
I am aware it does not sound logical at all but it is the closest to an explanation i can get out of it.
I might have also configured something improperly in the past and simply never noticed, which sounds more reasonable than my previous explanation.

1 Like

If anyone needs a UPS, it’s you.

4 Likes

I fully agree with this. I have been using a UPS backup for about 10 years now and it has saved me a few times not with just my computer but with the external drives and devices i have as well. They are relatively cheap compared to buying all new equipment. I don’t have many power issues but when I do I’m prepared.

1 Like