2013-05-14 13:29:45 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# If lsb_release is missing, just do nothing.
|
|
|
|
DISTRO=`lsb_release -si` || true
|
|
|
|
|
|
|
|
GRUBFILE=""
|
|
|
|
|
2013-09-17 17:17:39 +00:00
|
|
|
echo 'GRUB_TERMINAL=console' >>/etc/default/grub
|
|
|
|
echo 'GRUB_GFXPAYLOAD_LINUX=text' >>/etc/default/grub
|
|
|
|
|
2013-05-14 13:29:45 +00:00
|
|
|
case $DISTRO in
|
|
|
|
'Ubuntu'|'Debian')
|
2013-09-17 17:17:39 +00:00
|
|
|
sed -i -e 's/\(^GRUB_CMDLINE_LINUX.*\)"$/\1 nofb nomodeset vga=normal"/' /etc/default/grub
|
|
|
|
update-grub
|
2013-05-14 13:29:45 +00:00
|
|
|
;;
|
|
|
|
'Fedora')
|
2013-07-16 16:52:21 +00:00
|
|
|
# By default the F19 cloud image is using extlinux to boot the image
|
2013-09-16 19:18:49 +00:00
|
|
|
if [ -f /boot/grub2/grub.cfg ]; then
|
2013-09-17 17:17:39 +00:00
|
|
|
echo 'GRUB_CMDLINE_LINUX="nofb nomodeset vga=normal"' >/etc/default/grub
|
2013-09-16 19:18:49 +00:00
|
|
|
sed -i -e 's/terminal_output gfxterm/terminal_output console/' /boot/grub2/grub.cfg
|
2013-09-17 17:17:39 +00:00
|
|
|
grub2-mkconfig -o /boot/grub2/grub.cfg
|
2013-09-16 19:18:49 +00:00
|
|
|
fi
|
2013-05-14 13:29:45 +00:00
|
|
|
;;
|
|
|
|
esac
|