Make GRUB configuration more robust... and correct

This commit is contained in:
Salt 2020-12-04 06:08:21 -06:00
parent 8987f44a73
commit d78c141f29
1 changed files with 3 additions and 1 deletions

View File

@ -306,7 +306,9 @@ build-gentoo-chroot2() {
# Last few chroot steps, mostly involving GRUB
read -p "Enter device to install GRUB to: " grubdev
log "Configuring GRUB"
grub-mkconfig -o /boot/grub
[ -f /boot/grub ] && rm /boot/grub -f
[ -d /boot/grub ] || mkdir /boot/grub -p
grub-mkconfig -o /boot/grub/grub.cfg
log "Installing GRUB"
grub-install "$grubdev"
cat <<-EOF