UEFI Grub and BIOS Grub in parallel

I installed Kubuntu on my Thinkpad laptop with Windows 10. I installed UEFI Grub on a separate small FAT 32 partition. Then I installed EOS on an empty partition, but on the recommendation of the offline installer, I installed BIOS-Grub on another FAT 32 partition. So I can boot Windows 10 from Ubuntu Grub as well, but if I choose legacy in the BIOS, EOS Grub doesn’t include Windows 10. How can this be easily solved by including Windows 10 in the EOS Grub menu? I tried this https://endeavouros.com/docs/system-rescue/repair-grub-efi-uefi-system/ but it was not effective. After issuing the mount / dev / sdXn / mnt / boot / efi command, I received an error message that / boot / efi could not be found.

From your EnOS, please post the output of the following commands:

test -d /sys/firmware/efi && echo UEFI || echo BIOS

sudo parted -l


efibootmgr -v
1 Like

If windows is installed UEFI, BIOS grub will not dual-boot it.

2 Likes

And not the MBR ?
It seems that the installed system is bootable (and pick up Kubuntu ?). Isn’t this odd?

If one has a UEFI system then you should always install in UEFI.

Sure. You can start Kubuntu from the EOS grub menu.

Yes, I noticed that. My goal is to have only one grub from which each system can be booted.

OK thank you. As soon as I am on this machine, I will try and give feedback.

The easiest way to accomplish that is to install all your OSes UEFI or all of them MBR/Bios.

Thank you for your reply. As I guess, this means reinstalling the EOS when the installer overwrites the grub previously created by Kubuntu on the EFI FAT 32 partition. Is the offline installation enabled on battery power?

BIOS

Típus: ATA KINGSTON SA400S3 (scsi)
/dev/sda lemez: 480GB
Szektorméret (logikai/fizikai): 512B/512B
Partíciós tábla: gpt
Lemezjelzők:

Szám Kezdet Vég Méret Fájlrendszer Név Jelzők
1 17,4kB 134MB 134MB msftres
2 135MB 690MB 555MB ntfs diag
3 690MB 795MB 105MB fat32 boot, esp
4 795MB 368GB 368GB ntfs msftdata
5 368GB 398GB 29,8GB ext4
10 398GB 431GB 33,1GB ext4
6 431GB 440GB 8389MB linux-swap(v1) swap
7 440GB 471GB 31,5GB ext4
8 471GB 480GB 8389MB linux-swap(v1) swap
9 480GB 480GB 538MB bios_grub, legacy_boot

EFI variables are not supported on this system.

1 Like

Thanks for the outputs!

This confirms @dalto’s comment above. Your systems are installed in a “mixed” mode.
Your EnOS is definitively installed in Bios mode as shown per the output of the first command above.

What is puzzling me is the fact that EnOS grub picks up Kubuntu. This would imply that Kubuntu is also installed in Bios mode. But you wrote:

At any rate, you would need to ascertain that all the systems are installed in the same mode.

I think when another Linux system is booted from grub’s boot menu the other’s system boot.img and core.img are not needed and therefore grub boots the other Linux system at an elevated stage where the differences in booting between UEFI and BIOS do not matter anymore.

1 Like

Just because grub is installed on a small fat32 partition doesn’t mean it’s using efi?

1 Like

Could you show file /boot/grub/grub.cfg on EOS?
Probably it is starting Kubuntu from a grub menu entry directly without using UEFI stuff at all.

You might be able to start Windows from EOS grub by writing the following into
file /boot/grub/custom.cfg:

menuentry 'Windows 10 (custom.cfg)' {
  savedefault
  search --set --fs-uuid XXXX-XXXX  # EFI partition uuid on your system, see: lsblk -fm
  chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

Thank you as my time allows, I will try and give feedback.

Custom.cfg did not exist, so I created it. After entering the code you suggested, I received an invalid signature error message.

Ok, it didn’t work.
Would be nice to see the full message though.

In fact, if I click on the Windows 10 entry, that’s all the message is, after which the grub main menu returns after a while. I was inattentive because during the EOS offline installation, during a manual partitioning, I created a new FAT32 small partition for BIOS Grub in response to a warning window. Otherwise, the installer would probably have overwritten the UEFI grub created when installing Kubuntu on the other, original EFI partition.

Actually, many different setups can co-exist on as UEFI partition. A directory is created to hold grub’s start file only, the actual grub info is kept on /boot for that particular system. You can only run in to trouble if UEFI is too small for how many you have installed. For instance I have 8 systems on one computer without crowding UEFI partition (500mb).

1 Like