How To: Install Kali Live on a USB Drive (With Persistence, Optional)

Install Kali Live on a USB Drive (With Persistence, Optional)

Hi there, nullbytes :) I've recently seen many questions regarding VMs with Kali, and personally I prefer using a Live Boot USB to get Kali without removing my system (and for many reasons).

Some of the reasons for using a Live USB are:
· You use all of your system resources (CPU, RAM, GPU, etc)
· You take no space of your Hard Drive for it.
· No tunnelling your Internal Wireless Adapter into eth0
· You can take your OS to any PC you use.

And you just need a USB flash drive of at least 4 GB with nothing on it to get it, so why not give it a try?

For this tutorial, I'll assume you're starting from a PC with Windows installed, as most newbies do.

Step 1: Get the Stuff You Need

First, you'll need a program to install Kali on your USB drive and make it bootable. My program of choice is Universal USB Installer, as it's painfully easy to use and it has a direct link to many Linux distros download page within the program.

Search for this button, and get the program. Once you run it, you'll see a disclaimer page. Accept it (or read it first, if you feel like it), and you'll be presented with the configuration section (after a few seconds). Choose Kali from the dropdown menu:

If you haven't downloaded a Kali image yet, just check the "Download Link" box and you'll be taken right into the download page.

If your system is 64 bit, you may want the 64 bit ISO, but it doesn't ensure you portability to all the PC's you find. If you're not sure whether your PC is 32 or 64 bit, choose the 32 bit ISO. It'll work for both architectures.

You can choose Direct download, but if you have a pretty slow and unreliable connection, download it via Torrent. If you never downloaded something via Torrent, you could look it up. It's pretty damn simple.

Once you have downloaded your Kali image, select it:

Step 2: Installing Kali

