From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: Non-graphical GRUB configuration Date: Sun, 2 Apr 2017 17:06:20 -0400 Message-ID: <20170402210620.GA26945@jasmine> References: <20170331125956.rhlwjg45vwo3pgwh@abyayala> <20170331234321.GA10435@jasmine> <20170401072740.kgzz3zbtikn5hpg5@abyayala> <20170401202901.GA10480@jasmine> <86vaqmwz3c.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cumhf-0004re-Ev for guix-devel@gnu.org; Sun, 02 Apr 2017 17:06:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cumhc-0000aP-AC for guix-devel@gnu.org; Sun, 02 Apr 2017 17:06:27 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41579) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cumhb-0000YS-W3 for guix-devel@gnu.org; Sun, 02 Apr 2017 17:06:24 -0400 Content-Disposition: inline In-Reply-To: <86vaqmwz3c.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: myglc2 Cc: guix-devel@gnu.org --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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'? > 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 > =20 > - terminal_output gfxterm > + serial --unit=3D0 --speed=3D115200 > + terminal_input serial console; terminal_output console > " > "")) > =20 Based on the GRUB manual [0], how about this plan? We'd add these fields to (grub-configuration):=20 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 serial-speed: GRUB default is 9600. Should this be an arbitrary integer, or should we offer a list of values? 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 They would correspond to the GRUB configuration keys GRUB_TERMINAL_OUTPUT, GRUB_TERMINAL_INPUT, and GRUB_SERIAL_COMMAND, 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] https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html https://www.gnu.org/software/grub/manual/html_node/terminal_005foutput.html https://www.gnu.org/software/grub/manual/html_node/terminal_005finput.html https://www.gnu.org/software/grub/manual/html_node/serial.html --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAljhZ8gACgkQJkb6MLrK fwjWBA//e0LE39GGXsXtAvDgq51zkyNKlOyZX1lQBzLcHicVSo6tcsmKDoAHw6Tb VuI0FrjyYIgicGdEEKhBA8bUtQrOjZd/1Ui2MMnMfQobk9vmr93vfT1bKY3aqNCF dQn/r+pZYmXxi5lqrxHQzqlRFDMU3lDkbeUYCCVj+7BBKu0HQgvzfMqwzzPkisTx Hib+aH19fiRsDGykmEIDas17S336tanlk3OlBAloX5ikvY54XNMDramrhP8NskXs 6NNNEQPvmRDewsSiPoVGJpeT0LLHyPvSFGAV5mT/vLa/nCdG496JXFV00V1ZRF12 ppydFQz7TTE969qE6zrgH5obEgLQV4IQFfK/SwCqjxkCKUrOIiIk9RYElk+mOIhO fVljR1rZa81Wc9M0WgqKghKAdXfVMcaERoIgnZDzCfWAis36Gtshb3MLQWIpzl9q 6LPYbgByOAa1KM3NsBi5m/UHJZrg9x2LZ6S+JpixxNuk1yEmuwie4TmmgAOyKHfL MHJ8ejmE+qEtQuIkphLgDeTAJvD3dVpvn5juTLkEPJzEJNJZsHElyYxKh/piqMCe rdIH2YghHUfJelXgKVsz4c63xirY6nefX14YUuEx7rgpiAwo1DX5eyE+lt15fUza 7Zjp8p+mAp8bOpU8LuSDx6Ee7lSf01k+7/nrciEA0TN0uOwEFtk= =8z2Y -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--