Ubuntu Server startup partition not selectable in BIOS menu

I just installed Ubuntu Server 20.04.03 with two disks like this:

Disk model: ST4000LM024-2AN1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 7010D0D6-B307-4FF0-BCD8-434932C089F2

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 7814033407 7814031360  3.7T Linux filesystem


Disk /dev/sda: 3.65 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: ST4000LM024-2AN1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 34704922-427B-4EF0-86D0-C0652819C79B

Device         Start        End    Sectors  Size Type
/dev/sda1       2048       4095       2048    1M BIOS boot
/dev/sda2       4096  251662335  251658240  120G Linux filesystem
/dev/sda3  251662336 7814033407 7562371072  3.5T Linux filesystem


blkid
/dev/sdb1: UUID="dace6e49-5297-4a1a-8517-0e4fce045ce4" TYPE="ext4" PARTUUID="34ea091c-d4c0-4b06-8df0-b5f46a82de43"
/dev/sda2: UUID="43c6108c-2843-4c85-86ba-3a9cc74fb006" TYPE="ext4" PARTUUID="843e7636-011d-4b7f-a972-633a5f64ad28"
/dev/sda3: UUID="d7388b54-3437-4466-a568-c2e3e20443ca" TYPE="ext4" PARTUUID="2f4bf77e-c09d-486d-a7f4-00db4f8b1316"

ubuntu server is on sda2. all is working fine, except when booting the system it always tells me to enter BIOS for setup. both hard drives are available as boot options, but no startup partitions are offered to setup.

I can manually choose the correct disk 34704922-427B-4EF0-86D0-C0652819C79B as startup override and it boots correctly from there.

Where did I go wrong with my setup and how can I fix it?


Solution 1:

So the disks are GPT partitioned, but your system uses legacy BIOS, not UEFI. As per https://wiki.archlinux.org/title/GRUB#GUID_Partition_Table_(GPT)_specific_instructions:

The BIOS Boot partition GUID should be 21686148-6449-6E6F-744E-656564454649 (check blkid). If it is, install GRUB manually:

# grub-install --target=i386-pc /dev/sda

Then make the grub config:

# grub-mkconfig -o /boot/grub/grub.cfg

If the GUID is different, you could try changing it. A few ways are described in https://www.simplified.guide/linux/disk-uuid-set. I've not done this myself, but at least this page does not mention losing any data during the process.