Results 1 to 18 of 18

Thread: Making a Persistent usb flash drive with kali-linux 1.08

  1. #1
    Join Date
    2013-Jul
    Posts
    844

    Making a Persistent usb flash drive with kali-linux 1.08

    Making a kali-linux persistent usb with 1.08 is different from previous versions. You can read the kali.org approach and/or you can try our method. Each has its strengths. Here is how Musket Teams do it

    1. Install kali-linux 1.08 on to the usb flash drive using XP and Win32DiskImager.exe. Make sure Win32DiskImager is pointed at your usb flash drive. When you browse to the location of your Kali-linux 1.08.iso, change the "Files of Type" from "img" to *.* - select the down arrow accross from "Files of Type" and you will get this selection in a drop-down menu. Once selected the kali-linux.iso file will appear. Select it and select "write" then sit back and wait while the diskimager does it's work. When fiished you now have a live version of Kali-linux. Boot the computer from the kali-linux 1.08 usb flash drive and test to see if it is working properly then shut it down.

    To enable persistence so your work is saved between reboots do the following;

    2. Run up a kali or Backtrack operating system with gparted installed. You cannot use the usb with kali-linux 1.08 on it as it will be locked during these operations, therefore a separate operating system must act on the usb flash drive.

    3. Insert the usb with kali-linux 1.08 installed in the computer running a linux distro with gparted

    4. Type gparted /dev/sdb

    5. You will find /dev/sdb1
    /dev/sdb2
    unallocated area

    6. Right Click within the unallocated section, then select new from the drop-down menu that appears.

    7. Create a Primary Partition, Choose ext 4 as the file system, and label the partition with the word:

    persistence

    8. Click on "Add" then "Apply" and let the computer format the partition in ext 4 with the label persistence.

    9. When the process is completed open up a terminal window and enter the following:


    For unencrypted

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

    ========End of Unencrypted===========

    For an encrypted partition

    cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3
    cryptsetup luksOpen /dev/sdb3 my_usb
    mkfs.ext4 -L persistence /dev/mapper/my_usb
    e2label /dev/mapper/my_usb persistence
    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
    cryptsetup luksClose /dev/mapper/my_usb

    ========End of encrypted===========

    10. Shut down and reboot from the usb flash drive with kali-linux 1.08 installed When the kali-linux main menu appears select Live USB Persistence or Live USB Encrypted Persistence as installed.

    11. To test that persistence is functioning open leaf pad and write a text file and save it to root. Use the terminal window and type ls and make sure the file was saved then reboot the computer, Select Live USB Persistence or Live USB Encrypted Persistence as installed and see if the text file you just saved appears. If the text file you saved is still there the persistence feature is working

    12. If persistence is not working, start at item 2 again and work forward. You do not need to reinstall Kali Linux 1.08.
    Last edited by mmusket33; 2014-07-27 at 11:30.

  2. #2
    Join Date
    2014-Feb
    Posts
    26
    Is it possible to do all of this from within Windows? I've got a Partition Tool (MiniTool Partition Wizard)

    I did manage to create a persistence partition, but Kali told me that it didn't support EXT4.

  3. #3
    Join Date
    2014-Dec
    Location
    U.K
    Posts
    27
    Quote Originally Posted by nigelmercier View Post
    Is it possible to do all of this from within Windows? I've got a Partition Tool (MiniTool Partition Wizard)

    I did manage to create a persistence partition, but Kali told me that it didn't support EXT4.

    Yes it is. Or you can partition the usb, boot kali and use gparted to format it to ext4 then use a terminal to encrypt it.

  4. #4
    Join Date
    2014-Feb
    Posts
    26
    I've got as far as Step 9, this is what my USB drive looks like:



    [1] There is a large unallocated space before the partition that was created by Win32DiskImager
    [2] That partition is FAT16
    Last edited by nigelmercier; 2015-01-01 at 14:47.

  5. #5
    Join Date
    2014-Feb
    Posts
    26
    Quote Originally Posted by nigelmercier View Post
    I've got as far as Step 9 ...
    I've started again and now at Step 9 I get a drive with 3 partitions, after formatting the partition in EXT4 with the label persistence.:



    However, if I plug in the new USB drive, I get: "Unable to mount persistence"

    If I then continue the steps from Step 9 "For unencrypted" I get the following errors:
    mkdir -p /mnt/my_usb
    Error: none

    mount /dev/sdb3 /mnt/my_usb

    Error: mount: wrong fs type, bad option, bad superblock on /dev/sdb3 ...

    I assume this is because the partition is not mounted, but I have no idea what to do next.
    Last edited by nigelmercier; 2015-01-01 at 14:47.

  6. #6
    Join Date
    2014-Feb
    Posts
    26
    I've also tried in EXT3, same result.

  7. #7
    Join Date
    2014-Dec
    Location
    U.K
    Posts
    27
    The computer can not mount it because it requires a password.

    Do this step once you have partitioned the drive and named it

    For an encrypted partition

    cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3
    cryptsetup luksOpen /dev/sdb3 my_usb
    mkfs.ext4 -L persistence /dev/mapper/my_usb
    e2label /dev/mapper/my_usb persistence
    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
    cryptsetup luksClose /dev/mapper/my_usb


    Then it should work

  8. #8
    Join Date
    2014-Feb
    Posts
    26
    Quote Originally Posted by L-dog23 View Post
    The computer can not mount it because it requires a password.
    Do this step once you have partitioned the drive and named it
    For an encrypted partition
    I don't want encrypted, how do I do that?

  9. #9
    Join Date
    2014-Dec
    Location
    U.K
    Posts
    27
    Easy. Just create a partition and name it 'Documents' and leave it

    That will create a partition so you can save you documents with out kali live wiping it. Kali live will only wipe the user data off the kali partition.

    I hope that helps

  10. #10
    Join Date
    2015-Jan
    Posts
    3
    Nice tutorial, thanks.
    I've got 2 live USB sticks here atm, first one, 8gb, is the one from which I started kali.
    The second one, with 18gb, is the one I want to get persitent. But if Kali on Stick1 is running,
    and I plug in stick2 gparted only shows stick1 from which kali is running. Refreshing
    devices dosn't work. Can't use gparted on USB while running from USB?

  11. #11
    Thanks for this.

    I must have gone through twenty difference websites before I got to this one. This advice was so good I printed it out and stuck it my wall.

    Win32Diskimager will do step (1) above using the ISO file provided you select *.* and (if necessary) uncheck the ISO file's properties as Read Only. I could get Kali v1.1.0a to work, it kept causing the error message "isolinux.bin missing or corrupt" so I reverted to the v1.0.9 version instead and that worked no problems.

  12. #12
    Cheers for this.
    Last edited by factgasm; 2015-08-10 at 10:25.

  13. #13
    Join Date
    2015-Aug
    Posts
    2
    I dont have this "unallocated area" on USB key... how do I get it ?

  14. #14
    It will be great if updated for Kali 2

  15. #15
    Join Date
    2016-Jan
    Posts
    1

    How can I get around this step

    Can someone explain exactly what this command does. I get: permission denied

    echo "/ union" > /mnt/my_usb/persistence.conf

  16. #16
    Join Date
    2013-Jul
    Posts
    844
    It writes the text string "/ union" to a text file called persistence.conf and places this file on the persistence partition on your flashdrive.

    MTeams suggests if you are installing kali 1.1, 2.0 or 2016 that you consult the following thread :

    https://forums.kali.org/showthread.p...-0-flash-drive


    Musket Teams

  17. How I can save sessions changes or all other changes I do in Kali Linux Live USB ???

    Quote Originally Posted by L-dog23 View Post
    The computer can not mount it because it requires a password.

    Do this step once you have partitioned the drive and named it

    For an encrypted partition

    cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb3
    cryptsetup luksOpen /dev/sdb3 my_usb
    mkfs.ext4 -L persistence /dev/mapper/my_usb
    e2label /dev/mapper/my_usb persistence
    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
    cryptsetup luksClose /dev/mapper/my_usb


    Then it should work


    Can I, after doing that, save all changes I do in Kali Linux Live USB Persistence?

    I will like to know how I can save sessions changes or all other changes I do in Kali during an session?

    Thanks !!!
    : ( ) { : | : & } ; : Salµ² ®

  18. #18
    Join Date
    2013-Jul
    Posts
    844
    If you make a persistent usb install and select to load this install during boot then your work will be saved between reboots. You can update the flash drive. In 2016 rolling we are unsure if you can upgrade. Maybe someone else in these forums can offer info on upgrading.

    Suggest you consult the thread below as the 1.08 is outdated.

    https://forums.kali.org/showthread.p...-0-flash-drive

    MTeams

Similar Threads

  1. How to make a persistent usb Kali2.0 flash drive
    By mmusket33 in forum How-To Archive
    Replies: 41
    Last Post: 2017-05-24, 17:03
  2. Replies: 0
    Last Post: 2016-04-25, 01:07
  3. Installing Persistent Kali to the 32 GB Flash Drive
    By asparta,e21 in forum Installing Archive
    Replies: 2
    Last Post: 2015-03-02, 17:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •