Partner links

Dual-boot Windows 7 and Kali Linux

Zemanta Related Posts Thumbnail

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.
Windows 7 Dual-boot Menu

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.
Kali Linux Windows 7 GRUB 2

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.
Windows 7 Partitions

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.
Windows 7 Shrink Partitions

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.
Windows 7 Partitions

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.
Kali Linux Boot Menu

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.
Kali Linux Debian Installer

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.
Kali Linux Create Partition

Create a new partition. Continue.
Dual-boot Windows 7 and Kali Linux

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.
Kali Linux Create Partition size

For this test system, I assigned 300 MB to it. Continue.
Dual-boot Windows 7 and Kali Linux

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.
Dual-boot Windows 7 and Kali Linux

Beginning. Continue.
Kali Linux Create Partition size

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.
Dual-boot Windows 7 and Kali Linux

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.
Kali Linux

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.
Dual-boot Windows 7 and Kali Linux

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.
Kali Linux

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.
Kali Linux

Share:

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
157 Comments
Inline Feedbacks
View all comments
Santhosh
Santhosh
6 years ago

Hi admin…. I have a problem with my kali linux installation. I tried a lot of solutions that I can try without internet. But nothing I got success. I have win 7 in my system.

I have four partitions in my system. Those are a initial 300 mb that is not allocated. Next C:/ drive, E:/ drive and D:/ drive. I shrinked D:/ drive for 30 GB and tried to install kali linux.

Everything went successfully. But grub-pc installation failed. I continued the installation without installing grub in the thought we can install it manually after completing the installation. Kali linux is installed successfully. I tried to install the grub manually after mounting the kali installed disk to /mnt mount point. But it results in package can’t locate error.

But I can install grub in my live usb. I thought that locale is not set properly in my Kali installation partition. So I exported some environmental variables to set the locale properly. Still I can’t install grub on my kali partition. I yet to try your solution that creating boot partition separately. Will it solve my problem?.

One more information I forgot to give. I don’t have UEFI option in my firmware and also I don’t have any secure boot option. Pls help me to install kali linux properly.

Santhosh
Santhosh
Reply to  finid
6 years ago

Kali version 2.0 and I select “Automatically partition the disk” during the installation. So boot is installed in the same partition as the /(root) directory installed.

Santhosh
Santhosh
Reply to  finid
6 years ago

Its Legacy BIOS.

Santhosh
Santhosh
Reply to  finid
6 years ago

Ok. I didn’t check whether it is extended partition or not. Let me try the installation as u said today. But one thing I forgot to tell is, I installed the kali with my live usb. I couldn’t use the main screen to install it. I get in to kali through live usb and then I tried ‘install kali’ option to install it. During the installation I couldn’t see the screen properly. Monitor hide the half of the screen and I couldn’t see the ‘Continue’ and ‘Cancel’ buttons. I just press the ‘Enter’ key to move into next screen.

Santhosh
Santhosh
Reply to  finid
6 years ago

I need one clarification. Is there issue with kali linux iso file that it should contain source files to install grub? I mean, should I put any additional source files in my live usb to make it work for installing grub?

Santhosh
Santhosh
Reply to  finid
6 years ago

I couldn’t select any mirror server for debian during installation since I couldn’t set up my network connection. Because I am using a Modem with multi SIM option. So Installer failed to set up the network. Is there any issue with it?

Santhosh
Santhosh
Reply to  finid
6 years ago

How to find whether my image file is netlist or not?

Santhosh
Santhosh
Reply to  finid
6 years ago

sorry netinstall

Santhosh
Santhosh
Reply to  finid
6 years ago

Now I checked my disk partition. All partitions that is C, D, E in my system are marked as primary partitions. Is there any problem with that?

Santhosh
Santhosh
Reply to  finid
6 years ago

Nthg related windows. I have some movies and setup files for some softwares in D and E. Now I shrinked the D partition and created a new partition that is showing as Logical partition. Can I continue the kali installation with this partition?

Santhosh
Santhosh
Reply to  finid
6 years ago

yes i know that, finid. Thanks for the useful information.

kali
kali
7 years ago

Thanx a million times for this useful & detailed tutorial @finid, I managed to understand that my PC has UEFI firmware and successfully installed Kali Linux 2.0 via bootable usb till the point of setting up EasyBCD but after restarting i got this error here https://drive.google.com/file/d/0B1FyPZWYrICGeGdGY3V3clRjdGc/view. Any help will be highly appreciated. Thanks once again.

kali
kali
Reply to  finid
7 years ago

No, I don’t because my laptop only supports USB, it’s more of the detachable tablet-laptop’s. But I do have the windows 10.iso and an extra usb. Will that work? Thanx for the quick reply too.

kali
kali
Reply to  finid
7 years ago

Okay, does that mean I repair windows 10 with the bootable usb & try kali linux 2.0 again?

THmir
THmir
7 years ago

Hi I have windows 10 installed on C drive and have other two partitions D and E with enough space to install Kali, these both drives have my personal data on it, Do I still need to shrink space from either of these volumes or I can install them on any drive (E or D) without shrinking space.