And then choose the drive letter for your USB drive (you probably won't need to use that checkbox on the right side). Be careful when doing this.

I'd recommend to check the box that formats your USB drive. That'll wipe your whole USB drive, make sure you back up everything you had there before proceeding. It'll make a quick format, so there's no reason to avoid this.

Click on Create, then Yes, and it'll do the whole process by itself. The longest part will be extracting the ISO to your USB, but it'll be over in a matter of minutes.

If everything went as expected, you'll see this, and you have a USB you can Live boot you Kali from. You may have to do a little tweaking on your BIOS for it to work, but I don't know how to cover every BIOS on a single tutorial.

Quick Linux Guide

If you're already a Linux user, follow these steps to make a Kali Live USB. It's way simpler and faster than Windows!

· Make sure you have a 4 GB+ USB drive connected and you're ready to get it cleaned.

· Download the Kali ISO of your choice (32/64 bit).

· Check your USB drive location with
sudo fdisk -l

· Let's say it's /dev/sdb and you haven't ever partitioned it. Just format it to be Fat32 with sudo mkfs.vfat -n 'Kali' -I /dev/sdb1

· Locate your Kali image and use it as input in this command:
sudo dd if=/home/you/downloads/kali.version.iso of=/dev/sdb1 bs=512

Wait for it to finish, and that's it, you have Kali on your USB drive now.

Setting Up Persistence (Preparing the Partition)

You liked to Live boot from USB, but you want to save changes made into your OS, or just files (such as .pcap files) into your USB drive? You'll need to set up Persistence. Your USB drive must have 8 GB+ of storage space.

Download MiniTool Partition Wizard Free, install it, run it and then choose Launch Application.

Right click on your USB drive, and click on Move/Resize

Use the small black arrow keys to shrink the partition size. It will leave a bit of storage space free, but if you manually assign the Partition Size, the program may fail. Click OK.

A new big grey chunk of unallocated space as appeared! Right click on it and click on Create. It'll warn us that Windows won't be able to see that partition, but we don't care about that ;)

Pick this options:
· Create as: Primary
· File System: Ext4
· Partition Label: persistence

Then click OK.

Now click on Apply (upper left corner), and just wait for it to complete the tasks.

Setting Up Persistence (Configuring the Partition)

Once the partition manager finished, reboot your computer and boot up from your USB drive. Choose the option "Live USB Persistence", and when it's booted up, open a Terminal and use these commands:

Determine which partition of your drive you'll use
fdisk -l

Remember your drive had a FAT32 partition and a Ext4 (Linux) one?

Make a directory on the filesystem to mount your USB
mkdir -p /mnt/my_usb

Mount the partition on the directory you made (don't click the desktop icon labeled persistence!)
mount /dev/sdc2 /mnt/my_usb

Add a configuration file to enable persistence
echo "/ union" > /mnt/my_usb/persistence.conf

Unmount the partition and reboot
umount /dev/sdc2 && reboot

Now, if you boot up to Live USB Persistence, you'll be able to save stuff everywhere on your Linux filesystem, and every configuration you make locally will be available everywhere you plug it in :)

Closing Up

I hope this article is useful for newbies who are getting their heads messed up with VMs instead of just booting up Kali and getting their heads messed up by using Kali.

I also hope it's not over explained (or under explained). I've tried to keep it as simple as I could without adding loads of screenies as if it were going to be read by dumb people. But I'll gladly answer any questions related to this in the comments :)

P.S.: Sorry Mac users, I don't know about your system. Yet.

P.S.2.: I'll do a Linux partition guide when I figure out how much space I can crop without screwing up my drive, but you can have fun with GParted in the meantime.

100 Comments

Fantastic read! Thorough analysis, great detail! Thank you!

I'm glad you liked it :)

Awesome post KITTEN. I think you gave the exact amount of detail necessary. Can't wait to read your partition guide - I've been planning on triple boot my systems for a while but lacked the exact know how.

Keep it up ma friend

Oh, maybe that description at the beginning was misleading, I just mentioned my setup as a comment. When I talk about the Linux partition guide, I just meant I wanted to show how to partition the USB drive properly starting from Linux, just as I showed a Quick Linux guide for installing Kali on a USB stick.

Would you want a tutorial on how to install Kali on your machine and make it dual-boot (or triple, quad, etc)? That's entirely a different story, I didn't write about it because you risk of losing everything on your HDD if anything goes wrong.

If anything goes wrong installing Kali on a USB, you backed up what it had previously, and no harm is done, it can be formatted again.

It would be cool to have a tutorial on triple boot I guess, but I understand know what you meant :).

hey when i create the partition on the usb, my computer is not able to read my usb. When i take away the partition you talked about above, my computer is able to read my usb, but then without the partition, i cant save anything. To wrap it up, make partition, computer cant read my usb, when i take away the partition, my computer is able to read my usb but i cant save anything in kali linux.

Please help

Nice tutorial Kitten! :)

I am just wondering why not to boot your system with Kali Live CD and install it in USB instead of HDD? I am just wondering why not. Could there be some issues if I start moving my USB through different PCs? I am not sure how kernel would deal with that in the long term solution.

I have this setup in so far I have been using it without any issues.

Well, that0s what Persistence is all about!!

If you set up Persistence and select that option when booting up on any PC, you'll get to boot it just as you left it last time you used it, but it'll load drivers for the PC you're using everytime :)

What this tutorial is about is installing the "Kali Live CD" on a USB, not the OS. If you installed the OS, then your PC depends on your USB drive to boot up. That's pretty unreliable, I wouldn't reccomend it.

i already knew how to use UUI, but not about the persistence. this will come in REALLY handy!

thanks, Kitten!

-Phoenix750

You're welcome :)

Great tutorial! I don't think that there is a tutorial on Null-byte on setting up Kali Live. I also like it that you are including a section on setting up persistency, so that you can return to your OS the same it was before!

Well, there is this post, that made me fear mine would get deleted for repeating information, but I felit like it was too general and not newbie-friendly enough with this subject.

