Using Kali Linux Persistent Live USB to Keep Your Pentest Tools Across Reboots
Learn how to add a persistence partition to a Kali Linux live USB so that installed tools, configurations, and wordlists survive reboots, with step‑by‑step setup, verification, and wear‑leveling tips.
23 Jun 2026, 11:29 UTC

Problem: Losing changes after each reboot
When you run Kali Linux from a live USB, any tools you install, configuration tweaks you make, or wordlists you save disappear once you power off. Re‑creating the environment each time wastes effort and can lead to inconsistent test results.
Thesis
By adding a persistence partition and a persistence.conf file, you can overlay a writable layer on the read‑only live image so that selected directories survive reboots without remastering the ISO.
Creating the persistence partition
- Boot any Linux system (or the Kali live USB itself) and identify the USB device, e.g.,
/dev/sdb. Warning: selecting the wrong device will destroy data. - Unmount any existing partitions on the device:
sudo umount /dev/sdb* - Use
fdiskorpartedto create a new partition that will hold persistence. Make it ext4 and label itpersistence. Example withfdisk:sudo fdisk /dev/sdb # Inside fdisk: n → p → [partition number] → [first sector] → [last sector, e.g., +2G] → t → [partition number] → 83 → a → [partition number] → w - Format the new partition:
(adjust the partition number as needed).sudo mkfs.ext4 -L persistence /dev/sdb2 - Mount it temporarily to add the configuration file:
sudo mkdir -p /mnt/persistence sudo mount /dev/sdb2 /mnt/persistence
Configuring what stays persistent
Create a persistence.conf file in the root of the persistence partition. Each line lists a directory to be made persistent; comments start with #.
# /mnt/persistence/persistence.conf /union /home /root /etc /opt /var/logThe special
/unionentry tells Casper to overlay the entire filesystem; the other entries limit persistence to those paths, reducing wear on the USB.Booting with persistence
- Unmount the partition:
sudo umount /mnt/persistence- Plug the USB into the target machine and boot. In the boot menu, choose the entry that includes "Persistence" (Kali’s live images add this automatically when the partition is labeled correctly).
- Once logged in, you can install tools, edit configs, or save files in the directories you listed.
Verifying that persistence works
After making a change, reboot and check that it remains.
- Create a test file in a persisted directory:
echo "persistence test" | sudo tee /root/persistence-test.txt - Reboot:
sudo reboot - After login, verify the file still exists:
ls -l /root/persistence-test.txt - Confirm that a non‑persisted directory reverts: create a file in
/tmp, reboot, and observe that it is gone. - You can also check that the overlay is active with:
ormount | grep overlaydmesg | grep -i casper
Limitations and best practices
- Wear: Frequent writes to flash memory can shorten the USB’s lifespan. Limit persistence to essential directories and consider using a high‑endurance USB 3.0 drive.
- Security: The persistence layer is not encrypted by default. Anyone with physical access can read persisted data. For sensitive work, encrypt the partition with LUKS before creating the filesystem.
- Size: The persistence partition cannot exceed the available space on the USB. Plan size based on the tools and data you intend to keep.
- Compatibility: Works with official Kali rolling release images from 2016 onward, in both BIOS and UEFI modes.
Actionable closing
Give your Kali live USB a persistence partition today: create the ext4 partition labeled persistence, add a persistence.conf that lists /home, /root, and any custom tool directories, boot with the persistence option, and verify that your changes survive a reboot. This small change saves you from rebuilding your test environment after every power cycle and keeps your workflow consistent.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.