Score:1

Unable to install GRUB in /dev/nvme1n1 grub-install failed

br flag

I had already installed Ubuntu 22.04 in /dev/nvme1n1 before but due to my incorrect fiddling with the wrong NVIDIA drivers I got the system unstable so decided to reinstall it. In /dev/nvme1n0 I have Windows 11 Pro and it was in the exact same state when I installed Ubuntu the first time around. This time however, no matter what I do in the installer I always end in the same Unable to install GRUB in /dev/nvme1n1 grub-install failed error.

I tried the following:

  1. Chose to overwrite the existing Ubuntu 22.04 installation => error
  2. Chose do something else then deleted all partitions in /dev/nvme1n1 with gparted just empty like new before running the installer => same error
  3. Chose do something else then deleted all partitions and created a initial EFI 500MB partition and another EXT4 with the remaining space => same error
  4. Tried the steps above indicating either the drive /dev/nvme1n1 or the specific partition for the grub installation /dev/nvme1n1p1 => same error

The media is a DVD and have successfully installed Ubuntu from it in another system so that discards the possibility of the installation media to be corrupt.

If it was an UEFI type of incompatibility btw I still don't get this UEFI/MBR/GPT stuff, seems to have been created only to annoy and confuse people; then the installation would have also failed the first time around but it worked .. so I am puzzled.

UPDATE

I have two m2 ssd drives in my system. In the first one I installed Windows 11 Pro and in the second I was attempting to install Ubuntu 22.04 which was failing with the errors above.

I booted into Windows and using Macrium Reflect, cloned Windows 11 Pro /dev/nvme0n1 into /dev/nvme1n1. I am running my Windows 11 Pro now from /dev/nvme1n1. Then retried all the initial steps but targeting /dev/nvme0n1 for the installation => same error!

cc flag
See https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 Grub installs to wrong disk. Do add yourself to the "Does this affect me?" list on the bug. There are workarounds/ solutions in the bug comments. Basically, installer picks first EFI partition it sees (on 1n0) regardless of what you enter for location. grub-install when run directly does what you tell it. Maybe the first EFI is too full after the first Ubuntu attempt. If your second disk is not removable, doesn't matter were grub gets installed.
oldfred avatar
cn flag
In addition, Windows updates may turn fast start up or bitlocker back on. Or even an UEFI update that resets to defaults. Then you may not be able to write into the ESP on first drive. Issue is just with Ubiquity installer. If you have ESP on Ubuntu drive, you can just install grub to it. Probably easiest with Boot-Repair, advanced mode & choose install, drive & also select latest kernel to just update everything. https://help.ubuntu.com/community/Boot-Repair & Advanced mode screens: https://sourceforge.net/p/boot-repair/home/Home/ You also can chroot into install & install grub from there.
SkyWalker avatar
br flag
How can I boot-repair a system that can’t boot in the first place? It has the / ext4 data correct but no way to boot that …
Score:0
br flag

In short, the issue was that I used acpi=off to boot the Ubuntu 22.04 installation media.

The long answer which was very surprising to me is the following. I assembled this PC myself and to test the setup I was using a very old low resolution and small Dell monitor. I was able to install the Ubuntu 22.04 the first time around with just using Try or install ubuntu ... and with e adding nomodeset to allow GPU compatibility. I then corrupted my Ubuntu installation by using NVidia drivers directly from NVidia's website. I decided to reinstall Ubuntu 22.04.

After my computer build was stable I moved it into my real working setup with 3x modern and high-resolution displays and here the Ubuntu 22.04 installation media was booting to a black screen when using only nomodeset. I then looked for a way to boot the installer and used acpi=off in addition to nomodeset. The installation media booted but was leading later to the main issue error of Unable to install GRUB in the middle of the installation process.

I thought about reproducing the same outcome as while testing my new PC build and switched off two displays. Then only used nomodeset and the installation worked smoothly. Basically avoiding the acpi=off. Now my new working Ubuntu 22.04 lives under /dev/nvme0n1 and Windows 11 Pro under /dev/nvme1n1, I guess it was a good test of the Macrium Reflect software.

I sit in a Tesla and translated this thread with Ai:

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.