[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-graphical GRUB configuration

From: myglc2
Subject: Re: Non-graphical GRUB configuration
Date: Sun, 02 Apr 2017 20:16:08 -0400
User-agent: mu4e 0.9.18; emacs 25.1.1

On 04/02/2017 at 21:06 Leo Famulari writes:

> On Sun, Apr 02, 2017 at 12:31:19PM -0400, myglc2 wrote:
>> I gather you are focused on KVM deployment, so this may be off-
>> topic. But FWIW, the patch that I use to run GRUB menus both locally on
>> the console and over IPMI SOL (serial over LAN) on an headless ASRock
>> server (MT-c224 w/ ASPEED 2300 BMC controller) is attached below.
> I think we can make it work on KVM and bare metal in the same commit :)
>> The important point is that 'terminal_output console' displays grub
>> menus on _both_ the local console and via serial ... but ... grub does
>> not receive the serial inputs ... unless ... 'terminal_input serial
>> console' is also specified.
> Okay, but your diff only selects the "console" terminal_output. Is that
> because the native console is accessed over the serial line? Or should
> it be 'terminal_output console serial'?

I grant you it seems odd, but with 'terminal_output console serial', the
grub output on the serial line is "garbled" in the sense that each line
is "doubled". Meanwhile, the appearance on the local console (on the
attached VGA display) is fine.

I don't know if this behavior is peculiar to this motherboard, or if
this is typical.

>> diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
>> index 4f9bde6a6..8199f6f0b 100644
>> --- a/gnu/system/grub.scm
>> +++ b/gnu/system/grub.scm
>> @@ -199,7 +199,8 @@ system string---e.g., \"x86_64-linux\"."
>>      insmod vga
>>    fi
>> -  terminal_output gfxterm
>> +  serial --unit=0 --speed=115200
>> +  terminal_input serial console; terminal_output console
>>  "
>>          ""))
> Based on the GRUB manual [0], how about this plan?
> We'd add these fields to (grub-configuration):
> terminal-outputs: One or more symbols: console, serial, gfxterm,
> ofconsole, vga_text. Default gfxterm.


> terminal-inputs: One or more symbols: console, serial, ofconsole,
> at_keyboard,usb_keyboard. Default unset.


> serial-unit: An integer from {0,1,2,3}, default 0


> serial-port: ??? I don't know which values are accepted

I don't think this is required.

> serial-speed: GRUB default is 9600. Should this be an arbitrary
> integer, or should we offer a list of values?

An integer is probably OK.

> serial-word: An integer from {5,6,7,8}, default 8
> serial-stop: An integer from {1,2}, default 1
> serial-parity: A symbol from {no, odd, even}, default no

I think you can skip these.

> They would correspond to the GRUB configuration keys
> respectively. [0]
> If 'terminal-inputs' or 'serial-*' are unset, we do what we do now:
> nothing. If 'terminal-outputs' is unset, we also do the same thing we
> now, which is set it to gfxterm.
> If any of them are set, we'd insert the corresponding text into the
> generated grub.cfg.
> If terminal-outputs does not include the symbol 'gfxterm', we'd disable
> the "setup_gfxterm" function.
> We can use the `grub-script-check` program to check the syntax of the
> generated grub.cfg.
> [0]

This seems very fine to me! Thanks - George

reply via email to

[Prev in Thread] Current Thread [Next in Thread]