Cannot boot system after removing Microsoft EFI

Hello all, I was trying to remove the Windows boot entry from systemd-boot, since I wiped the windows partition some months ago and I followed this piece of advice to remove the entry using efibootmgr.

I removed it correctly but I noticed that it was being somehow regenerated every time I booted my PC, so I went and removed (yeah, same on me for not making a backup) the /efi/EFI/Microsoft folder to try and axe it forever.

Well, now I cannot even get to the boot menu, the PC gets stuck on its MSI logo screen before it.
Ive tried booting with a USB, chroot-ing into my partition and rerunning both bootctl installand reinstall-kernels, as mentioned in here, to no avail.

Any ideas on how to restore the boot? I should also have that folder backed up in timeshift somewhere, but I`ve just been unable to make it work from the USB stick.

Are you saying you could not boot up a live disk? or that you booted into a live disk and tried said commands and that failed?

so you can or can’t boot the LiveISO?

And welcome here at the forum :enos:

Sorry for the poor wording. I CAN boot with the live ISO, and through it I tried a few things which didn’t solve the issue

first of all post the nvram entries output efibootmgr
this will show if there is actually any entry added or not.

thats a tutorial to remove the bootentry in nvram only it will not cleanup your efi partition from the entry… not directly at least it says how to backup the files only…

And you may not mounted the efi partition correctly into the chroot environment too (no details given) here is a tutorial for chroot on EndeavourOS:
https://discovery.endeavouros.com/system-rescue/arch-chroot/2022/12/

Here is the output of efibootmgr

[liveuser@eos-2024.04.20 ~]$ efibootmgr
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0004,0002,0003,0005
Boot0002* Linux Boot Manager    HD(2,GPT,f5081b98-519a-44b4-a76c-fb53bc80af90,0x32800,0x200000)/\EFI\SYSTEMD\SYSTEMD-BOOTX64.EFI
Boot0003* UEFI OS       HD(2,GPT,f5081b98-519a-44b4-a76c-fb53bc80af90,0x32800,0x200000)/\EFI\BOOT\BOOTX64.EFI0000424f
Boot0004* UEFI: TOSHIBA TransMemory 1.00        PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/CDROM(1,0x501b60,0x4fa98)0000424f
Boot0005* UEFI: TOSHIBA TransMemory 1.00, Partition 2   PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/HD(2,MBR,0x7498467c,0x501b60,0x4f800)0000424f

0002 has always been the endeavourOS entry, TOSHIBA is my USB but I cannot really say what the 0003 entry corresponds to.

And yes, I did follow that same tutorial, in my case I run in EFI mode as inferred from lsblk -f

[liveuser@eos-2024.04.20 ~]$ lsblk -f
NAME        FSTYPE   FSVER            LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0       squashfs 4.0                                                                     0   100% /run/archiso/airootfs
sda         iso9660  Joliet Extension EOS_202404  2024-04-20-15-57-10-00                              
├─sda1      iso9660  Joliet Extension EOS_202404  2024-04-20-15-57-10-00                     0   100% /run/archiso/bootmnt
└─sda2      vfat     FAT16            ARCHISO_EFI 7156-9697                                           
nvme0n1                                                                                               
├─nvme0n1p2 vfat     FAT32                        3377-1151                             736.5M    28% /mnt/efi
├─nvme0n1p3 ext4     1.0              endeavouros 9d1e2ab2-2a03-4e41-86ce-1dfccafaee7e  691.9G    20% /mnt
└─nvme0n1p5 ntfs                      DriverCD    B4901D06901CD0AA

To clear any ambiguity, what I did to mount the efi partition and chroot into it was

sudo mount /dev/nvme0n1p3 /mnt
sudo mount /dev/nvme0n1p2 /mnt/efi
sudo arch-chroot /mnt

thats generic hardware entry for the same drive you have installed EndeavourOS on.

this looks correct… with this it could be you removed something from the efi partition that belongs to Linux.

If this is systemd-boot install and not grub indeed… with grub efi is mounted on /boot/efi instead but if so it would give you an error that the path is not found … also you will be still able to use arch-chroot on /mnt …

Default would be systemd-boot if you do not explicitly chnaged that on initial install.

You can check on chroot by proceeding cat /etc/fstab and look if the efi mountpoint is /efi or /boot/efi there…

Well I was getting a bit desperate and wiped the whole drive, generated new partition tables and reinstalled EOS.

I first tried installing with systemd boot, and the problem persisted.
Luckily for me, installing with grub did the trick (guess I’m doing grub now… :slight_smile: ).

Anyway, thank you very much for the help, it was probably a remnant in that Microsoft folder from when I was dual booting.

Now… back to that pesky bluetooth issue I started having this morning after updating… (my adventure continues)