diskimage-builder/elements/base/finalise.d/52-force-text-mode-console
Lucas Alvares Gomes 6f8b8f07b2 F19 GRUB configuration file
In the 51-grub hook, after the GRUB installation, the script will look
for a GRUB configuration file and in case it's not present one will
be generated using the grub-mkconfig command. The reason why it have
to be done is because the new Fedora 19 cloud images is using extlinux
by default.

Change-Id: I80b15b3122698d98ac4d47dc06faf5909a90ab00
2013-07-12 17:21:15 +01:00

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