unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Miguel Ángel Arruga Vivas" <rosen644835@gmail.com>
To: Brett Gilio <brettg@gnu.org>
Cc: othacehe@gnu.org, Brendan Tildesley <mail@brendan.scot>,
	44027@debbugs.gnu.org
Subject: bug#44027: [PATCH] installer: Create bios_grub partition when it is needed.
Date: Sat, 17 Oct 2020 15:09:27 +0200	[thread overview]
Message-ID: <87pn5hq9rs.fsf_-_@gmail.com> (raw)
In-Reply-To: <878sc5wzld.fsf@debian> (Brett Gilio's message of "Fri, 16 Oct 2020 17:55:10 -0500")


[-- Attachment #1.1: Type: text/plain, Size: 792 bytes --]

Hi,

Brett Gilio <brettg@gnu.org> writes:
> Ludovic Courtès <ludo@gnu.org> writes:
>> Shouldn’t it create a “legacy” partition table rather than GPT since
>> we’re on an old, non-UEFI platform?
>
> That is my thinking as well, it should create a legacy MBR table.

IMHO the old format should be avoided completely when possible.  Why
should we enforce it?

I think this problem involves having a previous ESP partition on the
disk (at least identified as such by parted), because auto-partition!
currently checks that before checking if the booted system has EFI
support.  When that's the case, it doesn't create the needed bios_grub
partition that might have been removed previously.

The attached patch solves that.  What do you think?

Happy hacking,
Miguel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-installer-Create-bios_grub-partition-when-it-is-needed.patch --]
[-- Type: text/x-patch, Size: 1467 bytes --]

From a2f13b21a631398689cc5471c1910af294454e80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644835@gmail.com>
Date: Sat, 17 Oct 2020 14:20:41 +0200
Subject: [PATCH] installer: Create bios_grub partition when it is needed.

* gnu/installer/parted.scm (auto-partition!): Only check for ESP on EFI
installations.
---
 gnu/installer/parted.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index b0c73b837e..fffd5abf3b 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -911,13 +911,13 @@ exists."
 
     (let* ((start-partition
             (and (not has-extended?)
-                 (not esp-partition)
                  (if (efi-installation?)
-                     (user-partition
-                      (fs-type 'fat32)
-                      (esp? #t)
-                      (size new-esp-size)
-                      (mount-point (default-esp-mount-point)))
+                     (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)
-- 
2.28.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]

  reply	other threads:[~2020-10-17 13:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16  8:03 bug#44027: 1.2-29a2eb3 Installer fails at final stage installing GRUB Brendan Tildesley
2020-10-16 14:32 ` Ludovic Courtès
2020-10-16 22:55   ` Brett Gilio
2020-10-17 13:09     ` Miguel Ángel Arruga Vivas [this message]
2020-10-18  2:02       ` bug#44027: [PATCH] installer: Create bios_grub partition when it is needed Brendan Tildesley
2020-10-18  4:07       ` Brendan Tildesley
2020-10-18 15:52         ` Miguel Ángel Arruga Vivas
2020-10-18 17:03           ` Mathieu Othacehe
2020-10-19  5:57             ` Brendan Tildesley
2020-10-19 10:48               ` Mathieu Othacehe
2020-10-19 13:21                 ` Miguel Ángel Arruga Vivas
2020-10-19 15:51                   ` Mathieu Othacehe
2020-10-19 19:59                     ` Miguel Ángel Arruga Vivas
2020-10-20  5:33               ` Bengt Richter

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=87pn5hq9rs.fsf_-_@gmail.com \
    --to=rosen644835@gmail.com \
    --cc=44027@debbugs.gnu.org \
    --cc=brettg@gnu.org \
    --cc=mail@brendan.scot \
    --cc=othacehe@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).