This is useful for systems using (U)EFI, otherwise it needs
annoying manual work, so instead automate the steps, assuming
<device> is a valid EFI partition.
NOTE: we need /sys inside the target system, so ensure it's available.
Thanks: Darshaka Pathirana <dpat@syn-net.org> for the pair programming session