This guide explains how to create a Debian Live USB with persistence, allowing changes, installed applications, and settings to survive reboots.
We are using Debian 12.4.0 Live ISO for this tutorial. You can download it from the official archive:
→ Debian 12.4.0 Live ISO (amd64, ISO-hybrid)
If you prefer to check the latest versions or other releases, you can also visit:
For this tutorial we intentionally use Debian 12.4.0 (Bookworm, XFCE).
- Debian 12.11 and Debian 13 (Trixie): Persistence behaves differently on these releases. With limited root space (~1 GB), changes and installed applications may not persist like a full install.
- Debian 12.4.0 Live ISO: Persistence works as expected, similar to a full hard-disk installation.
- After creating your USB with Debian 12.4.0, you can safely update the system to the latest point release (e.g., Debian 12.11).
sudo apt update && sudo apt upgradeThis will bring it up to Debian 12.11.
This guide is based on community contributions and my own testing. Original persistence steps were adapted from StackExchange. All credit to the original author(s).
Original Author Attribution (Footnote)
Jeff Schaller, StackExchange Profile, Post date / last edited: Sep 22, 20191
Use this guide at your own risk. Writing to the wrong device with dd can erase data permanently. Double-check your USB device name (e.g., /dev/sdb) before running commands.
Note: This guide was tested using MX Linux Live USB; any Linux distribution with necessary tools (dd, fdisk, mkfs, etc.) should work. Tested with SanDisk USB stick; other brands may vary.
Choose your download path. Example:
cd /home/demo/Live-usb-storage
wget -c http://get.debian.org/images/archive/12.4.0-live/amd64/iso-hybrid/debian-live-12.4.0-amd64-xfce.isoTip: Make sure you have enough free space in your download folder (~4GB).
sudo umount /dev/sdb1 2>/dev/null
sudo umount /dev/sdb2 2>/dev/nullTip: Ensure no other programs are accessing the USB to prevent errors.
LANG=C sed 's/splash quiet/persistence /;s/quiet splash/persistence /' \
</home/demo/Live-usb-storage/debian-live-12.4.0-amd64-xfce.iso \
>/home/demo/Live-usb-storage/debian-live-12.4.0-amd64-xfce.iso-persist.isoTip: Check the file path is correct to avoid overwriting the wrong ISO.
lsblk -o NAME,SIZE,MODEL,MOUNTPOINTTip: Carefully check the device name (e.g.,
/dev/sdb) before proceeding. Using the wrong device in later commands likeddormkfscan erase important data.
sudo dd if=debian-live-12.4.0-amd64-xfce.iso-persist.iso of=/dev/sdb bs=4M status=progress oflag=syncTip: Double-check the
of=device to avoid erasing other drives. This command can take several minutes.
sudo umount /dev/sdb1Tip: Replugging ensures the system recognizes the new ISO write before creating partitions.
sudo fdisk /dev/sdb <<<$'n\np\n\n\n\nw'Tip: Make sure you are creating the partition on the correct USB device.
sudo mkfs.ext4 -L persistence /dev/sdb3Tip: Labeling as
persistenceis required for the Live USB to recognize it.
sudo mount /dev/sdb3 /mntOn Debian (tested), the following works:
sudo echo '/ union' >/mnt/persistence.confNote: On some other Linux distributions, the above may fail because the redirection (
>) happens beforesudoapplies. If so, try one of these alternatives:
# safer — uses tee with sudo
echo '/ union' | sudo tee /mnt/persistence.conf
# or run a shell as root so the redirection is performed with sudo
sudo sh -c "echo '/ union' > /mnt/persistence.conf"Tip: Verify the file was created:
ls -l /mnt/persistence.conf cat /mnt/persistence.conf
sudo syncsudo umount /mnt- Reboot your computer and select the USB in BIOS/UEFI.
- At the boot menu, choose the first option (Live system). This is the only choice that enables persistence; other options, like full install, are not relevant.
- After booting, any changes, installed applications, and saved files will persist across reboots.
Tip: If persistence does not seem to work, confirm the partition is labeled
persistenceand thatpersistence.confexists at the root.
If persistence does not work after following the steps:
-
Check the partition label
The persistence partition must be labeled exactlypersistence.lsblk -o NAME,LABEL -
Verify
persistence.confexists and is correctls -l /mnt/persistence.conf cat /mnt/persistence.confIt should contain:
/ union -
Confirm you booted with persistence enabled
At the boot menu, choose the first option (Live system).
If you select "failsafe" or "forensic" modes, persistence will not load. -
Recheck partition number
On some setups the persistence partition may not be/dev/sdb3.
Uselsblkto confirm which partition was created. -
Try a different USB stick
Some USB brands handle hybrid ISO + persistence partitions better than others.
If problems continue, repeat the process with another drive.
This guide is licensed under the Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0). You are free to share and adapt the material, provided proper credit is given and adaptations are shared under the same license.
- Original persistence method: Jeff Schaller, StackExchange (2019)
- Adapted, tested, and documented by padiks
- Guidance & formatting help: ChatGPT
- Tested on Debian 12.4.0 XFCE with persistence enabled.
- Debian 12.11 and Debian 13 persistence behaves differently; see tutorial notes.
- USB brand and host Linux distribution may affect results; proceed at your own discretion.
This guide is provided as a finished resource. No additional contributions are expected at this time.
Enjoy your portable Debian system with persistence!
Footnotes
-
Included for proper credit. Steps adapted and tested for Debian 12.4.0. ↩