On 05/08/2025 at 10:49, smallbussiness wrote:
When installing Debian on a USB drive intended to be a fully portable OS (with its own bootloader), the installer silently installed or updated the GRUB bootloader on my laptop’s internal EFI partition, even though the target root filesystem and EFI partition were on the USB drive.
grub-installer does not choose GRUB location, it installs the boot loader in the EFI partition which was chosen and mounted during partitioning. If multiple EFI partitions were set "Use as: EFI system partition", then partman-efi chooses the "first" one (in its own internal order) regardless of the root filesystem location.
Which partitioning method did you use ? Guided using an entire disk, guided using the largest free space, manual ? If you use manual partitioning, you must make sure to disable all othe EFI partitions. Guided methods should disable all other EFI partitions so only the one on the selected disk should be used. There was a bug (fixed for trixie) in guided partitioning with LVM but I doubt you used LVM on a USB drive.