Install GRUB on Windows to replace Windows Boot Manager and Boot External Ubuntu
UEFI should boot GRUB located on an external drive automatically.
I have tested this with an external install made like this: How to Create a Full Install of Ubuntu 22.04 to USB Device Step by Step You will need to use F9, F12, etc to select the USB drive.
You can also add the external drive to the UEFI boot menu.
To add the Full install USB drive to internal GRUB
Once GRUB has been installed to the internal drive you can plug in your external drive and run sudo update-grub
Ubuntu must be installed in the same BIOS or UEFI mode as Windows.
Note: Grub 2.06 turns off os-prober in /etc/default/grub. See: How can I add Windows 11 to grub menu?
To add Persistent Live install to the internal GRUB boot menu, (by hand)
Add the following menuentry to /etc/grub.d/40_custom and then run sudo update-grub
menuentry "Ubuntu USB" {
set root=(hd0,1)
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed maybe-ubiquity quiet splash ---
initrd /casper/initrd
}
or
menuentry "Ubuntu - flash drive" {
search --set=root --fs-uuid xxxx-xx-xx-xx-xx-xx-xx
set gfxpayload=keep
linux ($root)/casper/vmlinuz$casper_flavour file=/cdrom/preseed/ubuntu.seed quiet splash ---
initrd ($root)/casper/initrd$casper_flavour
}
where xxxx-xx-xx-xx-xx-xx-xx is the USB / partition UUID
If I recall right.