GNU bug report logs - #26334
[PATCH 1/1] system: grub: Enable the use of a non-graphical GRUB menu.

Previous Next

Package: guix-patches;

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

Date: Sat, 1 Apr 2017 20:23:02 UTC

Severity: normal

Tags: patch

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 26334 in the body.
You can then email your comments to 26334 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#26334; Package guix-patches. (Sat, 01 Apr 2017 20:23: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. (Sat, 01 Apr 2017 20:23: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: [PATCH 1/1] system: grub: Enable the use of a non-graphical GRUB menu.
Date: Sat,  1 Apr 2017 16:22:32 -0400
* gnu/system/grub.scm (<grub-configuration>)[graphical?]: New field.
(eye-candy)[setup-gfxterm-body]: Use 'graphical?'.
* doc/guix.texi (GRUB Configuration): Document 'graphical?'.
---
 doc/guix.texi       |  4 ++++
 gnu/system/grub.scm | 14 +++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 8da82b4d8..75fc76396 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -14915,6 +14915,10 @@ The @code{grub-theme} object describing the theme to use.
 
 @item @code{grub} (default: @code{grub})
 The GRUB package to use.
+
+@item @code{graphical?} (default: @code{#t})
+A Boolean field that controls whether the GRUB boot menu is graphical or
+text-based.
 @end table
 
 @end deftp
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index 4f9bde6a6..ad1bc8768 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -117,7 +117,9 @@ denoting a file name."
   (timeout         grub-configuration-timeout        ; integer
                    (default 5))
   (theme           grub-configuration-theme          ; <grub-theme>
-                   (default %default-theme)))
+                   (default %default-theme))
+  (graphical?      grub-configuration-graphical?     ; boolean
+                   (default #t)))
 
 (define-record-type* <menu-entry>
   menu-entry make-menu-entry
@@ -181,6 +183,7 @@ system string---e.g., \"x86_64-linux\"."
     ;; most other modern architectures have no other mode and therefore don't
     ;; need to be switched.
     (if (string-match "^(x86_64|i[3-6]86)-" system)
+      (string-append
         "
   # Leave 'gfxmode' to 'auto'.
   insmod video_bochs
@@ -198,10 +201,15 @@ system string---e.g., \"x86_64-linux\"."
     insmod vbe
     insmod vga
   fi
-
+"
+        (if (grub-configuration-graphical? config)
+          "
   terminal_output gfxterm
 "
-        ""))
+          "
+  terminal_output console
+")
+        "")))
 
   (define (theme-colors type)
     (let* ((theme  (grub-configuration-theme config))
-- 
2.12.2





Information forwarded to guix-patches <at> gnu.org:
bug#26334; Package guix-patches. (Sat, 01 Apr 2017 22:17:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 26334 <at> debbugs.gnu.org
Subject: Re: bug#26334: [PATCH 1/1] system: grub: Enable the use of a
 non-graphical GRUB menu.
Date: Sun, 02 Apr 2017 00:15:54 +0200
Hello!

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

> * gnu/system/grub.scm (<grub-configuration>)[graphical?]: New field.
> (eye-candy)[setup-gfxterm-body]: Use 'graphical?'.
> * doc/guix.texi (GRUB Configuration): Document 'graphical?'.

Would it be possible to detect whether graphical output is available
only in GRUB code?  Or is the use case a situation where graphical
output *is* supported but somehow undesirable?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#26334; Package guix-patches. (Sat, 01 Apr 2017 22:44:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 26334 <at> debbugs.gnu.org
Subject: Re: bug#26334: [PATCH 1/1] system: grub: Enable the use of a
 non-graphical GRUB menu.
Date: Sat, 1 Apr 2017 18:43:45 -0400
[Message part 1 (text/plain, inline)]
On Sun, Apr 02, 2017 at 12:15:54AM +0200, Ludovic Courtès wrote:
> Would it be possible to detect whether graphical output is available
> only in GRUB code?

I'm far from a GRUB expert...

Apparently, the terminal input and output devices default to the
"platform's native terminal {input,output}":
https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html

> Or is the use case a situation where graphical output *is* supported
> but somehow undesirable?

Yes, that is a potential use case. For example, I have a system based on
an embedded system-on-a-chip that includes a GPU, but no physical video
ports; I must use the serial port.

I also have this use case on a laptop as a consequence of
<https://bugs.gnu.org/24948>.

For both of those systems, I've been using a different patch that
has the same effect on the generated grub.cfg.

Perhaps instead of a graphical? toggle, we could expose the different
values of GRUB_TERMINAL_OUTPUT and GRUB_TERMINAL_INPUT:

https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#26334; Package guix-patches. (Sat, 01 Apr 2017 23:08:01 GMT) Full text and rfc822 format available.

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

From: ng0 <contact.ng0 <at> cryptolab.net>
To: Leo Famulari <leo <at> famulari.name>
Cc: Ludovic Courtès <ludo <at> gnu.org>, 26334 <at> debbugs.gnu.org
Subject: Re: bug#26334: [PATCH 1/1] system: grub: Enable the use of a
 non-graphical GRUB menu.
Date: Sun, 2 Apr 2017 00:06:38 +0000
Hi Leo,

thanks for publishing it this quickly :)

Leo Famulari transcribed 2.1K bytes:
> On Sun, Apr 02, 2017 at 12:15:54AM +0200, Ludovic Courtès wrote:
> > Would it be possible to detect whether graphical output is available
> > only in GRUB code?
> 
> I'm far from a GRUB expert...
> 
> Apparently, the terminal input and output devices default to the
> "platform's native terminal {input,output}":
> https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html
> 
> > Or is the use case a situation where graphical output *is* supported
> > but somehow undesirable?

Ludovic, for me this is for getting agetty work correctly with the
IN-Berlin facilities for their kvm vserver redirection to the real
server.
(going off-topic:)
I plan to get them into the loop of Guix Deploy. What's the status of
that meta project by the way? I don't live in Berlin but as I don't
think if Ricardo is even remotely interested (or has the time) to meet
with IN-Berlin and introduce them to Guix on servers. My idea is
roughly to check what their requirements for servers are, their
workflow, what they'd like to see improved and use this as a feedback
for the (yet to be developed) deploy function.
Furthermore I'd like to work an intermediate way for providing GuixSD
images which fit their use case without relying on myself as a provider.
Their requirement (as I see it from my position and experience with
them) is that the users ssh-pubkey is used for machine access from the
beginning on instead of password based login. So a way to define it in
the systemconfig would be one requirement I see.

> Yes, that is a potential use case. For example, I have a system based on
> an embedded system-on-a-chip that includes a GPU, but no physical video
> ports; I must use the serial port.
> 
> I also have this use case on a laptop as a consequence of
> <https://bugs.gnu.org/24948>.
> 
> For both of those systems, I've been using a different patch that
> has the same effect on the generated grub.cfg.
> 
> Perhaps instead of a graphical? toggle, we could expose the different
> values of GRUB_TERMINAL_OUTPUT and GRUB_TERMINAL_INPUT:
> 
> https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html






Information forwarded to guix-patches <at> gnu.org:
bug#26334; Package guix-patches. (Sat, 01 Apr 2017 23:17:01 GMT) Full text and rfc822 format available.

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

From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>,
	26334 <at> debbugs.gnu.org
Subject: Re: bug#26334: [PATCH 1/1] system: grub: Enable the use of a
 non-graphical GRUB menu.
Date: Sat, 1 Apr 2017 19:16:18 -0400
On Sun, Apr 02, 2017 at 12:06:38AM +0000, ng0 wrote:
> Ludovic, for me this is for getting agetty work correctly with the
> IN-Berlin facilities for their kvm vserver redirection to the real
> server.

Right, remote consoles are another use case for a non-graphical GRUB
menu.




Information forwarded to guix-patches <at> gnu.org:
bug#26334; Package guix-patches. (Sun, 02 Apr 2017 08:32:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 26334 <at> debbugs.gnu.org
Subject: Re: bug#26334: [PATCH 1/1] system: grub: Enable the use of a
 non-graphical GRUB menu.
Date: Sun, 02 Apr 2017 10:31:04 +0200
Heya!

ng0 <contact.ng0 <at> cryptolab.net> skribis:

> (going off-topic:)
> I plan to get them into the loop of Guix Deploy. What's the status of
> that meta project by the way?

You can check the ‘wip-deploy’ branch: it has initial interfaces, but
very little is implemented at this point.  Most of the building blocks
are there, though.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#26334; Package guix-patches. (Sun, 02 Apr 2017 08:35:02 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Leo Famulari <leo <at> famulari.name>
Cc: 26334 <at> debbugs.gnu.org
Subject: Re: bug#26334: [PATCH 1/1] system: grub: Enable the use of a
 non-graphical GRUB menu.
Date: Sun, 02 Apr 2017 10:34:01 +0200
Hi Leo!

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

> On Sun, Apr 02, 2017 at 12:15:54AM +0200, Ludovic Courtès wrote:
>> Would it be possible to detect whether graphical output is available
>> only in GRUB code?
>
> I'm far from a GRUB expert...
>
> Apparently, the terminal input and output devices default to the
> "platform's native terminal {input,output}":
> https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html
>
>> Or is the use case a situation where graphical output *is* supported
>> but somehow undesirable?
>
> Yes, that is a potential use case. For example, I have a system based on
> an embedded system-on-a-chip that includes a GPU, but no physical video
> ports; I must use the serial port.
>
> I also have this use case on a laptop as a consequence of
> <https://bugs.gnu.org/24948>.

Oh right.

> For both of those systems, I've been using a different patch that
> has the same effect on the generated grub.cfg.
>
> Perhaps instead of a graphical? toggle, we could expose the different
> values of GRUB_TERMINAL_OUTPUT and GRUB_TERMINAL_INPUT:
>
> https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html

Yes, that makes sense to me.  So I’d say add a ‘terminal-output’ field
instead of ‘graphical?’, have that default to "gfxterm" (in which case
it does the current “if loadfont…; setup_gfxterm; fi”).

WDYT?

Thanks!

Ludo’.




Reply sent to Leo Famulari <leo <at> famulari.name>:
You have taken responsibility. (Thu, 11 May 2017 07:40:02 GMT) Full text and rfc822 format available.

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

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

From: Leo Famulari <leo <at> famulari.name>
To: 26334-done <at> debbugs.gnu.org
Subject: CLOSED [PATCH 1/1] system: grub: Enable the use of a non-graphical
 GRUB menu.
Date: Thu, 11 May 2017 03:39:33 -0400
[Message part 1 (text/plain, inline)]
Closing in favor of <https://bugs.gnu.org/26875>.
[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. (Thu, 08 Jun 2017 11:24:04 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.