Grub menu is empty

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.

How shall I proceed now?

Could you boot up your live usb and post the output of the following commands?

sudo parted -l

efibootmgr

Also the content of the /etc/fstab from your installed system may be helpful.

Sure, thanks for your reply:

[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.

Make sure you have legacy/csm boot mode disabled in your firmware/bios settings.

Boot up your live usb in uefi mode. See if that would make any difference.

Ok, so I disabled secure boot and legacy boot. efibootmgr now says something more promising:

[root@EndeavourOS /]# efibootmgr 
BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0000,0001,0005,0006
Boot0000* Windows Boot Manager	HD(1,GPT,f1ccc0ef-7d5a-470c-93e3-08f3e0db6a4f,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000033000100000010000000040000007fff0400
Boot0001* grub	HD(1,GPT,2478ed72-61f4-4e4c-aa56-c4f60a2041e0,0x1000,0x100000)/File(\EFI\grub\grubx64.efi)
Boot0005* UEFI OS	HD(1,GPT,2478ed72-61f4-4e4c-aa56-c4f60a2041e0,0x1000,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)
Boot0006* UEFI: SanDisk Extreme 55AE	PciRoot(0x0)/Pci(0x1d,0x0)/USB(1,0)/USB(1,0)/HD(2,MBR,0x6e69b6bd,0x746e6da0,0x10000)0000424f

grub:

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
1 Like

That’s good news!

Now try the following:

In the chroot, try to run your updates again:

pacman -Syu

And then reinstall your kernels plus their headers. For example for the LTS:

pacman -S linux-lts linux-lts-headers

Pay attention to the output in the terminal. Specially make sure that the initrids have been generated successfully.

At the end run the grub-mkconfig command.

If you get any error messages at any step, please post them here.

If not exit the chroot and reboot.