Encrypted 20.04 Full Install USB using a Virtual Machine (BIOS First)
Introduction
The other answers to this question assume you have a computer where you can remove the internal drives or somehow disable them. This is not always possible or convenient. I did this using a QEMU-KVM virtual machine. If you already have the QEMU-KVM virtual machine setup on your Ubuntu desktop or if you have a computer running Ubuntu that is capable of running QEMU-KVM virtual machines, then this approach may be easier than unplugging hard drives from inside of your computer.
In general a virtual machine (VM) is great for managing full installs of Ubuntu in USB. Once I set it up, I can boot the USB full install in the VM and maintain it without shutting down my main Ubuntu desktop.
Prerequisites
- QEMU-KVM Virtual Machine Manager GUI running on Ubuntu 20.04.
The following command will install the all the packages needed:
sudo apt install --install-recommends virt-manager
- An empty USB drive large enough for a full installation of Ubuntu
and sufficient space to keep your data
- The Ubuntu 20.04 ISO stored in the computer where the QEMU-KVM is
running
Find USB device name
We need to find the device name of the USB drive. Insert the USB drive and open the Gnome Disks app:

Note, my USB drive is called /dev/sdc
. Yours may be different. You will need this information in the next step.
Unmount any and all partitions using the black square button and turning it into a black triangles.
It is important unmount all the USB partitions of the USB.
The process of installing Ubuntu in the VM will require the VM to have full access to the USB drive, so that it can overwrite and create new partitions in the VM.
Create a new VM to use USB drives
Normally when you create a new VM it prompts you to create a virtual hard disk (a file) where the OS is installed. We want to directly access the USB and install Ubuntu there. This requires a new VM setup. We also want create a VM that boots Legacy BIOS and optionally another VM that boots UEFI.
Open the app Virtual Machine Manager and go to File > New Virtual Machine:

We will use the Ubuntu 20.04.2.0 Desktop ISO. click Forward and proceed to the next screen:

Click the browse button and find the ISO file. Then click Choose Volume to select it. Fill in the Name of the OS you are installing as seen above.
Select the amount of RAM and the number of CPUs you want to allocate to this VM:

Now comes the important part. click on Select or create custom storage and type in your USB device name:

Note, mine is /dev/sdc
, yours may be different. If you have done this before, you will get a warning Disk "/dev/sdc" is already in use by other guests.... Click Yes to use this disks.
Edit the name of the VM if you want.
Select Customize configuration before install:

This is where you choose BIOS or UEFI mode:

Select BIOS if not already selected.
If you want to create another VM to test UEFI booting of the USB you are creating, follow all the steps above and select the UEFI option for the second VM.
Click the Apply button at the bottom to make the changes.
When satisfied with all the changes, click Begin Installation at the top to continue. This will start the newly created VM and boot from the ISO you selected in the BIOS mode. You should see this screen:

If you get a different screen you may have booted using the UEFI mode. Next you will get a screen that says Try Ubuntu without installing:

Select the Try Ubuntu option. This will let you do the changes we need after the installation. You will see the familiar Ubuntu Desktop with the icon for Install Ubuntu.

Select Language, Keyboard, Normal Installation, Install third Party... .
At Installation type Tag "Erase disk and install Ubuntu" and then select "Advanced features". Click "Use LVM with the new Ubuntu installation" and then "Encrypt the new Ubuntu installation for security".

Choose a security key. Overwrite empty disk space if inclined.
Select Country, then User name and Password.
When Installation completes, select Continue testing to make the changes to the USB so that it boots in both BIOS and UEFI modes.

Within the the Ubuntu VM still running from the installation ISO open the app "disks" and select the USB drive from the left panel:

Note the device name, /dev/vda
. This is different from the the /dev/sdc
as now we are looking at the same USB from within the VM. Also note the size of Partition 1 and Partition 5, in this case 537 MB and 767 MB respectively. This will help us find these partitions later.
Mount these two partitions by clicking on the black triangles and turning them into squares.
Open the Files app (AKA Nautilus) in the VM, and navigate to +Other Locations > Computers > cdrom. This is the Ubuntu installation ISO we have booted from.
Open another instances of the Files app in the VM and and navigate to +Other Locations > 537 MB Volume. This is Partition 1.
Resise and move the two opened Files window so that you can see both as shown below.
Copy the folder boot
and EFI
from the cdrom
to Partition 1
:

Now navigate to +Other Locations > 767 MB Volume > grub in the top Files window.
And to +Other Locations > 537 MB Volume > boot > grub in the bottom Files window as shown below:

Copy the grub.cfg
file from /media/ubuntu/f31c1dbd-ea5c-487c-a14a-90b6edcea385/grub
to /media/ubuntu/4281-A2FB/boot/grub
as shown above.
Open the app disks again and unmount partition 1 and partition 5. close the disks app.
Open the terminal app within the VM and mount partition 1 in /mnt
and install grub
with the two commands:
sudo mount /dev/vda1 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/vda
Note here we refer to the USB drive as /dev/vda
and the first partition as /dev/vda1
.

Note, you won't need any password for sudo in the Live install boot.
Close the terminal and power off the VM. Hit Enter when prompted.
Go to the VM's settings tab while the VM is not running, and then SATA CDROM in the left panel:

Remove the ISO image and Apply for the changes to take effect. Start the VM again so that it boots from the USB drive.
for some reason I get a black screen instead of the encryption pass-phrase prompt when I boot the USB using a VM. However, blindly typing the pass-phrase and hitting Enter works.
Postscript (PS)
If you keep updating the kernel using only either BIOS or the UEFI boot, sooner or later the USB will not boot in the other mode as the two grub.cfg
files in two partitions will get out of sync. See How to Maintain BIOS/UEFI Flash Drive with Full Disk Encryption for a solution.
Hope this helps
uname --kernel-release
in a terminal. Run your updates; reboot; and enteruname --kernel-release
again. If the kernel was updated, the result will change. – Paddy Landau Oct 24 '18 at 06:25