Ciuffy delves into many ways of using Kali (CD, USB, VM, Dual-boot) and configuring MBR for BIOS and EFI. He even wrote a FAQ!

hi
please help me

the nvidia driver is drive me crazy i am new for the linux os (kali) and i tried every thing to install the nvidia driver and nothing worked .please some one help me .thanx

my video card is nvidia Geforce 710m

Well, this isn't directly related to my article, but...

I know there are reasons to install a proprietary driver for Kali, but don't go crazy on that, there' still loads of things you can do if you can't install them. Or Google your problem, I found this article from BlackOps that seems to cover what you want to do pretty well.

Cheeers.

thank u very much i know it is not very important but i need it for the hdmi any way i shall try this and thank u very much for your help ...

Excellent guide! As someone who always uses a VM. I will definitely be trying this soon. Thanks for posting.

Thanks! Unless you use VM because you have a hacking lab set up in it, this is way better in every way.

Hi everybody, i'd recommend using an USB 3.0 stick with persistence or else you'll have a pretty slow and unusable live persistence. Some folks on IRC told me getting USB 3.0 for persistence was bullshit but that makes a HUUUGE difference even when using it on USB 2.0 ports. I personnally got a 10€ USB 3.0 Kingston 16GB stick and it's working pretty well even with full encryption on the USB stick. That's just an advice in case someone want to buy a key with the aim of getting persistence on it. ;)

EDIT: BTW, great tutorial for beginners ! Good job Kitten ! :)

Yeah, I was wondering about that. All my USB drives (excepting my external HDD) are 2.0, and neither my desktop nor my laptop have USB 3.0 ports.

But as far as I knew, if you plug a USB3 into a USB2 port, it'll work at USB2 speed. And if you plug a USB2 into a USB3 port, it'll work, because of backward compatibility, but at USB2 speed, still. I guess I'll only know for sure when I get one of those 3.0 USB drives :)

that's good but something i wanna ask:

by this is Kali functions work correctly once i did that to Ubuntu but many actions were disabled, what about Kali then?

Actions such as?

can i save all the settings ,updates etc on it?

Yep. And as Charly up there said, it's works way faster if you get a USB 3.0 drive and plug it into a 3.0 port

Thanks for your post. But is there any way for MAC?

Probably, but as I don't own one, I don't know it it's possible.

Look for this button in the upper left side of the program :)

Yours might be sdb2, or sdb1. I used sdc 1 because I have two HDD in my computer. Check what's your thumbdrive letter with fdisk -l. It will have a Linux partition and a W95 FAT one. The one you want to make persistent is the Linux one.

Hello. Can someone please help! I have downloaded the correct 64bit ISO for kali Linux, I then used a 4GB USB and wrote the program to it using Win32 Disc imager. I booted from the advanced settings and I keep getting a message that says USB not authenticated. I have Windows 8 and I have a HP laptop. What is the problem. So far I have tried numerous times with no success. I'm not sure what the problem is.

There must be something in your BIOS that's stopping it from booting. Maybe something called secure boot?

Thank you. Do you know how I would change that setting?

I actually found success. Thank you Kitten. Now all I have to do is learn how to use the new OS.

Great!
Good luck with that small task you're willing to accomplish :)

Problem is you're trying to boot in UEFI secure mode :) Try by disabling it from your BIOS

I finished the last step and my computer restarted. When it booted the linux menu appears. Is it should be like that and every time I should choose usb persistence? or did I do somting wrong?

You must choose USB Persistence every time, unless you want a live session that doesn't leave anything after it halts.

One simple test to check if it worked would be:
· Open a Terminal.
· Enter the command: touch testfile
· Reboot
· Enter with USB Persistence again
· Open a Terminal, and enter the command: ls

If testfile appears listed, congratulations, you did it well :)

Thank you I'll try that.

hello kiten
it din't showed any testfile
what i have to do please reply

