From 3430fe5273fb868c49352eeb8871c1646ee6c6ab Mon Sep 17 00:00:00 2001 From: "David M. Johnson" Date: Wed, 27 Feb 2019 16:14:09 -0700 Subject: [PATCH] Set and export linuxconsoleargs variable for subsidiary configfile loads. We only want to have to hardcode the console info in the initial configfile, not in any network-loaded (bootinfo) config files. Those can now reference this variable in the linux command line to get the console set according to the initial grub2pxe configuration. --- emulab/grub.cfg | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/emulab/grub.cfg b/emulab/grub.cfg index 420cedc36..a99abdfb6 100644 --- a/emulab/grub.cfg +++ b/emulab/grub.cfg @@ -15,18 +15,28 @@ set diskdrivers=efi set netdrivers=efi if [ $console = vga ]; then + set linuxconsoleargs="console=tty0" true elif [ $console = sio1 ]; then serial --unit=0 --speed=115200 terminal_input serial terminal_output serial + set linuxconsoleargs="console=tty0 console=ttyS0,115200" elif [ $console = sio2 ]; then serial --unit=1 --speed=115200 terminal_input serial terminal_output serial + set linuxconsoleargs="console=tty0 console=ttyS1,115200" else + set linuxconsoleargs="console=tty0" echo "Unknown console $console, using VGA" fi +# +# Export this so that other grub.cfg files we load over the network +# (e.g. as part of the Emulab bootinfo process, to netboot other +# initramfses) have the right console settings. +# +export linuxconsoleargs insmod ext2 insmod ufs1 -- GitLab