unable to install GRUB in dummy on debian stretch in DELL PRECISION 5510

38,725

There seem to be multiple possible causes for this failure. In my case, Debian installer failed to configure /etc/default/grub correctly. The solution I will describe worked for my particular setup on a Thinkpad 13 Gen 2

Setup

  1. Boot mode is "UEFI Only" (check the corresponding setting in the BIOS Setup).
  2. Factory installed Windows 10 booting, obviously, in UEFI mode (check the "BIOS mode" row in System Information, it should say UEFI).
  3. The disk had 3 partitions:

    1. EFI System Partition
    2. Windows NTFS Partition
    3. Recovery Partition
  4. I wanted to keep Windows for a dual boot, so I shrank the Windows partition to get room for Debian (using the Disk Management tool under Windows).

  5. Ran Debian installation from a USB stick. The installer ran in the UEFI mode (there was a text line on the initial splash screen saying "Debian GNU/Linux UEFI Installer menu).
  6. Partitioned the free space on the disk manually:
    1. Created a 256MB partition for /boot
    2. Created an encrypted volume in the rest of the free space (the encrypted volume is what Debian installer seems to have a problem with during Grub installation later on).
    3. Created 3 LVM logical volumes for root, swap, and home.
  7. The installation ran smoothly until the "Install the Grub Boot Loader on a Hard Disk" step, at which the installer failed with the message: "Unable to install GRUB in dummy. Executing 'grub-install dummy' failed. This is a fatal error."
  8. I skipped the Grub installation step and continued the installation with the next step. The installation finished successfully, but on the reboot no Grub screen was displayed and Windows booted.

Solution

  1. Boot from the installation media from which you installed Debian.
  2. In the initial menu, go to Advanced options -> Rescue mode and go through the configuration process for the rescue mode until you get a shell prompt.
  3. In the shell prompt run:
    apt-get install --reinstall grub-efi-amd64
    This should fail with the message
    grub-install: error: attempt to install to encrypted disk without cryptodisk enabled. Set 'GRUB_ENABLE_CRYPTODISK=y' in file '/etc/default/grub'.
  4. Open /etc/default/grub in an editor (e.g., nano) and add GRUB_ENABLE_CRYPTODISK=y as the last line. Save the file.
  5. Run
    apt-get install --reinstall grub-efi-amd64
    update-grub
  6. Run exit and reboot.

You should now get a Grub menu with the options to boot Debian and Windows.

UPDATE

I found out that Debian installer ignored the separate /boot partition I created and tried to install Grub to the boot directory on the encrypted root partition. This caused the failure. So, instead of editing /etc/default/grub move the contents of the boot directory to a separate unencrypted /boot partition (note that the EFI Partition is mounted into /boot/efi) and then install Grub normally:
apt-get install --reinstall grub-efi-amd64
update-grub

If you use this solution, you will be prompted only once for a password to decrypt your encrypted partition.

Share:
38,725

Related videos on Youtube

Erick Chacon
Author by

Erick Chacon

I am a PhD student in Epidemiology and Statistics at Lancaster University. I am mainly attracted to spatio-temporal modelling, Bayesian statistics, advanced computational techniques and big data.

Updated on September 18, 2022

Comments

  • Erick Chacon
    Erick Chacon over 1 year

    I am trying do dual-boot my Dell Precision 5510 (1TB PCIe SSD), that came with windows 10, adding Debian stretch.

    First, I have disabled fast startup of windows and then and disabled secure boot. Then, when installing Debian from a bootable USB stick, in some moment, it prompt the windows installing grub boot loader. It shows the message looking for other operation systems for around half an hour and finally prompt the window error unable to install grub in dummy, executing grub-install dummy failed, fatal error. Hope someone can give a hand.

    • GAD3R
      GAD3R over 7 years
      Welcome to SU , are you using a gpt table?
    • Erick Chacon
      Erick Chacon over 7 years
      Sorry for the answer, explicitly I did not manage anything of a gpt table. But I think that the debian installer manage that when UEFI mode is recognized. If my answer is wrong, please guide me.
    • GAD3R
      GAD3R over 7 years
      Boot from a Linux Live USB/CD to repair the existing installation , Create a new partition flagged bios_grub Size = 1 M , Then create the chroot environment to reinstall grub , if you don't have a linux live USB reinstall Debian , do not forget to add the bios_grub partition
    • Erick Chacon
      Erick Chacon over 7 years
      Then, should I finish this installation (I have cancelled that) and then do what you suggest?
    • GAD3R
      GAD3R over 7 years
      Reinstall the system , Create the swap , root , bios_ grub partition .... the grub bootloader will be installed correctly on your dd
    • Erick Chacon
      Erick Chacon over 7 years
      @GAD3R Thanks for all your suggestion. Is it necessary to create this bios_grub partition when installing on UEFI mode? I have read that the installer should recognized the EFI partition (that is already on the disc) and install grub there.
    • GAD3R
      GAD3R over 7 years
      If you want to install Grub you need create it , if you want to add linux to windows bootloader you can skip it
    • Erick Chacon
      Erick Chacon over 7 years
      @GAD3R Could you provide a detailed answer please?
    • Melroy van den Berg
      Melroy van den Berg over 3 years
      This is still an issue in the year 2020.. Come on Debian!
  • Erick Chacon
    Erick Chacon over 7 years
    This is the result of using boot-repair. dropbox.com/s/b54brzgo2q390kf/…
  • mxmlnkn
    mxmlnkn about 5 years
    I have the exact same setup and problem as you but I don't understand your Update comment. Is the solution above it even needed anymore or a valid way? What do you mean by move the contents of the boot directory. I tried cp -r /boot/* /boot/efi/ and got a problem with a mismatching UUID...
  • SergiyKolesnikov
    SergiyKolesnikov about 5 years
    @mxmlnkn cp -r /boot/* /boot/efi/ is wrong and you should revert what you copied. What I mean by the update comment is that you should do steps 1-3. Then mount the unencrypted boot-partition to, for example, /mnt and copy everything from /boot (except /boot/efi) to /mnt. Then unmount the boot-partition from /mnt and mount it to /boot. Then run apt-get install --reinstall grub-efi-amd64 and update-grub.