Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36

Thread: How to make a persistent usb Kali2.0 flash drive

  1. #1
    Senior Member
    Join Date
    Jul 2013
    Posts
    766

    How to make a persistent usb Kali2.0 flash drive

    MTeams is seeing alot of comments that old methods of making a persistent USB with kali2.0 do not work. This is simply not the case. Here is a method tested in MTeams labs

    Install kali-linux 2.0 onto the usb flash drive using XP and Win32DiskImager.exe(Win32). Download the latest Win32 if you wish, however older versions might work.

    Make sure Win32DiskImager is pointed at your usb flash drive.

    When you browse to the location of your Kali-linux 2.0.iso, change the "Files of Type" from "img" to *.* - select the down arrow across 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 finished, you now have a live version of Kali-linux2.0. Boot the computer from the kali-linux 2.0 usb flash drive and test to see if it is working properly then shut it down.

    Note here that kali-linux2.0 does not work on all computers. We have two(2) laptops that take only 1.10a. When we load kali2.0 the install hangs and it will not accept functioning usb flash drive installs of kali-linux 2.0 either.

    If your live usb install of kali-linux2.0 functions, enable persistence so your work is saved between reboots.

    Run up a kali or Backtrack operating system with gparted installed. You cannot use the live usb with kali-linux 2.0 on it, as it will be locked during these operations, therefore a separate linux operating system must act on the usb flash drive. You can use a second usb flash drive to run the OS. However you might have to change the sdb3 to sdc3 in the commands below. Gparted can give
    you these designations. You will have to experiment with this approach.

    Type gparted in a terminal window:

    When gparted runs it will probably be pointed at the harddrives which are labeled sda. In the upper right-hand corner of the gparted window you will see a small greyish rectangular block with the word /dev/??? then a size in GiB and two(2) up-down arrows. Click on these arrows until you see the usb flashdrive.

    You should now see two(2) long rectangular blocks.

    In this example we see:

    /dev/sdb1 unallocated
    3.09 GiB 4.28 GiB

    Right-click within the right-hand large unallocated rectangular block. You need to format and label this block. When you right click within the block a menu will appear.

    Select New

    In the "Create new Partition" drop down menu

    Select

    Create as: Primary Partition
    File system: ext4
    Label: persistence

    Enter the word persistence carefully. Do not misspell or alter caps or the persistence feature may not work.

    When completed select:

    Add

    Go to upper left-hand corner of the main gparted menu

    Click Edit
    Select Apply All Operations
    Select Apply

    Sit back and wait till the operations are all completed

    When finished gparted showed the following in the two(2)

    large rectangular windows. Size of the right window will vary.

    /dev/sdb1 /dev/sdb3
    3.09 GiB 4.28 GiB

    Open a new terminal window.

    Type

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

    Now test the persistence feature between reboots.

    Shutdown and reboot using the kali2.0 usb you just worked on.

    When the menu appears:

    !!!Select Live USB Persistence ONLY ( with up down arrows)!!!

    Warning if you select Live (686-pae) you will not load any persistent data and the test for persistence will fail.

    Open leafpad and save a text file in root.

    Type ls in a terminal window and make sure the file is present.

    Reboot into the kali2.0 usb again.

    When the menu appears:

    !!!Select Live USB Persistence ONLY ( with up down arrows)!!!

    Warning if you select Live (686-pae) you will not load any persistent data and the test for persistence will fail.

    If the text file is still there then the persistent feature is functioning. Do not try and upgrade your persistent usb but you can update the existing files. If persistence is not operating, you probably misspelled the word "persistence" or you used the wrong ??sda/sdb/sdc?? entries in the terminal window commands given above.

    We did not test the luks encryption therefore no guidance is provided.

    Musket Teams
    Last edited by mmusket33; 2015-08-21 at 08:02 AM.

  2. #2
    Junior Member
    Join Date
    Dec 2015
    Posts
    1
    Hi there,

    Does this
    Run up a kali or Backtrack operating system with gparted installed. You cannot use the live usb with kali-linux 2.0 on it, as it will be locked during these operations, therefore a separate linux operating system must act on the usb flash drive. You can use a second usb flash drive to run the OS. However you might have to change the sdb3 to sdc3 in the commands below.
    mean I cannot use gparted to create the new partition labelled persisitence in the Kali Linux OS running on the exact same USB drive?

    Previously,I used dd command on my Ubuntu OS to copy the kali2.0-ISO to my USB drive.And then I used the parted command to create the new partition labelled work on the USB drive.I did not use the luks encryption.And I write a file named persistence.conf with "/ union" in the partition 'work'.After all these are done on my Ubuntu,I reboot to boot from USB drive,successfully boot to kali grub menu,and select Live (686-pae) or Live USB Persistence.In both modes,I can successfully boot to the gnome environment and everything works normally.But even though I select the Live USB Persistence mode,updates or data vanish between reboots.I notice that the 'work' partition contains only one file,i.e. persistence.conf,and that even though I select the Live USB Persistence mode there exists two icons on the desktop,which are kali live and work.I even tried this:highlight the Live USB Persistence option and press TAB and then type 'persistencelabel=work'.This works the same as I simply press Enter on the options 'Live (686-pae)' or 'Live USB Persistence'.

    Later,I deleted all the partitions and data on my USB drive,formated it again,and create a new partition with gparted on my Ubuntu.Then I used dd command to copy the ISO to USB drive.This time,I did not create the new partition on the USB in my Ubuntu.I reboot to boot from USB drive,select the Live (686-pae) mode,and boot to the gnome environment.I use the gparted command to create the persistence partition and do the following things as mentioned above.Then I reboot and select Live USB Persistence.This time the booting process just do not work out.I boot into the tty1.And system prompts me to login.After I enter username(root) and default password.Some strange information I cannot seize appears on screen.And then there only exists an underscore at the left top corner of the screen.I wait for a long time and nothing changes,which force me to press the POWER button to restart the computer.

    I boot from the USB drive and select Live (686-pae),which works well.I check the contents in the persistence partition and find out there are many files other than 'persistence.conf',including directories named etc,home,lib,root,usr and so on.

    Please help me sort things out.

  3. #3
    Senior Member
    Join Date
    Jul 2013
    Posts
    766
    MTeams did a test persistent usb install of:

    kali-linux-2016.1-i386

    using the procedures outlined in this thread.

    The complete process was flawless.

    Win32DiskImager loaded the program onto the flashdrive faster then all previous kali distros. Adding the persistence feature worked fine. The whole process took less then 30 minutes.

    One bit of caution:

    The sdb3 device designation in this thread may be sdc3. You can get that thru gparted after the formating step.

    MTeams

  4. #4
    Junior Member
    Join Date
    Apr 2015
    Posts
    1
    Hello there
    My method (Tested 04.02.2016 win8.1 Kali 2.0)
    1.Rufus > kali 2.0 > usb (internet required)
    2.MiniTool Partition Wizard > usb > resize >two partition and new unallocated partition create ext4 primary label persistence > apply all
    3.Reboot computer and boot screen click down key select ''Live USB Persistence'' enter
    4. fdisk -l see sda2 ,sdb2 or sdc2 and change code your computer no change other code

    mkdir -p /mnt/KALI
    mount /dev/sdb2 /mnt/KALI
    echo "/ union" > /mnt/KALI/persistence.conf
    umount /mnt/KALI

    6.Reboot and start Live USB Persistence

    Video:
    https://mega.nz/#!RYxk3JiB!IjPFG3NNq...qlV2x45BUyL9DU

    Extra:

    Kali 2.0 live usb persistence medya ımage backup and restore needs (tested ok)

    USB Image Tool
    http://www.alexpage.de/

    My english badd sorry!
    Last edited by xfaster; 2016-02-04 at 11:40 AM.

  5. #5
    Junior Member
    Join Date
    Feb 2016
    Posts
    1
    Hello there,

    I finally got persistence to work but looks like I am unable to boot up persistence on another laptop/computer using the same usb.


  6. #6
    Senior Member
    Join Date
    Jul 2013
    Posts
    766
    To hanilitto

    Mteams have computers that will not allow a USB live or persistent to run nor can we do a Hard Drive install of kali 2,0 or kali 2016,1R. The computer will allow kali 1.10a to function.

    These computers load the selection menu between live or persistent but hang during the setup.

    If the computer is not accessing the usb during start(i.e. no selection menu seen) suggest you check your BIOS boot order during start so the computer accesses the usb before the Hard Drive.

    MTeams

  7. #7
    Junior Member
    Join Date
    Mar 2016
    Posts
    5
    Good day!

    I just completed your tutorial and ran into a problem. When I go to boot up the Kali 2.0 USB that I performed the above instructions into, it goes to a black screen with a cursor blinking.

    I loaded up another Kali 2.0 live USB and the mount point shows /lib/live/mount/persistence/sda1 ... where the live usb that I booted off of has a mount point of /media/root/UUI.

    This is just me making general observations, I may be out to lunch. I would appreciate any help!

    Thanks!

  8. #8
    Senior Member
    Join Date
    Jul 2013
    Posts
    766
    To Jabroni:

    MTeams has never seen this problem. Suggest you break the process into steps. First make a live bootable (ie no persistence) install and boot that and see if it will run. If the live version runs then you can install the persistence feature. If the live runs but the persistence does not run then the problem is in the steps used to install the persistence.

    MTeams

  9. #9
    Junior Member
    Join Date
    Mar 2016
    Posts
    5
    Ok I have started fresh, the first thing I notice is that the when I enter gparted from a second live USB, the entire USB is used for the file system, there is no unallocated space. Last time, I unmounted, reduced the file size, then completed the remaining instructions.

    I am just trying now to see if it will work.

  10. #10
    Junior Member
    Join Date
    Mar 2016
    Posts
    5
    Ok, so all I did was force unmount the USB and it's partitions. Reduced the size of the main partition, took the unallocated space and created the persistence partition.

    Before I did anything else I rebooted and tried to boot right into the USB and the blinking cursor happened again. Any thoughts?

Posting Permissions

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