THmir
THmir
Reply to  finid
7 years ago

No It’s BIOS.

THmir
THmir
Reply to  THmir
7 years ago

What if I move all my Data from E into C and install Kali on E drive as its empty.

patri0t
patri0t
7 years ago

Hey there, I had a couple of questions that I’m having trouble finding answers to elsewhere.

First, my computer came set up with 3 primary partitions and an extended partition containing a logical drive. How much does primary vs. logical matter in the dual boot setup, specifically when setting up the /boot partition?

Second, is internet access required during the install in order to configure the apt and a few other things? When I tried installing the fist time the installer couldn’t connect to the internet via wireless which, from what I’ve gathered from other sources, might have to led to problems further along in the install.

Third, when I tried to install the GRUB loader to my /boot partition it said there was a fatal error and I’m not quite sure why. Also, what exactly is the difference/advantage to installing it to the /boot partition vs. to the MBR?

If you need additional information on the partitions, hardware, etc. I can provide them. Any and all help is welcomed and much appreciated.

patri0t
patri0t
Reply to  finid
7 years ago

Okay, thank you.

Well when I tried the install the first time, it failed to connect to the internet or configure the apt and I couldn’t use a network mirror, presumably because I had no internet connection at the time.

So if the apt fails to configure at the time of install, is there anything else in the install that is dependent upon that step that would keep the install from working or can that be fixed later?

My HDD is ~500 GB and the partitions are as follows:

1) 200 MB Healthy (System, Active, Primary)

2) (C:) 363.22 GB Healthy (Boot, Page File, Crash Dump, Primary)

**3 and 4 are part of the extended partition**
3) 58.59 GB Free Space (this is where the kali partitions are going)

4) (D:) 29.00 GB Healthy (Logical Drive)

5) 14.75 GB Healthy (OEM Partition)
**By the way, do you happen to know what the OEM partition is for? I’ve read that it has something to do with a deep sleep mode similar to hibernate where when the computer is in hibernate for long enough it will just write everything in memory to this partition.

Thanks again, really appreciate the feedback.

patri0t
patri0t
Reply to  finid
7 years ago

I’m not sure I follow you as far as the logical drive only being 50% free space. And that list was directly from the windows disk management feature, where the green outline indicating the extended partition contained what I listed as partition 3 and 4 in my last response. I could send you a screenshot if that would help. Otherwise, I’ll retry the kali install and list what the partitioner sees there.

P.S. I’m not sure if it matters, but I’m installing via USB having used the Universal Linux UFD creator from pendrivelinux.com. Just in case there’s known problems with this install method or with the UUI tool itself.

patri0t
patri0t
Reply to  finid
7 years ago

So I got everything working without any real problems. Didn’t do anything different so I’m not sure why it didn’t work the first time. However, there are a few questions I have now that I have Kali installed. I ran all the updates/upgrades and added a few personal touches. But other than that, what are some things considered essential after getting passed the install? Also, I used 10 GB for my / partition and it seems to be almost full already after the updates and upgrades. Is there any way to shift some of the load to the /home partition or any other means of saving some space on the root partition? Thanks for all the help you’ve provided along the way.

Vihanga
Vihanga
7 years ago

Hello,
I have windows 7 and when installing windows, I partitioned another 100gb for the Linux but when I try to install Kali Linux on it, it says that this partition is formatted with the nfs and that all data in it will be destroyed! Then I click on continue and then it says “no root file system is defined. Please correct this from the partitioning menue”.

Miinh
Miinh
7 years ago

Excuse me, sir!

On the next step after choosing “No” install Grub as the MRB, there are somes options to choose where to install Grub. So what do they mean? I mean what are the differences between them?

Thank you!

flo
flo
7 years ago

Thank you very much! After searching on goo trying to understand the difference between installing grub directly to MBR or to a partition, this guide was the first one that made it clear. Nice and simple, with plenty of images to clear a not so knowledgeable person. Bookmarked, for further interesting articles!

Bhavik
7 years ago

Hello I’m having win7 on the C: and there are two other partition D:, E: which contains my personal data and my work data. The que. is that if I install dualboot on C: then it will erase the other partition, as I’m new to Kali and linux also. Guide me about this. thank you

Sem
Sem
7 years ago

Hi,

I followed your instructions and the installation went great, but it doesn’t load up grub. So I tried EasyBCD and I get this: Minimal BASH-like line editing is supported
For the first world, TAB lists possible command completions.Anywhere else TAB lists the possible completions of a device/filename]
grub>

Also tried changing grub timeout, but it didn’t work.

Matt
Matt
Reply to  finid
7 years ago

Hi, I’ve had the same problem. During install, I wasn’t prompted for GRUB, so I presume it hasn’t installed in the right place?
As previously stated by Sem, it says:

[ Minimal BASH-like line editing is supported
For the first world, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename]

Sem
Sem
Reply to  finid
7 years ago

Hi,

