Category: sysadmin Generated on 2016-04-20
source: https://askubuntu.com/questions/559007/is-it-still-possible-to-install-ubuntu-to-an-external-harddrive-with-uefi
EFI System Partitions = ESP
grub-efi-amd64-bin
package mkdir -p /mnt/esp
mount {/dev/sdb1} /mnt/esp
mkdir -p /mnt/rootfs
mount {/dev/sdb2} /mnt/rootfs
grub-install --efi-directory /mnt/esp --boot-directory /mnt/rootfs/boot --target x86_64-efi --removable $device
Note that $device is the whole device e.g. /dev/sdb, not a partition.
The parameter --target x86_64-efi
will ensure that UEFI images and modules will be installed to the given paths.
--removable
will install the UEFI image to the hardcoded path \EFI\BOOT\BOOT{arch}.EFI
for removable media, instead of a distribution specific path.
Your grub.cfg in /boot/grub/
should work with both boot methods.
grub-efi-amd64-bin
package.--removable
parameter.This also works if you just want to boot your exisitng UEFI installation on another computer.