Create persistence partition on any file drive Kali Linux liveusb
1t3rt1m3I show on the example of a virtual machine.
First, create a new disk in the virtual machine profile, from 4 GB (depending on your needs, you can create any).
We add an image of the operating system to the profile, turn on the machine. We open the terminal. Next, enter the commands sequentially.
lsblk
# check the list of disk devices
sudo su
# act in the terminal as superuser
cfdisk /dev/sdaX
# create a disk layout, where "X" is the partition number
mkfs.ext4 -L persistence /dev/mapper/my_part
# create a file system on the desired disk partition
e2label /dev/mapper/my_part persistence
# add a label
mount /dev/mapper/my_part /mnt
# mount the partition in the system
edit file /mnt/persistence.conf
add unquoted string echo "/ union"
# create a file to identify the repository
Ready. When loading, use the "Persistence" option