Last updated at Mon, 24 Jul 2017 15:58:41 GMT

Author: Jeremy Druin (webpwnized)

Twitter: @webpwnized

Title: Installing Persistent Kali Linux on Bootable USB Flash Drive

From: ISSA KY June 2013 Workshop

Recorded By: Adrian Crenshaw (@irongeek_adc)

This video covers the installation of Kali Linux on a USB drive. Additionally, setting up persistence on a separate partition is reviewed including how the persistence works. A Kali Linux virtual machine is used to create the USB.

The workshop was done to support the Long family. Johnny Long is a well-known speaking and author otherwise known as "j0hnny" or "j0hnnyhax". He moved to Africa in order to build computer training facilities in Uganda. Donations are given by browsing to http://www.hackersforcharity.org/donate/ then clicking the “Make a one-time donation directly to the Long family” link.


Please find notes attached below.

Links:

1. Kali Docs Guide: http://docs.kali.org/installation/kali-linux-live-usb-install

2. Win32 Image Writer: https://launchpad.net/win32-image-writer

3. persistence.conf documentation: http://live-systems.org/manpages/stable/en/html/persistence.conf.5.html

4. Live project homepage: http://live.debian.net/

5. Live project manual: http://live.debian.net/manual/

Commands:

1. cp command (linux): dd if=kali.iso of=/dev/sdb bs=512k

2. pv command (linux): pv -p -t -b -e -r -b kali.iso > /dev/sdb (Shows progress - install with "apt-get install pv")

Assumptions:

1. Enough space on USB device?

2. USB device is bootable?

3. Host allows boot from USB device?

4. Have access to boot config in host BIOS?

Steps:

1. Insert USB

2. Have USB recognized as device (Note: Virtual box will take more effort)

3. Use dmesg to verify USB device label.

4. Optional: Use gparted to remove existing partitions from USB

5. Copy kali.iso to USB

6. Use gparted to create new partition in unused space (give partition the label "persistence")

7. Create persistence.conf file in root of persistence partition

A "custom persistent mount" has the format: DIR [OPTION]

A custom persistent mount creates a mirror of DIR called the SOURCE directory

DIR must be an absolute path

cannot contain white spaces or the special . and .. path  components

cannot be /live  (or  any  of  its  sub-directories)

options are comma separated

bind-mount is default

union-mount is an option

"source=PATH" stores the persistence changes into PATH on the  persistence media

on conflict, last option wins

source directory created automatically

source directory bootstrapped  by  copying  the  contents of the DIR into its source (except union, link)

All persistence volumes mounted in /live/persistence/<device name>

8. Enter persistence as a boot parameter when booting

Demos:

1. boot live

2. isolinux menus and append options

3. changes to persistence volume with union

4. changes to persistence volume with bind

5. /live/persistence mount

6. How to do this in windows?