PDA

View Full Version : Kali Linux USB not persisting!



Flika
2017-11-14, 13:50
I have looked all through the documentation and forums, and can't figure out what I'm doing wrong. I'm new to Kali, and would like to get some help from those who have experience.
Here is what I did step by step:
First, I wrote the Kali Linux ISO to a Gigastone 16GB 2.0 flashdrive using Universal USB installer on Windows 10, making sure it was formated in Fat32.

Next, I resized the default partition (named UUI) to 5GB and used the unallocated space to create a new partition named "persistence", setting it to the Ext4 file system. (I used Ext4 because I saw the majority of Windows user had success with it.)

Next, I booted into the USB, slecting Kali Live Persistence when prompted on how to boot kali.

I then opened the terminal and typed the following commands:

fdisk -l
(I saw that the partition that I had created using the ext4 file system was called /dev/sdb2)
mkdir -p /mnt/UUI
mount /dev/sdb2 /mnt UUI
echo "/union" > /mnt/UUI/persistence.conf
umount /dev/sdb2 && reboot

Upon reboot I saw the item on the desktop labeled persistence was gone, I was told this was a good sign.
I left a test file in the /union folder as well as on the desktop.
Upon reboot, the test folder in the union files persisted, but the test on the desktop did not.
I have done lots of research to try and find how to fix this, but to no avail. I'm hoping somebody with some actual experience can help me, as I need to have Kali operational for a Pen testing course I am taking. Thanks! :)

muts
2017-11-14, 14:06
Hi Flika,

It took me a few times to read through your post to figure out what exactly you did, as it's not the recommended way to do things....however i think i spotted your issue - TL;DR, your persistence.conf file has a small typo:

Change :

echo "/union" > /mnt/UUI/persistence.conf

To:

echo "/ union" > /mnt/UUI/persistence.conf

(There should be a space between the "/" and "union" entries.)

The long version:

The persistence.conf file holds a list of paths which you want persistence to be enabled. The syntax of the file is:

<path> <type of persistence>

In our most common case, we want the whole root path (/) to persist any changes (union), which explains the syntax of the file. You can read more about persistence.conf here (http://manpages.ubuntu.com/manpages/trusty/man5/persistence.conf.5.html) and here (https://kali.training/chapter-9/adding-persistence-to-the-live-iso/).

Keep us posted with your results!

Flika
2017-11-20, 14:15
Thanks, this fixed the issue! Thank you for telling me the long version, I like to know exactly how things work