From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#30312: documentation: misleading EFI partitioning instructions Date: Tue, 26 Jun 2018 12:11:51 +0200 Message-ID: <871sctzwk8.fsf@fastmail.com> References: <871scu6k6m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fXkx9-0008E6-Sh for bug-guix@gnu.org; Tue, 26 Jun 2018 06:12:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fXkx8-0007p8-CU for bug-guix@gnu.org; Tue, 26 Jun 2018 06:12:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:55994) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fXkx8-0007og-7q for bug-guix@gnu.org; Tue, 26 Jun 2018 06:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fXkx8-0000Jh-2z for bug-guix@gnu.org; Tue, 26 Jun 2018 06:12:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <871scu6k6m.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Ricardo Wurmus Cc: 30312@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hello gentlefolks! > > Ricardo Wurmus skribis: > >> First, this sounds like it=E2=80=99s up to the user to pick either EFI-b= ased >> 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=E2=80= =99s >> really not much of a choice. >> >> Second, the =E2=80=9Cparted=E2=80=9D command operates on the first parti= tion (=E2=80=9C1=E2=80=9D), yet >> for the second command the second partition (=E2=80=9C/dev/sda2=E2=80=9D= ) is used. It=E2=80=99s >> better to be consistent here, i.e. to change =E2=80=9Cset 1 esp on=E2=80= =9D to =E2=80=9Cset 2 >> esp on=E2=80=9D and to state that this would modify =E2=80=9C/dev/sda2= =E2=80=9D. >> >> 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 =E2=80=9C/mnt/boot/efi=E2=80=9D as the target? Or should it be = =E2=80=9C/boot/efi=E2=80=9D? >> >> An example would be useful here. > > It=E2=80=99d 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 . 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: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-doc-Use-a-consistent-partitioning-scheme.patch Content-Transfer-Encoding: quoted-printable From=2028b1aff2f0a78e7736c214880bbcfce1c0135346 Mon Sep 17 00:00:00 2001 From: Marius Bakke 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. =2D-- 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 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -8641,21 +8641,21 @@ create a file system on the relevant partition(s)@f= ootnote{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 =2D@file{/dev/sda2}, run: +@file{/dev/sda1}, run: =20 @example =2Dmkfs.fat -F32 /dev/sda2 +mkfs.fat -F32 /dev/sda1 @end example =20 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 =2Dpartition 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: =20 @example =2Dmkfs.ext4 -L my-root /dev/sda1 +mkfs.ext4 -L my-root /dev/sda2 @end example =20 @cindex encrypted disk @@ -8663,12 +8663,12 @@ If you are instead planning to encrypt the root par= tition, 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 =2Dstore 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: =20 @example =2Dcryptsetup luksFormat /dev/sda1 =2Dcryptsetup 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 =20 @@ -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 =2Dswap partition on @file{/dev/sda2}, you would run: +swap partition on @file{/dev/sda3}, you would run: =20 @example =2Dmkswap /dev/sda2 =2Dswapon /dev/sda2 +mkswap /dev/sda3 +swapon /dev/sda3 @end example =20 Alternatively, you may use a swap file. For example, assuming that in =2D-=20 2.18.0 --=-=-= Content-Type: text/plain 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. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlsyEWcACgkQoqBt8qM6 VPqdQQf/VnbXhLXTgb7dLLRw2YpX2EBJuXe5PXdxnCvl69GUjbq2+8YV60a3d7x5 z9m4VHfhzI7M5v6jlrJkhNR67XHzsTvhIE2GEXyUdv6Yyo2abgT1RkKL9gxQA8sz 2kJ3f3P/resIQNigLVS/tUxLwTLW2rluLzO1TPZoBPfd+UXhTRzJTfE2ehvMiZLo BDZsrfUZRvWeEEJYFJjNCjfHRreCB2v5sr5FsGTqpvTnpPD0xGn3VClFGMjR0Yz5 Xtvc5C54jNoQxnKhmATUDjZ175p2/0F4dh7/m80wcjjhK47pfrQiDzcw+udUoic7 hMK1oQykmgFpk4iOoTcL8MOCjnVM2A== =SM/L -----END PGP SIGNATURE----- --==-=-=--