From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8DhtAGmjhWC9WgEAgWs5BA (envelope-from ) for ; Sun, 25 Apr 2021 19:14:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oD63N2ijhWD3cgAA1q6Kng (envelope-from ) for ; Sun, 25 Apr 2021 17:14:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3317422359 for ; Sun, 25 Apr 2021 19:14:16 +0200 (CEST) Received: from localhost ([::1]:53452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laiKl-0005vL-Ae for larch@yhetil.org; Sun, 25 Apr 2021 13:14:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36594) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1laiJa-0004bi-Ps for bug-guix@gnu.org; Sun, 25 Apr 2021 13:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60305) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1laiJa-0005eX-IE for bug-guix@gnu.org; Sun, 25 Apr 2021 13:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1laiJa-0008Co-By for bug-guix@gnu.org; Sun, 25 Apr 2021 13:13:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47889: [installer image] grub-install efi fails getting canonical path to /boot/efi on dos-formatted disk Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 25 Apr 2021 17:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47889 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "pelzflorian (Florian Pelz)" Received: via spool by 47889-submit@debbugs.gnu.org id=B47889.161937077031524 (code B ref 47889); Sun, 25 Apr 2021 17:13:02 +0000 Received: (at 47889) by debbugs.gnu.org; 25 Apr 2021 17:12:50 +0000 Received: from localhost ([127.0.0.1]:43618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laiJO-0008CN-56 for submit@debbugs.gnu.org; Sun, 25 Apr 2021 13:12:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1laiJM-0008CB-0m for 47889@debbugs.gnu.org; Sun, 25 Apr 2021 13:12:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39882) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laiJF-0005Wo-HS; Sun, 25 Apr 2021 13:12:41 -0400 Received: from [2a01:e0a:19b:d9a0:35c2:b1bf:b4c1:9d32] (port=41098 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1laiJF-00017R-2C; Sun, 25 Apr 2021 13:12:41 -0400 From: Mathieu Othacehe References: <20210419092928.p426llfdlvb5ay3z@pelzflorian.localdomain> <878s5a1m9k.fsf@gnu.org> <20210422143651.fwdrrqmcw225eh23@pelzflorian.localdomain> <87im4ds2su.fsf@gnu.org> <87eeeyv49v.fsf@gnu.org> <20210425163412.duj4t4ind5r5tv4x@pelzflorian.localdomain> Date: Sun, 25 Apr 2021 19:12:39 +0200 In-Reply-To: <20210425163412.duj4t4ind5r5tv4x@pelzflorian.localdomain> (pelzflorian@pelzflorian.de's message of "Sun, 25 Apr 2021 18:34:12 +0200") Message-ID: <878s56uw3c.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 47889@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1619370856; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post; bh=fpyZG7u6E7Dth8mbbTI0Zy6ixgtJjZeifs4ZCwVOqNE=; b=kA9PBnKmxXhRAeRPkx/C91W01VO7M9Da8j1FapupPlVJQPd+WCM8/p5UcgrZoSFAUgvKXn o0TcqnLv3U1Er+m6Q07uVxYJXSYogI7BwWeosBhWH3Gi2XUQFqM5KP8BFmN3+ha3BUmygm 6vJimRAZjBxemQP8jlkxSoNfBQuHzYMADPuF6bj5eLtyhykCu4sEU0H3DfCQSAuicvu4TY r2qZaoDIuxCsooz9Gz3I0GHvxC2lrg9Ziu8c4v0qao8mWW5MlX3fOSv2f/uyMI7F/eCFcw egRpKOlHLMogUUAvHKuFJ81SIR8NAx7PBdQ+YtPyBus1TYCrflppd+oUp2e4UA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619370856; a=rsa-sha256; cv=none; b=SvqxVrl/vUnMnBw14tYlV+Qmc0Vqr3Gx930mjiqzzBr5Ee44hOu7CRxqFgcpGHKRXStm+9 wSo8B8+JjGZEVx5FCAv9SQbcJRMRQkNHh0bGQlP9l1h51GTW7ObuJ30LHFeMVodLpIkpBh Yx50wgHOJEJ3hFihU/Q9JOdstdRl0R43HguQlcbXckMwXTnROGOq5pZZNLfenI35WUydnV whvW/0oye3kvJo+DHuwHvgPN68bsSIRihyEjX6hCXYsoGdOmv59Br8tjozLKyZCkRyvjnO UBcpchQ93qW4vNoZVN5bupGMs6H3ORzg/x7i1DUUpNn4hqsRRbkc/e4M+g3TUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.95 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 3317422359 X-Spam-Score: -2.95 X-Migadu-Scanner: scn0.migadu.com X-TUID: K+VPFR9ljk1A --=-=-= Content-Type: text/plain Hello Florian, > Can you force GPT also in 2.? All disk partitions get removed anyway. > Arch wiki says MSDOS layout does not work on all EFI systems > . Well I'm not sure, if someone has an MSDOS partition table with an ESP partition it wouldn't be a good idea to wipe it. The attached patch forces GPT if there's no partition table, and will preserve/create an ESP partition on an MSDOS/EFI setup. I'm testing it on various machines, seems to work fine. WDYT? Thanks, Mathieu --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-wip-esp.patch >From 65339286fe9d0c4758c04cfcaa177334577741cc Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Sun, 25 Apr 2021 19:06:31 +0200 Subject: [PATCH] wip esp --- gnu/installer/newt/partition.scm | 16 +++++++----- gnu/installer/parted.scm | 45 ++++++++++++++------------------ 2 files changed, 28 insertions(+), 33 deletions(-) diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm index 81cf68d782..2dcb10bbdb 100644 --- a/gnu/installer/newt/partition.scm +++ b/gnu/installer/newt/partition.scm @@ -95,14 +95,16 @@ DEVICES list." (define (run-label-page button-text button-callback) "Run a page asking the user to select a partition table label." - (run-listbox-selection-page - #:info-text (G_ "Select a new partition table type. \ + (if (efi-installation?) + "gpt" + (run-listbox-selection-page + #:info-text (G_ "Select a new partition table type. \ Be careful, all data on the disk will be lost.") - #:title (G_ "Partition table") - #:listbox-items '("msdos" "gpt") - #:listbox-item->text identity - #:button-text button-text - #:button-callback-procedure button-callback)) + #:title (G_ "Partition table") + #:listbox-items '("msdos" "gpt") + #:listbox-item->text identity + #:button-text button-text + #:button-callback-procedure button-callback))) (define (run-type-page partition) "Run a page asking the user to select a partition type." diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index 9ef263d1f9..6d6e500d71 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -70,6 +70,7 @@ small-freespace-partition? esp-partition? boot-partition? + efi-installation? default-esp-mount-point with-delay-device-in-use? @@ -193,12 +194,8 @@ inferior to MAX-SIZE, #f otherwise." (define (esp-partition? partition) "Return #t if partition has the ESP flag, return #f otherwise." (let* ((disk (partition-disk partition)) - (disk-type (disk-disk-type disk)) - (has-extended? (disk-type-check-feature - disk-type - DISK-TYPE-FEATURE-EXTENDED))) + (disk-type (disk-disk-type disk))) (and (data-partition? partition) - (not has-extended?) (partition-is-flag-available? partition PARTITION-FLAG-ESP) (partition-get-flag partition PARTITION-FLAG-ESP)))) @@ -918,30 +915,26 @@ exists." ;; disk space. Otherwise, set the swap size to 5% of the disk space. (swap-size (min default-swap-size five-percent-disk))) - (if has-extended? - ;; msdos - remove everything. - (disk-remove-all-partitions disk) - ;; gpt - remove everything but esp if it exists. - (for-each - (lambda (partition) - (and (data-partition? partition) - (disk-remove-partition* disk partition))) - non-boot-partitions)) + ;; Remove everything but esp if it exists. + (for-each + (lambda (partition) + (and (data-partition? partition) + (disk-remove-partition* disk partition))) + non-boot-partitions) (let* ((start-partition - (and (not has-extended?) - (if (efi-installation?) - (and (not esp-partition) - (user-partition - (fs-type 'fat32) - (esp? #t) - (size new-esp-size) - (mount-point (default-esp-mount-point)))) + (if (efi-installation?) + (and (not esp-partition) (user-partition - (fs-type 'ext4) - (bootable? #t) - (bios-grub? #t) - (size bios-grub-size))))) + (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)))) (new-partitions (cond ((or (eq? scheme 'entire-root) -- 2.31.1 --=-=-=--