Great i managed to save files into "pesistence" the unlabeled partition we mad..
But i can't save me settings ..for example when i change time then reboot...i find the initial system time
Or when i change the backgound then reboot i find the original background
Or when i update some programs and reboot
I find my programs without my updates
Is that normal??
Help me please

Ddi you do the part of "Configuring the partition"?

I think I did but when typing this command
mount /dev/sdc2 /mnt/myusb
It didn't work untill I modified it into
mount. -t /dev/sdc2 /mnt/my
usb
I added "-t"
And also chnaged sdc2 into sdb2 as i have it

Image via harajgulf.com

You forgot to put a space in the mount command.

mount /dev/sdb2<HERE GOES A SPACE>/mnt/my_usb

Then continue the process...

Spaces are important.
You also wrote /union instead of / union after that.

Wait will this also work on the new Kali Linux 2.0 Live? (which i CANNOT wait for?)

Let me consult my crystal ball...

I can't see it clearly, it'll probably be possible, but a different method may be needed.

well, I hope as they release 2.0, they make update their Kali Linux docs .

After i add a kali linux with persistence in a usb device i can add more OS like tails and windows in same usb device?

You can add them with YUMI instead of Universal USB Installer, and then get persistence...

I did everything as per the steps given...did the procedure for persistence too...but when i tried to boot kali from the usb, it just shows a message "Boot error" just below the "Verifying DMI pool data.." message. Kali boot screen didnt even show up.

Did i do something wrong? Or is it my PC?

My PC details....

Thanks in advance... :)

BTW I'm trying to install kali 2.0 with persistence

I got it to boot....

But pls include instructions for making the persistence encrypted

Again Thanks in advance... :)

+1

I also like to see instructions on how to encrypt the persistence ;)

Thanks

In case anyone is wondering. This process works on Kali 2.0. For whatever reason, it only works when the original ext4 part is 8gb or less. But if you have a larger partition available, just make the 8gb first and after you test persistence and ensure that it is working. Open gparted and extend the persistence partition to whatever size you want. Just in case this helps. Live long and prosper.

Great article this is what I was looking for :) Would you mind uploading for the Live Encrypted Persistence please? :)

Your instructions were not over detailed. I greatly appreciate that you wrote this. I didn't read ahead however... I didn't see the part where you said not to click on the persistence folder on the desktop til it was too late. What does clicking on that folder do? When I try the mount command I receive the error that the path can't be found in /etc/fstab. Any help here greatly appreciated.

Thanks!

I did everything right, however after choosing Live USB Persistence, the screen looks like it's booting and then suddenly it becomes this:

Image via ahmetucar.co

And that's all. Nothing happens. Later when I click esc or backspace it goes between two images similiar to this and that's the end. Can't open a Terminal, can't do anything.

Help?

Hello guys.

I have 1 problem. I wanted to create bootable USB linux kali device. When i would have USB in my PC i could run linux by going in boot menu and select USB. So i downloaded linux kalix64.iso and wrote it with Win32 Disk Imager on 32GB USB. I restarted pc and i came in Bott menu. There i selected USB boot. I installed Linux from USB. After installing it i wanted to go back on Windows 10. I turned off PC and unpluged USB. Then i turned on pc and i got this message:

"error: no such device: d75a65fc-e4f5-4b25-9cb4-a82efc6bbb8f.
Entering rescue mode...
grub rescue> "

Then i turned off my pc and turned it on with USB in it. So it took me to GNU GRUB there i could chose between Linux Kali and Windows 8 (loader) (na/dev/sda1). So now i cant go in any OS without USB in my PC.

Plz help me.
Thank you for answer and sorry for my bad English

Thanks for this article ,
but I have a problem with creating ext4 partition:

Could you please help me with this ?

have you figured this problem out yet? Im running into the same issue. i got Kali 2. loaded it onto my 16gb lexar usb. when i boot up i can run kali Live but the partition wizard wont let me create a persistence partition. i get the exact same error you posted in the image above. Please let me know if you figured it out

