Kali Linux 2018 Live USB with Persistence

How-To: Kali Linux 2021 Live USB with Persistence and Optional Encryption (Windows)

Last updated on | 471 replies

In this guide we will create a Kali Linux 2021 Live USB from Windows and configure a persistent partition (with optional encryption) so we can retain files and settings between reboots. With Rufus and Kali Linux 2021, this process is now so much simpler than before.

Note Regarding Kali 2022

This guide has not been tested on Kali 2022.1 (released Feb 2022). An updated guide will be published shortly.

1. Download Kali Linux 2021 (Live)

In this guide we are using the Kali Linux Intel/AMD 64-Bit (Live) image, which most modern PCs support.

If you have a torrent client, use the Kali torrent download link to speed up the download (10 minutes) as kali.org sometimes throttle web downloads heavily.

2. Write Kali Linux 2021 Live ISO to USB

Note: Before writing the ISO, it is strongly recommended that you delete all partitions from the USB drive if any exist, otherwise it may not boot properly. You can do this using Windows Disk Manager.

Write the ISO to your USB drive using a tool like Rufus, Universal USB Installer or UNetbootin. In this guide we are using Rufus.

  1. Download Rufus and run it.
  2. Select your USB device.
  3. Click SELECT and browse to the Kali Linux 2021 Live ISO you downloaded.
  4. Set a Persistent partition size, in this example, 4GB, though this can be as large as you want depending on your USB size.
  5. Click START.
Creating a Kali Linux Live USB with Universal USB Installer

If you see a warning about Syslinux, click Yes.

Kali Linux 2021 Live USB with Persistence and Optional Encryption

Click OK if you see this warning.

Kali Linux 2021 Live USB with Persistence and Optional Encryption

It may take 10-30 minutes to write the Kali Linux 2021 Live ISO to USB depending on your hardware and size of USB.

3. Boot Into Kali Linux 2021 Live USB

On some PCs, you can simply restart the machine, and if the USB is plugged in, it should boot to Kali Linux 2021 Live automatically.

If this doesn’t work and the PC boots straight back into Windows, hold down the SHIFT key while clicking Restart in the Windows start menu and select Boot from USB.

If this doesn’t work either, you may need to do some searching on how to boot from USB on your particular machine. Repeatedly pressing one of the function keys (F12F2, etc) or the ESC or Delete keys on bootup will invoke the boot or BIOS menus on some machines, where you can select USB as the boot device. You may also have to disable Secure Boot in your BIOS in order to allow Kali to run.

When the PC reboots, you should be presented with the Kali Linux 2021 Live boot menu.

In the Kali boot menu, select Live USB Persistence and press ENTER. The menu may look slightly different depending on your version of Kali.

Kali Linux 2021 Live USB with Persistence and Optional Encryption

Kali should boot straight to Desktop. However, if you do get a password prompt, the default username and password in Kali Linux 2021 is “kali”. For Kali Linux 2019 and below, the default user is “root” and the password is “toor”.

To test if persistence is working correctly on Kali Linux 2021, try creating an empty test folder on the Desktop and restarting. Select Live USB Persistence and if the test folder is still there, persistence is working correctly.

Note: From now on, every time you boot from USB, you must select Live USB Persistence in order for persistence to work correctly.

4. Kali Linux 2021 Live Encryption (Optional)

If you want to protect your persistence partition with a password, you can do so with luksEncryption.

Be warned, this process will overwrite your current persistence partition. If you currently have files and settings stored on the persistence partition, you must back them up before continuing with this process.

Reboot the PC and select Live USB Encrypted Persistence and press ENTER.

Kali Linux 2021 Live USB with Persistence and Optional Encryption

Open Terminal and use the root account with:

sudo su

Identify your persistence partition by listing partitions (lower case L, not number 1).

fdisk -l


Device     Boot    Size     Id   Type                
/dev/sdb1  *       111.7G   c    W95 FAT32 (LBA)                 
/dev/sdb2          4G       83   HPFS/NTFS/exFAT

You may see several entries for devices and partitions listed here. It’s very important that you identify your persistence partition correctly as we are going to overwrite it.

Look for your USB drive. It should have two partitions: One that stores the Kali Linux 2021 operating system, and another persistence partition, which you created earlier.

In the above example, I can see my 4GB persistence partition that I created in Rufus in Step 2.

My partitions are listed here as sbd1 and sdb2, however, depending on your hardware configuration, these may appear as sdc1, sdc3, etc. These will be different for everyone, so make sure you correctly identify the persistence partition for your particular hardware configuration and update the commands below to match.

If you are unsure where your persistence partition is, paste the results of fdisk -l in the comments below and I will try to assist (lower case L, not number 1).

5. Cryptsetup / LUKS Encryption

cryptsetup is a utility used to conveniently set up disk encryption using LUKS Encryption.

As my persistence partition is sdb2, the commands below will reflect that. Make sure to replace sbd2 with your own persistence partition, otherwise you might overwrite data accidently. You have been warned!

cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb2


WARNING: Device /dev/sdb2 already contains a 'ext3' superblock signature.

This will overwrite data on /dev/sdb2 irrevocably. 

Are you sure? (Type 'yes' in capital letters):

Type YES and press ENTER to wipe the partition.


Enter passphrase for /dev/sdb2:
Verify passphrase:

Enter a password twice. You can generate a strong password here. Make sure to keep it safe. Once the partition is encrypted, you cannot recover it without your password.


Existing 'ext3' superblock signature (offset: 1080 bytes) on device /dev/sdb2 will be wiped.
Key slot 0 created.
Command successful.

LUKS Encryption has now been applied to your persistence partition.

Now open your encrypted persistence partition.

cryptsetup luksOpen /dev/sdb2 my_usb


Enter passphrase for /dev/sdb2:

Enter your password.

6. Create and Label Encrypted Filesystem

Create an ext3 filesystem and label it “persistence”. Ensure you spell “persistence” correctly!

mkfs.ext3 -L persistence /dev/mapper/my_usb


mke2fs [version] ([date]) Creating filesystem with [number] 4k blocks and [number] inodes 
Filesystem UUID: [serial number] 
Superblock backups stored on blocks: [numbers] 
Allocating group tables: done 
Writing inode tables: done 
Creating journal ([number] blocks): done 
Writing superblocks and filesystem accounting information: done

Label it:

e2label /dev/mapper/my_usb persistence

7. Mount, Unmount and Close Encrypted Partition

mkdir -p /mnt/my_usb/
mount /dev/mapper/my_usb /mnt/my_usb
echo "/ union" > /mnt/my_usb/persistence.conf


umount /dev/mapper/my_usb


cryptsetup luksClose /dev/mapper/my_usb

You’re all done!

8. Reboot

Now, reboot the machine and choose Live USB Encrypted Persistence in the Kali Linux 2021 boot menu.

On bootup, you will be promted to enter your password.

Please unlock disk /dev/sdb2:

From now on, whenever you boot up Kali, you must select Live USB Encrypted Persistence in the menu to use your encrypted partition.

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

471 replies

Leave a reply

