unable to properly boot linux from external ssd

Solution 1:

For external drives or any second drive, you have to gpt partition in advance & include an ESP - efi system partition. You do not now need swap partition as Ubuntu uses a swap file.

How to prepare a disk on an EFI based PC for Ubuntu?

During install you can do this (see oldfred's work around)? or reinstall grub to external drive after install. Note that external drives only boot from /EFI/Boot/bootx64.efi. But full reinstall of grub now also creates that file. Internal drive will boot from /EFI/ubuntu/shimx64.efi. You only see details with efibootmgr -v.

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379

I have totally turned off and changed ESP during install & it does not work. This says if you do it before starting install it will work. Have not yet tested myself, yet.

How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

It should boot from same system as installed as boot files are only put in first drive usually internal drive. If using live installer be sure to boot in UEFI boot mode. You can use Boot-Repair to reinstall grub or manually do it if you can boot from inside your install. Use advanced mode to choose external drive to install grub into:

https://help.ubuntu.com/community/Boot-Repair

https://sourceforge.net/p/boot-repair/home/Home/

If booted into your install you can use efibootmgr to create new UEFI boot entry, but must have the extra parameters to specify drive & partition of ESP on external drive.