pbear - I have just read your most excellent tutorial on how to install to an external USB drive:
I want to install to an external USB HDD with gpt partitioning - UEFI mode. I have to admit your 'Unflag/Reflag" method makes me a bit nervous, and I don't really want to install rEFInd, so I wonder if there isn't an even simpler way. Note - I haven't yet done much thinking on this, so I'm probably missing something which you'll see immediately. I already have my partitions set up on the USB drive. I know that in the efi partition the bootloader is stored in the "Ubuntu" folder along with a small "grub.cfg" file which is just a pointer to the real "/boot/grub/grub.cfg" file in the installed OS. For example, here's the "/boot/efi/EFI/Ubuntu/grub.cfg" from my internal HDD:
Code: Select all
search.fs_uuid a3e65c35-55b4-4515-81c6-8d2b94627f57 root hd0,gpt5 set prefix=($root)'/boot/grub' configfile $prefix/grub.cfg
Do you think this could work, or am I missing something really obvious?
EDIT - I've been doing some reading since I posted this. It looks like for a removable device, the fallback bootloader in "EFI/Boot" is used. As there is no "grub.cfg" file in this folder, I assume that maybe the pointer to the grub.cfg file in the installed filesystem is incorporated within the "EFI/Boot/bootx64.efi" bootloader at installation? Easy to see why there is a separate pointer file in the "Ubuntu" folder - for secure boot to check the bootloader signature, the bootloader couldn't be modified at installation - the modified part gets put into the little "grub.cfg" file. Anyway, if the EFI/Boot/bootx64.efi file points to the grub.cfg in the root partition of the installed OS, it looks like the method I proposed here will not work. I'd appreciate your comments, though.