7abd158346
Apply kernel command line parameters to force Linux to remain in text mode. Typical distro kernels quickly switch into a graphical screenmode and this is incompatible with common Lights Out Management hardware which is able to intercept text mode consoles to display them remotely. Change-Id: Id553972c4fd87e78c9e6fe344331a399913d965e
22 lines
481 B
Bash
Executable File
22 lines
481 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
# If lsb_release is missing, just do nothing.
|
|
DISTRO=`lsb_release -si` || true
|
|
|
|
GRUBFILE=""
|
|
|
|
case $DISTRO in
|
|
'Ubuntu'|'Debian')
|
|
sed -i -e 's/\(^GRUB_CMDLINE_LINUX.*\)"$/\1 nomodeset vga=normal"/' /etc/default/grub
|
|
;;
|
|
'Fedora')
|
|
echo 'GRUB_CMDLINE_LINUX="nomodeset vga=normal"' >/etc/default/grub
|
|
sed -i -e 's/terminal_output gfxterm/terminal_output console/' /boot/grub2/grub.cfg
|
|
;;
|
|
esac
|
|
|
|
echo 'GRUB_TERMINAL=console' >>/etc/default/grub
|
|
|