0

I went over many posts, books, blogs on Grub, UEFI,... and I can't figure out how to fix my grub.

Situation: My main disk (SSD 500GB, now in /dev/sda) run debian using Grub2 in UEFI. All good.

After messing, now I have two disks running debian:

1- previous one (SSD running debian), not booting anymore in UEFI or Legacy

2- an WD disk (1TB in /dev/sdc) running Debian 11 contains legacy MBR and grub

From grub in legacy I can run WD-Debian 11 or SSD-Debian Computer does not boot in UEFI

I want to switch my system back to UEFI. However I can't boot as UEFI, no grub starts in UEFI.

lsblk:

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT.

sda 8:0 0 447.1G 0 disk

├─sda1 8:1 0 512M 0 part

├─sda2 8:2 0 414.7G 0 part

└─sda3 8:3 0 31.9G 0 part

sdb 8:16 0 7.3T 0 disk

sdc 8:32 0 931.5G 0 disk

├─sdc1 8:33 0 930.6G 0 part /

├─sdc2 8:34 0 1K 0 part

└─sdc5 8:37 0 976M 0 part [SWAP]

I tried to install grub in sda, (sudo grub-install /dev/sda):

But got error:

Installing for i386-pc platform. grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible. grub-install: error: embedding is not possible, but this is required for cross-disk install.

I tried to use debian live, gparted live, etc but I could not find grub-install in these live iso.

How could I rescue the grub in UEFI mode in my SSD disk?

Thanks

2
  • 1
    With UEFI hardware, you should always use UEFI and gpt partitioning. With gpt and BIOS boot, you need a bios_grub partition. But better to use UEFI which needs an ESP - efi system partition. Ubuntu only wanted ESP on first drive, but with older Debian was able to install using ESP on sdb drive. Make sure you have ESP on drive and run this in UEFI boot mode. Lets see details, use ppa version with your live installer (2nd option) or any working install, not Boot-Repair ISO: Only advanced mode, may give choice of install & drive with ESP. help.ubuntu.com/community/Boot-Repair
    – oldfred
    Oct 24, 2021 at 18:04
  • Thanks. You were right. Booting the USB using UEFI mode from a installation debian .iso had all the tools missing in the live iso. I went to Advance/ Rescue Mode and then I could install the grub. The only risky part is that I had no option to list the disks, and I just guess the /dev/sdX. I was lucky and it was still in sdb. Now I can boot with UEFI gru, and also added a windows, and grup-update. All good. If you add this as an answer I will check it.
    – daniel_hck
    Oct 24, 2021 at 23:58

1 Answer 1

1

With UEFI hardware, you should always use UEFI and gpt partitioning.

Only with gpt and BIOS boot, you need a bios_grub partition.

But better to use UEFI which needs an ESP - efi system partition. Ubuntu only wanted ESP on first drive, but with older Debian was able to install using ESP on sdb drive. Make sure you have ESP on drive and run Boot-Repair in UEFI boot mode.

Lets see details, use ppa version with your live installer (2nd option) or any working install, not Boot-Repair ISO:

Only Using advanced mode, may give choice of install & drive with ESP.

https://help.ubuntu.com/community/Boot-Repair

https://sourceforge.net/p/boot-repair/home/Home/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.