grub2 fails to install upon ubuntu installation

Bug #1962678 reported by Nikolai Gonzales
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Currently attempting to install ubuntu 20.04 alongside Windows 11 on my HP laptop. I have tried the boot-repair service on previous installation attempts yet still receive errors when that program attempts to repair grub. If it is any help, here is the pastebin of the errors from boot-repair from a few weeks ago:

https://paste.ubuntu.com/p/45dnxkjfHG/

It seems like these lines are most important:

*********************************************************************************************

grub-install --efi-directory=/boot/efi --target=x86_64-efi
Installing for x86_64-efi platform.
grub-install: error: cannot open `/boot/efi/EFI/ubuntu/grubx64.efi': Not a directory.
Exit code: 1
Refind detected on nvme0n1p1
Error: no grub*.efi generated for Ubuntu 20.04.3 LTS. Please report this message to <email address hidden>

/sbin/grub-install --efi-directory=/boot/efi --target=x86_64-efi --recheck
Installing for x86_64-efi platform.
/sbin/grub-install: error: cannot open `/boot/efi/EFI/ubuntu/grubx64.efi': Not a directory.

/sbin/grub-install --efi-directory=/boot/efi --target=x86_64-efi --no-nvram
Installing for x86_64-efi platform.
/sbin/grub-install: error: cannot open `/boot/efi/EFI/ubuntu/grubx64.efi': Not a directory.
--no-nvram exit code: 1 Please report this message to <email address hidden>

*********************************************************************************************

I will continue to try different fixes on my end to install Grub, but it seems like an actual bug in the ubuntu/grub installer for EFI systems.

Thank you!
Nikolai

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: ubiquity 20.04.15.19
ProcVersionSignature: Ubuntu 5.13.0-30.33~20.04.1-generic 5.13.19
Uname: Linux 5.13.0-30-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu27.21
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.445.1
CurrentDesktop: ubuntu:GNOME
Date: Tue Mar 1 22:25:03 2022
InstallCmdLine: BOOT_IMAGE=/casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
LiveMediaBuild: Ubuntu 20.04.4 LTS "Focal Fossa" - Release amd64 (20220223)
ProcEnviron:
 LANGUAGE=en_US.UTF-8
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 LC_NUMERIC=C.UTF-8
SourcePackage: grub-installer
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Nikolai Gonzales (nikolaig-11) wrote :
Revision history for this message
Marc Savard (13islucky) wrote (last edit ):
Download full text (4.2 KiB)

Hello Nikolai,

I'm having the same issue that your are reporting. Did you managed to find a fix for that error? Here's the log file:

***

boot-repair-4ppa200 [20220831_1928]

============================= Boot Repair Summary ==============================

df: /dev/nvme0n1p2: Aucun fichier ou dossier de ce type
df: /dev/nvme0n1p2: Aucun fichier ou dossier de ce type

Recommended repair: ____________________________________________________________

The default repair of the Boot-Repair utility will reinstall the grub-efi-amd64-signed of
nvme1n1p2,
using the following options: nvme1n1p1/boot/efi
Additional repair will be performed: unhide-bootmenu-10s use-standard-efi-file

Mount nvme1n1p1 on /mnt/boot-sav/nvme1n1p2/boot/efi

=============== Reinstall the grub-efi-amd64-signed of nvme1n1p2 ===============

chroot /mnt/boot-sav/nvme1n1p2 grub-install --version
grub-install (GRUB) 2.04-1ubuntu26.15+zorin1
chroot /mnt/boot-sav/nvme1n1p2 modprobe efivars

chroot /mnt/boot-sav/nvme1n1p2 efibootmgr -v before grub install
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0003,0000,0004
Boot0000* ubuntu HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIUBUNTUSHIMX64.EFI)
Boot0003* Windows Boot Manager HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIMICROSOFTBOOTBOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...1................
Boot0004* UEFI: USB DISK 3.0 PMAP PciRoot(0x0)/Pci(0x14,0x0)/USB(23,0)/USB(3,0)/USB(0,0)/CDROM(1,0x258,0x8500)..BO

chroot /mnt/boot-sav/nvme1n1p2 uname -r
5.13.0-30-generic

chroot /mnt/boot-sav/nvme1n1p2 grub-install --efi-directory=/boot/efi --target=x86_64-efi --uefi-secure-boot
Installing for x86_64-efi platform.
Installation finished. No error reported.
Error: no grub*.efi generated for Zorin OS 16.1 (16). Veuillez indiquer ce message à <email address hidden>

chroot /mnt/boot-sav/nvme1n1p2 efibootmgr -v after grub install
BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0000,0003,0004
Boot0000* ubuntu HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIubuntushimx64.efi)
Boot0003* Windows Boot Manager HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIMICROSOFTBOOTBOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...1................
Boot0004* UEFI: USB DISK 3.0 PMAP PciRoot(0x0)/Pci(0x14,0x0)/USB(23,0)/USB(3,0)/USB(0,0)/CDROM(1,0x258,0x8500)..BO

chroot /mnt/boot-sav/nvme1n1p2 update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/zorin/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.13.0-44-generic
Found initrd image: /boot/initrd.img-5.13.0-44-generic
Found Windows Boot Manager on /dev/nvme1n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings

Unhide GRUB boot menu in nvme1n1p2/b...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in grub-installer (Ubuntu):
status: New → Confirmed
Revision history for this message
Nikolai Gonzales (nikolaig-11) wrote : Re: [Bug 1962678] Re: grub2 fails to install upon ubuntu installation
Download full text (7.6 KiB)

Hi Marc,

Unfortunately I was unable to find a fix to this issue. However I haven’t
had the need for Linux on this machine since then so I haven’t attempted an
install in a few months.

I may try again sometime soon with Ubuntu 20.04.5. I’ll be sure to let you
know if I happen to find a solution.

Best regards,
Nikolai

On Wed, Aug 31, 2022 at 6:56 PM Marc Savard <email address hidden>
wrote:

> Hello Nikolai,
>
> I'm having the same issue that your are reporting. Did you managed to
> find a fix for that error? Here's the log file:
>
> ***
>
>
> boot-repair-4ppa200
> [20220831_1928]
>
> ============================= Boot Repair Summary
> ==============================
>
>
>
> df: /dev/nvme0n1p2: Aucun fichier ou dossier de ce type
> df: /dev/nvme0n1p2: Aucun fichier ou dossier de ce type
>
> Recommended repair:
> ____________________________________________________________
>
> The default repair of the Boot-Repair utility will reinstall the
> grub-efi-amd64-signed of
> nvme1n1p2,
> using the following options: nvme1n1p1/boot/efi
> Additional repair will be performed: unhide-bootmenu-10s
> use-standard-efi-file
>
>
> Mount nvme1n1p1 on /mnt/boot-sav/nvme1n1p2/boot/efi
>
> =============== Reinstall the grub-efi-amd64-signed of nvme1n1p2
> ===============
>
> chroot /mnt/boot-sav/nvme1n1p2 grub-install --version
> grub-install (GRUB) 2.04-1ubuntu26.15+zorin1
> chroot /mnt/boot-sav/nvme1n1p2 modprobe efivars
>
> chroot /mnt/boot-sav/nvme1n1p2 efibootmgr -v before grub install
> BootCurrent: 0004
> Timeout: 1 seconds
> BootOrder: 0003,0000,0004
> Boot0000* ubuntu
> HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIUBUNTUSHIMX64.EFI)
> Boot0003* Windows Boot Manager
> HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIMICROSOFTBOOTBOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...1.............
> ...
> Boot0004* UEFI: USB DISK 3.0 PMAP
> PciRoot(0x0)/Pci(0x14,0x0)/USB(23,0)/USB(3,0)/USB(0,0)/CDROM(1,0x258,0x8500)..BO
>
> chroot /mnt/boot-sav/nvme1n1p2 uname -r
> 5.13.0-30-generic
>
> chroot /mnt/boot-sav/nvme1n1p2 grub-install --efi-directory=/boot/efi
> --target=x86_64-efi --uefi-secure-boot
> Installing for x86_64-efi platform.
> Installation finished. No error reported.
> Error: no grub*.efi generated for Zorin OS 16.1 (16). Veuillez indiquer ce
> message à <email address hidden>
>
> chroot /mnt/boot-sav/nvme1n1p2 efibootmgr -v after grub install
> BootCurrent: 0004
> Timeout: 1 seconds
> BootOrder: 0000,0003,0004
> Boot0000* ubuntu
> HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIubuntushimx64.efi)
> Boot0003* Windows Boot Manager
> HD(1,GPT,0c87fef8-cfd9-46ed-8f12-ae0a3b00b37e,0x800,0x100000)/File(EFIMICROSOFTBOOTBOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...1.............
> ...
> Boot0004* UEFI: USB DISK 3.0 PMAP
> PciRoot(0x0)/Pci(0x14,0x0)/USB(23,0)/USB(3,0)/USB(0,0)/CDROM(1,0x258,0x8500)..BO
>
> chroot /mnt/boot-sav/nvme1n1p2 update-grub
> Sourcing file `/etc/default/grub'
> Sourcing file `/etc/default/grub....

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.