How to Create a Persistent Fedora Live USB That Saves Your Changes

Create a persistent Fedora Live USB by adding a persistence partition to the ISO image before writing it to the drive.

You booted the Live USB, made changes, and lost everything

You burn a Fedora Live ISO to a USB drive, boot it, spend an afternoon configuring your dotfiles and installing development tools, and then shut down. You plug the drive into a different machine the next day. Everything is gone. The terminal is clean. The packages are uninstalled. The live environment reset itself. You need a way to make those changes survive a reboot.

How the live environment actually works

A standard Live USB is built on a read-only squashfs filesystem. When you boot it, the system mounts that compressed image and creates a temporary overlay in RAM. Any file you create, package you install, or setting you change lives in that volatile overlay. The moment the power cuts, the RAM clears and the overlay vanishes. This design keeps the ISO small and protects the original image from corruption. It also means the drive is stateless by default.

Persistence changes that architecture. It allocates a separate, writable partition on the USB drive. During boot, the live environment's initramfs scans the drive for a partition with a specific label. When it finds it, the system mounts that partition and redirects the temporary overlay to it. Your changes now write to flash storage instead of RAM. The live session behaves like a normal installation, but the base system remains read-only. You can install packages, modify configuration files, and save documents. They survive reboots because they live on the persistent partition, not in volatile memory.

The catch is that the bootloader and initramfs must know where to look. Fedora handles this automatically if you follow the exact partition labeling and marker file convention. Deviate from the naming scheme and the system falls back to the default RAM overlay.

Check lsblk before you touch any drive. Guessing the device name is the fastest way to erase your host system.

Step-by-step: building the persistent drive

You will write the ISO to the drive, partition the remaining space, format it, and place the marker file the initramfs expects. Replace /dev/sdX with your actual USB device. Never use /dev/sda unless you are absolutely certain it is the removable drive.

Here is how to write the ISO image to the drive and verify the write completed without errors.

# Unmount any auto-mounted partitions to prevent write conflicts
sudo umount /dev/sdX*
# Write the ISO directly to the block device, not a partition
sudo dd if=fedora-43-x86_64-live.iso of=/dev/sdX bs=4M status=progress
# Flush buffers to ensure all data hits the flash controller
sync

The ISO occupies the first few gigabytes. The rest of the drive is unallocated space. You will carve a new partition out of that space. This partition will hold your persistent overlay.

Here is how to create a new partition in the unallocated space using fdisk.

# Launch fdisk on the USB device
sudo fdisk /dev/sdX
# Inside fdisk, press 'n' to create a new partition
# Press 'p' for primary, '3' for partition number
# Accept the default first sector
# Accept the default last sector to use all remaining space
# Press 'w' to write the table and exit

The partition table is updated. The kernel needs to re-read it so the new partition appears as a block device.

Here is how to force the kernel to recognize the new partition without rebooting.

# Tell the kernel to re-read the partition table
sudo partprobe /dev/sdX
# Verify the new partition appears as /dev/sdX3
lsblk /dev/sdX

Now you will format the new partition and create the marker file. Fedora's live environment looks for a partition labeled persistence containing a file named persistence.conf. The file must contain the word persistence on the first line. This tells the initramfs to mount the partition as the overlay root.

Here is how to format the partition, mount it, and write the required marker file.

# Format the new partition as ext4 with the exact label the live env expects
sudo mkfs.ext4 -L persistence /dev/sdX3
# Mount the partition temporarily to write the marker
sudo mount /dev/sdX3 /mnt
# Create the marker file that triggers persistence detection
echo 'persistence' | sudo tee /mnt/persistence.conf
# Unmount cleanly so the label and marker are committed to disk
sudo umount /mnt

The drive is ready. Boot it like a normal Live USB. If the system does not automatically detect the persistent partition, you will need to pass a kernel parameter at the GRUB menu. Highlight the boot entry, press e, find the line starting with vmlinuz, and append persistent to the end. Press Ctrl+X to boot.

Run journalctl -xe after boot if the overlay fails to mount. The initramfs logs will show exactly why the detection skipped.

Verify the overlay is writing to disk

Persistence is invisible until you test it. The live environment mounts the persistent partition at /run/initramfs/live or merges it into the root overlay. You can confirm it is active by checking mounted filesystems and writing a test file.

Here is how to confirm the persistent partition is mounted and active.

# List mounted filesystems and look for the persistence label
df -h | grep persistence
# Check the overlay mount point in the running system
mount | grep overlay

Create a file in your home directory. Reboot the live environment. Log in again. The file should still be there. If it is gone, the overlay is still pointing to RAM. Check your partition label and marker file spelling. The initramfs is strict about exact matches.

Create a test file, reboot, and verify it survives. If the file vanishes, check your label and marker file spelling.

Common pitfalls and what the error looks like

The most common failure is targeting the wrong block device. dd does not ask for confirmation. It writes exactly what you tell it to write. If you point it at your internal drive, the boot sector vanishes and the system becomes unbootable. Always verify with lsblk before running dd.

Another frequent issue is using the wrong filesystem. The live initramfs expects ext4 for the persistence partition. Formatting it as exFAT or FAT32 breaks the overlay mount. You will see a boot hang or a fallback to the default read-only mode. The terminal will drop you into a shell with a message like Failed to mount persistence partition. Falling back to RAM overlay.

The marker file is also a silent killer. If persistence.conf contains extra whitespace, a trailing newline, or the wrong word, the initramfs ignores it. The file must contain exactly persistence followed by a newline. Use echo 'persistence' > /mnt/persistence.conf or the tee command shown earlier. Do not open it in a text editor that adds hidden formatting.

Cheap USB drives fail under constant overlay writes. The persistence partition receives heavy I/O during package installs and system updates. If you see I/O error messages in journalctl -xe or the system freezes during writes, the flash controller is throttling or dying. Use a reputable USB 3.0 drive with good write endurance.

Read journalctl -xe before guessing. The initramfs logs will tell you exactly which step failed.

When to use persistence versus other approaches

Use native persistence when you need a portable development environment that survives reboots and runs directly on bare metal. Use Ventoy when you need to carry multiple ISO images on a single drive and boot them without rewriting the USB. Use a full Fedora installation when you need maximum performance, native hardware access, and automatic updates. Use a virtual machine when you want to experiment with system changes without risking your host hardware or network configuration.

Trust the package manager. Manual file edits drift, snapshots stay.

Where to go next