grub-install fails as installer incorrectly assumes EFI

Bug #1991471 reported by Daniel Richard G.
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
New
Undecided
Unassigned

Bug Description

I am using the installer in the released image of Xubuntu 22.04.1 (jammy). The ubiquity version is 22.04.17.

The system supports UEFI, but this is disabled. /sys/firmware/efivars/ is absent, and no EFI partition is present. syslog even shows this line:

    Oct 2 04:20:23 xubuntu 05efi: debug: Not on UEFI platform

I use the "Something else" option for partitioning, and set up swap, /, and /home partitions.

The install then fails with

    ==== Unable to install GRUB in /dev/sda ====

    Executing 'grub-install /dev/sda' failed.

    This is a fatal error.

Here is the relevant excerpt from syslog:

    Oct 2 04:20:24 xubuntu grub-installer: info: Identified partition label for /dev/sda3: msdos
    Oct 2 04:20:24 xubuntu grub-installer: info: Installing grub on '/dev/sda'
    Oct 2 04:20:24 xubuntu grub-installer: info: grub-install does not support --no-floppy
    Oct 2 04:20:24 xubuntu grub-installer: info: Running chroot /target grub-install --force --target x86_64-efi "/dev/sda"
    Oct 2 04:20:24 xubuntu grub-installer: Installing for x86_64-efi platform.
    Oct 2 04:20:36 xubuntu grub-installer: grub-install: error: cannot open `/boot/efi/EFI/ubuntu/grubx64.efi': No such file or directory.
    Oct 2 04:20:36 xubuntu grub-installer: error: Running 'grub-install --force --target x86_64-efi "/dev/sda"' failed.

The installer appears to be attempting to install grub-efi-amd64 instead of grub-pc, despite having correctly identified the system as non-EFI earlier.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.470
CurrentDesktop: XFCE
DistroRelease: Ubuntu 22.04
InstallCmdLine: BOOT_IMAGE=(loop)/casper/vmlinuz boot=casper iso-scan/filename=/linux/xubuntu-22.04.1-desktop-amd64.iso toram
LiveMediaBuild: Xubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
Package: ubiquity 22.04.17
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 5.15.0-43.46-generic 5.15.39
RebootRequiredPkgs: Error: path contained symlinks.
Tags: jammy ubiquity-22.04.17
Uname: Linux 5.15.0-43-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True

Revision history for this message
Daniel Richard G. (skunk) wrote :

A couple further remarks:

The installer was run in a live system booted from a read-only USB stick that has an EFI system partition. This partition was mounted at /boot/efi/ by the installer (despite never being requested, and the system not using UEFI). This particular behavior has been reported in other bugs, e.g. bug #1983384, bug #1970995.

If /boot/efi is unmounted, and the directory removed during installation (prior to the grub-install step), then the installation completes successfully.

Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 1991471

Note: this should be run on the system used for install during the session where install failed, so the ubiquity logs can be appended to the log. This report maybe unhelpful without it, unless marked duplicate to other report(s) which contain that required detail. Whether or not the live system has a EFI system partition is decided by the ISO writing software.

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Revision history for this message
Daniel Richard G. (skunk) wrote : Casper.txt

apport information

tags: added: apport-collected ubiquity-22.04.17
description: updated
Revision history for this message
Daniel Richard G. (skunk) wrote : Dependencies.txt

apport information

Revision history for this message
Daniel Richard G. (skunk) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Daniel Richard G. (skunk) wrote : UbiquityDebug.txt

apport information

Revision history for this message
Daniel Richard G. (skunk) wrote : UbiquityPartman.txt

apport information

Revision history for this message
Daniel Richard G. (skunk) wrote : UbiquitySyslog.txt

apport information

Revision history for this message
Daniel Richard G. (skunk) wrote :

I ran apport-collect at the time when the grub-install error appeared.

Also, I spoke too soon on the installation completing successfully if /boot/efi is removed: The newly-installed system's /etc/fstab still refers to the EFI partition on the original USB boot media, so the new system fails to boot.

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.