GRUB won't install

Hey there. I’m installing NixOS from Mint. I’m at the point where GRUB gets installed- but it won’t. I know I have a 64-bit processor and have set up my partition table accordingly, but it insists on installing for i386. And then I get this warning:

this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.

How do I get GRUB to install for x86_64 instead?

For GPT’s, it’s recommended to use systemd-boot (assuming your system is also uefi).

If Mint also installed GRUB, then it should be possible to have GRUB point to your NixOS installation (although automatic nixos generations wont be enabled).

This is specific scenario is handled in NixOS - NixOS 21.05 manual with

parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB
parted /dev/sda -- set 3 boot on

NOTE: the set 3 here works because the boot partition was the third one to be made. You may have to adjust the index number depending on how you created your partitions.

This only works on UEFI boot though.

And while it’s safe to assume that everyone’s device supports that now, it should still be noted that MBR != BIOS boot and GPT != UEFI boot.

While what @jonringer says is not incorrect, it doesn’t actually apply to this situation.

I know I have a 64-bit processor and have set up my partition table accordingly, but it insists on installing for i386. And then I get this warning:
How do I get GRUB to install for x86_64 instead?

You’re doing BIOS boot (not UEFI) and the “model” is i386 in this case. There is no x86_64 in this case.

this GPT partition label contains no BIOS Boot Partition; embedding won’t be possible.

You need a small 1MB partition on your disk of type ef02 when you try to boot in BIOS mode from a GPT disk.

Alternatively, in case this is actually a UEFI machine that you just happen to be booting in BIOS (CSM) mode, you will need to boot in UEFI mode in order to install that way (and you would need the ESP).

1 Like

Thanks for the replies. I guess it’s smart to know my hardware. :slight_smile:

So, it’s actually the motherboard that determines my setup, right?

What’s the incantation- er, I mean, the command to set that up? Does it have to be in a specific place?

Well, it depends. If you motherboard doesn’t support UEFI, then yes. But it might still support it and you have chosen to boot in BIOS mode (or CSM mode as it’s referred to).

You can use regular gdisk or any other partitioner that supports GPT to create a partition of type ef02. man gdisk is your friend here.

Just on the disk from which you’re booting - I don’t think the order or placement matters.