How To Make Kali Linux Live USB Persistence 2022

kali linux live usb persistence

What is Kali Linux Live USB Persistence

As you know Kali Linux is one of the popular operating systems for hacking and penetration testing.

It has a feature to install kali Linux on a flash drive, this feature is amazing you have kali os in your pocket.

Run Kali Linux on any system with the help of this pen drive.

But the problem is “when you restart the OS, your saved data, and any changes/configuration in Kali Linux will be removed.

Kali Linux live USB persistence is a solution

Now your Kali Linux will run from USB on any system without losing saved data, configurations, installed programs, and any changes.

Let’s Make Kali Linux Live USB Persistence

First, you just make Kali Linux bootable USB live andy boot your system with it.

When your computer will boot from Pendrive you will reach to boot menu. Where you must select “Live USB Persistence” as shown in the following image.

Add New Partition in Kali Linux Live USB Device

You can use any tool for creating partition including, parted, fdisk etc. Here I am using fdisk command to create partition.

STEP 1: First step to have eyes on attached disk and partitions in your system. Worng selection will give you high shock.

fdisk -l

In the above image you can see one hard disk and 1 Flash drive is connected in my system.

I have create Bootable Pen drive so It is my targeted device to make Kali Linux Live useb persistece.

#fdisk /dev/sdb

  • Press ‘n’ and hit enter
  • press ‘p’ for primary partition
  • Remain default and hit enter
  • First Sector default and hit enter
  • Last sector default and hit enter
  • Press “w” and hit enter for writing changes into hard disk

Created a new partition 3 of type ‘Linux’ and of size 11.7 GiB. Check again using fdisk -l command to check new created partition.

Format the partition using following commands

Command : mkfs.ext3 -L persistence /dev/sdb3

┌──(root💀kali)[~]
└─# mkfs.ext3 -L persistence /dev/sdb3
mke2fs 1.46.2 (28-Feb-2021)
Creating filesystem with 3062464 4k blocks and 767040 inodes
Filesystem UUID: 1e7863b4-78b2-4203-b433-01a87e80cdc5
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208


Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

┌──(root💀kali)[~]
└─#

At the time of creating a persistent USB drive, size does matter! The larger size of the USB drive, the better, also depending on the Linux version. In this process, Linux System will be used so make sure the tool GParted is installed. If the GParted tool does not exist in your system then install it by using the given method:

  • Apt-get install gparted
  • Aptitude install gparted
  • Yum install gparted

After completing the installation of GParted.

Follow the given instruction:

  1. Download Kali Linux ISO file & plug the thumb drive
  2. Open terminal and find the USB device location by using following commands
    mount | grep –I udisks |awk ‘{print $1}’
  3. Its needed to transfer Kali Linux ISO image into the USB device by using following commands
    dd if = Kali_Image.iso of =/dev/sdb bs =512k
  4. Open Gparted
    gparted /dev/sdb
    The device should have one partition with the image of Kali Linux that was just installed.

Add New Partition in Kali Linux Live USB Device

Add new partition in Pen Drive, launch the Gparted by given method then follow the given instruction:

  1. Select unallocated space and right click then click on ‘New’.
  2. Create as New & Select ext4 from drop down menu in File system .
  3. Add.
  4. Apply All Operations.

Add persistent configuration file by using following command.

  • #mkdir /mnt/usb
  • #mount /dev/sdb2 /mnt/usb
  • #echo “/ union” >> /mnt/usb/persistence.conf
  • #umount /mnt/usb

Now Creation of LiveUSB installation be completed, Reboot the computer and boot from SUB Drive .

If Appreciate My Work, You should consider:

4 thoughts on “How To Make Kali Linux Live USB Persistence 2022

Leave a Reply

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