From 9fd877247de6efec3aec53e93db5323a97d7b05e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 4 Jul 2018 21:52:23 +0200 Subject: system: Default .bashrc uses '--color=auto' for grep and ls. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported by Tobias Geerinckx-Rice and Björn Höfling . * gnu/system/shadow.scm (default-skeletons)["bashrc"]: Use '--color=auto' instead of '--color'. --- gnu/system/shadow.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/system') diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 28d399f2b16..b4db69f0682 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -178,9 +178,9 @@ then else PS1='\\u@\\h \\w\\$ ' fi -alias ls='ls -p --color' +alias ls='ls -p --color=auto' alias ll='ls -l' -alias grep='grep --color'\n")) +alias grep='grep --color=auto'\n")) (zlogin (plain-file "zlogin" "\ # Honor system-wide environment variables source /etc/profile\n")) -- cgit v1.3 From fc0e663f782896f542d008c871d21b9cf636a75c Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 5 Jul 2018 11:44:46 +0200 Subject: doc: Improve UEFI/BIOS bootloader documentation. Partly fixes . * 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. --- doc/guix.texi | 60 ++++++++++++++++++++++++++++++------- gnu/system/examples/bare-bones.tmpl | 5 ++-- gnu/system/examples/desktop.tmpl | 8 ++--- 3 files changed, 57 insertions(+), 16 deletions(-) (limited to 'gnu/system') 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}: parted /dev/sda set 1 esp on @end example +@quotation Note +@vindex grub-bootloader +@vindex grub-efi-bootloader +Unsure whether to use EFI- or BIOS-based GRUB? If the directory +@file{/sys/firmware/efi} exists in the installation image, the you should +probably perform an EFI installation, using @code{grub-efi-bootloader}. +Otherwise you should use the BIOS-based GRUB, known as +@code{grub-bootloader}. @xref{Bootloader Configuration}, for more info on +bootloaders. +@end quotation + Once you are done partitioning the target hard disk drive, you have to create a file system on the relevant partition(s)@footnote{Currently GuixSD 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 fields), and how to @dfn{instantiate} the operating system using @command{guix system}. +@unnumberedsubsubsec Bootloader + +@cindex legacy boot, on Intel machines +@cindex BIOS boot, on Intel machines +@cindex UEFI boot +@cindex EFI boot +The @code{bootloader} field describes the method that will be used to boot +your system. Machines based on Intel processors can boot in ``legacy'' BIOS +mode, as in the example above. However, more recent machines rely instead on +the @dfn{Unified Extensible Firmware Interface} (UEFI) to boot. In that case, +the @code{bootloader} field should contain something along these lines: + +@example +(bootloader-configuration + (bootloader grub-efi-bootloader) + (target "/boot/efi")) +@end example + +@xref{Bootloader Configuration}, for more information on the available +configuration options. + @unnumberedsubsubsec Globally-Visible Packages @vindex %base-packages @@ -9074,8 +9106,7 @@ management, power management, and more, would look like this: @include os-config-desktop.texi @end lisp -@cindex UEFI -A graphical UEFI system with a choice of lightweight window managers +A graphical system with a choice of lightweight window managers instead of full-blown desktop environments would look like this: @lisp @@ -20697,21 +20728,30 @@ The type of a bootloader configuration declaration. 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. + +@vindex grub-efi-bootloader @code{grub-efi-bootloader} allows to boot on modern systems using the -@dfn{Unified Extensible Firmware Interface} (UEFI). +@dfn{Unified Extensible Firmware Interface} (UEFI). This is what you should +use if the installation image contains a @file{/sys/firmware/efi} directory +when you boot it on your system. + +@vindex grub-bootloader +@code{grub-bootloader} allows you to boot in particular Intel-based machines +in ``legacy'' BIOS mode. Available bootloaders are described in @code{(gnu bootloader @dots{})} modules. @item @code{target} This is a string denoting the target onto which to install the -bootloader. The exact interpretation depends on the bootloader in -question; for @code{grub-bootloader}, for example, it should be a device -name understood by the bootloader @command{installer} command, such as -@code{/dev/sda} or @code{(hd0)} (for GRUB, @pxref{Invoking -grub-install,,, grub, GNU GRUB Manual}). For -@code{grub-efi-bootloader}, it should be the path to a mounted EFI file -system. +bootloader. + +The interpretation depends on the bootloader in question. For +@code{grub-bootloader}, for example, it should be a device name understood by +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}. @item @code{menu-entries} (default: @code{()}) A 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 @@ (timezone "Europe/Berlin") (locale "en_US.utf8") - ;; Assuming /dev/sdX is the target hard disk, and "my-root" is - ;; the label of the target root file system. + ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the + ;; target hard disk, and "my-root" is the label of the target + ;; root file system. (bootloader (bootloader-configuration (bootloader grub-bootloader) (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 @@ (timezone "Europe/Paris") (locale "en_US.utf8") - ;; Assuming /dev/sdX is the target hard disk, and "my-root" - ;; is the label of the target root file system. + ;; Use the UEFI variant of GRUB with the EFI System + ;; Partition mounted on /boot/efi. (bootloader (bootloader-configuration - (bootloader grub-bootloader) - (target "/dev/sdX"))) + (bootloader grub-efi-bootloader) + (target "/boot/efi"))) ;; Specify a mapped device for the encrypted root partition. ;; The UUID is that returned by 'cryptsetup luksUUID'. -- cgit v1.3 From 264967c883d32606c18b378f717c303e7490c942 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 20 Jul 2018 17:57:36 +0200 Subject: install: Add service for the loopback device. Lack of a loopback device prevented the system from building starting from commit 363c946b36a77aa6f0e60b8c93a171d2e649164f. * gnu/system/install.scm (%installation-services): Add 'static-networking-service-type' instance for 'lo'. --- gnu/system/install.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/system') diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 6a3ae1947be..95661dc9736 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -298,6 +298,13 @@ You have been warned. Thanks for being so brave.\x1b[0m `(("/bin/sh" ,(file-append (canonical-package bash) "/bin/sh")))) + ;; Loopback device, needed by OpenSSH notably. + (service static-networking-service-type + (list (static-networking (interface "lo") + (ip "127.0.0.1") + (requirement '()) + (provision '(loopback))))) + ;; Keep a reference to BARE-BONES-OS to make sure it can be ;; installed without downloading/building anything. Also keep the ;; things needed by 'profile-derivation' to minimize the amount of -- cgit v1.3 From 10df28d74d1f799969d3ce37348c44efb1067c7f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 23 Jul 2018 10:36:37 +0200 Subject: system: '.guile' skeleton now recommends 'guile-colorized'. * gnu/system/shadow.scm (default-skeletons)[".guile"]: Recommend 'guile-colorized'. --- gnu/system/shadow.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gnu/system') diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index b4db69f0682..f800c3b5465 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -210,7 +210,17 @@ include /run/current-system/profile/share/nano/*.nanorc\n")) ((module-ref module 'activate-readline)))) (else (display \"Consider installing the 'guile-readline' package for -convenient interactive line editing and input history.\\n\\n\")))\n")) +convenient interactive line editing and input history.\\n\\n\"))) + + (unless (getenv \"INSIDE_EMACS\") + (cond ((false-if-exception (resolve-interface '(ice-9 colorized))) + => + (lambda (module) + ;; Enable completion and input history at the REPL. + ((module-ref module 'activate-colorized)))) + (else + (display \"Consider installing the 'guile-colorized' package +for a colorful Guile experience.\\n\\n\"))))\n")) (".guile-wm" ,guile-wm) (".gdbinit" ,gdbinit)))) -- cgit v1.3