Results 1 to 8 of 8

Thread: Making a Kali Live USB Persistent using GParted or terminal

  1. #1
    Join Date
    2016-Aug
    Posts
    20

    Making a Kali Live USB Persistent using GParted or terminal

    Hi!
    About a week ago, I created a live, bootable Kali Linux USB drive. I did this by using the Mac Linux USB Loader’s “Create Live USB” function. My native OS is Mac OSX El Capitan, running on a mid-2015 Macbook Pro. The ISO image which I downloaded (64bit) was named kali-linux-2016.1-amd64.iso. Mac USB Loader created a bootable USB with a folder EFI (which has a sub-folder boot, which holds boot.efi, boot.iso, and bootX64.efi).

    I successfully booted into Kali, running as root, but I noticed that my sessions weren’t being saved. I attempted to make my USB drive persistent by following several sets of instructions, including those from Kali’s website. Pasting those commands into the terminal gave me errors such as “<filename>: no such file or directory exists”. I was unable to make the partitions work.

    Recently, I tried to use NullByte’s tutorial on making a persistent USB (search “Create (Bootable) Persistent Kali Linux USB With Ease). I booted into Kali and opened GParted. In the tutorial, the author said that he had two partitions, but I had three. They were as follows:

    /dev/sda1 - fat32, labeled EFI, 200.00 MiB, 26.10 MiB used
    /dev/sda2 - unknown, labeled Customer, 232.96 GiB, “—“ for used and remaining
    /dev/sda3 - hfs+, labeled Recovery HD, 619.89 MiB, 536.39 used.

    The move/resize operation was grayed out and not available for /dev/sda2.

    I attempted to shrink /dev/sda1 from 200.00 MiB to 41MiB (41 was a fairly arbitrary number). I got another unallocated partition.
    Then, I tried to create something on unallocated (by clicking “new”) which the system named “Primary Partition #1”, of type ext4 and size 159.00 MiB on “/dev/sda”. When I applied these operations (as per the tutorial), I got several error messages, saying that overlapping partitions would occur and that my OS might be compromised/not able to boot properly and that I should reboot before making further changes. I closed these, and it went to a screen saying that it was “applying pending operations” and that 0 out of 2 were complete. It stayed like this for a while, making no progress, and I eventually gave up.

    I haven’t had any luck with other tutorials either. If anybody could tell me how to use GParted properly to resize the partition and then the terminal commands for making my USB persistent, I’d really appreciate it. I would prefer if it were encrypted.

    Let me know if you need more system information/information about the error messages to answer this effectively. Thanks so much!

  2. #2
    I think you are working on the main disk (200GB) not the usb. You should make sure you are actually working on the usb, which usually has smaller sizes, and is called sdb. Also you don't need to remove or resize anything, just add an ext3 partition named persistence and it must have one conf file. See this post: https://forums.kali.org/showthread.p...g&goto=newpost

  3. #3
    Join Date
    2016-Aug
    Posts
    20
    Oh man, I'm so confused. In GParted I navigated to another screen which tells me I have:
    /dev/sdb1 - 200MiB and fat32
    /dev/sdb2 - fat32, with a mountpoint of "/lib/live/mount/persistence/sdb2, labeled KALI (the name of my USB)
    and unallocated.

    What should I do with these three (I changed occurrences of hostname=kali to persistence) in order to make my USB persistent? It still isn't.
    How do

  4. #4
    It looks like your partitions might be messed up. Show me the output of these commands:
    fdisk -l /dev/sdb
    mount | grep /dev/sdb
    df | grep /dev/sdb

  5. #5
    Join Date
    2016-Aug
    Posts
    20
    fdisk -l /dev/sdb yields:
    Disk /dev/sdb: 29.4 GiB, 31591497728 bytes, 61702144 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: C1B213ED-9EAF-4CA6-9162-459DCCF37B9F

    Device Start End Sectors Size Type
    /dev/sdb1 40 409639 409600 200M EFI System
    /dev/sdb2 411648 61700095 61288448 29.2G Microsoft basic data

    mount | grep /dev/sdb yields:
    /dev/sdb2 on /lib/live/mount/findiso type vfat (ro,noatime,fmask=0022,dmask=0022,codepage=437,ioc harset=utf8,shortname=mixed,errors=remount-ro)

    df | grep /dev/sdb yields:
    /dev/sdb2 30629248 2883808 27745440 10% /lib/live/mount/findiso

    Thanks for all the help!

  6. #6
    Join Date
    2016-Aug
    Posts
    20
    Oh, also - I checked GParted again and apparently, /dev/sdb2 is mounted on /lib/live/mount/findiso now. I deleted and reinstalled a fresh version of Kali on my USB, I guess this is why?

  7. #7
    Those partitions still do not look right. Are you sure your usb drive is around 29GB? Make sure you don't have other usb drives plugged in. If you do, then it might be sdc or sdd or even sdf.

    If you can boot kali from that usb, then simply:
    1. use gparted to add an ext3 partition named persistence.
    2. make sure you have a persistence.conf file on that partition.
    3. boot from the usb and select the persistence option at the boot menu.

  8. #8
    Join Date
    2016-Aug
    Posts
    20
    Fixed it, I think. That was a painful experience!

    For those wondering, I used rEFInd to boot it, and imaged Kali using the terminal commands rather than using Mac Linux USB Loader. Pro tip - just use rEFInd installed from Recovery Mode and not Mac Linux USB Loader, because it made my partitions super weird and made it so Kali wouldn't show the boot menu.

Similar Threads

  1. Replies: 2
    Last Post: 2018-08-25, 10:22
  2. Making a Persistent usb flash drive with kali-linux 1.08
    By mmusket33 in forum How-To Archive
    Replies: 17
    Last Post: 2016-05-21, 01:03
  3. Making a live bootable Kali usb
    By Surgikill in forum Installing Archive
    Replies: 1
    Last Post: 2013-09-02, 02:03

Tags for this Thread

Posting Permissions

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