tar2fs: add grub support

...for vm images; BIOS one tested, EFI one untested yet
but will be required for AArch64 VMs it seems.
This commit is contained in:
Алексей Шабалин 2018-11-26 21:19:10 +03:00 committed by Michael Shigorin
parent f35351d877
commit 11e1bf73db

View File

@ -300,6 +300,12 @@ image=/boot/vmlinuz
boot=$BLOCKDEV
$LILO_COMMON
EOF
elif [ -x "$ROOTFS"/usr/sbin/grub-efi-autoupdate ]; then
chroot "$ROOTFS" grub-mkconfig -o /boot/grub/grub.cfg
chroot "$ROOTFS" grub-install
elif [ -x "$ROOTFS"/usr/sbin/grub-autoupdate ]; then
chroot "$ROOTFS" grub-mkconfig -o /boot/grub/grub.cfg
chroot "$ROOTFS" grub-install --target=i386-pc "$LOOPDEV"
fi
if [ -n "$SUDO_USER" ]; then