Try fullwipe. Then partition into FAT32 and EXT4 before you install kali

Thanks for the awesome article.

I have a question. I was wondering, if I can create the persistence derive in my HDD. Is is possible to have persistence space in HDD and use it while Live booting from a USB.

Actually I am not being able to setup Kali 2 in my HDD, because of CDROM not found issue. So I was wondering if this method can be applied.

Thanks in advance :)

I had the same CDROM issue, when you get to the retry part, unplug the USB. Then plug it back in and wait for a few seconds before pressing retry, Done!

Hello, i have an ask. First, i say: i installed kali on a vm but the vm was really bugged and now i want to install in a usb. Kali is bugged here too? Is an iso installation problem? Thanks and sorry my english xD

Went to the UUI website downloaded the wrong file and BOOM! 1-855-402-4168 Popup! They really are a pain in the a$$. And right before I have to got to work. Good thing there is nothing on that computer, (I may be a nooooob but I know that much). Live and learn.

hi, sorry for bothering...I tried
mount /dev/sdb2 /mnt/my_usb

but it says:

NTFS Signature is missing.
Failed to mount '/dev/sdb2': Invalid argument.
The device '/dec/sdb2' doesn't seem to have a valid NTFS.

What should I do next?

So after my first little mishap... I followed the first part of the post and got Kali live on my USB! Tweaked my BIOS to load it. After I played around in Kali and doing a little more home work, I tackled the USB partition. No problems at all.

Thanks Kitten for this awesomely written post.
BUT... I have a problem. IDK what I want to do in Kali first!

Firstly learn commands to use in terminal; start with the linux basics guide on this very webiste. Then move on to metasploit.

Hey i was wondering if the process becomes easier if you do the step 4 in UUI, "Set a persistent file size for storing changes" option.I am using v. 1.9.6.3 of UUi so the option must have been added later on.does that save you the hassle of using MiniTool Partition Wizard?

EDIT : My bad,that option was showing just for Ubuntu.

I have done exactly as mentioned above but it is not working .Can any one say mewhat the problem is ?

I have downloaded it to my pc but it doesn't have option of kali linux in the list what should i do kindly help me to install kali linux in my pc.thankz

Scroll down the list.... Kali is under 'Security and Penetration Testing'

Please help me... i have successfully made a bootable kali linux 2.0 usb.. everything works fine... except the network(internet access through broadband connection)... is there any solution to this problem? thanks in advance

Are any networks showing up, or are they showing but you can't connect to them?

Whenever I create a live usb with the universal USB installer, they don't work. I can make a working live usb with win32 disk imager, however it removes the device name so it's just called D: so what would I call the disk while using the command line to create persistence?

I get to the point where I create the unallocated space on my USB stick, and I right click that space and hit 'Create' but I get an error: "MiniTool Partition Wizard cannot create a new partition on this removable disk. If you like to create several partitions on this removable disk, you need to delete all the partitions first."

help anyone? I have burned the iso in uui and managed the partitions appropriately in partition manager in windows, but when I reboot and press f9 (hp laptop) to go to the list of bootable drives, usb ain't there. I have tried turning on legacy support, I have tried turning off secure boot, I have tried moving usb up in the boot priority list, I have pressed shift+restart in windows and selected "boot usb" option (it just says it fails when I try that), and I have no idea what to do. When I turned on legacy, usb does show u as option, but if i select it, hp says "selected boot drive failed to authenticate." I tried this all on a 2.0 64 GB usb and now I have a 3.0 64GB usb, both have been formatted before I started the project with every format out there. Can someone please help?

