fixed the chroot commands

This commit is contained in:
Patrick_Pluto 2024-11-11 07:39:40 +01:00
parent e7594e2556
commit e2a1d5fa18

View file

@ -23,15 +23,15 @@ mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
if command -v grub2-mkconfig &>/dev/null; then
if chroot /mnt /bin/bash -c "command -v grub2-mkconfig &>/dev/null;" then
chroot /mnt /bin/bash -c "grub2-mkconfig -o /boot/grub/grub.cfg"
elif command -v grub-mkconfig &>/dev/null; then
elif chroot /mnt /bin/bash -c "command -v grub-mkconfig &>/dev/null;" then
chroot /mnt /bin/bash -c "grub-mkconfig -o /boot/grub/grub.cfg"
fi
if command -v grub2-install &>/dev/null; then
if chroot /mnt /bin/bash -c "command -v grub2-install &>/dev/null;" then
chroot /mnt /bin/bash -c "grub2-install /dev/sda"
elif command -v grub-install &>/dev/null; then
elif chroot /mnt /bin/bash -c "command -v grub-install &>/dev/null;" then
chroot /mnt /bin/bash -c "grub-install /dev/sda"
fi