GNU bug report logs - #26875
Non-graphical (and other types) of GRUB interfaces

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Thu, 11 May 2017 07:37:01 UTC

Severity: normal

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26875 in the body.
You can then email your comments to 26875 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Thu, 11 May 2017 07:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 11 May 2017 07:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: Non-graphical (and other types) of GRUB interfaces
Date: Thu, 11 May 2017 03:36:26 -0400
[Message part 1 (text/plain, inline)]
This patch exposes the GRUB configuration options that control where and
how the user interface is presented. Generally, you can use it to put
the GRUB menu on a serial port, get a text-only menu on the kernel
console, or even use Morse code on the PC speaker (untested!).

You can use it like this, for example:

(bootloader (grub-configuration
            (device "/dev/sda")
            (terminal-outputs '(gfxterm console))
            (terminal-inputs '(serial console usb_keyboard))
            (serial-speed 115200)
            (serial-unit 0)))

Since this offers new ways to break your system, the patch sets up some
input validation. Hopefully it's enough.

The general idea came from this conversation:

https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00053.html

Your feedback?
[0001-system-grub-Expose-GRUB-s-interactive-interface-sett.patch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Thu, 11 May 2017 07:47:02 GMT) Full text and rfc822 format available.

Message #8 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: ng0 <ng0 <at> pragmatique.xyz>
To: Leo Famulari <leo <at> famulari.name>
Cc: 26875 <at> debbugs.gnu.org
Subject: Re: bug#26875: Non-graphical (and other types) of GRUB interfaces
Date: Thu, 11 May 2017 07:46:36 +0000
Leo Famulari transcribed 9.9K bytes:
> This patch exposes the GRUB configuration options that control where and
> how the user interface is presented. Generally, you can use it to put
> the GRUB menu on a serial port, get a text-only menu on the kernel
> console, or even use Morse code on the PC speaker (untested!).
> 
> You can use it like this, for example:
> 
> (bootloader (grub-configuration
>             (device "/dev/sda")
>             (terminal-outputs '(gfxterm console))
>             (terminal-inputs '(serial console usb_keyboard))
>             (serial-speed 115200)
>             (serial-unit 0)))
> 
> Since this offers new ways to break your system, the patch sets up some
> input validation. Hopefully it's enough.
> 
> The general idea came from this conversation:
> 
> https://lists.gnu.org/archive/html/guix-devel/2017-04/msg00053.html
> 
> Your feedback?

Without testing it, this looks like it could fix the use of GuixSD
on IN-Berlin e.V. servers. At least the options are given, like
talked about in a level above this subthread.

> From 21ed0a8f364ce3cb784c0752e28600e8e786e295 Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo <at> famulari.name>
> Date: Thu, 11 May 2017 03:12:44 -0400
> Subject: [PATCH] system: grub: Expose GRUB's interactive interface settings.
> 
> * gnu/system/grub.scm (<grub-configuration>): Add new fields
> terminal-outputs, terminal-inputs, serial-unit, and serial-speed.
> (grub-setup-io, setup-gfxterm): New procedures.
> * doc/guix.texi (GRUB Configuration): Document the new fields.
> ---
>  doc/guix.texi       | 20 +++++++++++
>  gnu/system/grub.scm | 99 ++++++++++++++++++++++++++++++++++++++++++++---------
>  2 files changed, 102 insertions(+), 17 deletions(-)
> 
> diff --git a/doc/guix.texi b/doc/guix.texi
> index 81aa957c6..a1f7fdee6 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -15223,6 +15223,26 @@ The @code{grub-theme} object describing the theme to use.
>  
>  @item @code{grub} (default: @code{grub})
>  The GRUB package to use.
> +
> +@item @code{terminal-outputs} (default: @code{'gfxterm})
> +The output terminals used for the GRUB boot menu, as a list of symbols.
> +These values are accepted: console, serial, serial_{0-3}, gfxterm,
> +vga_text, mda_text, morse, spkmodem
> +
> +@item @code{terminal-inputs} (default: @code{'()})
> +The input terminals used for the GRUB boot menu, as a list of symbols.
> +The default is the native platform terminal as determined by GRUB at
> +run-time.  These values are accepted: console, serial, serial_{0-3},
> +at_keyboard, usb_keyboard.
> +
> +@item @code{serial-unit} (default: @code{#f})
> +The serial unit used by GRUB, as an integer from 0 to 3.  The default
> +value is chosen by GRUB at run-time; currently GRUB chooses 0, which
> +corresponds to COM1.
> +
> +@item @code{serial-speed} (default: @code{#f})
> +The speed of the serial interface, as an integer.  The default value is
> +chosen by GRUB at run-time; currently GRUB chooses 9600bps.
>  @end table
>  
>  @end deftp
> diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
> index 58096429f..b5b8c8c8a 100644
> --- a/gnu/system/grub.scm
> +++ b/gnu/system/grub.scm
> @@ -1,6 +1,7 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
>  ;;; Copyright © 2016 Chris Marusich <cmmarusich <at> gmail.com>
> +;;; Copyright © 2017 Leo Famulari <leo <at> famulari.name>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -108,17 +109,25 @@ denoting a file name."
>  (define-record-type* <grub-configuration>
>    grub-configuration make-grub-configuration
>    grub-configuration?
> -  (grub            grub-configuration-grub           ; package
> -                   (default (@ (gnu packages bootloaders) grub)))
> -  (device          grub-configuration-device)        ; string
> -  (menu-entries    grub-configuration-menu-entries   ; list
> -                   (default '()))
> -  (default-entry   grub-configuration-default-entry  ; integer
> -                   (default 0))
> -  (timeout         grub-configuration-timeout        ; integer
> -                   (default 5))
> -  (theme           grub-configuration-theme          ; <grub-theme>
> -                   (default %default-theme)))
> +  (grub             grub-configuration-grub             ; package
> +                    (default (@ (gnu packages bootloaders) grub)))
> +  (device           grub-configuration-device)          ; string
> +  (menu-entries     grub-configuration-menu-entries     ; list
> +                    (default '()))
> +  (default-entry    grub-configuration-default-entry    ; integer
> +                    (default 0))
> +  (timeout          grub-configuration-timeout          ; integer
> +                    (default 5))
> +  (theme            grub-configuration-theme            ; <grub-theme>
> +                    (default %default-theme))
> +  (terminal-outputs grub-configuration-terminal-outputs ; list of symbols
> +                    (default '(gfxterm)))
> +  (terminal-inputs  grub-configuration-terminal-inputs  ; list of symbols
> +                    (default '()))
> +  (serial-unit      grub-configuration-serial-unit      ; integer | #f
> +                    (default #f))
> +  (serial-speed     grub-configuration-serial-speed     ; integer | #f
> +                    (default #f)))
>  
>  (define-record-type* <menu-entry>
>    menu-entry make-menu-entry
> @@ -199,11 +208,16 @@ system string---e.g., \"x86_64-linux\"."
>      insmod vbe
>      insmod vga
>    fi
> -
> -  terminal_output gfxterm
>  "
>          ""))
>  
> +  (define (setup-gfxterm config font-file)
> +    (if (memq 'gfxterm (grub-configuration-terminal-outputs config))
> +      #~(format #f "if loadfont ~a; then
> +  setup_gfxterm
> +fi~%" #$font-file)
> +      ""))
> +
>    (define (theme-colors type)
>      (let* ((theme  (grub-configuration-theme config))
>             (colors (type theme)))
> @@ -222,9 +236,8 @@ function setup_gfxterm {~a}
>  # Set 'root' to the partition that contains /gnu/store.
>  ~a
>  
> -if loadfont ~a; then
> -  setup_gfxterm
> -fi
> +~a
> +~a
>  
>  insmod png
>  if background_image ~a; then
> @@ -236,7 +249,8 @@ else
>  fi~%"
>                             #$setup-gfxterm-body
>                             #$(grub-root-search store-device font-file)
> -                           #$font-file
> +                           #$(grub-setup-io config)
> +                           #$(setup-gfxterm config font-file)
>  
>                             #$(strip-mount-point store-mount-point image)
>                             #$(theme-colors grub-theme-color-normal)
> @@ -247,6 +261,57 @@ fi~%"
>  ;;; Configuration file.
>  ;;;
>  
> +(define (grub-setup-io config)
> +  "Return GRUB commands to configure the input / output interfaces.  The result
> +is a string that can be inserted in grub.cfg."
> +  (let* ((symbols->string (lambda (list)
> +                           (string-join (map symbol->string list) " ")))
> +         (outputs (grub-configuration-terminal-outputs config))
> +         (inputs (grub-configuration-terminal-inputs config))
> +         (unit (grub-configuration-serial-unit config))
> +         (speed (grub-configuration-serial-speed config))
> +
> +         ;; Respectively, GRUB_TERMINAL_OUTPUT and GRUB_TERMINAL_INPUT,
> +         ;; as documented in GRUB manual section "Simple Configuration
> +         ;; Handling".
> +         (valid-outputs '(console serial serial_0 serial_1 serial_2 serial_3
> +                          gfxterm vga_text mda_text morse spkmodem))
> +         (valid-inputs '(console serial serial_0 serial_1 serial_2 serial_3
> +                         at_keyboard usb_keyboard))
> +
> +         (io (string-append
> +               "terminal_output "
> +               (symbols->string
> +                 (map
> +                   (lambda (output)
> +                     (if (memq output valid-outputs) output #f)) outputs)) "\n"
> +               (if (null? inputs)
> +                 ""
> +                 (string-append
> +                   "terminal_input "
> +                   (symbols->string
> +                     (map
> +                       (lambda (input)
> +                         (if (memq input valid-inputs) input #f)) inputs)) "\n"))
> +               ;; UNIT and SPEED are arguments to the same GRUB command
> +               ;; ("serial"), so we process them together.
> +               (if (or unit speed)
> +                 (string-append
> +                   "serial"
> +                   (if unit
> +                     ;; COM ports 0 through 3
> +                     (if (and (exact-integer? unit) (<= unit 3) (>= unit 0))
> +                       (string-append " --unit=" (number->string unit))
> +                       #f)
> +                     "")
> +                   (if speed
> +                     (if (exact-integer? speed)
> +                       (string-append " --speed=" (number->string speed))
> +                       #f)
> +                     ""))
> +                 ""))))
> +    (format #f "~a" io)))
> +
>  (define (grub-root-search device file)
>    "Return the GRUB 'search' command to look for DEVICE, which contains FILE,
>  a gexp.  The result is a gexp that can be inserted in the grub.cfg-generation
> -- 
> 2.13.0
> 




-- 
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/




Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Sat, 13 May 2017 05:16:01 GMT) Full text and rfc822 format available.

Message #11 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 26875 <at> debbugs.gnu.org
Subject: Re: bug#26875: Non-graphical (and other types) of GRUB interfaces
Date: Sat, 13 May 2017 01:15:43 -0400
On Thu, May 11, 2017 at 07:46:36AM +0000, ng0 wrote:
> Without testing it, this looks like it could fix the use of GuixSD
> on IN-Berlin e.V. servers. At least the options are given, like
> talked about in a level above this subthread.

It works in QEMU, so hopefully it will work on VPS providers like
IN-Berlin.

I'm sending version 2 of the patch. It fixes a texinfo syntax error in
the manual that I added just before sending the earlier patch.




Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Sat, 13 May 2017 05:22:02 GMT) Full text and rfc822 format available.

Message #14 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: 26875 <at> debbugs.gnu.org
Subject: [v2] system: grub: Expose GRUB's interactive interface settings.
Date: Sat, 13 May 2017 01:21:02 -0400
* gnu/system/grub.scm (<grub-configuration>): Add new fields
terminal-outputs, terminal-inputs, serial-unit, and serial-speed.
(grub-setup-io, setup-gfxterm): New procedures.
* doc/guix.texi (GRUB Configuration): Document the new fields.
---
 doc/guix.texi       | 20 +++++++++++
 gnu/system/grub.scm | 99 ++++++++++++++++++++++++++++++++++++++++++++---------
 2 files changed, 102 insertions(+), 17 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 5227ad4ba..207045b7b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15225,6 +15225,26 @@ The @code{grub-theme} object describing the theme to use.
 
 @item @code{grub} (default: @code{grub})
 The GRUB package to use.
+
+@item @code{terminal-outputs} (default: @code{'gfxterm})
+The output terminals used for the GRUB boot menu, as a list of symbols.
+These values are accepted: console, serial, serial_@{0-3@}, gfxterm,
+vga_text, mda_text, morse, spkmodem
+
+@item @code{terminal-inputs} (default: @code{'()})
+The input terminals used for the GRUB boot menu, as a list of symbols.
+The default is the native platform terminal as determined by GRUB at
+run-time.  These values are accepted: console, serial, serial_@{0-3@},
+at_keyboard, usb_keyboard.
+
+@item @code{serial-unit} (default: @code{#f})
+The serial unit used by GRUB, as an integer from 0 to 3.  The default
+value is chosen by GRUB at run-time; currently GRUB chooses 0, which
+corresponds to COM1.
+
+@item @code{serial-speed} (default: @code{#f})
+The speed of the serial interface, as an integer.  The default value is
+chosen by GRUB at run-time; currently GRUB chooses 9600bps.
 @end table
 
 @end deftp
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index 58096429f..97081d848 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2016 Chris Marusich <cmmarusich <at> gmail.com>
+;;; Copyright © 2017 Leo Famulari <leo <at> famulari.name>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -108,17 +109,25 @@ denoting a file name."
 (define-record-type* <grub-configuration>
   grub-configuration make-grub-configuration
   grub-configuration?
-  (grub            grub-configuration-grub           ; package
-                   (default (@ (gnu packages bootloaders) grub)))
-  (device          grub-configuration-device)        ; string
-  (menu-entries    grub-configuration-menu-entries   ; list
-                   (default '()))
-  (default-entry   grub-configuration-default-entry  ; integer
-                   (default 0))
-  (timeout         grub-configuration-timeout        ; integer
-                   (default 5))
-  (theme           grub-configuration-theme          ; <grub-theme>
-                   (default %default-theme)))
+  (grub             grub-configuration-grub             ; package
+                    (default (@ (gnu packages bootloaders) grub)))
+  (device           grub-configuration-device)          ; string
+  (menu-entries     grub-configuration-menu-entries     ; list
+                    (default '()))
+  (default-entry    grub-configuration-default-entry    ; integer
+                    (default 0))
+  (timeout          grub-configuration-timeout          ; integer
+                    (default 5))
+  (theme            grub-configuration-theme            ; <grub-theme>
+                    (default %default-theme))
+  (terminal-outputs grub-configuration-terminal-outputs ; list of symbols
+                    (default '(gfxterm)))
+  (terminal-inputs  grub-configuration-terminal-inputs  ; list of symbols
+                    (default '()))
+  (serial-unit      grub-configuration-serial-unit      ; integer | #f
+                    (default #f))
+  (serial-speed     grub-configuration-serial-speed     ; integer | #f
+                    (default #f)))
 
 (define-record-type* <menu-entry>
   menu-entry make-menu-entry
@@ -199,11 +208,16 @@ system string---e.g., \"x86_64-linux\"."
     insmod vbe
     insmod vga
   fi
-
-  terminal_output gfxterm
 "
         ""))
 
+  (define (setup-gfxterm config font-file)
+    (if (memq 'gfxterm (grub-configuration-terminal-outputs config))
+      #~(format #f "if loadfont ~a; then
+  setup_gfxterm
+fi~%" #$font-file)
+      ""))
+
   (define (theme-colors type)
     (let* ((theme  (grub-configuration-theme config))
            (colors (type theme)))
@@ -222,9 +236,8 @@ function setup_gfxterm {~a}
 # Set 'root' to the partition that contains /gnu/store.
 ~a
 
-if loadfont ~a; then
-  setup_gfxterm
-fi
+~a
+~a
 
 insmod png
 if background_image ~a; then
@@ -236,7 +249,8 @@ else
 fi~%"
                            #$setup-gfxterm-body
                            #$(grub-root-search store-device font-file)
-                           #$font-file
+                           #$(grub-setup-io config)
+                           #$(setup-gfxterm config font-file)
 
                            #$(strip-mount-point store-mount-point image)
                            #$(theme-colors grub-theme-color-normal)
@@ -247,6 +261,57 @@ fi~%"
 ;;; Configuration file.
 ;;;
 
+(define (grub-setup-io config)
+  "Return GRUB commands to configure the input / output interfaces.  The result
+is a string that can be inserted in grub.cfg."
+  (let* ((symbols->string (lambda (list)
+                           (string-join (map symbol->string list) " ")))
+         (outputs (grub-configuration-terminal-outputs config))
+         (inputs (grub-configuration-terminal-inputs config))
+         (unit (grub-configuration-serial-unit config))
+         (speed (grub-configuration-serial-speed config))
+
+         ;; Respectively, GRUB_TERMINAL_OUTPUT and GRUB_TERMINAL_INPUT,
+         ;; as documented in GRUB manual section "Simple Configuration
+         ;; Handling".
+         (valid-outputs '(console serial serial_0 serial_1 serial_2 serial_3
+                          gfxterm vga_text mda_text morse spkmodem))
+         (valid-inputs '(console serial serial_0 serial_1 serial_2 serial_3
+                         at_keyboard usb_keyboard))
+
+         (io (string-append
+               "terminal_output "
+               (symbols->string
+                 (map
+                   (lambda (output)
+                     (if (memq output valid-outputs) output #f)) outputs)) "\n"
+               (if (null? inputs)
+                 ""
+                 (string-append
+                   "terminal_input "
+                   (symbols->string
+                     (map
+                       (lambda (input)
+                         (if (memq input valid-inputs) input #f)) inputs)) "\n"))
+               ;; UNIT and SPEED are arguments to the same GRUB command
+               ;; ("serial"), so we process them together.
+               (if (or unit speed)
+                 (string-append
+                   "serial"
+                   (if unit
+                     ;; COM ports 1 through 4
+                     (if (and (exact-integer? unit) (<= unit 3) (>= unit 0))
+                       (string-append " --unit=" (number->string unit))
+                       #f)
+                     "")
+                   (if speed
+                     (if (exact-integer? speed)
+                       (string-append " --speed=" (number->string speed))
+                       #f)
+                     ""))
+                 ""))))
+    (format #f "~a" io)))
+
 (define (grub-root-search device file)
   "Return the GRUB 'search' command to look for DEVICE, which contains FILE,
 a gexp.  The result is a gexp that can be inserted in the grub.cfg-generation
-- 
2.13.0





Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Sat, 13 May 2017 13:52:02 GMT) Full text and rfc822 format available.

Message #17 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>, 26875 <at> debbugs.gnu.org
Subject: Re: bug#26875: [v2] system: grub: Expose GRUB's interactive interface
 settings.
Date: Sat, 13 May 2017 15:51:27 +0200
Hi Leo,

Leo Famulari <leo <at> famulari.name> skribis:

> * gnu/system/grub.scm (<grub-configuration>): Add new fields
> terminal-outputs, terminal-inputs, serial-unit, and serial-speed.
> (grub-setup-io, setup-gfxterm): New procedures.
> * doc/guix.texi (GRUB Configuration): Document the new fields.

Overall LGTM.  Nice to see it taking shape!

Some minor comments and suggestions:

> +@item @code{terminal-outputs} (default: @code{'gfxterm})
> +The output terminals used for the GRUB boot menu, as a list of symbols.
> +These values are accepted: console, serial, serial_@{0-3@}, gfxterm,
> +vga_text, mda_text, morse, spkmodem

Please use @code for the possible, add a final period, and a
cross-reference to the relevant part of the GRUB manual with
“(@pxref{…})” if possible.

> +@item @code{terminal-inputs} (default: @code{'()})
> +The input terminals used for the GRUB boot menu, as a list of symbols.
> +The default is the native platform terminal as determined by GRUB at
> +run-time.  These values are accepted: console, serial, serial_@{0-3@},
> +at_keyboard, usb_keyboard.
> +
> +@item @code{serial-unit} (default: @code{#f})
> +The serial unit used by GRUB, as an integer from 0 to 3.  The default
> +value is chosen by GRUB at run-time; currently GRUB chooses 0, which
> +corresponds to COM1.

Likewise.

> +@item @code{serial-speed} (default: @code{#f})
> +The speed of the serial interface, as an integer.  The default value is
> +chosen by GRUB at run-time; currently GRUB chooses 9600bps.

9,600 <at> tie{}bps.  :-)

Apart from that, as long as “make check-system TESTS=basic” and similar
pass, that’s all good for me!

Mathieu: is it OK to apply this before the patch series on non-GRUB
bootloaders?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Sat, 13 May 2017 16:41:01 GMT) Full text and rfc822 format available.

Message #20 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Mathieu Othacehe <m.othacehe <at> gmail.com>, 26875 <at> debbugs.gnu.org
Subject: Re: bug#26875: [v2] system: grub: Expose GRUB's interactive
 interface settings.
Date: Sat, 13 May 2017 12:40:32 -0400
[Message part 1 (text/plain, inline)]
On Sat, May 13, 2017 at 03:51:27PM +0200, Ludovic Courtès wrote:
> > +@item @code{terminal-outputs} (default: @code{'gfxterm})
> > +The output terminals used for the GRUB boot menu, as a list of symbols.
> > +These values are accepted: console, serial, serial_@{0-3@}, gfxterm,
> > +vga_text, mda_text, morse, spkmodem
> 
> Please use @code for the possible, add a final period, and a
> cross-reference to the relevant part of the GRUB manual with
> “(@pxref{…})” if possible.

Okay!

> 
> > +@item @code{terminal-inputs} (default: @code{'()})
> > +The input terminals used for the GRUB boot menu, as a list of symbols.
> > +The default is the native platform terminal as determined by GRUB at
> > +run-time.  These values are accepted: console, serial, serial_@{0-3@},
> > +at_keyboard, usb_keyboard.
> > +
> > +@item @code{serial-unit} (default: @code{#f})
> > +The serial unit used by GRUB, as an integer from 0 to 3.  The default
> > +value is chosen by GRUB at run-time; currently GRUB chooses 0, which
> > +corresponds to COM1.
> 
> Likewise.

Yes!

> 
> > +@item @code{serial-speed} (default: @code{#f})
> > +The speed of the serial interface, as an integer.  The default value is
> > +chosen by GRUB at run-time; currently GRUB chooses 9600bps.
> 
> 9,600 <at> tie{}bps.  :-)

Sure!

> Apart from that, as long as “make check-system TESTS=basic” and similar
> pass, that’s all good for me!

I tried the basic, btrfs-root-os, and encrypted-root-os tests. Testers
should note this is an ABI break.

> Mathieu: is it OK to apply this before the patch series on non-GRUB
> bootloaders?

I'll wait for this response.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Sun, 14 May 2017 07:39:02 GMT) Full text and rfc822 format available.

Message #23 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <m.othacehe <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 26875 <at> debbugs.gnu.org, Leo Famulari <leo <at> famulari.name>
Subject: Re: bug#26875: [v2] system: grub: Expose GRUB's interactive interface
 settings.
Date: Sun, 14 May 2017 09:38:24 +0200
> Mathieu: is it OK to apply this before the patch series on non-GRUB
> bootloaders?

Yes no problem ! This doesn't seems to difficult to rebase on top of my
serie. I guess "serial-unit" and "serial-speed" could fit in generic
"bootloader-configuration". I'm not sure for "terminal_inputs/outputs"
that seem grub specific.

Mathieu




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Sun, 14 May 2017 18:18:01 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Sun, 14 May 2017 18:18:02 GMT) Full text and rfc822 format available.

Message #28 received at 26875-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Mathieu Othacehe <m.othacehe <at> gmail.com>
Cc: 26875-done <at> debbugs.gnu.org,
 Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#26875: [v2] system: grub: Expose GRUB's interactive
 interface settings.
Date: Sun, 14 May 2017 14:17:52 -0400
On Sun, May 14, 2017 at 09:38:24AM +0200, Mathieu Othacehe wrote:
> 
> > Mathieu: is it OK to apply this before the patch series on non-GRUB
> > bootloaders?
> 
> Yes no problem !

Awesome! Pushed as e0b2e93005188ab4d6c7413a27832ba2fb7388e8.

> This doesn't seems to difficult to rebase on top of my
> serie. I guess "serial-unit" and "serial-speed" could fit in generic
> "bootloader-configuration". I'm not sure for "terminal_inputs/outputs"
> that seem grub specific.

Yes, the serial-unit (aka COM port) and serial-speed seem generically
useful on their own, as long you take care to handle the different
numbering between GRUB's serial-unit (zero indexed) and the COM port
numbering (indexed from 1).

The terminal inputs and outputs are generic only at the highest level.
At least, the choice between a graphical and text / curses interface
seeems universal. But of course other bootloader implementations will
support their own set of interfaces, and they may require extra
configuration.




Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Mon, 15 May 2017 09:37:02 GMT) Full text and rfc822 format available.

Message #31 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <brendan.tildesley <at> openmailbox.org>
To: 26875 <at> debbugs.gnu.org
Cc: leo <at> famulari.name
Subject: Re: Non-graphical (and other types) of GRUB interfaces
Date: Mon, 15 May 2017 19:36:01 +1000
I just updated to the latest git and rebooted to find the GRUB menu no
longer has the pretty GuixSD logo, but has fallen back to a
ncurses-looking blue box on black. Looks like it may be caused by this.
I haven't done any further investigation yet. What do you think?





Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Mon, 15 May 2017 18:05:01 GMT) Full text and rfc822 format available.

Message #34 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Brendan Tildesley <brendan.tildesley <at> openmailbox.org>
Cc: 26875 <at> debbugs.gnu.org
Subject: Re: Non-graphical (and other types) of GRUB interfaces
Date: Mon, 15 May 2017 14:04:45 -0400
On Mon, May 15, 2017 at 07:36:01PM +1000, Brendan Tildesley wrote:
> I just updated to the latest git and rebooted to find the GRUB menu no
> longer has the pretty GuixSD logo, but has fallen back to a
> ncurses-looking blue box on black. Looks like it may be caused by this.
> I haven't done any further investigation yet. What do you think?

Hm, that's not supposed to happen unless you tell it to.
Investigating...




Information forwarded to guix-patches <at> gnu.org:
bug#26875; Package guix-patches. (Mon, 15 May 2017 20:26:02 GMT) Full text and rfc822 format available.

Message #37 received at 26875 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Brendan Tildesley <brendan.tildesley <at> openmailbox.org>
Cc: 26875 <at> debbugs.gnu.org
Subject: Re: Non-graphical (and other types) of GRUB interfaces
Date: Mon, 15 May 2017 16:25:28 -0400
[Message part 1 (text/plain, inline)]
On Mon, May 15, 2017 at 07:36:01PM +1000, Brendan Tildesley wrote:
> I just updated to the latest git and rebooted to find the GRUB menu no
> longer has the pretty GuixSD logo, but has fallen back to a
> ncurses-looking blue box on black. Looks like it may be caused by this.
> I haven't done any further investigation yet. What do you think?

The problem was that the elements of the generated GRUB configuration
file were in the wrong order. Even when the graphical menu should have
been displayed (it's still the default), various bits of GRUB scripting
failed.

Fixed in c48a145fbb613ac2b623f0a11278848923b312f1

Sorry for this! I tested that the correct menu got displayed in the
default case relatively early in development of this change. Later on I
only checked that the generated GRUB configuration looked correct,
because it's expensive (time and disk space) to test changes like this.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 13 Jun 2017 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.