|
|
|
|
@ -308,7 +308,15 @@ echo ' echo "Failed to create dos file system for EFI partition - $errors"' >> /
|
|
|
|
|
echo " exit 100">> /mnt/setup-chroot.sh
|
|
|
|
|
echo "fi">> /mnt/setup-chroot.sh
|
|
|
|
|
echo "echo PARTUUID=$(blkid -s PARTUUID -o value /dev/disk/by-id/${firstdisk}-part2) /boot/efi vfat nofail,x-systemd.device-timeout=0 0 1 >> /etc/fstab" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "errors=\$(mount /boot/efi 2>&1 1>/dev/null && apt install -y grub-efi-amd64-signed shim-signed 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
echo "echo \"\"" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "echo \"Mounting /boot/efi and cleaning past boot items...\"" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "mount /boot/efi 2>&1 1>/dev/null" >> /mnt/setup-chroot.sh
|
|
|
|
|
# clear past boots
|
|
|
|
|
echo "for f in \`efibootmgr -v | grep -e '^Boot[0-9]\\+' | sed 's/^Boot\\([0-9]*\\).*/\\1/g'\`; do efibootmgr -b \$f -B; done" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo "echo \"Done.\"" >> /mnt/setup-chroot.sh
|
|
|
|
|
|
|
|
|
|
echo "errors=\$(apt install -y grub-efi-amd64-signed shim-signed 2>&1 1>/dev/null)" >> /mnt/setup-chroot.sh
|
|
|
|
|
echo 'if ! [ "$?" = "0" ]; then '>> /mnt/setup-chroot.sh
|
|
|
|
|
echo ' echo "Failed to mount EFI partition or install grub-EFI - $errors"' >> /mnt/setup-chroot.sh
|
|
|
|
|
echo " exit 1">> /mnt/setup-chroot.sh
|
|
|
|
|
|