1

I had installed Debian on my external HDD but for some reasons GRUB didn't get installed on the HDD EFI partition but instead on has been installed on the man disk where I was doing the Debian install.

I would like instead to 're' install manually GRUB with the grub-install binaries in the EFI partition of my HDD like that I can simply plug it in any computer I be able to boot into Debian.

I'm unsure how to do it with grub-install.

lsblk gives (removes the other disks):

sdd      8:48   0 931.5G  0 disk 
├─sdd1   8:49   0   200M  0 part /mnt/efi
├─sdd2   8:50   0 819.4G  0 part /media/ubuntu/John
├─sdd3   8:51   0   104G  0 part /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996
└─sdd4   8:52   0   7.9G  0 part 

what argument should I pass to grub install?

grub-install sdd1 ?

or

grub-install --efi-directory=/mnt/efi?

(I have mounted myself sdd1 to /mnt/efi) (I'm doing this from a live Unbuntu usb)

1 Answer 1

2

The command should be:

grub-install  /dev/sdd

The command grub-install without options should print un error if some additional option are required such as the target and the directory.

You can set the --efi-directory and --target option:

grub-install --target=x86_64-efi --efi-directory=/boot/efi /dev/sdd

--efi-directory=DIR

Use DIR as the EFI System Partition root. This option is only available on the EFI target platform.

Debian wiki: GrubEFIReinstall

2
  • But since I'm doing this from a live USB if I don't set the --root-directory, wont grub-install install it on /boot of the live usb?
    – Marco
    Commented Dec 28, 2018 at 13:35
  • grub-install --target=x86_64-efi --boot-directory /media/ubuntu/992fa2fd-51db-493b-92bb-bc08379fd996/boot/grub/ --efi-directory /mnt/efi/ Is that correct ?
    – Marco
    Commented Dec 28, 2018 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .