Through the Internet there are lots of tutorials on how doing it, therefore most of them do not work(and the kali one is a little hard to understand and sometimes jump some steps needed in windows) and I had a hard time trying to do this so I've decided to make a new one (most of the steps are from kali.org, I just implemented some steps that were missing for making it in Windows 10)
In Windows 10:
//Download win32diskimager
//Write the kali.iso in your pendrive(through the win32diskimager)(when selecting the .iso image you'll may need to change the filename extension box that is located near the search box)
//Boot(In windows 10 you'll need to disable secure boot, to do that restart the pc holding shift then go to troubleshoot/advanced options/uefi firmware settings the press restart then go to security then disable secure boot and press F10, after doing this, to boot you only need to restart holding shift, press use a device and then press EFI USB DEVICE)then select kali live(The first option that appears)
In Kali Linux:
//Download the latest kali.iso image(AGAIN) or just copy it using other pendrive(IMPORTANT: IF USING OTHER PENDRIVE COPY IT TO THE DOWNLOADS DIRECTORY)
//Open Terminal
Inside the Terminal:
///////////
I'm using a 16gb pendrive(which only really has 14.9gb) and the kali-linux-2016.2-amd64.iso iso image
If using a pendrive with different capacity: change the end command(3rd command) to end= your usb capacity -1gb
If using a different kali iso image: change the dd if command(2nd command) to dd if=your kali iso image and also change the read start command(4th command) to read start _ < <(du -bcm your kali iso image
///////////
- cd Downloads
- dd if=kali-linux-2016.2-amd64.iso of=/dev/sdc bs=512k
- end=14gb
- read start _ < <(du -bcm kali-linux-2016.2-amd64.iso | tail -1); echo $start
- parted /dev/sdc mkpart primary $start $end
*Yes
*Ignore
- cryptsetup --verbose --verify-passphrase luksFormat /dev/sdc3
*YES
*"Password"
*"Password"
- cryptsetup luksOpen /dev/sdc3 my_usb
*"Password"
- mkfs.ext3 -L persistence /dev/mapper/my_usb
- e2label /dev/mapper/my_usb persistence
- mkdir -p /mnt/my_usb
- mount /dev/mapper/my_usb /mnt/my_usb
- echo "/ union" > /mnt/my_usb/persistence.conf
- umount /dev/mapper/my_usb
- cryptsetup luksClose /dev/mapper/my_usb
//After doing this reboot and press the live encrypted option in the kali boot menu! You're all set! Enjoy!