Subject: bug#47889: [installer image] grub-install efi fails getting canonical path to /boot/efi on dos-formatted disk

From: Ludovic Courtès <[email-masked]>
Date: Thu, 22 Apr 2021 15:28:39 +0200

Hi Florian,

"pelzflorian (Florian Pelz)" <[email-masked]> skribis:

> When installing from the Guix install image, grub-install fails on my
> x86_64 ASRock Beebox PC:
>
> guix system: error: '/gnu/store/hsc3gsqbxkl64nx38sf2fgs2fxzbpr0i-grub-efi-2.04/sbin/grub-install --boot-directory /mnt/boot --bootloader-id=Guix --efi-directory /boot/efi' exited with status 1; output follows:
>
>  Installing for x86_64-efi platform.
>  /gnu/store/hsc3gsqbxkl64nx38sf2fgs2fxzbpr0i-grub-efi-2.04/sbin/grub-install: error: failed to get canonical path of `/boot/efi'.
>
> I let the Guix installer (git master commit
> fef2f08bc640f78cc0a86fc7be3eccbc07b5e98c) auto-partition my entire
> disk without encryption.
>
> “fdisk -l /dev/sda” shows:
>
> Disk /dev/sda: 238.49 GiB, 256060514304 bytes, 500118192 sectors
> […]
> Disklabel type: dos
> Disk identifier: 0xd0416d83
>
> Device     Boot   Start       End   Sectors   Size Id Type
> /dev/sda1          2048   7811071   7009024   3.7G 82 Linux swap / Solaris
> /dev/sda2  *    7011072 500117583 492306432 234.8G 83 Linux

There’s no EFI (vfat) partition here.  Is it an EFI machine?

Is /boot/efi mounted when you boot the installation image?

If it were EFI, it would be a GPT partition table, not a DOS one.

It seems to me there’s confusion here: the generated config file seems
to be using ‘grub-efi-bootloader’, but the machine is actually not EFI.
WDYT?

Thanks,
Ludo’.