This guide explains how to install a full Ubuntu system on an external USB drive or SSD, so you can plug it into any compatible computer and boot into your own Ubuntu desktop, with full persistence and saved settings.
The main challenge on UEFI systems is bootloader isolation: by default the installer may mess with the host system’s ESP (EFI System Partition). The trick is to temporarily hide the host’s ESP from the installer so it instead creates its own ESP directly on the USB.
- Two USB drives:
- One smaller USB (≥4 GB) for the live Ubuntu ISO.
- One larger USB or external SSD (≥32 GB recommended) for the full Ubuntu install.
- Prefer USB 3 or Thunderbolt SSD for acceptable speed when installing and booting.
- Disable Secure Boot on the host system if it blocks booting from USB.
- Download an Ubuntu ISO from the official Ubuntu website.
- Use a tool such as Balena Etcher (or
Startup Disk Creatoron Linux) to write the ISO to the smaller USB. - The result is a live Ubuntu USB that lets you boot into a temporary session and install Ubuntu on the other USB.
You are now ready to boot into the live environment and begin the full installation.
This step hides the host’s ESP from the installer so it does not touch the host’s bootloader.
- Plug in both USBs and boot from the live Ubuntu USB (“Try Ubuntu”).
- Open GParted:
- Press the Windows key, type
GParted, and run it. - If GParted is not installed, run:
sudo apt update && sudo apt install gparted
- Press the Windows key, type
- In GParted:
- Select the internal hard disk (not the USB).
- Locate the ESP partition (usually 100–500 MB, FAT32, with
espandbootflags). - Right‑click the ESP partition → Manage Flags.
- Remove the
esp(and usuallyboot) flag.
- Take note (or screenshot) of the original flags if non‑standard, so you can restore them later.
After removing the ESP flag, the partition often gains the msftdata type, and the system no longer sees it as an ESP. Changes apply immediately.
You can now proceed with installing Ubuntu on the external USB.
- Ensure the bigger USB is plugged in and visible in GParted.
- On the live desktop, double‑click “Install Ubuntu”.
- Choose “Minimal installation” to reduce file count and speed up installation time.
- When you reach the “Installation type” screen:
- Select Something Else.
- Confirm that the host’s internal disk no longer shows an ESP because the flags were removed.
- Prepare partitions on the external USB:
- Delete any existing partitions to create free space.
- Create a new partition:
- First partition: ESP (≈500–1000 MB, FAT32,
espflag enabled).
- First partition: ESP (≈500–1000 MB, FAT32,
- Allocate the remaining space:
- Root partition: Ext4, mount point
/.
- Root partition: Ext4, mount point
- [optional] create swap but it's better to it under root thanks to swapfile.
- Ensure the external USB is selected under “Device for bootloader installation”.
- Continue:
- Set timezone, create user/password, and start installation.
- The process will be slower than normal due to USB speed.
Important: Do not restart immediately after installation finishes. You must restore the ESP flags on the host disk first.
- In the still‑running live session, open GParted again.
- Select the host’s internal disk and locate the partition that was ESP (now likely shown as
msftdata). - Right‑click → Manage Flags and re‑enable the
espflag (and usuallyboot). - Close GParted and then restart the machine.
If you accidentally rebooted before restoring flags, simply boot again from the live USB, correct the flags in GParted, and then reboot properly.
- Ensure the target system allows booting from USB and Secure Boot is disabled (if necessary).
- At power‑on, press the boot‑menu key (often F2/F10/F12 depending on manufacturer) and select the Ubuntu USB.
- You will see the GRUB menu; choose Ubuntu to boot.
You may see extra GRUB entries referencing OSes from the machine where the USB was installed. These are harmless but can be removed with grub‑customizer if desired.
If you later want to reuse the USBs for normal storage:
- Use GParted (Linux, Windows, or macOS version) or a similar partitioning tool.
- Delete all existing partitions on each USB.
- Create a single partition formatted as NTFS or FAT32 for general‑purpose use.
- Performance will always be slower than an internal SSD/HDD, especially with USB 2.
- The ESP‑hiding trick only works while the host’s ESP is unflagged; forget to restore flags and the host may fail to boot without the USB plugged in.
- For advanced EFI control (e.g., using the special fallback path), some guides also recommend using
grub‑installwith--removableon the USB’s ESP, though this is beyond the basic procedure above.
This is a cleaned up copy of Abhishek Prakash's work