GNU bug report logs

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

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Full log

Message #31 received at 47889@debbugs.gnu.org (full text, mbox, reply):

Received: (at 47889) by debbugs.gnu.org; 24 Apr 2021 03:24:39 +0000
From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 23 23:24:39 2021
Received: from localhost ([127.0.0.1]:39217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1la8uN-0000WT-DA
	for submit@debbugs.gnu.org; Fri, 23 Apr 2021 23:24:39 -0400
Received: from imta-35.everyone.net ([216.200.145.35]:39766
 helo=imta-38.everyone.net)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bokr@oz.net>) id 1la8uL-0000WK-Ci
 for 47889@debbugs.gnu.org; Fri, 23 Apr 2021 23:24:37 -0400
Received: from pps.filterd (omta001.sj2.proofpoint.com [127.0.0.1])
 by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 13O3NH4c023485;
 Fri, 23 Apr 2021 20:24:36 -0700
X-Eon-Originating-Account: HgaCxO1vKDGUP0divjwzq9aNDDtSvrYODhc4YtqeXpo
X-Eon-Dm: m0116952.ppops.net
Received: by m0116952.mta.everyone.net (EON-AUTHRELAY2 - 53b92217)
 id m0116952.60622040.24e74d; Fri, 23 Apr 2021 20:24:34 -0700
X-Eon-Sig: AQMHrIJgg49ytaZ/vgIAAAAE,a1eb1d33f5723f275722ec81ceed6c5e
X-Eip: scjME-tntOQaopeGtSULaIeKHFbMsfSz-MX7rTLX8Eg
Date: Sat, 24 Apr 2021 05:24:26 +0200
From: Bengt Richter <bokr@bokr.com>
To: Ludovic Courtès <ludo@gnu.org>
Subject: Re: bug#47889: [installer image] grub-install efi fails getting
 canonical path to /boot/efi on dos-formatted disk
Message-ID: <20210424032425.GA18504@LionPure>
References: <20210419092928.p426llfdlvb5ay3z@pelzflorian.localdomain>
 <878s5a1m9k.fsf@gnu.org>
 <20210422143651.fwdrrqmcw225eh23@pelzflorian.localdomain>
 <87im4ds2su.fsf@gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <87im4ds2su.fsf@gnu.org>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-Proofpoint-ORIG-GUID: XqPFEycguuu0Mme1BYj6P-hCtKRFXTir
X-Proofpoint-GUID: XqPFEycguuu0Mme1BYj6P-hCtKRFXTir
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761
 definitions=2021-04-23_14:2021-04-23,
 2021-04-23 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0
 impostorscore=0 spamscore=0
 lowpriorityscore=0 malwarescore=0 bulkscore=0 clxscore=1034
 priorityscore=1501 adultscore=0 phishscore=0 mlxlogscore=999
 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2104060000 definitions=main-2104240021
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 47889
Cc: Mathieu Othacehe <othacehe@gnu.org>,
 "pelzflorian \(Florian Pelz\)" <pelzflorian@pelzflorian.de>,
 47889@debbugs.gnu.org
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Reply-To: Bengt Richter <bokr@bokr.com>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -0.7 (/)
Hi Ludo, Florian,

On +2021-04-23 12:39:13 +0200, Ludovic Courtès wrote:
> Hi Florian,
> 
> (Cc: Mathieu.)
> 
> "pelzflorian (Florian Pelz)" <pelzflorian@pelzflorian.de> skribis:
> 
> > On Thu, Apr 22, 2021 at 03:28:39PM +0200, Ludovic Courtès wrote:
> >> There’s no EFI (vfat) partition here.  Is it an EFI machine?
> >> 
> >> Is /boot/efi mounted when you boot the installation image?
> >
> > No because there is no EFI partition.  If I create one and restart the
> > installer, then it is *not* mounted either, only /mnt/boot/efi later
> > during the install.  (I believe since the installer is installed as on
> > an external medium, it does not need an EFI partition.)
> >
> > I had booted the install image via UEFI boot and had expected auto
> > partitioning and the default configuration to do the right thing.
> 
> The installer determines whether it’s doing a UEFI installation like so:
> 
>   (define (efi-installation?)
>     "Return #t if an EFI installation should be performed, #f otherwise."
>     (file-exists? "/sys/firmware/efi"))
> 
> It uses that to determine whether to create an EFI System Partition
> (ESP) and whether to use ‘grub-efi-bootloader’.
>

How does that work if you want to mount an external USB disk as the target
of your installation partitioning and formatting etc, but which may be intended
for another laptop with a different BIOS booting in a different mode than your
installer was booted into? (Maybe plug the finished USB disk into another laptop?
USB C3.1 is fast enough if connected to a good SSD cassette).

I.e., suppose your installer machine was booted UEFI but you want the target disk
to be legacy MBR booted on a laptop that can only do that, loading grub2 as embedded
in the target disk? Or vice versa?

I'd like an interactive install, maybe selecting a target disk something like
--8<---------------cut here---------------start------------->8---
$ select choice in $(lsblk -o kname,model,serial|tr -s ' ' _); do break;done
1) KNAME_MODEL_SERIAL					   6) dm-0_
2) sdb_Ultra_Fit_XXXXXXXXXXXXXXXXXXXX			   7) nvme0n1_Samsung_SSD_970_EVO_Plus_500GB_XXXXXXXXXXXXXXX
3) sdb1_						   8) nvme0n1p1_
4) sdb2_						   9) nvme0n1p2_
5) sr0_USB_SCSI_CD-ROM_XXXXXXXXXXXXXXXX
#? 2
$ echo "$choice"
sdb_Ultra_Fit_XXXXXXXXXXXXXXXXXXXX
--8<---------------cut here---------------end--------------->8---

so then the installation script can continue and mount the associated disk device
--8<---------------cut here---------------start------------->8---
$ echo "$choice"|cut -d _ -f1 
sdb 
--8<---------------cut here---------------end--------------->8---

It seems like the /sys/... file system that would show whether the disk is EFI-bootable
will be determined by booting the very disk image we are trying to create -- both by its
content (MBR and/or GPT, and what bootloader + .cfg, etc) and the BIOS trying to boot it.

Sorry for the noise if I am missing some context.

> Did it create an ESP in your case?
> 
> I’m not entirely sure how it decides between GPT and DOS, though;
> Mathieu?
> 
> We should add UEFI installation tests using OVMF.
> 
> Thanks,
> Ludo’.
> 
> 
> 

-- 
Regards,
Bengt Richter




Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Sun Dec 22 09:35:55 2024; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.