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

View File

@ -306,7 +306,9 @@ build-gentoo-chroot2() {
# Last few chroot steps, mostly involving GRUB # Last few chroot steps, mostly involving GRUB
read -p "Enter device to install GRUB to: " grubdev read -p "Enter device to install GRUB to: " grubdev
log "Configuring GRUB" 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" log "Installing GRUB"
grub-install "$grubdev" grub-install "$grubdev"
cat <<-EOF cat <<-EOF