I have installed Debian Stretch onto an external USB drive that I plan to use as a portable installation that I can use on multiple computers, so I need to be able to boot it from the USB directly without creating an nvram entry in the UEFI. The problem is, the UEFI does not see the drive as bootable (it doesn't appear in the boot menu or boot settings).
I ran the Debian installer in expert mode and selected to install grub to the fallback location, I've booted the system via nvram and tried to install grub manually using
grub-install --efi-directory=/boot/efi --boot-directory=/boot --removable /dev/sde
I have installed refind and ran it with --usedefault
.
I've confirmed that /boot/efi/EFI/BOOT/BOOTX64.efi
is present, but the UEFI still doesn't list the USB drive as a boot option on two different machines I've tried.
Booting via nvram
works fine, but I need to be able to boot directly from the USB without relying on nvram
entries on motherboard.
Does anyone have any idea what could be going wrong? Here is the output of fdisk -l
:
Disk /dev/sde: 59.8 GiB, 64160400896 bytes, 125313283 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 831C76FD-DE61-4D79-93F5-0DA1C5EE5978
Device Start End Sectors Size Type
/dev/sde1 2048 1050623 1048576 512M EFI System
/dev/sde2 1050624 1550335 499712 244M Linux filesystem
/dev/sde3 1550336 125313023 123762688 59G Linux filesystem
And parted:
(parted) print
Model: Samsung Flash Drive (scsi)
Disk /dev/sde: 64.2GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 boot, esp
2 538MB 794MB 256MB ext2
3 794MB 64.2GB 63.4GB
/dev/sde1
is ESP, fat32 and is mounted at /boot/efi
with the esp, boot
flags. /dev/sde2
is ext2
and mounted at /boot
, and /dev/sde3
is a luks partition with root
and swap
LV's.