Thursday, May 22, 2014

Instructions On How To Dual Boot Kali and Windows UEFI

First of all, if you are not hard wired to the internet you can't install kali.  You'll need to be hardwired to the internet in order to download the grub boot loaders toward the end of the installation and wifi, wireless will not work.

WIFI, wireless will not work!

1 flash drive with a minimum of 8gb

For i386 and amd64 architectures, a minimum of 512MB RAM.

Back up your files and programs

Create a system image

If you need a copy of your drivers and a resource CD click here.

STEP 1:

Download Kali



The links above are linked directly to Kali's server but if you'd rather go to Kalis website and download them directly, click here.




If the 64 bit iso from Kali's website shows any extraction errors or broken or missing files during the creation of your bootable usb then download the iso torrent from KAT's website. It worked for me.


STEP 2: 

Create a bootable usb 



I prefer the Universal USB Installer from Pendrivelinux.com. It's a smart program for creating bootable usbs.  It will setup the format settings automatically based on the OS distrobution that you've chosen.
Alright once you've got both Kali and UUI downloaded, start up the Universal Usb Installer and insert your usb into an available port on your computer.
Step one:  Select Kali as your Linux Distribution.
Step two:  Browse to the location where your Kali iso is located
Step three:  Select the flash drive you intend to use
Step four:  Check off the format box to erase all data on the usb
Step Five:  Click create and confirm.

As I said, if you see any errors during the creation of your bootable usb then download your iso again from Kali or try the link to Kat.ph and download the iso from there.

If no errors, broken or missing files are found then continue on to the next step. 


On your desktop create a new folder and rename it EFI.
Open the EFI folder and create a new folder and rename it BOOT. Leave the BOOT folder open for now, minimized or whatever you want to do with it.  

Now Open up notepad, copy and paste the following:

-------------Copy Below this line-------------

# Config file for GRUB2 - The GNU GRand Unified Bootloader
# /boot/grub/grub.cfg

# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,2)
# /dev/sda3 (hd0,3)
#
# root=UUID=556feb5a-aa31-4dc0-91ba-1fc416f045c6 persistent

set menu_color_normal=yellow/blue
set menu_color_highlight=blue/yellow

function load_video {
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod all_video
}

load_video
set gfxpayload=keep

# Timeout for menu
set timeout=5

# Set default boot entry as Entry 0
set default=0
set color_normal=yellow/blue

menuentry "Kali - Boot Non Persistent Mode" {
set root=(hd0,gpt1)
linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali
initrdefi /live/initrd.img
}

menuentry "Kali - Boot Persistent" {
set root=(hd0,gpt1)
linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali persistence
initrdefi /live/initrd.img
}

menuentry "Kali Failsafe" {
set root=(hd0,gpt1)
linuxefi /live/vmlinuz boot=live config memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal
initrdefi /live/initrd.img
}

menuentry "Kali Forensics - No Drive or Swap Mount" {
set root=(hd0,gpt1)
linuxefi /live/vmlinuz boot=live noconfig=sudo username=root hostname=kali noswap noautomount
initrdefi /live/initrd.img
}

menuentry "Kali Graphical Install" {
set root=(hd0,gpt1)
linuxefi /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788
initrdefi /install/gtk/initrd.gz
}

menuentry "Kali Text Install" {
set root=(hd0,gpt1)
linuxefi /install/vmlinuz video=vesa:ywrap,mtrr vga=788
initrdefi /install/initrd.gz

}



-------------Copy above this line-------------
 
See toward the top of the grub file where it says, root=UUID and then a combination of letters and numbers?  You need to change that to match your UUID.  You can find yours in your BIOS settings menu.  If you are running Windows 8.1 you can reach this either through your manufacturers assist button on your laptop or by pressing F8 during the first stage after turning on your computer and sometimes it's your space bar or even Esc.  Check your owners manual online.  The UUID is usually next to your processor interface in the Bios setting menu.  The processor interface tells you which processors are compatible with your motherboard.   Once you've got your UUID replace the one in the code above with yours and then save the file in notepad as, grub.cfg and make sure you use the (*.*) symbol (all files) when you save.  Do not save as *.txt (text file) otherwise your file name will say grub.cfg.txt and it will be useless then.  Once saved put grub.cfg into the BOOT folder and leave the folder open and you can minimize it for now.

