diskimage-builder/elements/base/finalise.d/52-force-text-mode-console
Dan Prince 15007cc184 Fedora 19 has no grub2 conf file.
This fixes ramdisk creation on Fedora 19.

Change-Id: Ica486473cecb93feac740ae905fba5f2a3723bc2
2013-09-16 12:21:59 -07:00

27 lines
642 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')
# By default the F19 cloud image is using extlinux to boot the image
[[ ! -d /boot/grub2 ]] && exit 0
echo 'GRUB_CMDLINE_LINUX="nomodeset vga=normal"' >/etc/default/grub
if [ -f /boot/grub2/grub.cfg ]; then
sed -i -e 's/terminal_output gfxterm/terminal_output console/' /boot/grub2/grub.cfg
fi
;;
esac
echo 'GRUB_TERMINAL=console' >>/etc/default/grub