TQ
dev.com

Blog about software development

Subscribe

Installing encrypted Linux Mint on an external SSD

29 Aug 2025 - by 'Maurits van der Schee'

Linux Mint can be installed on an external SSD and easily carried around and be boot on any other machine. You can easily buy a fast, large and durable external SSD nowadays. Unfortunately installing a bootable Linux Mint on a an external SSD is not so straightforward. In this post I'll explain you how to do it and specifically how to work around a bug in the Linux Mint (Ubuntu/Debian) installer.

Hardware

I used a (relatively) cheap "Kingston XS1000 1TB" (80 eur), but you may use any M2 NVMe enclosure that supports USB 3.0 or higher. It should ideally be an external drive rated for 1000 MB/sec or more in read performance to ensure you are dealing with an external SSD that is as fast as your internal disk (and also durable enough).

Motivation

The safest way to install Linux Mint to an external SSD is to remove the internal disk from the machine and do the installation as you normally would (no manual partitioning or bug workaround needed). This article is written as not everybody likes opening up their laptop or desktop computer.

People will try to install with the internal disk connected and that disk will contain a FAT32 partition with "boot" flag on it. The installer seems to allow you to select which EFI partition to use (in a "bootloader" dropdown). Unfortunately this selection is ignored as this selection is only relevant for systems using legacy boot (nobody does this anymore). Instead the installer overwrites the first FAT32 partition it finds that has a "boot" flag set (the on on your internal disk).

This will lead to a system that can neither boot from the internal disk nor from the external disk on another system. Because of this strange behavior (a bug in my opinion) you have to remove the "boot" flag of the internal disk before you start installing on the external SSD. When you are done installing you can put the "boot" flag back on the partition of the internal disk.

To restore the overwritten EFI partition on the internal disk you can use the tool "boot-repair" from the terminal before starting the Linux Mint installation. I've had to do this many times when writing this aricle.

Disclaimer

Playing with disks and their partitions is risky. You may end up with a system that does not boot anymore from the internal disk or even with an internal disk that is completely wiped. Always make a backup of all data on the system before you start.

Requirements

Procedure

Boot from the thumb drive that has the Linux installer into a Linux Live environment.

First we will prepare the external SSD.

Now the external SSD is clean and ready to be used as an external disk.

Next we are going to remove the "boot" flag from the internal disk(s)

Note that changes to the flags are immediately effective.

Now the Linux Mint installer can be started.

As a last step add the "boot" flag again:

Now the system can both be booted from the internal disk and the external SSD.

Performance test

Since the 4k random read performance and I/O ping is the most important you can test what disk works best for you.

sudo apt install fio

To test the 4k random read performance, run:

fio --name TEST --filename=temp.file --rw=randrw --size=20m --io_size=100m --blocksize=4k --ioengine=libaio --fsync=1 --iodepth=1 --direct=1 --numjobs=1 --runtime=60 --group_reporting

Look for this line with results:

READ: bw=5594KiB/s (5728kB/s), ...

To test the I/O ping, run:

ioping -c 20 .

Look for this line with results:

min/avg/max/mdev = 178.9 us / 198.9 us / 231.1 us / 23.0 us

The above are results from my USB 3.1 connected "Kingston XS1000 1TB" disk under LUKS. I was hitting about 5500 KiB/s for the 4K random reads with an I/O ping of about 200 us. This was better than the my internal NMVe disk on which I was getting 4000 KiB/s (also LUKS encrypted) and with an I/O ping of about 2.3 ms.

Links


PS: Liked this article? Please share it on Facebook, Twitter or LinkedIn.