Debian Installer: fix uefi efi grub install

It is possible that debian installer grub-install --force "dummy" failed" to install the uefi bootloader.

grub-installer: info: Running chroot /target grub-install --force "dummy"
grub-installer: Installing for x86_64-efi platform.
grub-installer: grub-install: warning: Cannot set EFI variable Boot0012
grub-installer: grub-install: warning: vars_set_variable: write() failed: No space left on device
grub-installer: grub-install: warning: _efi_set_variable_mode: ops->set_variable
grub-installer: grub-install: warning: failed-to register the EFI boot entry
  1. Press F2 to switch to debian installer second console
  2. Mount the efivars partition; changeroot to target; install grub again
  3. Verify via efibootmgr
  4. Switch back: Press F1 and reinstall grub via installer

Command line:

mount -t efivarfs efivarfs /target/sys/firmware/efi/efivars
chroot /target/
grub-install --force "dummy"
efibootmgr --verbose | grep debian

Links