Results 1 to 6 of 6

Thread: Persistent Kali Live-USB with Windows accessible storage

  1. #1
    Join Date
    2014-Apr
    Posts
    6

    Persistent Kali Live-USB with Windows accessible storage

    Hi,
    like mentioned in the title I'd like to configure an installation of Kali as an persistent Live-USB. Also I'd like to partly use a partition as a storage which is accessible in Windows.
    So far I've got no problems with the steps in particular. I'm able to install Kali on the USB via dd command, I'm able to create the persistance and I also already understood that Windows only accepts the first partition of an USB Storage as accessible storage itself.
    But now i got stuck combining these things. As soon as I install Kali on the second partition and mark it with the boot flag, I can't boot it.
    I had two kind of failures doing this, first of all BIOS refuses booting the Live USB, or in case it gets to the boot screen after choosing the option I get the message "invalid or corrupt kernel image"
    So, I hope you understand my problem and could gather some information.

  2. #2
    Join Date
    2013-May
    Location
    Netherlands
    Posts
    6
    You might try to intall the image on the USB using Unetbootin (install either by "apt-get install unetbootin" or download from SourceForge). Format your USB in Fat32 using the (Gnome) disk tool and start Unetbootin. Select your image on your pc, enable "Space used to preserve files[...]" and click "OK".
    When you're still not able to boot: have you downloaded the image by torrent or direct-download? If the latter, have you checksummed the image?

  3. #3
    Join Date
    2014-Apr
    Posts
    6
    Ok, I loaded it as direct download, but checksums are fine.
    First tried Unetbootin with one single Partition to see how it works at all, but it refused working even there. I've been able to choose the start options, choosed default, and after this he started loading but soon he got stuck in a loop printing couldn't load graphic 0 or something like that, unfortunately I didn't made a screenshot.
    Second try with 2 partitions failed too, but didn't even load the bootmenu

  4. #4
    Join Date
    2014-Apr
    Posts
    6

    Found solution

    Well at least i got it working on my own. I try to explain my steps as good as possible.
    First of all I used this Tutorial by IvanBayan big thx at this point!

    I used as system to install the Live stick an Live System of Kali
    I started to make the partitions on the destination Stick, check if the bott flag is on the 2nd partition:
    Code:
    # gparted /dev/sdc
    
    /dev/sdc1 --- storage     --- ntfs --- 10GiB    ---
    /dev/sdc2 --- kali        --- ext4 --- 3.5GiB   --- boot
    /dev/sdc3 --- persistence --- ext4 --- 15.58GiB ---


    Now I installed the kali image and prepered the bootloader:
    Code:
    # mkdir /mnt/source /mnt/kali /mnt/os
    # mount /dev/sda3 /mnt/os
    # mount /mnt/os/kali.iso /mnt/source
    mount: block device /mnt/os/kali.iso is write-protected, mounting read-only
    # mount /dev/sdc2 /mnt/kali
    # cp -rf /mnt/source/* /mnt/kali/
    # mv /mnt/kali/isolinux /mnt/kali/extlinux
    # mv /mnt/kali/extlinux/isolinux.cfg /mnt/kali/extlinux/extlinux.conf
    I modyfyed the boot menu in "/mnt/kali/isolinux/live.cfg"
    I replaced the first paragraph with the following to ones.
    This makes another option in the boot menu available to start directly into the persistent mode:
    Code:
    label live-686-pae-persistence
    	menu label ^Live persistence (686-pae)
    	menu default
    	linux /live/vmlinuz
    	initrd /live/initrd.img
    	append boot=live noconfig=sudo username=root hostname=kali persistence
    
    label live-686-pae
    	menu label ^Live (686-pae)
    	linux /live/vmlinuz
    	initrd /live/initrd.img
    	append boot=live noconfig=sudo username=root hostname=kali
    If you'd like to remove the start up system bell you have to edit the "/mnt/kali/isolinux/menu.cfg"
    In it you have to remove the ascii code ^G in the menue title.

    Now I added persistence:
    Code:
    # mkdir /mnt/persistence
    # mount /dev/sdc3 /mnt/persistence
    # echo "/ union" > /mnt/persistence/persistence.conf
    Finally I configured the bootloader.
    Code:
    # extlinux --install /mnt/kali/extlinux/
    /mnt/kali/extlinux/ is device /dev/sdc2
    #umount /mnt/source /mnt/kali /mnt/os /mnt/persistence
    #cat /usr/lib/extlinux/mbr.bin > /dev/sdc
    And that's it now it worked fine for me.
    Last edited by edipp; 2014-04-23 at 22:50. Reason: add gparted

  5. #5
    Join Date
    2016-Jul
    Posts
    6
    Would it be possible to get an update on this for Kali 2016.1? I've got 100Gb of unallocated space on a 120Gb SanDisk USB 3.0 drive, and I'd really like to be able to use it on both Windows and Linux.

    Here is how my drive is currently laid out (from fdisk):

    Disk /dev/sdc: 115.7 GiB, 124218507264 bytes, 242614272 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: dos
    Disk identifier: 0x0c7b9850

    Device Boot Start End Sectors Size Id Type
    /dev/sdc1 * 64 5570559 5570496 2.7G 17 Hidden HPFS/NTFS
    /dev/sdc2 5570560 5752895 182336 89M 16 Hidden FAT16
    /dev/sdc3 5754880 30920703 25165824 12G 83 Linux

    Note: sdc2 is the Kali Live volume that gets mounted in /media and has the EFI/BOOT folder. I've set the hidden flag just so that I don't have to see it mounted.

    Thanks in advance!
    Kali 2016.1 Persistent USB w/ a General User & Sudo.

  6. #6
    Join Date
    2016-Sep
    Posts
    1
    Quote Originally Posted by Snotes View Post
    Would it be possible to get an update on this for Kali 2016.1? I've got 100Gb of unallocated space on a 120Gb SanDisk USB 3.0 drive, and I'd really like to be able to use it on both Windows and Linux.
    I followed these instructions successfully: https://fajarichwannoor.wordpress.co...e-for-windows/

    Basically it says, "boot to windows, download bootice, set the partition to accessible". I used gparted to create the partition and format it.

Similar Threads

  1. Installing Kali Linux on SSD (persistent storage)
    By Black Rose in forum Installing Archive
    Replies: 2
    Last Post: 2021-01-20, 00:54
  2. Replies: 0
    Last Post: 2016-12-10, 04:59
  3. Replies: 3
    Last Post: 2015-08-22, 10:59
  4. Replies: 11
    Last Post: 2015-01-06, 18:42

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
  •