Results 1 to 7 of 7

Thread: Can't get persistence to work on 32Gb USB drive

  1. #1
    Join Date
    2019-Feb
    Posts
    4

    Can't get persistence to work on 32Gb USB drive

    I am using a SanDisk Ultra USB 3.0 drive and the kali-linux-2019.1a-amd64.iso to make a live USB with persistence in Windows 7 Professional. I have read and followed every tutorial about persistence that's out there. I get Kali on the usb drive, reboot it and it works like a champ. I get the persistence partition created and labeled and formatted but when I make changes to Kali and download a test file it will not save them through a reboot. I have formatted the persistence partition in EXT3 and EXT4 and neither one works. Following the different tutorials I have used Rufus, unetbootin, LinuxLive USB Creator, win32diskimager, the universal usb installer and/or the minitool partition wizard either alone or in some combination as prescribed by whichever tutorial I was following. I am at a loss as to what the problem could be. Is it the brand of usb drive? Am I not holding my mouth right? Do I need to sacrifice something or someone to the god of persistence? I have inserted a graphic from the minitool partition wizard showing the partition table of the flash drive. Thanks in advance.

    usb partitions.jpg

  2. #2
    Join Date
    2016-Dec
    Location
    Canada
    Posts
    326
    Looks like for what ever reason the partition didnt mount at boot. You boot the thumb drive from the persistence mode right?
    I made a thread on reddit with instructions ti create persistence usb from terminal of kali. Hope it helps.

    https://www.reddit.com/r/Kalilinux/c...m_source=share

    The last icon isnt a pipe symbol its the cursor of the computer.
    Just press enter after every line, also fill in appropriate info. its from offensive security team instructions simplified. Good luck.

  3. #3
    Join Date
    2019-Feb
    Posts
    4
    Thanks for the info bigbiz. When I do the parted print it gives me a list of all the commands and options I can do then it gives me the info for my hard drive (that has Windows on it) but shows nothing about the flash drive (sdb). When I do /dev/sdb it just gives me the list of commands. I don't want to do mkpart since all it shows me is the primary hard drive and I really don't need to re-partition that. When I do the "mount /dev/sdb2 /mount/frickin" command I get this response: mount: /mount/frickin: mount point does not exist. I did the "mkdir -p /mnt/frickin" step right before that but I don't know what to do from here. If I do mount /dev/sdb2 I get the response: mount: /dev/sdb2: can't find in /etc/fstab. Any advice would be greatly appreciated.

  4. #4
    Join Date
    2019-Feb
    Posts
    4
    Ok I've gotten to the point that I now have an ext3 partition on my usb drive that is labelled persistence but when I reboot I still don't have actual persistence. What am I not connecting in the process?

  5. #5
    Join Date
    2016-Dec
    Location
    Canada
    Posts
    326
    Best guess reinstall kali onto the usb make sure the usb is wiped clean. Then try again.

  6. #6
    Join Date
    2016-Dec
    Location
    California
    Posts
    33
    I wrote a linux shell script to write an iso with persistence to a USB drive.
    You could boot kali USB without persistence, run the script on another USB drive.
    Please let me know if it works for you.

    Code:
    #!/bin/bash
    # vi:nowrap
    # write iso with persistence
    # kali-persistence.sh {iso}
    
    # *** IMPORTANT *** edit DEVICE as needed ***
    
    DEVICE=/dev/sdb
    
    # .......1.........2.........3.........4.........5.........6....
    if [ ! -e $DEVICE ] # device exists ?
    then
      echo;echo "device $DEVICE ?";echo;exit 10
    fi
    
    ISO=${1}
    if [ ! -e "$ISO" ] # iso exists ?
    then
      echo;echo ".iso $ISO ?";echo;exit 10
    fi
    
    # .......1.........2.........3.........4.........5.........6....
    # writing the iso creates 2 partitions
      echo;echo "Write $ISO to $DEVICE"
      sudo dd bs=1M if=$ISO of=$DEVICE oflag=direct status=progress && sync
    
      PERSIS=3 # write persistence to partition 3
      START=$(du -B1000000 $ISO | cut -f1)
      END=$(lsblk --noheadings --nodeps --bytes --output SIZE $DEVICE)
      END=$(($END / 1000000))
      echo;echo "Persistence on $DEVICE$PERSIS from $START to $END"
      sudo parted $DEVICE mkpart primary $START $END &&
      sleep 1
      sudo mkfs.ext3 -L persistence $DEVICE$PERSIS &&
      sudo mkdir -p /mnt/kaliUSB &&
      sudo mount $DEVICE$PERSIS /mnt/kaliUSB &&
      sudo sh -c "echo '/ union' > /mnt/kaliUSB/persistence.conf" &&
      sudo umount $DEVICE$PERSIS &&
      sudo rm -fr /mnt/kaliUSB/
      sudo fdisk -l $DEVICE
    
    # .......1.........2.........3.........4.........5.........6....

  7. #7
    Join Date
    2019-Feb
    Posts
    4
    That's great! I'll do that. Thanks for the help.

Similar Threads

  1. Replacing main install drive with existing kali persistence drive
    By BlakeCypher in forum Installing Archive
    Replies: 0
    Last Post: 2020-05-13, 15:53
  2. USB Drive. Live with persistence vs Install
    By mattspierce in forum Installing Archive
    Replies: 0
    Last Post: 2014-10-14, 18:06
  3. Live USB slower with larger USB drive capacity and persistence?
    By 64nickel in forum Installing Archive
    Replies: 5
    Last Post: 2014-10-08, 14:22

Posting Permissions

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