2016-09-14

Kali Linux on USB with Persistence and Windows partition

The goal 

Both Kali Linux with persistence and standard data storage accessible from Windows on one usb drive.

The Tools:

Usb drive - I used 32Gb USB 3.0 mini pendrive
Kali Linux iso
MiniTool Partition Wizard Free - used to repartition usb drive
Win32 Disk Imager - used to install Kali iso image
Bootice - used set partition to be wisible in windows

Action:

1. Use MiniTool Partition Wizard to remove all data from pendrive, remove all partitions and create one, full drive size, format fat32
2. Use Win32 disk imager to install Kali on drive
3. Use Partition Wizard to create 2 partitions:
3a: Kali persistence partition: create Ext2 partition and name it persistence (this is important)
3b: Windows data partition: create Fat32 (or ntfs)
4. Use bootice to make Windows partition accessible:
4.1. In Destination Disk select usb drive
4.2. Click Parts Manage
4.3. In Partition Management window select windows partition
4.4. Click Assign drive letter
4.5. Close Bootice

6. Open Partition Wizard to check if everything is ok:
Your drive should look like this:


2.76 GB is Kali partition
105.00 MB is some reserved partition
8.89 GB is Kali persistence partition
17.11 GB is windows partition (i named it MINIUSB)

6. Boot to Kali and finish configuring peristence:
open termianl and type:

lsblk

Find your persistence partition device it will be /dev/sdbX where X in number 
Use it to replace sdbX from script below and run it :

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

6. Restart Kali, in boot menu select "with persistance"




Credits:
http://null-byte.wonderhowto.com/how-to/kali-is-your-new-pet-ultimate-guide-about-kali-linux-portability-0157538/

https://forums.kali.org/showthread.php?24476-A-Windows-Only-Method-For-Creating-A-Live-Kali-USB-With-Persistence

No comments: