0

I can't install Ubuntu on my Windows 11 machine for dual booting. Every time I get the error:

executing grub-install dev/nvme0n1p2 failed.

So far I've tried:

  • Unallocating the disk before the installation and manually partitioning while installing Ubuntu.
  • Going straight for the Ubuntu installation and choosing "Install Ubuntu alongside Windows boot manager" option and using the slider to automatically allocate space.

Neither of these worked. I still get the error:

executing grub-install dev/nvme0n1p2 failed.

So I tried to fix grub loader. By following a couple of guides, I tried ppa:yannubuntu/boot-repair tool. (I don't know if it is allowed to post links here but if they are needed I can provide links to the said tutorials.) Unfortunately that didn't work so I tried to install grub loader manually by following another guide. I got an error saying that I didn't have enough space in the EFI partition. (and yes I am sure I was trying to install grub while I was mounted on the EFI partition, nvme0n1p2 in my case.)

If it would be of any help, I realized that the Disk app in Ubuntu shows that the EFI partition shows that 100% of the partition is in use. However, in Windows; diskmgmt.msc shows that the EFI partition is 100% free.

Additional information:

  • I have secure boot disabled.
  • I am trying the dual boot install on a Lenovo LOQ 15APH8 model laptop. It has an RTX 4060 GPU and Ryzen 7 7840HS CPU with 16 GBs of RAM.
  • I am creating the bootable USB with Rufus and I've tried both MBR and GPT partitioning.
  • I haven't tried resizing my EFI partition, and since I already have deleted my EFI partition while messing with partitions, I don't want to do it again. (I can do it if it is necessary though)
  • The problem was present even before deleting the EFI partition, and I have wiped the disk and reinstalled everything after breaking the system. So Windows created a new EFI partition.
  • Bitlocker and fast startup was turned off.

The summary report from boot-repair

paste.ubuntu link for boot-repair report

Tried dosfsck

Report summary for the most recent boot-repair try.

Any help is appreciated.

1 Answers1

0

Turns out, my problem was with the original EFI partition (/dev/nvme0n1p2 in my case.)

Upon reading the boot-repair summaries, I realized that boot-repair couldn't use the space on the EFI partition since it was full or it seemed to be full to Linux. I am not good with partitions so I might be wrong.

The solution was to resize the EFI partition. To do this I followed a YouTube tutorial and created another EFI partition that is bigger, old one was 100MB and the new is 300MB. Then, I restarted the system and I deleted the old EFI partition using a 3rd party software but it could probably be done with diskmgmt.msc. After that I booted into the live Ubuntu stick and performed another boot-repair (You can find guides on how to do that easily.). Then everything was working again.

Note: I saw what @oldfred suggested after I fixed the problem. Their solution would probably also work, since the problem seems to be with Lenovo.