How to make UEFI's GRUB2 menu the same as BIOS's one

I’ve recently switched from BIOS to UEFI and noticed the difference in GRUB2 menu as the following images

BIOS

UEFI
grub-efi

Personally, UEFI’s menu is too ugly for me. Is there anyway I can use the BIOS’s menu for UEFI?

What is the output of nixos-option boot.loader.grub.gfxmodeEfi for you?

Are you sure that the latter is grub2? For me it looks a lot more like systemd-boot.

3 Likes

@NobbZ thank you for letting me know. Since I only have experience with GRUB2, I assumed it’s GRUB2 menu

@SRGOM here’s my result. How can I proceed from here?

What are the values of boot.loader.{grub,systemd-boot}.enable?

nixos-option boot.loader.systemd-boot.enable
nixos-option boot.loader.grub.enable

nixos-option boot.loader.systemd-boot.enable

nixos-option boot.loader.grub.enable

Yupp, the EFI boot is systemd-boot. It looks like that.

I have no experience in changing it to grub.

If you already had a working grub install on the same computer, changing this should be as simple as setting those 3 value in your system configuration.nix (don’t hesatite to reformat that for a better presentation).

boot.loader.systemd-boot.enable = false;
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;

you should also have a grub.device = something in your configuration. After this, a rebuild should reinstall grub (althought I recommend you to have a bootable nixos usb stick or disk near you if something goes wrong)

The grub device has to be none or noop AFAIR when doing EFI. Please check the documentation carefully!

1 Like

I’ve never had a working GRUB before on this laptop. When I initialized configuration.nix with nixos-generate-config, NixOS picked systemd-boot for me

I tried the following config

boot.loader.systemd-boot.enable = false;
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.device = "nodev";

However, it’s still systemd-boot. I assume that if I don’t have a GRUB2 config used before, I cannot switch to it

If you’re switching your config, and running nixos-rebuild switch, and it’s not changing your bootloader, you might check to ensure your config has /boot configured correctly and that it’s mounted. Otherwise when you switch, it will build/install the new bootloader to the “wrong” /boot.

I assume that if I don’t have a GRUB2 config used before, I cannot switch to it

The generations that you see in the bootloader list? Those are generated during nixos-rebuild switch. So when you reconfigure to use grub like you showed, and switch to it, it would build the grub config file for you, with entries for each nixos generation and install it to /boot.