Kali Linux: Official Documentation
Kali Linux: Official Documentation
Kali Linux: Official Documentation
org/downloading/kali-linux-live-usb-persistence
Kali Linux
Official Documentation
Have a question? Type your keywords here! SEARCH
Docs Categories To make use of the USB persistence options at boot time, you’ll need to do some
additional setup on your “Kali Linux Live” USB drive; this article will show you how.
01. Getting Started This guide assumes that you have already created a Kali Linux “Live” USB drive as
02. Kali Linux Live described in the section on that subject. For the purposes of this article, we’ll assume
you’re working on a Linux-based system.
03. Installing Kali Linux
1 of 4 02/13/2016 07:18 PM
Kali Linux Live USB Persistence | Kali Linux http://docs.kali.org/downloading/kali-linux-live-usb-persistence
Follow @kalilinux 79.3K followers you are running as the root user
Follow @exploitdb 89.5K followers
your USB drive is /dev/sdb
your USB drive has a capacity of at least 8GB — the Kali Linux image takes
over 3GB, and for this guide, we’ll be creating a new partition of about 4GB
to store our persistent data in.
In this example, we’ll create a new partition to store our persistent data into, starting
right above the second Kali Live partition and ending at 7GB, put an ext3 �le system
onto it, and create a persistence.conf �le on the new partition.
1. First, begin by imaging the latest Kali Linux ISO (currently v1.0.9a) to your
USB drive as described in this article. We’re going to assume that the two
partitions created by the imaging are /dev/sdb1 and /dev/sdb2. This can be
veri�ed with the command “fdisk -l“.
end=7gb
read start _ < <(du -bcm kali-linux-1.0.8-amd64.iso | tail -1); echo $start
parted /dev/sdb mkpart primary $start $end
The parted command may advise you that it can’t use the exact start values
you speci�ed; if so, accept the suggested value instead. If advised that the
partition isn’t placed at an optimal location, “ignore” it. When parted
completes, the new partition should have been created at /dev/sdb3; again,
this can be veri�ed with the command “fdisk -l“.
3. Next, create an ext3 �le system in the partition and label it “persistence”.
mkfs.ext3 -L persistence /dev/sdb3
e2label /dev/sdb3 persistence
4. Create a mount point, mount the new partition there, and then create the
con�guration �le to enable persistence. Finally, unmount the partition.
mkdir -p /mnt/my_usb
mount /dev/sdb3 /mnt/my_usb
echo "/ union" > /mnt/my_usb/persistence.conf
umount /dev/sdb3
2 of 4 02/13/2016 07:18 PM
Kali Linux Live USB Persistence | Kali Linux http://docs.kali.org/downloading/kali-linux-live-usb-persistence
1. Image the latest Kali Linux ISO (currently v1.0.9a) to your USB drive as
described in this article.
2. Create the new partition in the empty space above our Kali Live partitions.
end=7gb
read start _ < <(du -bcm kali-linux-1.0.8-amd64.iso | tail -1); echo $start
parted /dev/sdb mkpart primary $start $end
The parted command may advise you that it can’t use the exact start value
you speci�ed; if so, accept the suggested value instead. If advised that the
partition isn’t placed at an optimal location, “ignore” it. When parted
completes, the new partition should have been created at /dev/sdb3; again,
this can be veri�ed with the command “fdisk -l“.
5. Create a mount point, mount our new encrypted partition there, set up the
persistence.conf �le, and unmount the 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
That’s really all there is to it! To use the persistent data features, simply plug your
USB drive into the computer you want to boot up Kali Live on — make sure your
BIOS is set to boot from your USB device — and �re it up. When the Kali Linux boot
screen is displayed, choose the persistent option you set up on your USB drive,
either normal or encrypted.
Related Articles
Making a Kali Bootable USB Drive Live Build a Custom Kali ISO
3 of 4 02/13/2016 07:18 PM
Kali Linux Live USB Persistence | Kali Linux http://docs.kali.org/downloading/kali-linux-live-usb-persistence
English 简体中⽂ Français Deutsch اﻟﻌﺮﺑﻴﺔ Português Nederlands Italiano 日本語 Русский
4 of 4 02/13/2016 07:18 PM