Your email address will not be published. Required fields are marked *

  1. I think this is a fantastic tutorial!

    It almost worked perfectly for me. Every time I wrote the ISO to the USB it would create an ISO9660 format for the two partitions. Gparted wouldn’t let me extend these partitions so I had to create an additional partition alongside the primary two. I used this command…

    fdisk –wipe=never -t dos /dev/sdX
    (Follow dialogs, but “n” for the new partition and I used default configurations. Then the “w” option to write the changes to the USB.)

    …as suggested in Vojtech Trefny’s reply.

    I was able to jump back into your tutorial at Step 3 after creating this partition, and I just targeted this partition as the one to be encrypted. I thought I’d mention it in case you wanted to add a 2.5 step or something.

  2. Hello, I used 64 GB pendrive to and used 50 GB persidtance, then i install application like terminator. but application getting deleted after restart. also settings are restored to default.

    1. Good news. And I think you can add a part of creating new sdb3. Also, it will be good to hear your news about making a standalone Kali installation on a usb drive, full encrypted, the part which I can’t deal with. Thank you big guy.

  3. Hello, Thanks for your great tutorial.
    I made a massive mistake, I used my_sub instead of my_usb and now no file or folder saves in desktop.
    How can I remove this persistence and make another one or what else should I do -_-

  4. Hi thanks for all it worked! (I made the Live USB Persistence without encryption)

    I have a simple question. I get logged in automatically everytime without any login screen. Is there a way to make a login screen for the login so i can put in my USER and my Password ?


  5. Hi I’ve just done this and it works fine once its booted, however if I boot into the installer to install to hard drive the menu is shifted off the screen to the left 3 inches.
    Do you have any idea how to fix this?
    I’ve fixed it before on a yummy created USB but there was already a place where I could shift right or left in one of the menus.
    I did try that in the /boot/grub/live/theme.txt and it got worse.
    much of that menu is shifted left 13 % and I tried 0% to no avail.
    Thanks, Ranall

  6. In Kali 2021.3 Live Encrypted persistence settings are not saved, but you could save your data inside the encrypted persistence partition without loosing at shutdown. Use Kali 2021.2, here all your settings and the data that you want to preseve are saved at logout.

  7. I followed all the article but when i boot again into the usb and choose the encrypted persistence option, it is login without any luks encryption.

    any suggestions ?

  8. Hello,
    After following the guide precisely (and unencrypted persistence working) I cannot get it to work – I’ve tried the official guide, your guide and a video and they all are basically the same, but yield the same, failed, result.

    Upon booting into encrypted persistence I am not prompted for a password to unlock the disk – it just boots straight to desktop – and the encrypted partition appears on the desktop as unmounted.

    Any ideas as to why this may be? I’m using 2021.3

  9. Probing EDD (edd=off to disable)… _

    I get this when I try to boot, is there any way to get back the old tutorial using Universal-USB-Installer and MiniToolPartitionWizard please ?

    1. 100%, others are incomplete ****, and the Rufus method is the best because it has automatic persistance mode.

      1. The persistence was working when first done by Rufus. But when I overwritten it to have encrypted one, it doesnt work. any idea why?

  10. Thank you, a million times! I’ve been struggling with getting my usb up and running because I’m still so new to all of this. You’re the first person who has simplified it so well, i actually know what the hell im doing. You rock!

  11. Thanks for this post, I’ve been trying the kali tuto, and I can’t made it, but, yours is nice, thanks.

  12. this is the wrong way round now. You’re running Kali in 111GB and got 4GB only as a hard drive… I’ve used this guide a dozen times it excellent thank you. needs to be sdb1 for the encrypted drive!

  13. 430 Comments – damn… glad I wasn’t the only one! I was trying to do this with etcher and running into walls. Thanks!

  14. Brother, thank you very much!

    I did exactly as you said. Downloaded Rufus, made de persistent partition (my USB drive is 16gb, so it made a 10gb partition).
    Downloaded de Live image at kali.org, put it on the formatet pendrive.
    Went to the Encrypted Partition, made all the commands and rebooted twice (in the first time it didn`t save the Wireless wifi, so I got a little bit worried it was not working).
    But then I created a new folder and a file in the desktop and rebooted again. Now everything is working fine.
    Tks a lot my friend!

  15. Didn’t work for me at first, but I checked the /mnt/my_usb/ directory and there was no persistence.config file in there, so I redid this step:
    Create a new file called persistence.conf using the nano text editor.
    $ sudo nano /mnt/my_usb/persistence.conf
    In this file, type / union.

    Once that happened, I was able to contain all changes (persistence) after rebooting. Thanks for the write up, exactly what I needed.

  16. This procedure is not working with ISO 2020.4.
    The boot is looped. I tested it more than once and several pendrives.

  17. My kali is not saving, when I write in the terminal “fdisk -l to show the partitions, it says: Partition 1 does not start on physical sector boundary” PLEASE HELP!!

  18. The encryption works well, but no persistence. What could go wrong? And how can i restart the drive and try again?

  19. Didn’t work on the latest 2020.4 kali distro. The PC fails to even boot past the Dell screen upon reboot until the USB is removed.

  20. rJust did went through this.

    Worked first time through with the 2020.4-live-amd64.iso and a 32gb sundisk cruiser. I guess technically I only followed the guide from step 4 and onward. I used rufus and did a dd copy to the usb and used Aomei partition assistent to unformat the persistence partition. Didn’t have to resize anything. After that I followed the guide verbatim and except for not capitilizing ‘yes’ and forgetting to unmount the usb at the very end everything went great. Did the folder test at the end and everything. Thanks for this! I owe you a beer.

  21. I created the Kali Live USB boot on a HP Pavilion laptop, and it works great. But when using the same USB drive on an Acer laptop it goes into a 10 second boot loop forever and will not start Kali. Seems to be display driver issue. How do you make the USB drive boot on other laptops? Thanks, Joe

  22. great uttorial thanks. Clear consise and straightforward. Only thing to add is that on point 6. Sudo fdisk -l looks like number 1 and its it’s a lower case ‘L’ Must be the font

  23. Persistence and encryption works on 2020.2 but when upgrading. Right around 30-40% it will go black screen and and cursor is blinking repeatedly.

    1. yes sir i got the same problem. so i just pressed control+alt+f3 when the screen went blank and then a terminal of kali opened there i updated the kali again, install gdm3 and kali successfully booted. but now i cant see the network manager icon whcih is on the right hand side top corner used to access the wifi and all. plz help

  24. when i enter the the sudo fdisk command “sudo fdisk -1” i get an error that says “fdisk: invalid option –‘1’
    when i enter the the sudo fdisk command “sudo fdisk” i get an error that says “fdisk: bad usage”
    when i enter the the sudo fdisk command “$ sudo fdisk -1” i get an error that says “bash: $: command not found”

  25. sir i made a kali live usbe before and now im here pls answer my questions

    i have not made any persistence will it work with that
    1. It will work for temporary. But when you are using kali linux live with out persistence you can not save any changes.

  26. It works very well, thank you!

    I made one mistake: Naming the partition of the USB stick “Persistence” instead of “persistence”. The capital letter ruined it the first time I tried. 😉

  27. This broke my 256GB usb. Now my USB isn’t being recognized at all. This happened during or after the Mini Partition Tool.

    Can’t fix my USB. Or this is only good with like a 32GB or smaller thumbdrive?

  28. Hello !

    [FAILED] Failed unmounting /run/live/persistence/sdc1
    [FAILED] Failed unmounting /tmp

    I used Kali before on another laptop and persistence worked now with v2020.2 i can run live but when i try to go into persistence
    i get this errors and it shutsdown after 1min

    any susugestions ?

  29. Hello
    I’m trying the live persistence for the first time.
    Follow all relevant procedures and steps, but still not working and my screen contd turning upside down I.e the opposite way
    Please need your assistance urgently.


  30. Hi there! So I was able to log into a live session in Kali 2020.1, but when I try to set up LUKS I get the error “Command failed with code -1 (wrong or missing parameters” when it should be asking me for a passphrase. My USB partition is sda2, but other than that I’ve entered exactly what’s listed. Any ideas?

  31. Sir I am not able to connect my Kali Linux with my wifi.
    And live persistence is also not working.
    When restart the pc than it removes my folders which I created earlier.
    Plz help me

    1. Make sure you have space in between / and union like / union. I followed the same mistake and learnt a hard way.

      command should be :

      correct format
      echo “/ union” > your mounted path ex. /mnt/usb

      incorrect format
      echo “/union” > your mounted path ex. /mnt/usb

    1. Its storing the forders but if I change the passwd of the user if I restart its not changing to login to that user I should default password only.

      1. Its storing the forders but if I change the passwd of the user if I restart its not changing to login to that user I should use default password only.

  32. I have done dist upgrade in kali 2020.1 live but after reboot it shows black screen only . What’s the problem here and how to install upgraded tools .

  33. Hey,
    I tried the live usb version on my pc as well as laptop. It worked perfectly on pc which runs on intel i3 processor. But on my laptop, sometimes it shows only blank screen. Even if it boots into the window, there is some graphical/display error whenever i point to any folders or options like blurry color pattern. My laptop runs on Amd ryzen 5. Please help to sort this out. I tried updating drivers. Still no use.

  34. Hi

    I installed it twice from start and I know the password is right but it shows as wrong password. It seems to be a problem with latest Kali version and there isn’t any information anywhere on web regarding this issue.

    Can you please solve it? Would be greatly appreciated. Thank you

  35. Sir i put 123456 as passphrase but when i type it in passphrase space it shows that it was a worng. Can you solve it

    1. I have the same issue

      I installed it twice from start and I know the password is right but it shows as wrong password. It seems to be a problem with latest Kali version and there isn’t any information anywhere on web regarding this issue.

      Can you please solve it? Would be greatly appreciated. Thank you

  36. Kali 2020.1
    I completed the encryption process and when I boot, and enter my passphrase it loads for a while and the computer turns off.

  37. Hey thanks for this advice. I made a bootable usb with kali linux 2020.1, I followed these instruction for mounting partition with persistence.conf and unmounted after \ union line added to persistence.conf. after reboot my test folder was missing so this did not work for me. My partition is sdb2 as well… first partition is fat32 lba second is not linux though. Used easy2boot software.

  38. I labeled the partition with both Rufus and the mini-tool of witch I prefer Rufus but it did not save properly and I had to run the command mentioned in the comments to name the partition and success! e2label /dev/sdb2 persistence

  39. I can’t set “Live system persistence (2020)”. It have always broken, when I tried to launch it and I had 2 ERRORS: “Failed unmounting /run/live/persistence/sdb5” and “Failed unmounting /tmp.”

  40. Hi! Easy to understand for a newbie, Great job!
    I did all the steps, but the folder isn’t there after restart, the persistence.conf file is saved and all but no folder.
    I did encounter this messege on red after sudo fdisk -l:
    partition 1 does not start on physical sector boundry. It could be this the problem?
    Thanks a lot!

    1. Same issue. Partition is there and persistence.conf is in the unmounted partition but no saved file or folder on the desktop.

      1. Figured it out directly from the kali.org website. You need to label the partition “persistence”. The OS must look for that when loading the live boot. If you’ve followed the guide completely and still don’t have a persistent boot, while the partition is unmounted (not sure it makes a difference, but just what i did) in the terminal type “e2label /dev/sdb2 persistence”. Per the guide and comments, “sdb2” in the command will be whatever your partition is actually labeled from fdisk -l command. Labeling the partition persistence fixed the issue for me and now I have a persistent boot.

        1. Thanks for the info. It could be that people aren’t labelling the partition “persistence” in MiniTool (or whatever Windows partition manager they’re using). So I might insert an extra step in the guide to check in Kali if the partition is labelled correctly, and if not, to run e2label /dev/sdb2 persistence.

          1. I tried doing this and it still isn’t working. Cannot get persistent Kali to boot at all. Can you please update the guide with specifics on how to check?

  41. I love these h4xx0r5 reporting problems without even trying a bit further from just copy&paste. You should be ashamed of yourselves (╯°□°)╯︵ ┻━┻

    1. you would have to edit the grub options. it is possible and i did it once before long ago. it requires editing configurations files. look it up. 🙂

  42. kali@kali:~$ sudo mkdir -p /mnt/my_usb
    kali@kali:~$ sudo mount /dev/sdb2 /mnt/my_usb
    kali@kali:~$ sudo echo “/ union” > /mnt/my_usb/persistence.conf
    bash: /mnt/my_usb/persistence.conf: Permission denied

    After step with “echo…” i had bloker with “Permission deined”
    I already try to use:
    sudo sh -c “echo “/ union” > /mnt/my_usb/persistence.conf” and the result was:
    kali@kali:~$ sudo sh -c “echo “/ union” > /mnt/my_usb/persistence.conf”
    I had just “/” as result of my command. Then i create new folder on the Desktop to check if this changes will save. Restart PC, go Kali Linux Live with Persistence – my folder did not saved..

    Do you know what the reason and how could fix this behavior??

    1. Log in as root and then redo the procedure ( it should work better than sudo), kali 2020 logs in as non-root by default

  43. Hey i have issue when i type my passphrase i
    in the encrypted persistence boot menu
    The computer shutdown and he is write” failed unmounting tmp ” and same for /run/live/medium

  44. Everything is followed as guided through, but the persistence isn’t working in Kali’s settings or folder creation in the desktop – as soon as i restart it goes back to original, Kali Version is 2019.4 – it does save the folder in the encrypted partition though, but nothing settings wise or let’s say if i update or upgrade nothing gets saved after restart – please help?

  45. Thank you very much. Quick question.
    When I get to the persistance phase, the command “mkfs.ext4 -L persistence /dev/mapper/my_usb” doen’t work, it tells it doesn’t exist
    any suggestion??

    thank you very much

  46. I followed instructions and partitioned usb correctly. After booting into live w/ persistence i entered the remaining commands. The first three went fine but the fourth not so much. How do i correct this?

    mkdir -p /mnt/my_usb

    mount /dev/sdb3 /mnt/my_usb

    echo “/ union” > /mnt/my_usb/persistence.conf

    umount /dev/sdb3

    Umount: /dev/sbd3: no such mount point specified

  47. **newest kali linux build on 512 gig usb device. used YUMI multiboot. Followed your above directions and also read the comments. Took over 8 hours to complete. Didn't make a test folder. Rather took a screenshot of terminal window. After restarting, I'm getting a failed to set font and keymap…(hmm, that doesn't sound too serious). Booted up, but the image of the terminal window wasn't in Pictures folder. Shut the windows machine down and re-started from usb again. Still no picture. Anyhow, then used sudo systemctl restart console-setup.service. Saved that command on a text and saved to documents. Also, put a Folder on the Desktop. Rebooted into the Windows. Then shut down and booted into Kali (from the usb). When it started this time, the folder is on the Desktop and the saved text is in the Documents folder. So, it's working. Still trying to figure out the "failed to set console font and keymap" at start-up. Thank you for your time. I'll take it from here. 🙂 Have to search out some more of your stuff… cheers

  48. Whenever I boot my system into Kali Linux with encrypted persistence, I get to the point where I am supposed to enter my passphrase, which I enter, but then when I get to the desktop, the test folder is never there. I then check the file manager, which has a device labeled “26 GB Encrypted” in the left hand column (I am using a 32GB USB with 6GB for the operating system and 26GB for persistence). I click on the device and I get prompted to enter the passphrase. After I enter the passphrase, I get an error that says ‘Unable to access “persistence”‘. More specifically, it says:

    Unable to access "persistence"

    Error mounting /dev/dm-0 at /media/root/persistence: wrong fs type, bad option,
    bad superblock on /dev/mapper/
    luks-1971d87e-5c90-414e-88b3-43a30fca485d, missing codepage or helper
    program, or other error

    I have tried this on both Kali Linux 2019.1a and 2019.3. I can’t figure out what the problem is. After the first time it didn’t work I started just copying and pasting the commands into the terminal to make sure that I wasn’t mistyping anything, so I know that the problem isn’t the commands being mistyped.

  49. After doing this when I set a root password it just reverts back to “toor” the next time I boot into it. The instructions you provided worked like a charm but I was hoping you could help me with this further step.

  50. I tried both kali-linux-large-2019.3-amd64.iso and kali-linux-2019.3-i386.iso in 2 different 8GB USB. I followed step by step
    /dev/sdc1 4.7G c W95 FAT32 (LBA)
    /dev/sdc2 2.8G 83 Linux

    mkdir -p /mnt/my_usb
    mount /dev/sdc2 /mnt/my_usb
    echo “/ union” >/mnt/my_usb/persistence.conf
    umount /dev/sdc2

    but it didn’t work well.
    Pls help.

  51. I tried your way twice, with the 2018 and 2019 Kali version, and both worked well. This is an excellent guide!

    Actually, the second time I wanted to use a different way. I am using Rufus to create Live USB, and it allows creating persistent partition directly when writing the ISO. The partitions were created, but for some unknown reason, the persistent one got filled up very quickly. And I was left with 0 bytes left. I tried it twice, but the same thing happens, in no time I got 100% usage.

    Then I try your way again. I let Rufus create Live USB with no persistent partition. Then resize the partition, and create persistence.conf manually. Until now, it got only 11% used and I already install so many more. I am still wondering, what when wrong, but I left the questions for a later time.

  52. I cant get Kali 2019.2 at all except for failsafe mode but you got me that far nothing else was working even near this well. I did get Kali 2019.1 to boot right up one problem though persistence isnt working could you please post how to fix that. Kali was kicking my ass but you got me going would be nice if I didnt have to start from go though every time I log on. One last thing some douche put in the comments about one of your commands being off the one that starts with echo. He’s nuts I typed it just as you had it and it worked perfectly. The second time I booted Kali I tried it his way hoping persistence might work it wont accept it his way. Would love it if you did something on a tool that actually works well for pentesting, been using Aircrack-ng and Hashcat on Unbuntu but man is it slow going. Thanks again and please if you can could you post how to get the persistence to work.

  53. Everything works well but when shutdowning it is not shutdowning at all
    It is showing”a stop job is running”

  54. Amazing, just trying it at the moment but this information was clear, updated and simple as it should be, thank you very much!!

  55. This works flawlessly on Kali Linux 2019.2 amd64. Best “how to” ever; clear, concise, well written. Thank you so much. Spent needless hours trying this, till we found your tutorial.
    Just awesome! Thank you again.

  56. My mistake (as English is not my first language) was that I misspelled PERSISTENCE… instead I wrote PREsistence… after I’ve fixed that it works.

  57. Everything works IF you also do these things:

    Remember that the OS might be bigger then 4GB. Adjust for that if needed.
    Set your new presistence partition NOT as Primary but as Logical. (VERY IMPORTANT).
    echo “/ union” > /mnt/my_usb/persistence.conf // ( > /mnt) this commando is wrong.

    echo “/ union” >/mnt/my_usb/persistence.conf // ( >/mnt) this commando is right.

    The diffrence is the space. (> /mnt…) –> (>/mnt…) as mentioned by Cristian Ritter in the comments below.

    Other then that, nice tutorial!

    1. I’m using a 32GB 3.0 flash drive, so I know that space isn’t an issue. I also increased the initial partition resize from 4 to 5 to see if that made any difference, but has not.

      I missed the comment about the space in the command being incorrect, I will give that a shot. Thank you!

    2. Well, I sure hope you are right. I can’t tell you how long I have trying to get this to work. It doesn’t seem to hard to do at all. But the system just won’t recognize the persistence partition what-so-ever. Thanks for the input on what to try,

  58. I’ve followed the steps a few times with Kali 2019.2 and can’t seem to get anything to save. No errors in the commands, but nothing saves when I reboot.

  59. sdb1 is same of sda1? in my case the created empty folder not show after restar kali USB persistence.

  60. Mine kind of worked. I cant save a folder to the desktop, but it looks like a usb drive is mounted called persistence… Clearly I did something wrong. And tips?

  61. Can I set persistence and load nvidia drivers on any pc that uses an intel gpu, then be able to use that live usb with other pc’s with nvidia cards? Thank you very much

  62. when I used fdisk -l
    I got an output that has the /dev/sdb2 as hpfs/ntfs/exFAT and not linux
    then when I tried to mount /dev/sdb2 /mnt/my_usb it failed saying bad superblock on /dev/sdb2, missing codepage or helper program, or other error.

    Any advice from here would be appreciated. I followed all of the steps above and one thing that happened that wasn’t covered was that it asked me to format the drive after I selected Apply at the end.

  63. Excellent! Thank you! I had a persistent partition before, but with your tutorial everything is persistent. Love it!

  64. If you get an error say “bash : unmount command not found “ MAKE SURE YOU ARE SPELLING IT RIGHT ITS “umount” not “unmount”

  65. I have already followed this tutorial, but when everything is finished then I reboot the persistence again then a boot failure occurs (end trace ***********)

  66. This is an awesome guide. Thanks. Can this work with other Linux distributions eg Ubuntu? or only on Kali?

  67. I already test all persistence it is not working, if i reboot all folder are gone, i use RoG strix how suppose i do?? Sorry for bad english

  68. it gave me a error in minitool when i tried to do both commands at once so i split the tutorial and resized partition then apply and add new partition ext4 then applied all ran sweeet thanks

  69. After creating the persistense partition, rebooting takes me to the grub loader with a console instead of the kali menu. I’ve followed the instructions to the dot. What may I have done incorrectly?

  70. Hi, so I already have kali linux on my usb drive but I am on a macbook pro and dont know how to set up a persistent partition, please help.

  71. Disk /dev/sdb: 14.3 GiB, 15376318464 bytes, 30031872 sectors
    Disk model: Ultra Fit
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x61924af6

    Device Boot Start End Sectors Size Id Type
    /dev/sdb1 * 2048 8390655 8388608 4G c W95 FAT32 (LBA)
    /dev/sdb2 8390656 30031871 21641216 10.3G 83 Linux
    It does not work for me when i reboot it

      1. kali-linux-2019-1a-amd64 works for me, but using Rufus instead of Universal USB Installer. Setting Rufus with GPT partition style. Try!

      2. Type msinfo32 on your windows cmd and look the BIOS Mode of your machine, mine is UEFI, so i had to set GPT partition, on Rufus, to boot.

  72. Thanks!! Works for me in kali-linux-2018.4-amd64, but i had to write the ISO to my 500G USB HD using Rufus setting GPT partition style (UEFI boot).

    1. Note that Windows 8 and later versions can only support UEFI, it can not boot from the traditional MBR disk.

  73. Hey there, having a strange issue hoping I can get some advice here.

    I’ve done this before in the past and I’ve followed this guide to the letter, but whenever I boot from the USB and select the “encrypted persistence” option it asked me to unlock /dev/sda3. I enter in the exact passphrase, and it just tells me there’s no key slot with that passphrase. From what I see in kali (running in VM) there’s only two partitions. Just does’t make sense to me. please advise.

      1. However I was under the assumption (from what I found googling the issue) I could use symbols from the 7-bit ASCII Table?

      2. I was able to figure it out, The laptop I was booting the USB from also had a LUKS encrypted partition and was asking for that passphrase first. I had to enter a bad password then select “no”. After that I was prompted to enter the passphrase for the correct partition.

  74. I’ve had 2 partitions there one with size set to 3.24 (Other) and second with size like 364kb (FAT16).
    I’ve followed every step carefully but still didn’t worked for me. Please, help me.

  75. echo “/ union” > /mnt/my_usb/persistence.conf this commando is a bit wrong
    right command is
    echo “/ union” >/mnt/my_usb/persistence.conf

    nice tuto.

    1. Run apt-get update
      Run apt-get install tor torbrowser-launcher
      Then, see Applications menu under Usual Applications and Internet. This shortcut will only work if you’re not running as the root user.

  76. Thanks for the guide but the partition magic tool broke my standart windows PC on the hard drive. It asked to reboot windows to finalize the work on the USB stick now it just won’t boot anymore 🙁

  77. Thanks for the guide, it’s very well written. The partitioning and installation went flawlessly. However I do have an issue with the thing running extremely slow, like apt-get update && apt-get dist-upgrade takes more than a whole day to finish installing after downloading 1GB of files.

    I use a 64GB Kingston 3.0 USB, plugged in to a 3.0 USB port.

    The machine has an i7 8550U processor and 8GB RAM with a Windows 10 main operating system. I have disabled secure boot in order to boot from USB. Perhaps you will have a clue and point me in the right direction on how to solve this? Is it the BIOS settings that require some modifying?

    I used the 2019.1 image for Kali.

  78. Creating file system section of tutorial was almost flawless, I ran into errors due to usb label having a space in it but finally got it working by only using the fist part of usb label, ie Kali Live to just Kali where the usb label was needed. Thanks for a great resource!

  79. use these commands instead

    fdisk -l
    mkdir -p /mnt/my_usb
    mount /dev/sdb3 /mnt/my_usb
    echo "/ union" > /mnt/my_usb/persistence.conf
    umount /dev/sdb3

  80. anyone having a problem, just use win32 disk imager and write the iso with it instead of Universal USB Installer and complete with the rest of the tutorial.

  81. I’ve just done it with Kali 2018.4. Works perfect! Thank for such a full guide!

    (For those one who has discrete nvidia card and stuck at firts boot – press e when choose kali boot option and type nouveau.modeset=0 in the end of “Linux” line)

  82. A very good guide but … l have a little trouble that when I created a passphrase and verified it, but the Teminal got this to me:”Command failed with code -1 (wrong or missing parameters).” So I just wander how to solve this problem, thank you very much!

  83. This guide worked almost flawlessly. In the end, following these instructions did give me a bootable USB with Kali + Persistence; however I was not able to resize the partition. I’m using a pretty standard Lexar USB and no matter where or how I tried, it wouldn’t give me the option to resize. I’ll likely try again with another USB stick, but I wanted to confirm that even though I couldn’t resize – simply creating the new partition and following the rest of the guide still results in a successful configuration.

  84. Hi and thank you very much for this amazingly put together tutorial. The only problem with my attempt so far is that I get stuck at step “4. Boot Into Kali Live USB”. I have created the persistence partition, resized it, process was complete, safely removed USB and then restarted laptop, entered boot menu, selected my flash drive but it doesn’t want to boot from it. I am using a new 64 GB flash drive (bought yesterday specifically for this purpose) and I’m stuck. The Kali Linux .img is 2018-4, checksums checked ok. I want to mention the fact that the drive is defo working fine, as I have previously installed ubuntu and mint on it, and managed to boot both distros just fine (but couldn’t get persistence to work on them, so decided wo get kali, since I’m studying cybersecurity @ university) (might have given you a bot too much background info there 😛 ). Any suggestions at all…?

    1. Try going into your BIOS and disableing “secure boot” under your boot settings. After restarting and doing the code confirmation then try booting to the usb. That’s what got mine to work. If it’s any help I was trying to run it on an HP laptop.

  85. Nice one!

    Got this working as described in article on first attempt. Thanks very much for this guide as its much more thorough than what is provided in the official Kali Docs.

    FYI I used 2018.4 amd64 image with SanDisk Cruzer 16GiB USB drive.

    Works like a charm.

  86. Firstly, I didn’t understand what I’ll write to my_usb.
    Second, I wrote persistence.
    Third, my Linux gives SCHED_ERROR 20 []

    Please help me

  87. After following the steps and trying to boot into Kali grub says you must load the kernel first. Did I miss something?

  88. After starting the live mode, the monitor goes dead. Only the console works after pressing ctrl+alt+F2.How fix this?

  89. I do everything as it comes out in the post and when I go to the partition wizard I get something bad is wrong and instead of blue I get black

  90. Any idea why I cannot mount/unmount my persistence partition?

    Device Boot Start End Sectors Size Id Type

    /dev/sda1 2048 10485759 10483712 5G b W95 FAT32

    /dev/sda2 10485760 115343359 104857600 50G 83 Linux

    root@kali:~# mount /dev/sda2 /mnt/my_usb/

    mount: /mnt/my_usb: /dev/sda2 already mounted or mount point busy.

    root@kali:~# umount /dev/sda2

    umount: /dev/sda2: not mounted.

  91. Error shows while formatting partition for persistence . Says mpw cannot create partition in this removable drive . You need to delete all the partition.

  92. THANK YOU!!!!
    After hours of frustration, came upon this page, followed the instructions and got my live usb with persistence encryption working straight away. And I’m a newbie…
    Brilliant. Thank You so much!

  93. this works, but after enabling persistence, kali is ridiculously slow.
    I can barely open directories in the gui or firefox, even on an i7/gtx1070..etc…
    is there some swap file or something we are supposed to enable?
    I’ve gone through the process on two different usb’s both 2.0 and 3.0 and
    it doesn’t resolve the lag issue, also tried on different usb ports

  94. Why after umount /dev/sdb3 I type reboot and it’s just freeze. Please, can anybody help with that? I’ve tried a lot time.

  95. I do exactly step by step. I used 16gb flash drive on my loptop without hard drive. one partition of flesh drive I left 4,5 gb for kali linux. second 10gb for persistence….but still kali linux x64 won’t save any files or settings…. all commands works without any fails.. Actually I see config file of persistence, and in opened file I see just this: / echo and nothing else…. Help … I tied diferend methods but still not working…. I spend 8h to searching how to fix it…. but nothing helps me…. cmo’n… ://////

    1. when you say this works, do you mean you can save files to the persistence drive, or all changed settings are persisted?
      I can save whatever file, but only in the persistence drive/folder. not on the desktop or anything.
      and any changed settings are lost.
      is this a limitation of kali live persistence?

  96. I’m using 2018.2 and I try to do the command for create new partition, it failed for mount /dev/mapper/my_usb /mnt/my_usb saying mount does not exist. Anyone can help me ?

  97. This worked exactly as described. Installed 2018.3a on a 32G thumb drive; tested fine. I have a test folder on my desktop and it retained my wifi settings. Thanks!

    1. I’ve to clearify that i followed the guide partially, i created the partition inside kali with the native “Disks” tool. I don’t think change nothing but i want to specify

  98. I did the same like several times with 32 gb usb of know how brand and after reboting every thing is gone i am again like a new user

  99. I followed the same steps like several times with 32 gb usb of know how brand and after reboting every thing is gone i am again like a new user

  100. how can i use some left space of my flashdrive for files that can be access on windows? I’d already installed bootable kali linux with space for persistence.

    1. Make a bloody ntfs partition that windows can see it download tools on qindles that grants support for ext4 filesystem..

  101. mkdir -p /mnt/my_usb
    mount /dev/sdb2 /mnt/my_usb
    echo “/ union” > /mnt/my_usb/persistence.conf
    umount /dev/sdb2

    —–here I made a mistake with “umount /dev/sdb2”. I found it on time and changed it. repeat these operation again. it seems everything is okay. I created a new folder in desktop, after restart, I can’t find it 。。。

  102. Just done this today, worked perfectly with 2018.3 thanks!

    Note: This can also be done without MS-Windows installed. You can even use a PC with no drive, just using another live system from DVD or USB stick (eg Lubuntu LTS). Be sure gparted is on the other live system. Gparted works similar to the windows tool shown here.
    But if you have a Windows system anyway somewhere, this is a very nice way to do it.

    PS. if you like to change the default password and autologin option, there are hints in the net, too.

  103. every time I follow this tutorial or any tutorial for that matter it doesn’t become persistent.
    the partition part of the usb is always showing up after attempting it. also should i do this all in the first live system or the persistent mode as i have read that on other tutorials that you cant start it in one system or the other. i had achieved this in 2016 with the same usb however now it no longer works. any possible reason why?

  104. I didn’t see the “Please unlock disk /dev/sdb2:” message and my test folder disappeared after reboot =(. I used 2018.3 amd64 image. And now I’m going to use the previous release (2018.2). Hope it will work.

  105. awsome dear friend it works on my first time.
    thank you bro.
    can please guide me “how to disable live system encrypted persistence”‘also .. the proper way u guided above how to setup live system encrypted persistence.
    it would be great if u share this one also.
    thank you once again.

    1. I’m not sure yet, I haven’t had the time to test it. And there isn’t any discussion about this on the Kali forums from what I can see. If anyone else could test I would be grateful! 🙂

  106. Works! Commenting from an encrypted persistence live boot.

    “Running apt-get update && apt-get upgrade” now to see if moving to the latest breaks anything, will report back.

      1. 2018.2 amd64

        looks like the problem is w/newer versions of dm-crypt I think. When I ran apt-get upgrade and it got to updating, it provided me with a warning about how the hooking method that was being used will be deprecated soon. It’s fine I guess if you already have an encrypted partition setup, but if you try to create a new one, nothing.

        I will find the exact warning and post it here later.

  107. when i rebooted, it asked “Please unlock disk /dev/sdb3 and it had worked.
    but when check “new folder” i was created, nothing was saved.
    what should i do ?

  108. Hello!
    i multiple times have created a new USB Stick after this instruction, but Kali does not auto mount my Partition with encrypted persistence??

    I dont know why! I have also tried other Instructions, that i have found in Goolge, but same error!
    Without the encryption it works, but with encryption kali does not ask me for a password, when i boot from my USB!

    I also have tried several Notebooks…

    Can you help me?

    And sorry for my bad English, i am a German User with terrible English Skills =)

    Best Regards

  109. Story time:

    This command – “mkfs.ext4 -L persistence /dev/mapper/my_usb” – is the culprit

    For whatever reason, after running this command, the type of drive shown from “fdisk -l” still shows “Microsoft Basic Data” for the drive.

    I figured it out by using the mkfs command while going through your other guide instead of setting up the partition as EXT4 when I start with miniTool partition wizard. lo and behold, I saw with a quick fdisk -l afterwards that the type hadn’t changed

    So I ran Gparted and reformatted the partition as EXT4 and labeled it “persistence”, now when I run fdisk -l it shows “Linux filesystem”

    Restart into the persistence option and BOOM! Mission accomplished.

    I would recommend perhaps modifying the guide to run “Gparted &”, and format the partition as EXT4 after using the cryptsetup luksOpen command instead of mkfs. If you want to keep that step as command line, when running Gparted it shows you what command it does to sucessfully change the partition.

    1. Ok, thanks for the feedback. I cannot recreate the problem here though I’ll need to do more tests.

      The partition shouldn’t be showing as Microsoft Basic Data. When you run fdisk -lwhen first booting into Kali, the persistence partiton type should show as HPFS/NTFS/exFAT. Are you sure you created it as unformatted as specified in Step 3. Create Persistence Partition?

    2. I think I’m having the same issue. After running “mkfs.ext4 -L persistence /dev/mapper/my_usb”, fdisk-l continues to show the partition as “HPFS/NTFS/exFAT.” By using Gparted, I am able to format it as EXT4 and get it to display as “Linux”. Unfortunately, Kali still ignores the persistence.conf when I reboot. I formatted my persistence partition as “unformatted” in step 3.

  110. When I rebooted, it asked “Please unlock disk /dev/sdb2” and I thought it had worked. The second time I rebooted it didn’t ask for a password, and nothing was saved. The persistent encrypted partition is there, it just doesn’t boot off it (I always chose “Live system (encrypted persistence, check kali.org/prst)”).

  111. I’ve followed this guide word for word, no luck.

    Everytime I boot and choose “encrypted persistence”, it does not unlock the drive upon boot. I boot into Kali’s gui first, root toor, then I have to use “cryptsetup luksOpen /dev/sdb2 persistence” and then mount it.

    Because it doesn’t unlock the drive on boot, it can’t read the persistence.conf file, so no persistence is maintained.

    I’m using kali-linux-xfce-2018.3-amd64.iso as my image (I ran a hash check to confirm it’s good). I’ve imaged using rufus, UNetbootin, and DD. I’ve managed the partitions using Windows disk manager, gparted, parted, and the minitool partition wizard.

    I’m imaging on to a 32 gb flash drive (I’ve tried two different ones to see if the hardware was causing the issue). I’ve flashed the image as a GPT filetable and MBR. I’ve booted using UEFI and legacy.

    Could really use some help.

    1. Do you get the message Please unlock disk /dev/sdb2 on boot?

      A lot of these issues are caused by an incompatible USB drive. Is the second USB you tried the same brand? Also if possible try creating partitions on a different computer as there could be some other USB hardware issue. If you can pick up a new USB drive, I recommend the SanDisk Ultra USB 3.0 Flash Drives. I have loads of them and they’ve never failed me.

      1. Nope, no message on boot to unlock /dev/sdb2. As for the brand, both of them are SanDisk, one is a Cruzer Glide 32gb, the other is an Ultra 32 gb.

        I will try to create the partitions on a different machine and report back.

        1. Nope, tried on a different machine. Nothing.

          On a related note, I just noticed upon startup as it loads

          “sdb sdb1 sdb2
          WARNING: unable to load module dm-crypt
          WARNING: cryptsetup is unavailable”

          I think there might be something wrong with the xfce version of Kali…I will try the base image and report back”

          1. Nope. That didn’t do it either. No warning this time for dm-crypt or cryptsetup either…or at least one that I can see… 🙁

          2. That’s a pain. And sdb2 is definitely the right partition? Try cryptsetup -v luksFormat /dev/sdb2 --debug in Step 5 to see if any errors come up in the debug.

            Also see if you can get unencrypted persistence working using my other guide. If that works, then you know your USB and partitions are ok and it’s some other issue with encryption only. Also try and copy and paste the commands from the guide just to rule out typos, and make sure you have the correct device, sdb2, etc.

          3. I can’t believe I’m about to say this because I am a total noob, but I think I might be able to offer some insight here.

            I think it’s an issue with the new Kali version 2018.3

            I followed the instructions above like you and installed the newest ISO which is 2018.3 but it doesn’t prompt you for the password during the boot sequence anymore. When you boot in, you can unlock your persistence through the Places> menu and selecting the encrypted drive but it seems unstable.

            I am a total noob, so please take everything I say with a big pinch of salt, but if I had to make a largely uneducated guess, I would say it seems to be an issue with the persistence partition not mounting correctly on boot.

            If you follow the instructions above to the letter, but instead go back to using the 2018.2 ISO, (which is still on the kali index website), it will work perfectly. The upgrade to the new kali version from within using apt upgrade command, that might work for you.

            Like I said, I am a completely newbie so I might be way offside here, but thought I would share what I’ve seen.

            Good luck, let us know if you figure it out.

  112. Hi, thank you for your guide.
    I followed the steps many time, I tried with a complicated passphrase with symbols lowercase and numbers, and then I tried again only with lowercase and numbers.
    And everytime I ve got this error : IO error while encrypted keyslot.
    Command failed with code -1 (wrong or missing parameters).
    What should I do?

    1. What happens when you run

      cryptsetup -v luksFormat /dev/sdb2 --debug

      where sdb2 is your persistence partition.

      1. Thank you for your quick answer. It says it will overwrite data on dev/sdc2 I put YES. It asks me to enter my passphrase, then to verify. I post you the complete lines. ibb.co/gV96Q9

        1. It seems to be having problems writing to that partition. All I can suggest it that you format your USB and try creating the partitions again from scratch. Or if you can, try on a different USB drive.

          1. You found the issue, I tried from scratch, and it goes wrong again.
            Then I tried from a different usb key, and everything is working perfectly now, thanks to you.
            You are a savior. Thank you so much.
            Take care

  113. Dear,

    I’ve followed your procedure with success but we I’ve rebooted the machine I lost every time all configurations (keyboard, wifi password, etc.) and also all apt updates.
    I’ve used this iso: kali-linux-2018.2-amd64 with a 32GB pendrive.
    Have you any idea?
    Thank you!


  114. If I want to be sure no data can be stored on the USB drive, can I just unmount the encrypted partition ?

    1. Then don’t set up persistence at all. Kali live doesn’t write to the USB unless you set up persistence.

  115. Where does the persistance live? I mean where is the encyrption with this set up? Is it the whole disk or partition? Or is it just the users home directory for instance?

    Cheers – great article

    1. The entire persistence partition is encrypted. e.g sdb2 and this is where your home folder resides. The 4GB system partition (sdb1) is not encrypted because otherwise you wouldn’t be able to load the LUKS encryption software on boot.

      1. Thanks
        I suppose this is my issue, insofar as I would want logs, browsing history, passwords, well everything really. Someone could just get the USB Drive and access all you have been doing in terms of software etc


        1. All that will be encrypted. The persistence partition is where files, settings, logs, etc, are saved to. The partition where Kali resides is not written to at all. It’s a Live USB and is therefore effectively read-only.

  116. I’m having a hard time getting this to work. I followed the guide as exactly as I possibly could, and yet when I turn off the system to reboot the log says failed unmounting /lib/live/medium. Then upon booting in encrypted persistence, I get to the point where it says Please unlock disk, and I type my password in and nothing happens. I have to force shutdown. What could be the reason behind this… I have cleaned, repartitioned, and reformatted the usb many times now to no avail. Thanks for the help

    1. When you type your password, there is no feedback in Linux like there is in Windows/Mac, eg. no stars or dots. This seems to throw off a lot of people. Just type your password carefully and press enter.

      1. Thank you, I should have clarified that I understand there is no visual when entering a password. I entered it correctly, and hit enter, nothing happened. Then, I had to force shutdown the machine.

        So, I decided to give it a whirl on my desktop instead of my laptop. Everything worked perfectly, including encrypted persistence….. So, I tried again on my laptop, and nothing… same problem, cant get past please unlock disk password request. Then I thought, what if i plug in the keyboard from my desktop to my laptop and it worked! But now the touchpad doesn’t work when i plug in the external keyboard.

        I’m using a surface book, and I have no idea why this is happening. Again, Thank you

  117. 2 things,
    first no matter what partition tool I use I can not resize the partition with the image on it.
    thinking this was not a huge issue I proceeded to finish per the instructions.

    second after rebooting, logging in with persistence, creating a file and rebooting I find the file or any changes at all are not saved.

    could my first problem be causing the second? if not what is causing it not to save? I followed every step and got no errors.

    1. Yeah, you’ll need to get your partitions right first.

      I would suggest removing all partitions from the USB drive and trying again.

      1. Press Windows + R simultaneously, type cmd, click “OK” to open an elevated command prompt.
      2. Type diskpart and hit enter
      3. Type list disk. Soon diskpart will list all the hard drives on your computer, including your USB flash drive that is connecting with the computer. Assuming that your USB flash drive is drive G:
      4. Type select disk G and hit enter.
      5. If there are one more partitions on the flash drive and you wish to delete some of them, now type list partition and hit enter. There should list all the partitions, numbered as 0, 1, 2…
      6. Type select partition 0 and hit enter
      7. Type delete partition and hit enter
      8. Repeat step 6 and step 7 to delete partition 1 or 2…
      9. After deleting all the target partitions, type create partition primary and hit enter.
      10. Exit the command prompt. Right-click on the USB drive in explorer and format it.
      1. to clarify, I did create a second partition but the disk imaging software I was using created a partition for the image the exact size of the image and would not allow me to increase it’s size.
        I’ve since used Universal USB Installer as per this guide and was able to make the 4gb partition for kali and partition the remaining space for persistence.

        I’ve followed the guide exactly now a few times without error and still nothing is saving.

        should this be the only line in persistence.conf

        / union

        1. Yes, it’s just / union. Did you try doing the partitions in MiniTool Partition Wizard?

          In most cases, this is a partition issue or the wrong commands are entered in part 5 and 6. If you can, copy and paste them and make sure you have the correct device name.

          1. thanks for all the help. yes, the last 6 attempts I used all tools mentioned in this guide. I’ve tried this and other guides over the last 4 days all with no success and I’m still unsure if I keep making a typo and that is causing it to fail. I’ll be trying again with many different USB and microsd in usb adapters and I’ll try doing it without typing 120wpm. I’ll even triple check my spelling of “persistence” as it’s just one of those words I’ll spell wrong 50% of the time. thanks again for the help and writing this guide, it’s by far the easiest to follow and seems to wok great when using the tools described. I’m sure the problem is with me and my spelling and impatient typing. OR could it be I’ve been using a microsd card in a USB adapter? ultimately I NEED kali on a microsd with persistence but I’ll try a standard usb right now.

  118. setelah saya reboot, saya tidak bisa memasukan passphrase padahal saya sudah membuat mudah passphrase saya

    after I reboot, I can’t enter the passphrase even though I have made my passphrase easy

    1. Are there any symbols in your password? Is it case sensitive? Because I suspect it might be a keyboard layout issue. Try a password all lowercase with no symbols next time.

  119. Perfect!

    I’ve been through countless guides for setting up encrypted persistence and this has been the only one that worked properly.

    Thank you.

  120. Worked perfectly! I wasted hours trying to work with kali.org’s now 2 years outdated instructions and was about ready to give up. Even found the suggested software better than what I’d been using.

    1. That’s great to hear. Yes, the reason I made this article is because the official Kali guide is out of date and not very noob-friendly.

  121. I followed each step. ( I’ve done this before with other kali versions and it worked perfectly) . But with the 2018.2 version, at the final step when i boot the live persistence, it’s asking me for the username & password and the default ones, root/toor are not working. I have tried other combinations like user, admin, live but none are working. I keep getting the message “Sorry, that didn’t work. Please try again.”
    Can you help me, please?

  122. works great! thank you!

    my problem is…how can i install wifi adapters so i can connect to internet via wifi?

    1. Thanks for the feedback.

      Wifi config is beyond the scope of this guide. Try Googling your Wifi adapter name and “Linux”.

  123. Followed instructions as posted and everything works with absolutely no problems at all. Nice guide. Thanks

  124. Ok so when i get into kali live and try set up persistence, i go through the terminal and do everything up to cryptsetup where i have to enter my own pass it wont allow me to type anything. I’ve rebooted and reran terminal over again and nothing seems to work.

    1. When you type a password in Linux, there are no dots or stars so it looks like nothing is being typed. Just type your password carefully and press enter.

  125. I tried booting into encrypted persistence from a usb after doing the above but now it doesn’t ask me for the passphrase firstly and secondly, after kali linux loads, I cannot interact with the interface at all – cannot click anything.
    Please advise

  126. I’ve tried this tutorial for 2 days but it did not work. and finally today I succeeded by becoming a Root Superuser first with password root/toor. with Kali Linux version 2018.2

      1. HELPPPPPPP!! i m using Kali 2018.2
        i did everything u mentioned……
        actually i need to use fluxion and this program has to install its dependencies, and when i restart the dependencies go away……. so i have to do that again and again….
        one more thing, i havr to copy all my files to the 3.6 GB Volume if i want it back…. if i save it in root, it vanishes after reboot….
        plz helppppp

      2. P.S. I am using a 8 GB usb……should i use a 16 GB drive….because i am going to use this live usb only for one program (fluxion) which doesnt take many MBs…….

  127. Je vous suis sincèrement reconnaissant pour votre requête c’était vraiment un poids qui s’en est aller .
    Soyez abondamment bénis.

  128. Persistence works for files but settings still reset because it still is a live install. Is there any way to enable install on a usb like a regular install so that settings are also retained post reboot?

    1. For my 2018.3 even the settings have been stored after reboot. (keyboard and language setting). Did you try the latest release, too?

  129. if it does not work
    in Kali GPARTED start and check partition labeling.
    Enter “persistence” again


  130. This works on my computer. However, when I boot up on a different computer, it doesn’t recognize my pass code. I get a message saying “No key available for this passphrase”

    1. Do you have any special chars in your passphrase? Your other computer might have a different keyboard layout configured.

  131. So I followed each step carefully but cannot save anything. After every boot I lose all my changes, files etc

    This is what my fdisk -l is…

    root@kali:~# fdisk -l
    Disk /dev/sdb: 7.5 GiB, 8054112256 bytes, 15730688 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x00000000

    Device Boot Start End Sectors Size Id Type
    /dev/sdb1 * 2048 8384511 8382464 4G c W95 FAT32 (LBA)
    /dev/sdb2 8384512 15730687 7346176 3.5G 83 Linux

    Could it possibly be the size of sdb2 since I’ve seen somewhere that you need at least 8GB of free space in the second partition

  132. before you proceed to step 5, you must boot Kali in “Live system (persistence mode)” and not in Live system mode

    1. I don’t see how that makes any difference because you haven’t created persistence.conf yet, which this boot option will look for. I’ve tested this several times.

      1. works for me, i had troubles with setting up persistence booting in Live system, then i tried booting in persistence mode and continue from step 5, turns out to be the solution for me

      2. i believe this boot option actually enables the possibility of setting up persistence, i have tried it your way twice and it did not work, i went troubleshooting and that’s how i successfully set up persistence, i tested it by creating a map on desktop, rebooting and the map is still there.

        1. Thanks for the feedback 🙂

          If anyone else has this issue, could they please let us know in the comments.

          1. Just for info, I also had the same issue. Followed the tut above to the letter, 3 times, result, no persistence.

            Followed the above to the letter, with the single exception of booting into live persistence, prior to step 5, and persistence took effect thereafter.

            Other than that tiny issue, thanks for the excellent tut

          2. OK, thanks for the feedback. I’ve changed that step now. We’ll see if anyone else has problems.

  133. It is a nice guide but may I ask how can I “full install” Kali to my USB instead of making a persistence for it to use file..? I have search this in Google but all I found is Live or with persistence only…

    1. I’ve never done it before but I’m sure it’s possible.

      I think you’ll need two USB drives though, one to load the ISO install, and when you get the the bit about partitions disks (Step 10 here), see if your other USB drive shows up there.

      1. It is not working..I can’t find my usb on the boot menu after the installation…I guess I will have to use the encrypted persistence 🙁

  134. Hello!
    Thanks for that!

    some info:
    If you after 1-3 parts start live on mac and do steps 4-7 you don’t have success. In mac fdisk -l also /dev/sdb2 but doesn’t save changes.
    Then I start live on Win computer and do steps 4-7 and then it’s all done! 🙂 and after that it starts normally on mac.

  135. Hi! First great guide! Took me a while to get it to work at first, i was installing kali with win32 disk installer. Which created a smaller recovery partition for kali interfering with persistence for some reason. After getting it all sorted out i got the persistence drive working. However when im saving something to the desktop nothing stays after a reboot. I went it to make sure the “” were removed from around the / union. All was well but still cant get things to save outside the persistence drive. When i reboot the persistence drive is remounted, not sure if that changes anything. Hope you can help.

    1. Also to mention i orginally mounted the persistence drive with /dev/sdc2, but i noticed after doing a fdisk -l i see it listed as /dev/sdd2 and my other partition ks /dev/sdd1 (changed from sdb1)

      1. Honestly, i have no idea why im doing it, it was suggested in a couple FAQ’s i found. I’m just following along, I dont really have any experince with linux prior this. Should i put quotes around the / union in the config file?

  136. When I run fdisk-l it shows my usb drive as sdb2 I enter the mount commands reboot to persistence and it’s labled sda2. Hmmm

  137. It didn’t work for me either until for step 4 I booted with “live system persistence” instead of “live system” which kept the mount point and persistence.conf file I created in step 5. Now if i create a folder it survives reboots.

    1. Not sure how that makes a difference. In step 4, there’s no point selecting the persistence option because you haven’t set up the persistence partition yet.

      Anyway, it worked for you in the end 🙂

  138. Now this is what I call class..Have tried creating the persistence for the past 2 days using all guides there is, all failed untill I found this. Simple and straight forward and works…yeeeeei! Thank you so much. I could have bought you a drink if you were close, but cheers!

  139. It works! But I used rufus for kali image, and then followed the rest of the steps, dont use disk imager for this task

  140. you guys are awesome, after so much searching and testing only yours idea and code, works like a charm…thanks guys.
    God bless you.

  141. Failure. Went step by step, smoothly and flawlessly until time for saving. Nada, zero, zip, nothing. thx

  142. Hi, Thanks for the tutorial.
    I am getting an error in following command:
    mount /dev/sdb2 /mnt/my_usb
    Following is the error:
    mount: /mnt/my_usb: wrong fs type, bad option, bad superblock on /dev/sbd2, missing codepage or helper program, or other error.
    Can you please help me out?

    1. Sounds like the USB wasn’t partitioned properly. Is sdb2 definitely the USB drive?

      What’s the output for fdisk -l /dev/sdb2?

  143. Hello.
    First Thanks for the posting this tutorial, secondly ; Can resizing the disk partion 1 makes my left storage (i have 16 gb data traveler usb) unreadble ? Can i undo all tasks such partitionning and resizing and make my usb normal again? i mean if something goes wrong can i get back to the moment which i did not mess with my usb storage ?
    Thanks for responding, i am new to partitionning stuff

    1. If you have any important files on the USB drive you must back them up elsewhere because the partitioning and ISO writing will wipe the drive clean.

      To restore the USB back to a 16GB drive, you must delete all the partitions you created in Partition Wizard and then create a new 16GB FAT32 partition in the unallocated space.

  144. Hi.

    I´ve followed the guide exactly, but this still dosent work for me. I also tried it in ext3.
    When im creating a “Test” folder and reboot, it dosent work, the folder has been deleted.

    So what to do now?

    1. Hi there. I’ve gone through this guide again from scratch using a Sandisk 16GB USB drive and it worked fine for me. What is your output when running fdisk -l?

      1. It´s now working just fine. The issue semed to be with my USB drive. Apperently it wasnt formated and prepared correctly.

        I did that and followed the guide exactly, and now its working just fine.

        Thx m8 😉

  145. im sure i followed the exact same steps, same commands but still no persistence.
    Good guide, very easy to follow but no persistence for me 🙁

    1. Hi there. Well, I’ve gone through this guide again from scratch using a Sandisk 16GB USB drive and it worked fine for me. What is your output when running fdisk -l?

  146. Im 100% sure i followed to exact instruction but it doesnt work.

    When i create an empty folder, after reboot ia not there.

    Good tutorial, explicit and easy to follow but for me it doesnt work

      1. k1tweeked:

        fdisk -l
        Disk /dev/sda: 14.9 GiB, 16013942784 bytes, 31277232 sectors
        Units: sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes
        Disk /dev/sdb: 14.6 GiB, 15682240512 bytes, 30629376 sectors
        Units: sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes
        Disklabel type: dos
        Disk identifier: 0x00000000
        Device     Boot   Start      End  Sectors  Size Id Type
        /dev/sdb1  *       2048  8390655  8388608    4G  7 HPFS/NTFS/exFAT
        /dev/sdb2       8390656 30627839 22237184 10.6G 83 Linux
        Disk /dev/loop0: 607.6 MiB, 637116416 bytes, 1244368 sectors
        Units: sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes

        OUTPUT FOR fdisk -l /dev/sdb2

         fdisk -l /dev/sdb2
        Disk /dev/sdb2: 10.6 GiB, 11385438208 bytes, 22237184 sectors
        Units: sectors of 1 * 512 = 512 bytes
        Sector size (logical/physical): 512 bytes / 512 bytes
        I/O size (minimum/optimal): 512 bytes / 512 bytes

        My USB is not a Sandisk and it’s 32g. HP Thin Client Pro T520 clean install Boot Nuke, Kali lite. Where did i go wrong? BTW same sentiments as above, good tutorial , easy to follow, or at least i thought it was…

        1. It might be this:

          /dev/sdb1 * 2048 8390655 8388608 4G 7 HPFS/NTFS/exFAT
          /dev/sdb2 8390656 30627839 22237184 10.6G 83 Linux

          sdb1 is formatted as NTFS whereas it should be FAT32. Look at Step 1, did you check the right file system in Universal USB Installer? I haven’t tested this guide with NTFS, not sure if it makes a difference.

          ps. I’ll download Kali Lite today and run through the guide again in case there are any issues.

  147. When I enter your second command, /dev/sdc2 /mnt/my_usb
    It gives me the following readout
    Bash: /dev/sdc2: permission denied
    Please help.

  148. I have a multi-boot external hard drive, with kali-2017.2 and a luks encrypted persistence drive. I just added kali-2018.1 to the bootloader and want to know how I reformat the drive to work with kali-2018?

  149. really, really the most thorough and complete instructions I’ve found. My usb was a 32gb so I created 2- 4gb partitions (boot and persistence), then formatted the remaining space with NTFS and labeled it storage.. Naturally i won’t read that storage partition in windows, but that’s all right. Thanks again

  150. After having difficulties with the official documentation that seems to be outdated concerning actual Kali Linux 2018 distribution this solution worked fine for me. Thanks a lot!

    I would still be interested in a solution for Linux tools, especially openSUSE’s partitioner (seems to be different from gparted), alternatively with Knoppix.? Had some issues with this.

      1. Followed guide to the letter however when I try to apply changes in MiniTool I get “Invalid configuration file”
        Any comment appreciated

        1. What USB drive are you using? You may need to format it using the manufacturer’s recommend tools. Also make sure another application isn’t using it.

          1. For me , the persistant partition was mounted in an other place by default so i had to unmount it and then do the rest of the tuto

    1. I found with system Ext3 would work most 2 boots and then total mess. Ext4 not a single problem and that’s all I changed was the Ext.

  151. This issue has as many answers as there are USB drives maddingly attempting persistent storage. Thank you for providing clear, succinct and accurate instructions! Now if you could only address the LUKS encryption I would be set.

  152. After surfing dozens of sites, I finally found a perfect guide for USB live persistence with encryption. Thanks! really helped a lot.

  153. aye, great tutorial bro but i got an error when i try to running “cryptsetup –verbose –verify-passphrase luksFormat /dev/sdb2” command which give me “cannot format device /dev/sdb2 which is still in use” how to solve this? thank you in advance.

  154. When i finish the process and boot from the usb it ask me to unlock a difirente partition (mint linux encrypted), any tips?

  155. that’s a great tutorial. However as soon as you you do an update terminal stops working and kali is buggy. Anyway to fix this?

    1. I’ve just followed this guide again using a brand new 16GB SanDisk Ultra USB drive and EXT4 worked fine for me.

      Did you follow this guide exactly? Did you write using Universal USB Installer and set up partitions using MiniTool? Are you using 32bit or 64bit Kali? What USB drive is it?

  156. Thanks it worked for me first time. In the previous guide (non-encryption) you format the persistence partition with EXT4 in Windows but in this guide you format with EXT3 in Ubuntu. Is there any reason for that? Thanks.

    1. The official Kali guide says to use EXT3 but I think they haven’t updated the guide in a while. I haven’t tested with EXT4 yet but I don’t see why it wouldn’t work.