After being away for a year, I updated my EndevourOS system. Of course, this didn’t go as planned. When I rebooted, I only briefly saw “Welcome to grub” after which it gave up and chose the second boot option which was Windows.
I booted into a Live USB, mounted Linux into /mnt and the EFI partition into /mnt/boot and arch-chroot /mnt. I did pacman -Sy grub efibootmgr. I reinstalled grub as grub-install --target=x86_64-efi --bootloader-id=grub --recheck and then grub-mkconfig -o /boot/grub/grub.cfg. os-prober didn’t find anything.
Now I can boot into grub but the list of systems it shows is empty.
One thing I found curious is that /sys/firmware/efi did not exist on the chrooted system. I am certain it is an EFI system, though, as the EFI partition exists.
[liveuser@eos-2023.08.05 ~]$ sudo parted -l
Model: ATA KINGSTON SA400S3 (scsi)
Disk /dev/sda: 120GB
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 120GB 119GB ntfs Basic data partition msftdata
4 120GB 120GB 523MB ntfs hidden, diag, no_automount
Model: ATA SAMSUNG MZ7LN256 (scsi)
Disk /dev/sdb: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2097kB 539MB 537MB fat32 boot, esp
2 539MB 256GB 256GB ext4 root
Model: SanDisk Extreme 55AE (scsi)
Disk /dev/sdc: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary boot
2 1000GB 1000GB 33.6MB primary fat16 esp
[liveuser@eos-2023.08.05 ~]$ efibootmgr
EFI variables are not supported on this system.
[liveuser@eos-2023.08.05 ~]$
This is why I find it strange that apparently the system is non-EFI, but I do have EFI partitions.
The Linux partition is /dev/sdb2. What is furthermore strange is that in order to get into my Ventoy LiveUSB which is /dev/sdc1, I had to boot into Kingston, which is /dev/sda.
root@EndeavourOS /# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub
Installing for x86_64-efi platform.
Installation finished. No error reported.
Although, osprober still finds nothing:
root@EndeavourOS /# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
done