Fix Multiple Ubuntu Instances in UEFI Boot Manager

Not sure what your intentions are for other OSes on the Sandisk, but I'd suggest installing grub onto the Sandisk (you did make an EFI partition on it, right?) or just copy everything on the internal disk's EFI to the Sandisk's EFI works too, no edits needed. The grub-install does work, check the options needed like --removable and --uefi-secure-boot and --efi-directory. (there was an old bug on the --uefi-secure-boot that didn't use shim the way it should, but might have been fixed by now). Then try booting the sandisk directly, the device default bootloader should be grub and work.

Now to clean up the internal disk, all you need to do is remove the ubuntu directory with the grub EFI entries with efibootmgr, and put the Sandisk first in the boot order. Also, look in the internal disk's EFI/Boot directory, and replace the bootx64.efi (which is a copy of grubx64.efi or ahimx64.efi) with the backed up Windows bootmgfw.efi, named with a bkp in the name so the file should be obvious (or just copy the bootmgfw.efi from the EFI/Microsoft... directory and rename it bootx64.efi.

This should leave your Sandisk as a bootable device on any system (well maybe with hardware issues) and your host system booting Windows when the Sandisk is not attached.


I don't know what a new windows install will do, but if you start from scratch, I'd assume a new EFI partition with just the Windows bootloaders would be made. So if you had set up the Sandisk with a working grub, then you should be able to attach it as needed, and install whatever you want on it.