PSA: Installing Ubuntu in UEFI mode to an external harddrive may alter your internal ESP partition. This is a known bug for 6 years, yet no fix so far.
I have a Surface and wanted to install Ubuntu to my external hard drive since I needed proper 3D acceleration for an university project. However, since I like Windows as a main desktop OS (dangerous to say here I guess, but there are quite a few things I really hate about Linux on Desktop) and my SSD is not that large, I wanted to install it to my already existing hard drive. So, I made room for a FAT32 partition and a ext4 partition, chose the ext4 for / and selected the FAT32 parition for the "Install boot loader to the following partition" option.
Guess what happens next? System installed, reboots and whoops, I'm in a GRUB shell. Okay, guess it just changed the UEFI boot variable. I disconnect the drive, and still boots to GRUB shell. Well here we go, Ubuntu just installed the boot loader to the internal SSD and set it as default boot loader, even though that was never intended. On top of that, it even installed a non working boot config, that's why I ended up in the GRUB shell after all.
After spending like 2 hours fixing this shit, I finally managed to remove GRUB from the SSD and moved it to the external hard drive. However, how did this happen?
Turns out [this is an almost 6 years old known bug reported with high priority.](
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379?comments=all) No one bothered fixing it so far, even though it messes up the boot config and other distros don't seem to have this issue.
To spread awareness here, pay attention when installing Ubuntu in UEFI mode as dual boot, even on an external hard drive. Kinda strange to ignore a given option, especially since UEFI is not new anymore but rather already there for years, yet the support for it still seems half-assed, at least in Ubuntu.
https://redd.it/ezice5@r_linux