]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
Debian grub2 config: set TERMINAL to 'serial console'
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 2 May 2017 15:42:26 +0000 (16:42 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 2 May 2017 16:17:19 +0000 (17:17 +0100)
It is usually useful to enable the BIOS option `continue redirection
after boot', where provided.  This shows messages from pxelinux etc.

But this can breaks serial access for grub, depending on the host.
(This is true on the noblings, for example.)

Using TERMINAL='serial console' provides the output to both (and would
take input from whichever presses a key).

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Osstest/Debian.pm

index acc4618c0d8e1be5d8c8b322c249fbb7eb097b8f..415505664a90a0ac7f8ff6f7f26366fb74ffb6df 100644 (file)
@@ -600,6 +600,9 @@ END
         target_editfile_root($ho, '/etc/default/grub', sub {
             my %k;
             while (<::EI>) {
+               # some bioses block the serial still so we try vga too
+               s/^(GRUB_TERMINAL=)(['"]?)serial\2\s*$/$1'serial console'\n/;
+
                 if (m/^\s*([A-Z_]+)\s*\=\s*(.*?)\s*$/) {
                     my ($k,$v) = ($1,$2);
                     $v =~ s/^\s*([\'\"])(.*)\1\s*$/$2/;