I’m not trying to install it anymore, because I tried everything. But now my windows 7 won’t start anymore. I accidently created a efi boot partition and I have a uefi laptop. So I think that causes the problem. Can someone explain me how to fix it. Because I can launch kali linux through usb and see that all my partitions are working and I see and edit all of my files. I already formatted the efi boot partition and changed everything back to normal but when I normally boot up my laptop I get EasyBCD for launching windows 7 and after that I get a message saying bootselection failed, because necesarry device is not accesible.

I hope someone can help, because I need my laptop.

Thanks

anirudh
anirudh
7 years ago

Thus i need to format my drive while making partition for kali linex os?

Muzammil
Muzammil
7 years ago

Hello Please Fix My Problem I Am Doing All Step But When I Start Kali Linux Is Open Grub> Now i Dont know how to start kali linux Please Fix My Problum Please And Add Me On Facebook muzammilmuju@yahoo.com add me please and solve this problum please

MARVELOUS
MARVELOUS
7 years ago

Please how do i install RT3070 drivers on kali linux for my wirrsless adapter?

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

what do you mean by Does it not work out of the box?

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

The name of my wireless adapter is Atheros AR9485. What do you mean by “Does it not work out of the box?” Don’t really understand that.

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

please hoe do i install pdf reader on my kali linux.

MARVELOUS
MARVELOUS
7 years ago

AM having problem dual booting kali linux and window 7 on my pc it do say software RAID not available when it gets to partitioning disks. Pls i need your help

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

pls i don’t understand that HDD configuration, how do i know my HDD configuration.
my HDD is 500gb. but it is the kali linux mini downloaded. hope you get that?

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

am using hp probook 4540s, i think there are four partitioned disks there, one is Local disk(c:) another one is HP_RECOVERY(D:), another one is SYSTEM(G:), another one is HP_RECOVERY(E:). (D:),(G:) and (E:) are primary partition.

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

how do i create a partition in GPT scheme. (D:) contains 19.3GB while (E:) contains 1.98GB

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

have checked it my partirion scheme is MBR not GPT, what can i do? do i have to convert it to GPT or what do i do? Thanks for your positve response

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

Please how do i install RT3070 drivers on kali linux for my wirrsless adapter?

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

please how do i install pdf reader on kali linux. thanks

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

i think the best thing to do is to delete the E: and D: partition

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

mr. finid still the same thing, i even used a partitioning wizard to change it to logical partition still saying software raid not available, it is even saying logical volume manager not available (LVM). Is it because i downloaded the mini version, and is because it is debian?

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

i think this linux mint is not free i have to buy it, and there is no how i an get it because am from Nigeria. And asper the debain linux i was talking about, i think i figure out the problem, the problem is from detecting disk, you know it will first detect disk before going to partitioning, and i think when it get to detecting disk, it do say no disk detected, please select a drive needed by your disk and it will list some options which i don’t understand, then i do select continue with no disk drive and the debian tries to load it from their website, that it when it do say software RAID not available and under it it will write some notes like this,the available kernel doesn’t seem to support software RAID (MD) devices. This should be done by loading the necessary modules.
DID YOU GET THAT?

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

victory at last master finid i downloaded kali linux full version worth of 3GB and i successfully install it on my pc and also dual boot it with window 7.Thank you so much. But there is a problem. I can’t login to the main kali after booting. How do i login?. Thanks in advance

MARVELOUS
MARVELOUS
Reply to  finid
7 years ago

Thnaks Mr finid it works, av created a standard user on my kali linux, thank you so much you’ve been a good master. I would like you to follow me up so as to know the proper usage. Thanks

MARVELOUS
MARVELOUS
Reply to  MARVELOUS
7 years ago

Please how do i install RT3070 driver on kali linux for my wireless adapter ?

Frank
Frank
7 years ago

Thanks, worked perfectly.

siddarth
siddarth
7 years ago

hi, i have win 8.1 in my c drive , and i have 2 other partitions, i have installed kali in a 30gb(sda #7) partition , but at the last step of installation while we have to install grub , it says “no other operating system detected” so its not detecting windows , now i chose option “no” and gave /dev/sda7 . now i restarted and went into windows and with easybcd i added kali option in boot menu , but when i click on that option it doesnt boot into kali it says some files missing

siddarth
siddarth
Reply to  finid
7 years ago

yes the bios mode is uefi , what is the correct way to do it?

siddarth
siddarth
Reply to  finid
7 years ago

acer travelmate p643-m

siddarth
siddarth
Reply to  finid
7 years ago

u mean install kali on the same partition as windows?

siddarth
siddarth
Reply to  finid
7 years ago

where should i upload screenshot? btw i can see 5 partitions ,
300 mb healthy(recovery partition),
c drive has windows
new volume d has other files
and there is a 29.30 gb partition in which i hav installed kali its healthy(EFI partition),
and 100mb healthy(EFI system partition)

siddarth
siddarth
Reply to  finid
7 years ago

what about the 100mb (efi syatem partition) is it related to kali , should i delete that too before re-installiing?

siddarth
siddarth
Reply to  finid
7 years ago

ok give me the link

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
157
0
Hya, what do you think? Please comment.x
()
x