Score:0

Cannot install GRUB on disk after installing Windows

de flag

Background

I have a dual boot system with Ubuntu 20.04 on a 120GB SSD and Windows 10 on a 500 GB NVME for gaming.

I had to re-install the Windows operating system and now I cannot boot into my Ubuntu OS even when I set it as the primary drive in the BIOS. Instead it boots straight into Windows.

When I remove my NVME which has Windows on it, I get a Bluescreen.

What Have I Tried?

I was advised to load a Live Ubuntu version from a USB from a Reddit user: reddit post

I followed this tutorial: tutorial

I've done slightly different things based on other threads, however it was essentially the same approach, obviously no luck.

Problem/ Error

  • I booted into Ubuntu from a USB in EFI mode. Clicked "Try Ubuntu".
  • Located my Ubuntu drive with fdisk -l
  • mounted the EFI Partition with mount /dev/sdb1 /mnt
  • Installed GRUB onto partition with grub-install --boot-directory=/mnt /dev/sdb

Full terminal session: Terminal commands/output on Paste bin

I recieved these errors:

# grub-install --boot-directory=/mnt /dev/sdb
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

Drive information from fdisk -l

Disk /dev/sdb: 111.81 GiB, 120034123776 bytes, 234441648 sectors
Disk model: ADATA SU655     
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1F53C55F-A945-4522-B8CA-FB528B52CA1D

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048   1050623   1048576   512M EFI System
/dev/sdb2  1050624 234440703 233390080 111.3G Linux filesystem

I really do not understand the issue here. I have read this brilliant thread: grub2-install: “this GPT partition label contains no BIOS Boot Partition” where one response explained the difference between EFI booting and BIOS/legacy mode. Since I have a 512 MB EFI partition on my drive I am even more confused why this is not working.

Score:0
de flag

Problem

grub-install --boot-directory=/mnt /dev/sdb was trying to perform a BIOS install. However, the drive already had an EFI boot partition.

Solution

Instead, boot-repair tool is needed to reinstall GRUB for the EFI partition.

If you want to use the GUI version of boot-repair follow this tutorial: Boot-Repair, simple tool to recover access to your Operating Systems

Make sure to configure the advanced settings at the bottom and specify which partition the EFI System is on.

Source

All credit goes to oldfred who help me a few days ago on a post and after a few more hours of research, I was able to interpret the documentation.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.