Skip to contentSkip to conversation

Debian grub2 config: set TERMINAL to 'serial console'

PATCH New Ian Jackson 1 participant 1 message May 2, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Debian grub2 config: set TERMINAL to 'serial console'

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).

---
 Osstest/Debian.pm | 3 +++
 1 file changed, 3 insertions(+)
Osstest/Debian.pm +3 -0
index acc4618..4155056 100644
@@ -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/;
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel