From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IIkFAd+MZl/4fwAA0tVLHw (envelope-from ) for ; Sat, 19 Sep 2020 22:57:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 4C6kON6MZl+BFAAA1q6Kng (envelope-from ) for ; Sat, 19 Sep 2020 22:57:34 +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 42ED19402A0 for ; Sat, 19 Sep 2020 22:57:34 +0000 (UTC) Received: from localhost ([::1]:40538 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJlnQ-00071I-6U for larch@yhetil.org; Sat, 19 Sep 2020 18:57:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33120) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJlmw-00071A-GG for guix-patches@gnu.org; Sat, 19 Sep 2020 18:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJlmw-0003ss-6b for guix-patches@gnu.org; Sat, 19 Sep 2020 18:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJlmw-0001iW-3x for guix-patches@gnu.org; Sat, 19 Sep 2020 18:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43524] [PATCH] doc: Document new bootloader grub-efi-netboot-bootloader. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 19 Sep 2020 22:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43524 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43524@debbugs.gnu.org, dannym@scratchpost.org X-Debbugs-Original-To: guix-patches@gnu.org, Danny Milosavljevic Received: via spool by submit@debbugs.gnu.org id=B.16005561766547 (code B ref -1); Sat, 19 Sep 2020 22:57:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Sep 2020 22:56:16 +0000 Received: from localhost ([127.0.0.1]:48396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJlmC-0001hX-9R for submit@debbugs.gnu.org; Sat, 19 Sep 2020 18:56:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:35188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJlm9-0001hO-Dp for submit@debbugs.gnu.org; Sat, 19 Sep 2020 18:56:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJlm9-0006wO-55 for guix-patches@gnu.org; Sat, 19 Sep 2020 18:56:13 -0400 Received: from vsmx012.vodafonemail.xion.oxcs.net ([153.92.174.90]:45709) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJlm6-0003p8-Cf for guix-patches@gnu.org; Sat, 19 Sep 2020 18:56:12 -0400 Received: from vsmx004.vodafonemail.xion.oxcs.net (unknown [192.168.75.198]) by mta-8-out.mta.xion.oxcs.net (Postfix) with ESMTP id BCAEFF34F49; Sat, 19 Sep 2020 22:56:01 +0000 (UTC) Received: from macbook-pro.kuh-wiese.my-router.de (unknown [2.206.141.21]) by mta-8-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 6DFA119AE65; Sat, 19 Sep 2020 22:55:57 +0000 (UTC) From: Stefan Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: Date: Sun, 20 Sep 2020 00:55:56 +0200 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-VADE-STATUS: LEGIT Received-SPF: pass client-ip=153.92.174.90; envelope-from=stefan-guix@vodafonemail.de; helo=vsmx012.vodafonemail.xion.oxcs.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/19 18:56:02 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.51 X-TUID: x2ukC5yOL/JU * doc/guix.texi (Bootloader Configuration)[bootloader]: Add grub-efi-netboot-bootloader. [target]: Add a note to a TFTP root directory for = grub-efi-netboot-bootloader. --- doc/guix.texi | 66 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 58 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index a6e14ea177..644b98ab10 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -28639,7 +28639,15 @@ The type of a bootloader configuration = declaration. @cindex BIOS, bootloader The bootloader to use, as a @code{bootloader} object. For now @code{grub-bootloader}, @code{grub-efi-bootloader}, -@code{extlinux-bootloader} and @code{u-boot-bootloader} are supported. +@code{grub-efi-netboot-bootloader}, @code{extlinux-bootloader} and +@code{u-boot-bootloader} are supported. + +@cindex ARM, bootloaders +@cindex AArch64, bootloaders +Available bootloaders are described in @code{(gnu bootloader @dots{})} +modules. In particular, @code{(gnu bootloader u-boot)} contains = definitions +of bootloaders for a wide range of ARM and AArch64 systems, using the +@uref{https://www.denx.de/wiki/U-Boot/, U-Boot bootloader}. =20 @vindex grub-efi-bootloader @code{grub-efi-bootloader} allows to boot on modern systems using the @@ -28651,12 +28659,52 @@ when you boot it on your system. @code{grub-bootloader} allows you to boot in particular Intel-based = machines in ``legacy'' BIOS mode. =20 -@cindex ARM, bootloaders -@cindex AArch64, bootloaders -Available bootloaders are described in @code{(gnu bootloader @dots{})} -modules. In particular, @code{(gnu bootloader u-boot)} contains = definitions -of bootloaders for a wide range of ARM and AArch64 systems, using the -@uref{https://www.denx.de/wiki/U-Boot/, U-Boot bootloader}. +@vindex grub-efi-netboot-bootloader +@code{grub-efi-netboot-bootloader} allows you to boot your system over = network +through TFTP. In combination with an NFS root file system this allows = you to +build a diskless Guix system. + +The installation of the @code{grub-efi-netboot-bootloader} generates = the content +of the TFTP root directory at @code{target} +(@pxref{Bootloader Configuration, @code{target}}), to be served by a = TFTP server. + You may want to mount your TFTP server directory onto @code{target} to = move the +required files to the TFTP server automatically. + +If you plan to use an NFS root file system as well (actually if you = mount the +store from an NFS share), then the TFTP server needs to serve the file +@file{/boot/grub/grub.cfg} and other files from the store (like GRUBs = background +image, the kernel (@pxref{operating-system Reference, @code{kernel}}) = and the +initrd (@pxref{operating-system Reference, @code{initrd}})), too. All = these +files from the store will be accessed by GRUB through TFTP with their = normal +store path, for example as +@file{tftp://tftp-server/gnu/store/=E2=80=A6-initrd/initrd.cpio.gz}. + +Two symlinks are created to make this possible. The first symlink is +@code{target}@file{/efi/Guix/boot/grub/grub.cfg} pointing to +@file{../../../boot/grub/grub.cfg}, +where @code{target} may be @file{/boot}. In this case the link is not = leaving +the served TFTP root directory, but otherwise it does. The second link = is +@code{target}@file{/gnu/store} and points to @file{../gnu/store}. This = link +is leaving the served TFTP root directory. + +The assumption behind all this is that you have an NFS server exporting = the root +file system for your Guix system, and additionally a TFTP server = exporting your +@code{target} directory=E2=80=94usually @file{/boot}=E2=80=94from that = same root file system for +your Guix system. In this constellation the symlinks will work. + +For other constellations you will have to program your own bootloader = installer, +which then takes care to make necessary files from the store accessible = through +TFTP, for example by copying them into the TFTP root directory at = @code{target}. + +It is important to note that symlinks pointing outside the TFTP root = directory +may need to be allowed in the configuration of your TFTP server. = Further the +store link exposes the whole store through TFTP. Both points need to = be +considered carefully for security aspects. + +Beside the @code{grub-efi-netboot-bootloader}, the already mentioned = TFTP and +NFS servers, you also need a properly configured DHCP server to make = the booting +over netboot possible. For all this we can currently only recommend = you to look +for instructions about @acronym{PXE, Preboot eXecution Environment}. =20 @item @code{target} This is a string denoting the target onto which to install the @@ -28667,7 +28715,9 @@ The interpretation depends on the bootloader in = question. For the bootloader @command{installer} command, such as @code{/dev/sda} or @code{(hd0)} (@pxref{Invoking grub-install,,, grub, GNU GRUB Manual}). = For @code{grub-efi-bootloader}, it should be the mount point of the EFI = file -system, usually @file{/boot/efi}. +system, usually @file{/boot/efi}. For = @code{grub-efi-netboot-bootloader}, +@code{target} should be the mount point corresponding to the TFTP root +directory of your TFTP server. =20 @item @code{menu-entries} (default: @code{()}) A possibly empty list of @code{menu-entry} objects (see below), = denoting --=20 2.26.0