Every issue of Ubuntu LTS since 8.04, I have made a Full install of Ubuntu to USB flash drive, and recorded each step..
This has been intended to make a guide/check list for users wishing to create Full install bootable flash drives.
Previously the procedure worked for BIOS boot if created in BIOS and for UEFI boot if created in UEFI.
This year for 20.04 the instructions should work for both creating and running the drive booted from either BIOS or UEFI.
The question is:
How to Create a Full Install of Ubuntu to USB device with Step by Step instructions that work in either BIOS or UEFI.
Creating a Full Install of Ubuntu 20.04 to USB that works in both BIOS and UEFI
Following is based on a 16GB Target drive, adjust for larger drive. This looks like a long list but, should take less than ten minutes to do the work. K1tty has done an excellent job clarifying many points in this answer, see https://askubuntu.com/a/1332619/43926
Confirm partitions to be formatted if asked, click continue.
Select your location. click "Continue".
Insert your name, computer name, username, password and select if you want to log in automatically or require a password. - Click "Continue".
Wait until install is complete.
Do not reboot or unplug the target USB.
Copy the
boot
and theEFI
folders from the Ubuntu ISO file to the boot,esp partition sdx3.If there any problems with permissions, etc, open Nautilus using
sudo -H nautilus
and try copying again.Copy
grub.cfg
from partition sdx4 /boot/grub/ to partition sdx3 /boot/grub/ overwriting thegrub.cfg
file.Re-Install GRUB:
sudo mount /dev/sdx3 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdx
Turn off computer and plug in the HDD.
Replace the computer's cover.
Note 1, Booting ISO Files.
rmmod tpm
anywhere above the first menuentry in grub.cfg.Note 2: Hard drive removal.
Note 3: Apple compatibility.
Note 4: Encryption (optional).