It is fine to use an ISO image and persistent volume in the way the question describes. However, You can create persistent volumes on any device but Tails won't do it for you and such configurations aren't supported.
Tails persistent volumes can go on any device. From the persistence design documentation:
the underlying tools will support storage on whatever relevant device
and
brave and advanced users can prepare their store their persistent data wherever they want
and
this is not something we will actively support and document beyond the bare minimum (--help and manpage)
How to create a persistent volume
- Create a partition named
TailsData
(this is how Tails recognises a persistent partition);
- Create a LUKS volume on the partition:
cryptsetup luksFormat ...
;
- Create a EXT4 filesystem in the LUKS volume
mkfs.ext4 ...
;
- Mount the filesystem (e.g. on
/mnt
);
- Set ACLS on the root directory:
setfacl -m user:115:rwx,group::rwx,mask::rwx /mnt
;
- Create file
/mnt/persistence.conf
with mode 600
and ownership 155:122
, with contents as descrbed below.
Tails uses the persistence.conf
file to mount diretories on the persistent volume onto the filesystem. For example, the line
/home/amnesia/Persistent source=Persistent
makes the Persistent
directory on the persistent volume available as the /home/amnesia/Persistent
directory. When Tails creates this file. the whitespace between the two parts is a tab
, however a space
also works.
A more complete example persistence.conf
is shown below:
/home/amnesia/Persistent source=Persistent
/home/amnesia/.gnupg source=gnupg
/home/amnesia/.ssh source=openssh-client
/home/amnesia/.purple source=pidgin
/home/amnesia/.claws-mail source=claws-mail
/home/amnesia/.gnome2/keyrings source=gnome-keyrings
/home/amnesia/.mozilla/firefox/bookmarks source=bookmarks
/etc/cups source=cups-configuration
/home/amnesia/.icedove source=icedove
An example
Given the GPT partition /dev/sdj3
, as root
:
# cryptsetup luksFormat /dev/sdj3
# cryptsetup open /dev/sdj3 tailsdata
# mkfs.ext4 /dev/mapper/tailsdata
# mount /dev/mapper/tailsdata /mnt
# echo '/home/amnesia/Persistent source=Persistent' > /mnt/persistence.conf
# chown 115:122 /mnt/persistence.conf
# chmod 600 /mnt/persistence.conf
# setfacl -m user:115:rwx,group::rwx,mask::rwx /mnt
# umount /mnt
# cryptsetup close tailsdata
It is important to set the permissions (chown
, chmod
and setfacl
) correctly otherwise Tails will disable persistence.
Tails will create the directories defined in persistence.conf
. If you want to precreate them set their ownership appropriately (1000:1000
for content beneath /home/amnesia
; as appropriate for other directories).
Tails will also create an empty file called live-additional-software.conf
. This is an optional file that allows additional packages to be installed from the persistent volume. See here for more information about this.
When mounted, the root of the persistent volume is at /live/persistence/TailsData_unlocked
.
Further reading: