unable to install GRUB in dummy on debian stretch in DELL PRECISION 5510
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
- Boot mode is "UEFI Only" (check the corresponding setting in the BIOS Setup).
- Factory installed Windows 10 booting, obviously, in UEFI mode (check the "BIOS mode" row in System Information, it should say UEFI).
The disk had 3 partitions:
- EFI System Partition
- Windows NTFS Partition
- Recovery Partition
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).
- 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).
- Partitioned the free space on the disk manually:
- Created a 256MB partition for
/boot
- 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).
- Created 3 LVM logical volumes for root, swap, and home.
- Created a 256MB partition for
- 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."
- 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
- Boot from the installation media from which you installed Debian.
- 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.
- 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'.
- Open
/etc/default/grub
in an editor (e.g., nano) and addGRUB_ENABLE_CRYPTODISK=y
as the last line. Save the file. - Run
apt-get install --reinstall grub-efi-amd64
update-grub
- 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.
Related videos on Youtube
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, 2022Comments
-
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 over 7 yearsWelcome to SU , are you using a gpt table?
-
Erick Chacon over 7 yearsSorry 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 over 7 yearsBoot 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 over 7 yearsThen, should I finish this installation (I have cancelled that) and then do what you suggest?
-
GAD3R over 7 yearsReinstall the system , Create the swap , root , bios_ grub partition .... the grub bootloader will be installed correctly on your dd
-
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 over 7 yearsIf you want to install Grub you need create it , if you want to add linux to windows bootloader you can skip it
-
Erick Chacon over 7 years@GAD3R Could you provide a detailed answer please?
-
Melroy van den Berg over 3 yearsThis is still an issue in the year 2020.. Come on Debian!
-
-
Erick Chacon over 7 yearsThis is the result of using boot-repair. dropbox.com/s/b54brzgo2q390kf/…
-
mxmlnkn about 5 yearsI 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 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 runapt-get install --reinstall grub-efi-amd64
andupdate-grub
.