Your current Windows Boot loader is crucial and so imoportant.  If that is compromised in anyway you will not be able to start Windows.  You will then have to reformat your hard drive and reinstall Windows and the start this process of installing Kali all over, again.  I am going to show you how to prevent that from happening.


Download and add these three files to your Boot folder.
BOOTX64.efi


\EFI\BOOT should look like this after you've finished transferring the four files.






Now you can close the BOOT folder. Copy and paste it to the Bootable USB you created.  It should look like this:

 

 

STEP 3: 

Shrink and partition a volume for Kali


Press the Windows Key + R to open up run and type cmd and press enter.  




 


In command prompt type, diskmgmt.msc. 













 






Right click your primary internal hard drive and select, "shrink volume".  The computer will query available shrink space and will tell you the maximum number in MB that you can shrink the drive without causing any problems. 







Then:

Right click the volume you just created and select, "New Simple Volume."  Format the new volume as NTFS and without an assigned letter.  Without formatting the volume it will not show up in the Kali installation.  Also, depending on the size you create you can also set aside an additional GB from that volume.  Just format the volume 1 GB smaller than the current volume size.  You will be able to use the formatted 1 GB partition as your swap space for Kali.

STEP 4:

Boot menu 


In order to boot more than one operating system without conflict or boot problems you'll need a boot manager.  In my opinion the freeware program I use is the easiest way to prevent boot problems.  The program is named, "Easy BCD".  Before you install Kali you need to install  this program.  It will create and display a boot menu outside of Windows and Kali during the first stage after pressing your power button and will give you the option to choose from either Operating system. You don't have to change any settings or tweak anything.  Just install it then select either add new entry or advanced settings and save a back up of the current boot menu.  Save the back up file to wherever you want.  The pic below is what BCD will look like on your desktop (sort've) after Kali is installed.  Just make sure if you plan to install Kali that you first install Easy BCD boot manager.  You could find another boot manager out there, however, I've found this one to be the most user friendly out there.





 (I added the, "= Kali" after debin.)



STEP 5:

Boot order 


Once that's done you can restart your computer and open your bios settings.  You should still be in UEFI boot mode.  Do not and I repeat, do not change to Legacy.  



Disable "secure boot" and set the computer to boot from external media. Insert your USB and Press F10 to save your changes.  




STEP 6:
Hopefully you didn't get any errors after you selected, "graphical installation."

  Now if you experience any of the following errors:

  • Empty security header
  • Error: /install/gtk/vmlinuz has invalid signature.
  • Error: you need to load the kernel first.
  • Press any key to continue... 
...Take out the usb and Reboot windows. Reinsert the usb after windows starts and open up the boot folder in \EFI\BOOT.  Open up the grub.cfg file and delete every line with "set root=(hd0,gpt1). (I counted six, set root=(hd0,gpt1)) Save your file and restart your computer and boot from your usb.  Kali should now start in UEFI.




Kali boot menu:  Choose, "Graphical Install."


 


configure the Network





Select your time zone 

 
   

After the Partitioner loads choose "Manual."
 
Usually the installation media for Kali will automatically have a partition ready for you as a boot partition.  Do not delete or format that drive.  Leave it as it is.   If not, you'll need to set one up.  To do so, you'll need to resize the partition to the minimum size it will let you.  It bases the size on a percentage.  I'm not exactly sure what that is.  One created select Use as:  EFI BOOT.  Make sure to set to bootable flag.


Then select the volume you created and formatted.
Change the following:
Use as: "Choose Ext4 Journaling file system"
Mount Point:    / - The root file system (This picture is /boot)
Double click to turn on, "bootable flag" 
Then select Done setting up the partition.

 Remember that second partition you set up in Windows?  Set that one to Swap space and then select done setting up the partition.  

So that's it for partitioning.
You can always create more partitions if you need to from gparted inside Kali. 


Choose finish, then confirm write changes to disk.
 




System will now install



Use a network mirror?

Yes



Http proxy information

(Leave blank for none)

 

Following the detection of another operating system.  Install the GRUB boot loader.  Packages will load and Installation will finish.  When you are notified to remove installation media take out the bootable usb and when the sytem restarts you will be greeted with a boot screen similar to this: 



There you go!  Enjoy.  

How to install the following using the Kali Terminal:

Mozilla Firefox
Java
Flash








No comments:

Post a Comment