unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>,
	"Ricardo Wurmus" <ricardo.wurmus@mdc-berlin.de>
Cc: 30312@debbugs.gnu.org
Subject: bug#30312: documentation: misleading EFI partitioning instructions
Date: Tue, 26 Jun 2018 12:11:51 +0200	[thread overview]
Message-ID: <871sctzwk8.fsf@fastmail.com> (raw)
In-Reply-To: <871scu6k6m.fsf@gnu.org>


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

ludo@gnu.org (Ludovic Courtès) writes:

> Hello gentlefolks!
>
> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
>
>> First, this sounds like it’s up to the user to pick either EFI-based
>> GRUB or BIOS-based GRUB.  It is not clear that this is determined by
>> whether the machine has a {BIOS, EFI in legacy mode} or EFI.  It’s
>> really not much of a choice.
>>
>> Second, the “parted” command operates on the first partition (“1”), yet
>> for the second command the second partition (“/dev/sda2”) is used.  It’s
>> better to be consistent here, i.e. to change “set 1 esp on” to “set 2
>> esp on” and to state that this would modify “/dev/sda2”.
>>
>> Finally, it is not clear where the efi partition should be mounted.
>> Should it be /mnt/boot/efi?  If so, should the configuration file
>> specify “/mnt/boot/efi” as the target?  Or should it be “/boot/efi”?
>>
>> An example would be useful here.
>
> It’d be nice to fix this before the release.  Anyone could take a look
> to address these issues?

I've tried to address the latter issue in <https://bugs.gnu.org/31959>.

I tested it by installing in a virtual machine with the ESP mounted at
"/mnt/boot/efi", using a Guix snapshot that included that commit.  It
also works on my installed system with the ESP on /boot/efi.

Here is a patch addressing the second issue:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-doc-Use-a-consistent-partitioning-scheme.patch --]
[-- Type: text/x-patch, Size: 2922 bytes --]

From 28b1aff2f0a78e7736c214880bbcfce1c0135346 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Tue, 26 Jun 2018 11:59:51 +0200
Subject: [PATCH] doc: Use a consistent partitioning scheme.

* doc/guix.texi (Preparing for Installation): Consistently refer to the ESP as
/dev/sda1; root file system as /dev/sda2; and swap as /dev/sda3.
---
 doc/guix.texi | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index da05a200a..d3375601a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8641,21 +8641,21 @@ create a file system on the relevant partition(s)@footnote{Currently
 GuixSD only supports ext4 and btrfs file systems.  In particular, code
 that reads file system UUIDs and labels only works for these file system
 types.}.  For the ESP, if you have one and assuming it is
-@file{/dev/sda2}, run:
+@file{/dev/sda1}, run:
 
 @example
-mkfs.fat -F32 /dev/sda2
+mkfs.fat -F32 /dev/sda1
 @end example
 
 Preferably, assign file systems a label so that you can easily and
 reliably refer to them in @code{file-system} declarations (@pxref{File
 Systems}).  This is typically done using the @code{-L} option of
 @command{mkfs.ext4} and related commands.  So, assuming the target root
-partition lives at @file{/dev/sda1}, a file system with the label
+partition lives at @file{/dev/sda2}, a file system with the label
 @code{my-root} can be created with:
 
 @example
-mkfs.ext4 -L my-root /dev/sda1
+mkfs.ext4 -L my-root /dev/sda2
 @end example
 
 @cindex encrypted disk
@@ -8663,12 +8663,12 @@ If you are instead planning to encrypt the root partition, you can use
 the Cryptsetup/LUKS utilities to do that (see @inlinefmtifelse{html,
 @uref{https://linux.die.net/man/8/cryptsetup, @code{man cryptsetup}},
 @code{man cryptsetup}} for more information.)  Assuming you want to
-store the root partition on @file{/dev/sda1}, the command sequence would
+store the root partition on @file{/dev/sda2}, the command sequence would
 be along these lines:
 
 @example
-cryptsetup luksFormat /dev/sda1
-cryptsetup open --type luks /dev/sda1 my-partition
+cryptsetup luksFormat /dev/sda2
+cryptsetup open --type luks /dev/sda2 my-partition
 mkfs.ext4 -L my-root /dev/mapper/my-partition
 @end example
 
@@ -8688,11 +8688,11 @@ by @code{guix system init} afterwards.
 Finally, if you plan to use one or more swap partitions (@pxref{Memory
 Concepts, swap space,, libc, The GNU C Library Reference Manual}), make
 sure to initialize them with @command{mkswap}.  Assuming you have one
-swap partition on @file{/dev/sda2}, you would run:
+swap partition on @file{/dev/sda3}, you would run:
 
 @example
-mkswap /dev/sda2
-swapon /dev/sda2
+mkswap /dev/sda3
+swapon /dev/sda3
 @end example
 
 Alternatively, you may use a swap file.  For example, assuming that in
-- 
2.18.0


[-- Attachment #1.3: Type: text/plain, Size: 275 bytes --]


I'm not sure how to best resolve the first issue.  I suppose we can
mention that if unsure which GRUB to use, the user can test whether
"/sys/firmware/efi" exists on the live image.

We could also make it clearer when booting whether the installer is in
"UEFI" mode or not.

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

  reply	other threads:[~2018-06-26 10:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 19:01 bug#30312: documentation: misleading EFI partitioning instructions Ricardo Wurmus
2018-02-01  9:13 ` Gábor Boskovits
2018-02-01 11:01   ` Gábor Boskovits
2018-02-01 21:23     ` Joshua Branson
2018-02-01 22:19 ` Carlo Zancanaro
2018-06-26  8:12 ` Ludovic Courtès
2018-06-26 10:11   ` Marius Bakke [this message]
2018-06-26 13:55     ` Ludovic Courtès
2018-06-26 15:18       ` Marius Bakke
2018-06-26 20:14         ` Ludovic Courtès
2018-07-05  9:58           ` 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=871sctzwk8.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=30312@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /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).