diff --git a/post-debootstrap-installer.sh b/post-debootstrap-installer.sh index 35233fc..39e0796 100755 --- a/post-debootstrap-installer.sh +++ b/post-debootstrap-installer.sh @@ -38,12 +38,12 @@ cat /hardware-setup/authorized_keys/* > /etc/dropbear/initramfs/authorized_keys # install grub if [ -d /sys/firmware/efi ]; then apt-get -y install grub-efi-amd64 - grub-install else apt-get -y install grub-pc - grub-install "$(findmnt --noheadings --output SOURCE /boot)" + boot_disk="/dev/$(lsblk --noheadings --output PKNAME $(findmnt --noheadings --output SOURCE /boot))" + grub-install "$boot_disk" fi # edit uuids in fstab