Goal: I am trying to install Ubuntu onto a Dell XPS 8900.
Problem: I can't get through an Ubuntu install without the install interrupting with Unable to install Grub in /dev/sda
, Executing 'grub-install /dev/sda failed.' This is a fatal error.
.
Installer: I am using a flash drive with Ubuntu 22.04 LTS Installer on it. I have tried with a flash drive that I have installed with before and I have tried with a fresh install on another flash drive that I created with the Startup Disk Creator application. Note: I have added nomodeset and acpi=off in my grub command to start the Ubuntu Installer OS.
Attempts to solve:
I tried to complete the grub-install myself using some answers on askubuntu. I did the aforementioned fix by exiting the installer prompt (after it failed) and running the commands in the terminal. I was able to successfully complete the grub-install here. However, as the original error happens part way into an install the resulting Ubuntu OS had multiple problems. I had services that would fail or just not start (including but not limited to: networkd-dispatcher.service, NetworkManager.service, fwupd-refresh.service, apparmor.service, caspermd5.services(?) ) and I had left over remnants from the install (for example, an application named Install RELEASE was still in my applications).
- Note:
chroot
ing into/mnt
and runninggrub-install /dev/sda
results inunable to allocate pty: No such device
- Note:
I am desperate now, so I updated the BIOS to its most recent update. That didn't do anything.
I tried running grub-install prior to running the Try Install application.
- Note: running
sudo grub-install --root-directory /mnt /dev/sda
results ingrub-instal: error: failed to register the EFI boot entry: Operation not permitted.
- Also, I worry that even if I could successfully run grub-install prior to running the Ubuntu Installer, that the Ubuntu Installer would still fail because the Ubuntu Installer might run grub-install without options.
- Note: running
Question: Why does Ubuntu 22.04 LTS install continue to fail with 'grub-install /dev/sda failed' error?
Output from sudo fdisk -l
:
<multiple /dev/loopN>
....
Disk /dev/sda: 1.82 TiB, ......
Device Size Type
/dev/sda1 512M EFI System
/dev/sda2 1.8T Linux Filesystem
Disk /dev/sdb: 14.45 GiB, ......
Device Size Type
/dev/sdb1 3.6G Microsoft basic data
/dev/sdb2 4.1M EFI System
/dev/sdb3 300K Microsoft basic data
/dev/sdb4 10.9G Linux Filesystem
....
<multiple /dev/loop<N>>
Output from lsblk
:
NAME TYPE MOUNTPOINTS
<multiple loop<N>>
...
sda disk
sda1 part
sda2 part
sdb disk /cdrom
sdb1 part
sdb2 part
sdb3 part
sdb4 part /var/crash
/var/log
sdc disk
sdd disk
sde disk
sdf disk
sr0 rom
Output of grub-install --version
:
grub-install (GRUB) 2.06-2ubuntu7
Output of sudo gdisk /dev/sda
:
GPT fdisk (gdisk) version 1.0.8
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Output of sudo gdisk /dev/sda
then p
:
Number Size Code Name
1 512MiB EF00 EFI System Partition
2 1.8TiB 8300