Hello, if you have UEFI bios open that (I use f10, I don't know on your pc) and move on "system" or "system configure" or other, scroll down on "boot options" or "boot menu" or other and disable "legacy boot". Now a menu bicome blue: modifie it and at the first transport " usb diskette" and do it with the second menu. Restart the pc et voilà :) sorry my english :c

Thank you so much for these well presented, detailed instructions!

Unfortunately, I have a problem - even though I followed everthing to the letter, and received ZERO errors (except when I omitted a space in the same place someone else that posted earlier did) - everything works perfectly except - no persistence. It would be much easier to help me if I could offer some sort of error message etc.. but I have none.

The only think I could think to do that might be of help was that I checked the contents of persistence.conf - it contains (without the single quotes): '/ union'

I positioned the cursor after the text to make sure there was no white space after the text.

I'm absolutely positive that I was dealing with the correct partition ( I ran fdisk -l and paid attention - I didn't just mindlessly choose the same drive as the demo, although it was coincidentally exactly the same :) )

Everything seems exactly as it should be yet - no persistence. No saving the configurations made to the web browser, no saving the CA certificate in the browser from Burpsuite.

I am clueless as to trouble shoot this. Any help would be greatly appreciated!

EDIT:

I wanted to add some screen shots that may be helpful - does anything look amiss here?

Thanks again!

Worked for me the first try, which doesn't ever happen for me. Thanks

Hello there. I've managed to successfully save downloaded files to the "persistence" folder that was created to the desktop, -it's the only folder that can save anything permanently- but I still have an issue with the system changes. Specifically, when I change the background or the security settings and that sort of things, they are all gone after the reboot. Any ideas?

P.S.
I owe you a BIG Thank You for the tutorial!!

I have followed all the steps, however When I go to boot from my USB, the USB device doesn't show up and no matter what I select, it boots to windows as normal. pls Help. first time

I got to mount /dev/sdc2 /mnt/myusb so I put mount /dev/sdc2 /mnt/sdb2 and it said mount: special device /dev/sdc2 does not exist (a path prefix is not a directory)_

You'll need to use lsblk to determine what device your USB stick is.

I made exactly as in the guide but i have a huge problem! After i boot up Kali live usb with persistence everything seems fine except for one thing... my root folder shows only 2GB of free space as available... i use gparted and there i see 10gb for primary and the rest for persistance... when i used the command "sudo apt-get upgrade" it failed in the end for not having enough disk space... now after that command i have like 27 MB left on root folder... or "Computer" in the "other" section... what should I do to rezolve that? Thanks and sorry for the inconveniences!

Great tutorial! Last night, when I was really tired, I tried it, and accidentally formatted the drives on my OS X laptop to EXT4, which not only erased my data, but OS X can't read any kind of EXT data, so I had to reinstall OS X. Oh well! Thanks for the tutorial!

The command of unmount usb and reboot is not running....it says tha unmount :command not found
Pls help me asap

Step 1: k

Did you get anywhere I'm stuck here

Hello! When I do this, it just creates an apparent drive that follows my system through reboots. The stuff that I insert into there is saved completely, between systems and reboots, but everywhere else like the settings and the desktop (and more importantly installed tools like shellter) are simply thrown. I followed these instructions to the point where I copypasted commands. The only difference was that I made a 24gb partition (28gb drive) instead of a 4gb partition. Help?

I did this last night but there was something wrong with the nullbyte servers so I couldn't comment. LOL.

Thanks, worked fine for me.
Is it possible to update a persistence live USB?
Like apt-get update, apt-get upgrade and apt-get dist-upgrade?

I followed the instructions for windows, and my usb looks like this:

I am not sure if it will boot kali linux. Have I done anything wrong?

can i done all the steps on window

Thank you Kitten, Nice tutorial.
But I have a question.

I follow all step in this tutorial. But I still can't save a file in root folder. I mean, I try to save a text file in /root, but After rebooting my text file is not there. Then I try to save a text file again to /union folder and rebooting, And my text file in there in /union folder and saved successfully. Is this true that I can't save in /root folder, but i can save in /union folder ?? If that true, is it means i must update my Kali everytime after reboot ??

i follow all step but i stuck after choose usb presistent, i can't login need username and password
what username and password??

Share Your Thoughts

  • Hot
  • Latest