#!/bin/bash set -x # load settings from config file . /etc/default/grub # create config grub-mkconfig -o /boot/grub/grub.cfg # install on ssd and hdd #grub-install --modules="$GRUB_PRELOAD_MODULES" /dev/sda grub-install --modules="$GRUB_PRELOAD_MODULES" /dev/sdb # sync and that's it sync