summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-07-05 11:44:46 +0200
committerLudovic Courtès <ludo@gnu.org>2018-07-05 11:44:46 +0200
commitfc0e663f782896f542d008c871d21b9cf636a75c (patch)
tree46f77271fe4e2328a382636c95e120ab460c72cd
parenta043b5b81a080c47e24298c80857919b9ea21bb2 (diff)
doc: Improve UEFI/BIOS bootloader documentation.
Partly fixes <https://bugs.gnu.org/30312>. * doc/guix.texi (Preparing for Installation): Add note on how to choose between UEFI and BIOS. (Using the Configuration System)[Bootloader]: New subsubsection. (Bootloader Configuration): Expound on the bootloader type and target. * gnu/system/examples/desktop.tmpl: Switch to UEFI. * gnu/system/examples/bare-bones.tmpl: Explicitly mention "legacy" and "BIOS" in the comments.
-rw-r--r--doc/guix.texi60
-rw-r--r--gnu/system/examples/bare-bones.tmpl5
-rw-r--r--gnu/system/examples/desktop.tmpl8
3 files changed, 57 insertions, 16 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 841bc2a34f0..a913c2ea3dc 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8636,6 +8636,17 @@ must have the @code{esp} flag set. E.g., for @command{parted}:
8636parted /dev/sda set 1 esp on 8636parted /dev/sda set 1 esp on
8637@end example 8637@end example
8638 8638
8639@quotation Note
8640@vindex grub-bootloader
8641@vindex grub-efi-bootloader
8642Unsure whether to use EFI- or BIOS-based GRUB? If the directory
8643@file{/sys/firmware/efi} exists in the installation image, the you should
8644probably perform an EFI installation, using @code{grub-efi-bootloader}.
8645Otherwise you should use the BIOS-based GRUB, known as
8646@code{grub-bootloader}. @xref{Bootloader Configuration}, for more info on
8647bootloaders.
8648@end quotation
8649
8639Once you are done partitioning the target hard disk drive, you have to 8650Once you are done partitioning the target hard disk drive, you have to
8640create a file system on the relevant partition(s)@footnote{Currently 8651create a file system on the relevant partition(s)@footnote{Currently
8641GuixSD only supports ext4 and btrfs file systems. In particular, code 8652GuixSD only supports ext4 and btrfs file systems. In particular, code
@@ -8964,6 +8975,27 @@ Below we discuss the effect of some of the most important fields
8964fields), and how to @dfn{instantiate} the operating system using 8975fields), and how to @dfn{instantiate} the operating system using
8965@command{guix system}. 8976@command{guix system}.
8966 8977
8978@unnumberedsubsubsec Bootloader
8979
8980@cindex legacy boot, on Intel machines
8981@cindex BIOS boot, on Intel machines
8982@cindex UEFI boot
8983@cindex EFI boot
8984The @code{bootloader} field describes the method that will be used to boot
8985your system. Machines based on Intel processors can boot in ``legacy'' BIOS
8986mode, as in the example above. However, more recent machines rely instead on
8987the @dfn{Unified Extensible Firmware Interface} (UEFI) to boot. In that case,
8988the @code{bootloader} field should contain something along these lines:
8989
8990@example
8991(bootloader-configuration
8992 (bootloader grub-efi-bootloader)
8993 (target "/boot/efi"))
8994@end example
8995
8996@xref{Bootloader Configuration}, for more information on the available
8997configuration options.
8998
8967@unnumberedsubsubsec Globally-Visible Packages 8999@unnumberedsubsubsec Globally-Visible Packages
8968 9000
8969@vindex %base-packages 9001@vindex %base-packages
@@ -9074,8 +9106,7 @@ management, power management, and more, would look like this:
9074@include os-config-desktop.texi 9106@include os-config-desktop.texi
9075@end lisp 9107@end lisp
9076 9108
9077@cindex UEFI 9109A graphical system with a choice of lightweight window managers
9078A graphical UEFI system with a choice of lightweight window managers
9079instead of full-blown desktop environments would look like this: 9110instead of full-blown desktop environments would look like this:
9080 9111
9081@lisp 9112@lisp
@@ -20697,21 +20728,30 @@ The type of a bootloader configuration declaration.
20697The bootloader to use, as a @code{bootloader} object. For now 20728The bootloader to use, as a @code{bootloader} object. For now
20698@code{grub-bootloader}, @code{grub-efi-bootloader}, 20729@code{grub-bootloader}, @code{grub-efi-bootloader},
20699@code{extlinux-bootloader} and @code{u-boot-bootloader} are supported. 20730@code{extlinux-bootloader} and @code{u-boot-bootloader} are supported.
20731
20732@vindex grub-efi-bootloader
20700@code{grub-efi-bootloader} allows to boot on modern systems using the 20733@code{grub-efi-bootloader} allows to boot on modern systems using the
20701@dfn{Unified Extensible Firmware Interface} (UEFI). 20734@dfn{Unified Extensible Firmware Interface} (UEFI). This is what you should
20735use if the installation image contains a @file{/sys/firmware/efi} directory
20736when you boot it on your system.
20737
20738@vindex grub-bootloader
20739@code{grub-bootloader} allows you to boot in particular Intel-based machines
20740in ``legacy'' BIOS mode.
20702 20741
20703Available bootloaders are described in @code{(gnu bootloader @dots{})} 20742Available bootloaders are described in @code{(gnu bootloader @dots{})}
20704modules. 20743modules.
20705 20744
20706@item @code{target} 20745@item @code{target}
20707This is a string denoting the target onto which to install the 20746This is a string denoting the target onto which to install the
20708bootloader. The exact interpretation depends on the bootloader in 20747bootloader.
20709question; for @code{grub-bootloader}, for example, it should be a device 20748
20710name understood by the bootloader @command{installer} command, such as 20749The interpretation depends on the bootloader in question. For
20711@code{/dev/sda} or @code{(hd0)} (for GRUB, @pxref{Invoking 20750@code{grub-bootloader}, for example, it should be a device name understood by
20712grub-install,,, grub, GNU GRUB Manual}). For 20751the bootloader @command{installer} command, such as @code{/dev/sda} or
20713@code{grub-efi-bootloader}, it should be the path to a mounted EFI file 20752@code{(hd0)} (@pxref{Invoking grub-install,,, grub, GNU GRUB Manual}). For
20714system. 20753@code{grub-efi-bootloader}, it should be the mount point of the EFI file
20754system, usually @file{/boot/efi}.
20715 20755
20716@item @code{menu-entries} (default: @code{()}) 20756@item @code{menu-entries} (default: @code{()})
20717A possibly empty list of @code{menu-entry} objects (see below), denoting 20757A possibly empty list of @code{menu-entry} objects (see below), denoting
diff --git a/gnu/system/examples/bare-bones.tmpl b/gnu/system/examples/bare-bones.tmpl
index cb6d2623db9..b763258e524 100644
--- a/gnu/system/examples/bare-bones.tmpl
+++ b/gnu/system/examples/bare-bones.tmpl
@@ -10,8 +10,9 @@
10 (timezone "Europe/Berlin") 10 (timezone "Europe/Berlin")
11 (locale "en_US.utf8") 11 (locale "en_US.utf8")
12 12
13 ;; Assuming /dev/sdX is the target hard disk, and "my-root" is 13 ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the
14 ;; the label of the target root file system. 14 ;; target hard disk, and "my-root" is the label of the target
15 ;; root file system.
15 (bootloader (bootloader-configuration 16 (bootloader (bootloader-configuration
16 (bootloader grub-bootloader) 17 (bootloader grub-bootloader)
17 (target "/dev/sdX"))) 18 (target "/dev/sdX")))
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl
index e8740407d0a..ea21e1df66f 100644
--- a/gnu/system/examples/desktop.tmpl
+++ b/gnu/system/examples/desktop.tmpl
@@ -11,11 +11,11 @@
11 (timezone "Europe/Paris") 11 (timezone "Europe/Paris")
12 (locale "en_US.utf8") 12 (locale "en_US.utf8")
13 13
14 ;; Assuming /dev/sdX is the target hard disk, and "my-root" 14 ;; Use the UEFI variant of GRUB with the EFI System
15 ;; is the label of the target root file system. 15 ;; Partition mounted on /boot/efi.
16 (bootloader (bootloader-configuration 16 (bootloader (bootloader-configuration
17 (bootloader grub-bootloader) 17 (bootloader grub-efi-bootloader)
18 (target "/dev/sdX"))) 18 (target "/boot/efi")))
19 19
20 ;; Specify a mapped device for the encrypted root partition. 20 ;; Specify a mapped device for the encrypted root partition.
21 ;; The UUID is that returned by 'cryptsetup luksUUID'. 21 ;; The UUID is that returned by 'cryptsetup luksUUID'.