0

What's my platform

Debian testing with Linux kernel 5.10.40 on Dell Latitude E5550.

What I'm doing

Up to now, my setup was old fashioned MBR partitions with "legacy" BIOS mode. Unfortunately, my new laptop doesn't support BIOS mode anymore, so I have to migrate to UEFI setup.

Since GPT is said to be supported with BIOS mode on Linux, I conceived the following migration path:

BIOS/MBR -> BIOS/GPT -> UEFI/GPT

To that end, I created the BIOS Boot Partition, as instructed by GRUB manual above, and converted my partitions to GPT with sgdisk -g /dev/sda. My current partition layout is:

# parted /dev/sda print
Model: ATA TS128GSSD370S (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 
Number Start End Size File system Name Flags
 1 32,3kB 253MB 253MB ext4
 2 253MB 263MB 10,5MB boot-system bios_grub
 3 263MB 128GB 128GB

Partition #3 is my main partition with LUKS-encrypted filesystem root and partition #1 is unencrypted /boot directory.

After convertion to GPT, I reinstalled GRUB with grub-install --target=i386-pc /dev/sda.

What doesn't work

When trying to boot from this drive, screen goes black and after ~2 seconds it displays a message: Selected boot device failed. Press any key to reboot the system. Googling it seems to indicate that it can point to multiple kind of issues with both Linux and Windows, so it's probably a BIOS/UEFI message and GRUB doesn't even gets loaded at this point, though it can be wrong assumption.

Currently, I use Super GRUB2 disk, which finds GRUB configuration on partition #1 and uses it to boot into my system. So it works just as before with MBR partitions, except the GRUB2 code from MBR doesn't seem to execute

What I've tried

The only thing that came to my mind was trying to set a boot flag on partition #1. It used to be there before the GPT conversion, though I'm not sure if it was needed. However, doing that and reinstalling GRUB again didn't change the outcome.

asked Jun 20, 2021 at 15:28
1
  • You do not have room for both /boot & ESP. The bios_grub only needs to be 1 or 2MB, but ESP should be 100MB minimum and many have complained about older smaller /boot partitions with LVM, so best not to shrink it. I do not use LVM, but changing sizes inside LVM is very easy, but changing partition containing LVM it not so easy. Grub does not use boot flag, but a few BIOS/UEFI use boot flag and need a partition with it. Commented Jun 20, 2021 at 16:42

1 Answer 1

0

In theory, yes, BIOS/GPT should be supported because the BIOS does not actually read the partition table at all, only the bootloader (the piece of GRUB that's written to the MBR) needs to understand GPT partitions.

However, some firmwares do still look at partition tables even in BIOS-boot mode and are known to not bother even trying to boot from GPT-partitioned disks, even if the disk has a completely valid MBR boot code installed. Dell is sometimes among those, from what I've heard.

I would suggest skipping this migration step entirely. It won't really make the future migration to UEFI/GPT any easier – you will still have to throw away your current GRUB configuration and re-do those two "boot" partitions as an EFI System Partition anyway, so just do it all in one step.

answered Jun 20, 2021 at 16:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.