Merge "Send custom parameters in bootloader to GRUB_CMDLINE"
This commit is contained in:
commit
ace33c0097
@ -12,3 +12,7 @@ Arguments
|
|||||||
|
|
||||||
* ``DIB_GRUB_TIMEOUT`` sets the ``grub`` menu timeout. It defaults to
|
* ``DIB_GRUB_TIMEOUT`` sets the ``grub`` menu timeout. It defaults to
|
||||||
5 seconds. Set this to 0 (no timeout) for fast boot times.
|
5 seconds. Set this to 0 (no timeout) for fast boot times.
|
||||||
|
|
||||||
|
* ``DIB_BOOTLOADER_DEFAULT_CMD_LINE`` sets the CMDLINE parameters that
|
||||||
|
are appended to the grub.cfg configuration. It defaults to
|
||||||
|
'nofb nomodeset vga=normal'
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
export DIB_BOOTLOADER_DEFAULT_CMDLINE=${DIB_BOOTLOADER_DEFAULT_CMDLINE:-"nofb nomodeset vga=normal"}
|
@ -144,14 +144,14 @@ function install_grub2 {
|
|||||||
DISTRO_NAME=${DISTRO_NAME:-}
|
DISTRO_NAME=${DISTRO_NAME:-}
|
||||||
case $DISTRO_NAME in
|
case $DISTRO_NAME in
|
||||||
'ubuntu'|'debian')
|
'ubuntu'|'debian')
|
||||||
sed -i -e 's/\(^GRUB_CMDLINE_LINUX.*\)"$/\1 nofb nomodeset vga=normal"/' /etc/default/grub
|
sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub
|
||||||
GRUB_MKCONFIG=update-grub
|
GRUB_MKCONFIG=update-grub
|
||||||
;;
|
;;
|
||||||
'fedora'|'centos7'|'centos')
|
'fedora'|'centos7'|'centos')
|
||||||
echo 'GRUB_CMDLINE_LINUX="nofb nomodeset vga=normal"' >>/etc/default/grub
|
echo "GRUB_CMDLINE_LINUX=\"${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"" >>/etc/default/grub
|
||||||
;;
|
;;
|
||||||
'opensuse')
|
'opensuse')
|
||||||
sed -i -e 's/\(^GRUB_CMDLINE_LINUX.*\)"$/\1 nofb nomodeset vga=normal"/' /etc/default/grub
|
sed -i -e "s/\(^GRUB_CMDLINE_LINUX.*\)\"$/\1 ${DIB_BOOTLOADER_DEFAULT_CMDLINE}\"/" /etc/default/grub
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user