diff --git a/elements/bootloader/finalise.d/50-bootloader b/elements/bootloader/finalise.d/50-bootloader index eb902f6c7..b64f4e7df 100755 --- a/elements/bootloader/finalise.d/50-bootloader +++ b/elements/bootloader/finalise.d/50-bootloader @@ -137,7 +137,11 @@ function install_grub2 { echo 'GRUB_GFXPAYLOAD_LINUX=text' >>/etc/default/grub echo 'GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=ttyS0,115200 no_timer_check"' >>/etc/default/grub echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub - GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG" + if which grub2-mkconfig >/dev/null; then + GRUB_MKCONFIG="grub2-mkconfig -o $GRUB_CFG" + else + GRUB_MKCONFIG="grub-mkconfig -o $GRUB_CFG" + fi DISTRO_NAME=${DISTRO_NAME:-} case $DISTRO_NAME in 'ubuntu'|'debian')