unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 47889@debbugs.gnu.org
Subject: bug#47889: [installer image] grub-install efi fails getting canonical path to /boot/efi on dos-formatted disk
Date: Sun, 25 Apr 2021 16:15:56 +0200	[thread overview]
Message-ID: <87eeeyv49v.fsf@gnu.org> (raw)
In-Reply-To: <87im4ds2su.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 23 Apr 2021 12:39:13 +0200")


Hello,

> I’m not entirely sure how it decides between GPT and DOS, though;
> Mathieu?
>
> We should add UEFI installation tests using OVMF.

I could reproduce this issue with the following steps:

--8<---------------cut here---------------start------------->8---
qemu-img create -f qcow2 guix-system.img 50G
qemu-system-x86_64 -m 1024 -bios $(guix build ovmf)/share/firmware/ovmf_x64.bin -cdrom /gnu/store/<lastest-image.iso> -hda guix-system.img
Choose the msdos disk type in the auto-partitioning installer partitioning menu.
--8<---------------cut here---------------end--------------->8---

When using the auto-partitioning, the installer probes the selected
installation device type. If it has no type, like with my reproducer, it
asks whether to use msdos or gpt.

If the disk is already using an msdos or gpt layout, it is preserved.

Then, the auto-partitioning considers erroneously that ESP partitions
are not supported on msdos disks with the following code snippet:

--8<---------------cut here---------------start------------->8---
(and (not has-extended?) ;not msdos?
                 (if (efi-installation?)
                     (and (not esp-partition)
                          (user-partition
                           (fs-type 'fat32)
                           (esp? #t)
                           (size new-esp-size)
                           (mount-point (default-esp-mount-point))))
                     (user-partition
                      (fs-type 'ext4)
                      (bootable? #t)
                      (bios-grub? #t)
                      (size bios-grub-size))))
--8<---------------cut here---------------end--------------->8---

Finally, grub-efi fails because there's no /boot/efi mount point.

This problem can then occur for two reasons:

1. The user is booting the installation image with UEFI support, using
  an empty installation device, choosing auto-partition and msdos as
  disk type.

2. The user is booting the installation image with UEFI support, using
  an already msdos formatted installation device and choosing
  auto-partition.

I think we could solve 1. easily, by forcing the GPT layout. Solving
2. is a bit trickier.

As Ludo suggested, we also need to create new installer tests covering
UEFI installations.

I'll try to come up with a patch soon.

Thanks,

Mathieu

  




  parent reply	other threads:[~2021-04-25 14:17 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19  9:29 bug#47889: [installer image] grub-install efi fails getting canonical path to /boot/efi on dos-formatted disk pelzflorian (Florian Pelz)
2021-04-19 11:01 ` pelzflorian (Florian Pelz)
2021-04-19 17:27 ` Leo Famulari
2021-04-19 20:19   ` pelzflorian (Florian Pelz)
2021-04-22 13:28 ` Ludovic Courtès
2021-04-22 14:38   ` pelzflorian (Florian Pelz)
2021-04-23 10:39     ` Ludovic Courtès
2021-04-23 11:12       ` pelzflorian (Florian Pelz)
2021-04-24  3:24       ` Bengt Richter
2021-04-24  9:31         ` pelzflorian (Florian Pelz)
2021-04-25 14:15       ` Mathieu Othacehe [this message]
2021-04-25 16:34         ` pelzflorian (Florian Pelz)
2021-04-25 17:12           ` Mathieu Othacehe
2021-04-26 11:17             ` pelzflorian (Florian Pelz)
2021-04-26 15:53             ` Ludovic Courtès
2021-04-26 16:37               ` Mathieu Othacehe
2021-04-27 16:48                 ` Mathieu Othacehe
2021-04-28 13:54                   ` Mathieu Othacehe
2021-04-29  7:45                     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eeeyv49v.fsf@gnu.org \
    --to=othacehe@gnu.org \
    --cc=47889@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).