Linux on Portable SSD
Goal: Have an external SSD capable of booting Linux simply by plugging it into any PC.
Requirements
USB Drive >= 16 GB
External Drive (SSD, USB or HDD) >= 32 GB to install Linux on
Tutorial
For any PC to be able to detect the SSD as bootable, the SSD must include an esp - efi partition (300mo fat32), which is how the bios detects the SSD as a boot option.
Boot on USB (use safe graphics if it crashes)
Start linux install, when asked, select custom partitioning
Here are the partitions you need to create on your external Drive:
root:
type: ext4
mount point: β/β
size you want for the OS eg: 75 GB
efi:
type: fat32
mount point: '/boot/efi'
size: 300MB
Here is how it should look like (ntfs if you want to use free remaining space as usb drive):

Continue install normally
Done, now you can boot on your external drive by choosing the right boot option
Troubleshooting
Not Booting: busybox (initramfs) prompt
Recover bad superblock
It happened to me many times that for no apparent reason my PC wont boot into linux on my external SSD, it would just load for a really long time and end up on a busybox (initramfs) prompt. This was really frustrating. I think it has something to do with force shutdown... Fortunately, I've found how to fix that. Check https://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/
Boot into Live USB Installation made before, Try Kubuntu
Plug your external SSD
Identify your root partition number with command
lsblk, mine was sdb2sudo sudumpe2fs /dev/sda2 | grep superblock
Sample Output:
fsck -b 32768 /dev/sda2# Just Press enter as long as its asking
Sample Output:
Done, now try to reboot on your external SSD and it should work.
if you reinstalled your main OS and your PC won't automatically boot on the SSD when it's 1st in the boot order, follow these quick steps:
Go in BIOS and manually boot on your external drive (select the OS manager EFI partition, not the USB Drive entry itself)
Follow this screenshot to reorder your boot option to ensure ubuntu is first.

If it still doesn't work, go in BIOS and set low boot priority to USB so it will first boot on grub and not on the default USB boot option that will lead to a boot loop.
If you have new chipset error or long boot try these:
sudo gedit /etc/default/grub
Replace GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset nouveau.modeset=0"
save & exit
sudo update-grub
If you just have a long boot try to disable secure boot in bios.
Fixed in Ubuntu 24.04 releases
At the time of writing this tutorial, the Ubuntu installer has a problem: the disk selected for installing the bootloader (GRUB) is not currently the one on which GRUB will be installed, GRUB will be installed on the first efi partition detected, in other words, in the case of a Windows PC, GRUB will be installed on the Windows PC and therefore the SSD will not be bootable on another PC, and the Windows PC will no longer boot when the external SSD is unplugged. To remedy this, in a live Ubuntu for example and using gparted, remove the boot and esp flags from any disk, create the efi partition on the external SSD with the boot and esp flags. Install, then reset the flags. This way, the only disk to have the flags will be the external SSD.
before it was necessary to add these steps after 2.
Enter in mode "try ubuntu" to create EFI partition (this step is crucial, it enable the portability of the drive, it allows the drive to have its own boot option so that any PC can detect it)
open gparted, select your external drive (NOT LINUX USB), create FAT32 500 MB partition , then right click on it, manage flags, boot + esp.
remove boot+esp flags from your PC main OS to ensure grub will install on the external drive and not on your PC (currently ubuntu install has this bug where it always selects the first EFI partition detected to install grub on it). AND at the end add back the boot+esp flags on original drive:
Once you are in ubuntu, do
sudo update-gruband install gparted to re-enable the EFI flags on your PC's main OS:sudo apt install gpartedre-enable boot + esp flags for the drives that had it before step 5. (basically your boot drives, C: drive on windows)
Last updated