0

I got a new HP-Pavilion laptop with Windows 10 installed and I am trying to install Ubuntu 18.04 as dualboot. However, when trying to install Ubuntu, during the installation of GRUB (as part of the automatic installation process) I get the message: Executing 'grub-install/dev/nvme0n1' failed.

I disabled the fast boot option as well as the secure boot option in BIOS. System uses UEFI. This happens if I select "Install Ubuntu alongside Windows Boot Manager" as well if I try to configure it myself using the "Something else" option.

My partition table looks like the following:

/dev/nvme0n1
 free space 1MB
 /dev/nvme0n1p1 efi  272MB  unknown  Windows Boot Manager
 /dev/nvme0n1p2      16MB   unknown
 /dev/nvme0n1p3 ntfs 125911MB (this is the windows partition)
 /dev/nvme0n1p4 ntfs 262144MB (this is an empty partition for data)
 free space          123207   (this shall be the ubuntu partition - tried it with formatted as ext4)
 /dev/nvme0n1p5 ntfs 547MB  477MB (don't know what this partition is)
 free space          8MB
/dev/nvme1n1
/dev/sda                    (not sure what these last two partitions are, maybe something hidden by HP)      

Now my questions are: any suggestions why this error would happen, and is there a (preferably easy) workaround? Does it make sense to choose the "Device for boot loader installation:" as /dev/nvme0n1p1 (Windows Boot Manager)? Or would that be a bad idea? Would it break something in the windows startup? I tried it with /dev/nvme0n1 (the top partition - this is where is failed before)

I will try to add a screenshot of the Gparted and the install menu. Install partition table and Gparted partition table

Any help is highly appreciated, as I don't really know how to continue from here.

Have a good day,

Phil

  • Looks like you have Windows fast start up on. That must be off. And/or you have settings in UEFI locking or securing the ESP as adding another boot loader is not Secure. That must be off, if you have it. http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions & https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation – oldfred Apr 04 '21 at 03:00
  • Oh dear! According to your images your Windows installation has been wiped. There is nothing in partition nvme01p3. Nor is there anything in your ESP, nvme01p1. Looks like you will have to reinstall Windows. If you were fortunate to make an image of it before you began this project you would have saved yourself a reinstall and a lot of time and trouble. Maybe HP have a factory setting. – Paul Benson Apr 04 '21 at 04:44
  • Thank you for your comments. I double checked: Windows fast start up is off and the secure boot is also disabled. Windows is still bootable, even though it shows the partition as unused. A Windows recovery file was created before the installation attempt. – phil555 Apr 04 '21 at 20:25
  • You have 3 warning marks against partitions in gparted including the windows partition and the ESP. An 'unused' partition means Linux can't read it, which suggests all is not well. You could first try a repair to remove them. Go into gparted again, highlight nvme01p3. then click partition and select 'check' and 'apply' button. Does that remove the warning sign and show partition as used? – Paul Benson Apr 04 '21 at 22:27

2 Answers2

0

Executing 'grub-install/dev/nvme0n1' failed ...I suppose it's a typo. There should be a space between 'grub-install' and '/dev/nvme0n1'. And you need to have "/dev/nvme0n1p1" mounted as ESP for your Linux installation since UEFI is being used.

  • Hello, Thank you very much for your reply! – phil555 Apr 04 '21 at 20:13
  • Hello, Thank you very much for your reply! You are right, this was a typo. I am unsure, since the /dev/nvme0n1p1 is the Windows bootloader. Can I just overwrite it? As in choose this as the device for the boot loader installation? Will this render something unuseable? Or would I have to format this partition as efi again and then set it as mounting point for boot? or again, would this then not allow me to boot into windows? Thanks a lot – phil555 Apr 04 '21 at 20:22
  • I now also tried to simply create a new EFI partition in the free space with 600MB and use the rest of the remaining free partition as ext4. I got the same error Executing 'grub-install /dev/nvme0n1p6' failed. Any hints on why GRUB can not be installed at all? – phil555 Apr 04 '21 at 20:34
0

So after all I managed to solve this. Posting it here, in case it might help someone.

I did an installation of Ubuntu using the whole hard drive.

GRUB installer still failed. Upon restart the rescue mode of HP came up and Windows got installed new from scratch. I guess that was stored on the /dev/sda drive which showed a capacity of 32GB before.

After that the first 1MB (as can be seen in the OP partition table) was gone.

Shrinked the Windows C: partition and tried my luck again with choosing "Install Ubuntu next to Windows Boot Manager" and this time it simply worked.

I still don't know why it didn't work before or why it worked now, but I am glad this is done now.

Thanks for your replies.