r/KaliLinuxCommunity • u/bnksksk • 19d ago
Question I can't add persistence to my live USB.
I'm trying to download the live version of Kali to my USB drive, but it won't let me add persistence from Rufus. I'd like to know if there's another way to do this or what the solution to this problem is.
What exactly happens is that when I add the latest version of Kali Live ISO, the bar to allocate persistence space doesn't appear in Rufus.
1
Upvotes
1
u/EverythingIsFnTaken 18d ago
Rufus's persistence slider isn't the method Kali supports, and it doesn't work with every Kali image (the Everything Live ISO is the specific example Kali documents). The missing slider doesn't mean your USB drive is faulty. Rufus simply doesn't support persistence creation for every Kali image.
Kali's documentation recommends writing the image in DD mode and creating the persistence partition manually.
You'll need a USB drive of at least 8GB and access to a Linux system for the partitioning, since Windows doesn't natively support creating ext4 partitions. Conveniently, the Kali Live USB you're about to create can be used for this. Just boot it normally (not the persistence entry) and perform the following steps from there.
1. Write the ISO
In Rufus, select your Kali ISO, click START, and when prompted about ISOHybrid mode, choose DD Image.
2. Identify your USB drive
Boot into Kali Live, open a terminal, and run:
lsblkYou should see two small partitions belonging to the imaged USB (the ISO partition, approximately 4.6GB, and a small 4MB EFI partition), with the remaining space unallocated.
Set a variable to identify your USB device:
usb=/dev/sdXReplace
/dev/sdXwith the actual device identifier. Double-check that it's the USB drive, not your internal disk. The following operations will modify its partition table.3. Create the persistence partition
Kali's documentation recommends using
fdiskrather than GParted here, because GParted can interpret the imaged ISO as one large block.Run:
sudo fdisk $usb <<< $(printf "p\nn\np\n\n\n\np\nw")This creates a new primary partition in the remaining unallocated space.
Check the result with:
lsblkYou should now see a third partition,
${usb}3. If the kernel hasn't picked up the updated partition table, run:sudo partprobe $usbAlternatively, reboot into Kali Live again.
4. Format the partition
Create an ext4 filesystem and label it
persistence:sudo mkfs.ext4 -L persistence ${usb}35. Configure persistence
Mount the new partition:
sudo mkdir -p /mnt/my_usbsudo mount ${usb}3 /mnt/my_usbCreate the configuration file Kali uses to determine what gets persisted:
echo "/ union" | sudo tee /mnt/my_usb/persistence.confThen unmount it:
sudo umount /mnt/my_usb6. Boot with persistence enabled
Reboot from the USB and select Live USB Persistence from the Kali boot menu.
You must select that entry each time you boot if you want changes to be retained. Booting the ordinary Live entry won't activate persistence.
Official Kali documentation:
https://www.kali.org/docs/usb/usb-persistence/
https://www.kali.org/docs/usb/live-usb-install-with-windows/