This article is a step-by-step guide on how to dual-boot Windows 7 and Kali Linux on a single hard disk drive (HDD). Kali Linux is what used to be BackTrack Linux, a distribution designed for penetration testing and security professionals. It ships with about 300 penetration testing and hacking applications installed.
While BackTrack is based on Ubuntu, Kali Linux is based on Debian, and uses the complete Debian Installer. As a result, the installation process is different from that of BackTrack, which uses Ubuntu’s graphical installation program.
The objective here is to show how to install it on an HDD alongside an existing installation of Windows 7, with the Windows 7 boot manager as the “master” boot loader, so that at the end, when the computer is (re)booted, you will be presented with a boot menu that looks just like the one shown below. Selecting Windows 7 boots the system into Windows 7 and choosing Kali Linux will, by default, take you to the Kali Linux boot menu, which is the same thing as the GRUB 2 menu, the version of GRUB used by Kali Linux.
To bypass Kali Linux’s boot menu, simply edit the file named /etc/default/grub and change GRUB_TIMEOUT=5 to GRUB_TIMEOUT=0. Then run the update-grub command.
Now that we know what to do, and what the result will be, let’s get it done. If you have not done so already, download an installation image of Kali Linux from here.
1. Shrink the Windows 7 C Drive: My test system has an existing installation of Windows 7 on a 500 GB HDD, with just two primary partitions. This is how they appear in Windows 7’s partition manager. The task here is to shrink the C drive to create room for installing Kali Linux. To do that, right-click on the C drive and select Shrink Volume.
Note: If you intend to install Windows 7 afresh, this process will be a lot easier if you set aside the free space that will be used for Kali Linux during the installation of Windows 7.
If you have enough free space on the C drive, the system will suggest a 50-50 split of the free space. Which is just good enough for this test installation. Shrink.
After the operation has completed, you should see the newly reclaimed space next to the C drive. You may exit the partition manager and reboot the computer. Be sure to have the installation disc of Kali Linux in the optical drive before rebooting.
2. Install Kali Linux: The best option to select on Kali Linux’s boot menu is Graphical Install. It gives you a point-and-click installation process. Install works just as well, but the interface is ncurses-based.
For installing Kali Linux, the following partitions will be created: /boot, /, /home, and Swap. In that order. The /home partition is optional. At the disk partitioning methods step of the installation process, you get a bunch of options. Because none of the guided options will create a separate /boot partition, creating the partitions will have to be done manually. So select “Manual” and click Continue.
Here you can see the existing Windows 7 partitions, both of which are primary partitions. The free space, reclaimed from Windows 7 in the previous step is what will be used for creating the partitions for Kali Linux. To start creating the partitions, select the free space and click Continue.
Create a new partition. Continue.
This shows the total amount of disk space available for Kali Linux. The /boot partition will be created first, so you need to specify the amount of disk space for it.
For this test system, I assigned 300 MB to it. Continue.
Because you still have two primary partitions to use, you can create the boot partition as a primary or logical partition. Either option will work, but the installer prefers creating it as a primary partition, if the boot loader is going to be installed in it. For this test installation, I chose to create it as a logical partition. Continue.
Beginning. Continue.
This step shows the details of the boot partition you just created. The only thing you need to change here is the mount point. Double-clicking on it will open another window where you can specify the correct mount point.
Here’s what it should look like after the mount point has been specified. The other option you might want to change here is the Bootable flag.
There is a good reason it should be enabled, but the system will boot even if it is disabled. It just depends on your BIOS version. For this test installation, it was disabled and the system still worked perfectly.
Here’s the final details of the boot partition. Scroll to “Done setting up the partition,” then click Continue. Note that the steps you used to create the boot partition will be repeated for the other partitions.
Back to the main disk partitioning window, you can see the boot partition you just created, plus the remaining free space. Select, the free space, then click Continue.
i install win7 and kali but i can,t see boot menu for select kali or windos and boot windos when i turn on my labtop?
What type of PC are you installing on? Using UEFI firmware or BIOS? On one hard drive or two?
i first istall win7 and next kali.
what is UEFI firmware?
i made 2 primery section for win.
i have one hard drive .
Are you attempting to install it on a recent computer or an old one? UEFI is the firmware that replaced the older BIOS as the default firmware on newer computers.
i have a dell model 5010 labtop.
i buy it 3 years ago.
hi
i install win7 with kali but when i turn on my labtop boot win automatic and don,t any boot for select kali or windos ?
When i am entering the partition menu while installing kali linux it is not showing the unallocated space of 150 GB which i intent to allocate to kali linux. In shows 500 GB space as a whole free space. Now if i install kalli linux my windows will get corrupted as kali linux is not recognizing the partitions done from widows to the hard drive.
Is that 500 GB the size of the whole HDD? What edition of Kali are you trying to install? Some more info about your PC will help, too. UEFI firmware or not?
I am trying to install kali-linux-1.0.9a-i386. and
UFCIUEFI is enabled i just checked in bios.UEFI*
Can you take a sceenshot of the partition menu as seen from Kali’s installer and post it here.
Hi ,
My windows has crashed. Tried installing kali linux through bootable USB. Getting BOOTMGR missing error . Please Help 🙁
Perhaps you did not transfer the Kali Linux image to the USB stick properly. How did you do it and from what OS/distro?
If running a Linux distribution see this forum post.
Help!!!!!
Grub4dos appears when i select Kali on the loader menu!!!
Windows 7 works just fine.
Help!!!!
;(
Hi all!
Thanks for the tuto, but i have a grub4dos menu when i select Kali OS on the loader menu…
Help please!
Obviously something’s not right. A little bit more detail about your hardware, UEFI firmware?
Thank you for the replay!
I have a HP Probook 4540s I3, i try to install Kali 64x from a USB Stick that works fine !
with win 7 64x (already installed).
I followed the steps above, but the step “install grub” faild and the system did not ask me to select /dev/sda5 at the end of setup.
How can i check firmware if i’m running on a UEFI ?
Regards,
PS : Excuse my bad english, i m a morrocain guy…
If GRUB installation failed, then that’s obviously why you can’t boot. Since Windows works just fine, try reinstalling Kali. Towards the end of the Kali installation, there’s always a screen where you’re asked whether you want to install GRUB in the MBR. That step is always there. You need to select No at that step, you can’t miss it.
If the PC is a recent PC, it likely has UEFI firmware. You can confirm that by accessing the BIOS/UEFI utility. Pressing one of the F keys (F2 or maybe even the Del key) should get you in the BIOS/UEFI setup.
I confirm ! the grub installation step is always there!
but the setup assistance return an error.
Anyway, I’il reinstall and keep you informed…
Thanks again!
Cool! If you can’t install Kali on real hardware, you can always install as a Guest OS using VirtualBox or VMPlayer.
– BIOS MODE : Legacy (uefi with and without CSM available)
-GRUB SETUP : GRUB INSTALLATION FAILD :
“The ‘grub-pc’ package
failed to install into /target/. Without the GRUB boot loader, the
installed system will not boot.”
ERROR 127 when i try with LILO.
PS : NOW I HAVE AN ERROR INDICATING THAT THERE IS NO OPERATING SYS ON MA MACHINE !!! 🙁
Help please!
I hope you have your data backed up somewhere. If you are not able to boot into Windows, boot into the Kali Live desktop and see if you can grab a screenshot of the disk partitions that shows both the Windows and Kali partitions. You may post it at this forum category.
Done!
Thank you very much! Couldn’t find this tutorial in my own language, when it was hard to find it in English as well. Thank you sir!
You need to set it / not /boot 😉
hi all nice info i am running windows 7 ultimate in c drive and have 2 more logical partitions amd 1 unallocated partition/space. i want to install in 1 of these 2 logical partitions not having windows. how may i do this?
should i have to remerge partitions to c and d drives and repartite usind kali? please suggest me way to install and dual boot it with win 7 so that i wont get any problems in my existing windows….thanx in advance for help
How much memory you want to allocate to Kali ?
For me I have overall 500 Gb HDD so I allocated 170 to Windows and 100 Gb to Kali and rest to my Data that can be use both in Kali and Windows.
Please post your windows Disk Storage map to Understand.
How to Open Disk Storage Map.
Right Click on My Computer->Manage->on left panel Disk Management.
Post that Image to help you better.
contact me via mail :- dbz.divik@gmail.com
Doesn’t work for me to 🙁
What Problem your getting ?
I followed the instructions and installed kali into my laptop and now it’s saying:
“BOOTMGR is missing
Press Ctrl+Alt+Dol to restart”
I am unable to boot either OS.
How do i fix this? Help please!
Your windows may have corrupt while installing.
Thanks but right now I’m accessing it by using other account
user name :- root
password :- the one which I created at time of installing it..
I did it as specified and my computer boots to missing operating system! Thats it! I boot to windows boot manager and i get this File: \Boot\BCD Status: 0xc0000225 Info: An error occured while attempting to read the boot configuration data.
What is the best way to fix this, I was thinking reinstall kali again, but change a step or 2 with the boot options or grub…I dont want to screw it up worse though….it seemed to boot fine when i made the new partition with windows disk manager…so i went ahead to see if kali would install and it seemed all good until the step where it was supposed to boot to windows for the last steps….lol
I hope i did not screw it up too bad….pls help! Thx.
Also i can still boot the live kali dvd and see the drive with windows on it and all my files…
Try to use USB for installing and live Boot Kali.
If you want to install Kali try to delete all free partition using windows .
use win32diskmanager to make live USB.
https://launchpad.net/win32-image-writer
Try it.
Hi have installed Kali as you told.
It is opening as well as but I have a problem in Authentication as it is showing only login for Other User and if I’m typing my username and password “Auth. Faliure”
Shouldn’t you be logging in as KY? Is that the user you created during installation?
I can’t click on that USER only other option is avail to me.
If that is the user you created during installation and you cannot click on it, then obviously, something’s not right. If you set root’s password during installation, try logging in with root as the user account. If you can do that, you can then created another user see if that works.
I tried to using other option and trying enter my user name but still auth failure.
Is there anyway dat not to create password while installing
I reinstalled Kali but same error can login
Try to add a new user at login screen by holding CTRL+ALT F2 type the following command without quotes:”su” and give root passwd
if you don`t have access to root password then you can try this “sudo passwd” for to create a new one
Once you got the root access you can add a new user by typing : “adduser divik” hit the enter and choose a password for the newly created user account. When you are done with that now you can exit or reboot or hold down CTRL+ALT F7 to go back to login screen and login with your new user account info.
I have Lenevo G580 and I have install Win764, when I follow above procedure but I have more than 4 partition but its not appear. during procedure