Came here in search of an answer to a problem, but didn't find it? Visit the forum @ LinuxBSDos.com, pick a category and ask a question.

How to dual-boot BackTrack 5 R2 and Windows 7 alongside each other

BackTrack Linux is now known as Kali Linux. You may read all Kali Linux articles and tutorial at http://linuxbsdos.com/category/kali-linux.

BackTrack is a Linux distribution that is based on Ubuntu, designed for hackers and/or security professionals, and loaded with the best Free Software and Open Source penetration testing applications available.

The latest edition is BackTrack 5 R2 (the “R” is for Revolution), and the most recent article about it published on this website, before the publication of this one, is Install BackTrack 5 Revolution 2 on external hard drive.

In this article, the steps required to dual-boot the KDE edition with Windows 7 (there is also a GNOME edition), are presented. To begin, download an installation image from here. Burn it to a DVD, then place the DVD in your computer’s optical drive and reboot. The system will boot into a console and you will see a prompt just like the one in the image below. To boot into a Live KDE desktop, type startx and press the Enter key on your keyboard.
BackTrack 5 R2 Startx

Once in the Live desktop, click on the Install BackTrack icon on the desktop. And when the installer launches, click through the first few steps until you get to the one shown below, It is the fourth of eight steps of the installation process. Notice that you have four disk partitioning options. How you want to set up the dual-boot system will determine which one you select.

Since the objective is to set up a dual-boot system, you obviously do not want to choose the second option (Erase and use entire disk). Select the first option if all the space on the disk is taken up by Windows and you want the installer to shrink Windows and install BackTrack. Select option 3 (Use the largest continuous free space) only if there is unpartitioned space on the target disk and you want the installer to auto-partition the space. Use the fourth option (Specify partitions manually (advanced)) if you want to create a custom set of partitions. This assumes that you have some knowledge of disk partitioning in Linux. If you do not, and want to go this route, you might want to read guide to disks and disk partitions in Linux and tips for dual-booting Windows and Linux.
Just to show how this can be done manually, the last option is selected for this tutorial.
BackTrack 5 R2 Disk Partitioning Options

And it just so happens that the target disk has some unpartitioned space. So the next step is to select it and click the Add button. By default, the BackTrack 5 installer creates just two partitions – one for the root partition, and the other for Swap. For a distribution of this sort, that is likely all you need, unless you want to add an NTFS partition at the end for whatever reason you can think of. For this tutorial, just two partitions will be created.
BackTrack 5 R2 Advanced Partitioning Tool

This is the partition setup window. Since there are two existing partitions (the Windows 7 partitions), the installer will attempt to create the BackTrack partitions as logical partitions, which is just fine. BackTrack, like any Linux distribution, can boot from a logical or primary partition. If you are confused about “primary” and “logical,” take a few minutes to read guide to disks and disk partitions in Linux.

What you need to do at this step, is specify the amount of disk space you want to use for BackTrack 5, then select the file system from the “Use as” dropdown menu (the default is ext4). Finally, select the mount point from the “Mount point” dropdown menu.
BackTrack 5 R2 Create Partition

This is what the same step looks like after the right values have been specified. Click OK to return to the main window.
BackTrack 5 R2 Create Root Partition

For the next partition, which should be for Swap, select “swap area” from the “Use as” menu and specify the amount of disk space you want. OK.
BackTrack 5 R2 Create Swap Partition

Back to the main window, click Forward to move to the next step.
BackTrack 5 R2 Create Partition Cmpleted

On the next step, shown here, the installer gives a summary of what it will do, based on the selections you made. And this is also where you specify where you want the installer to install GRUB, the boot loader. By default, GRUB, the GRand Unified Bootloader, is installed in the Master Boot Record (MBR). In setting up a dual-boot system with Windows, installing it there will overwrite the Windows boot loader, which could cause major headaches for you when you reinstall or upgrade Windows, or install certain anti-virus programs. The recommended option is to install GRUB in the root partition of BackTrack, which in this case, is /dev/sda5. So, to change where GRUB should be installed, click Advanced.
BackTrack 5 R2 Install Summary

That should land you here. You can see that /dev/sda is the “Device for boot loader installation.” That is just another way of saying that GRUB will be installed in the MBR.
BackTrack 5 R2 Install GRUB MBR

For this tutorial, you want to change it to /dev/sda5. OK.
BackTrack 5 R2 Install GRUB Root Partition

Back to the installer summary window, click Install to continue with the rest of the installation.
BackTrack 5 R2 Install

After installation has completed successfully, reboot the computer. It will boot into Windows, which is expected. The next task is to add an entry for BackTrack 5 to Windows 7’s boot menu. To do that, you need another application. The easiest to use that I have found is a free-for-personal-use software from NeoSmart Technologies called EasyBCD. You may download it from here. After download, install it in the same way that you would install any other Windows application.

After installation, launch it. EasyBCD’s main window is shown below. To add an entry for BackTrack 5, click Add New Entry.
Windows Boot Menu EasyBCD

Now, you are here. Click on the Linux/BSD tab. Select GRUB 2 from the “Type” dropdown menu, then modify the “Name” field to reflect the name of the distribution. Click on the Add Entry button, then on the Edit Boot Menu tab to see the result. GRUB 2 is the version of GRUB used by BackTrack 5.
BackTrack 5 R2 Add Windows Boot Menu EasyBCD

This is what the result should be. Exit EasyBCD, then restart the computer.
BackTrack 5 R2 Windows Boot Menu EasyBCD

You should now see a boot menu that looks just like this one. Boot into both operating systems one after the other to verify that everything is alright. Happy hacking.
Windows 7 Dual-Boot BackTrack 5 Boot Menu

Digital Ocean SSD VPS Cloud Server droplets

Digital Ocean is a VPS/Cloud hosting provider. For just $5 per month, you can get yourself a Cloud server with 512 MB of RAM, 20 GB super-fast SSD, free snapshots, plus backups for a minimal fee. All via a simple graphical interface.

And by signing up with this referral link, you can help support this website.

If you are reading this, your ad could also be occupying this space. Contact us to make it happen.

If commenting on this article is closed, please post your comments at forum.linuxbsdos.com.

81 Comments

  1. Ruben says:

    hey! is a good post, I have some questions,I was following the guide, in the part of partition, theres no free space, I have 1tb, particioning on 3 c: 300 gb, d: 300gb and e:300gb, I am using just almost 100gb on C, but when i tried to install backtrack 5 r2 It shows me justo 2 option,
    1.- erase and use the entire disk
    2.- specify particion manually
    when I chosse #2 it says that theres no free space, why theres no the option, install them side by side??
    thnaks for your time!

    • finid says:

      If you have a 1 TB HDD with 3 partitions each allocated 300 GB, there obviously have got to 100 GB worth of disk space somewhere.

      If you can, log into BackTrack and post the output of the command df -h.

      • Ruben says:

        it suppoused for RECOVERY, I thing I have to partition just for BT5 with 100GB, using I don’t know, mm… magic partition or something like! that, thanks man, i’ll try thanks!

  2. roger says:

    ok thanks, i’ll be waiting.

    • finid says:

      Ok, sorry for the long wait.

      I just successfully installed BT 5 GNOME using a 32-bit ISO image in a virtual environment using VirtualBox.

      Since you are using VMWare, just be sure to do the install using a VMWare image.

  3. roger says:

    am trying to run backtrack 5 gnome 32bits on vmware player but when installation reaches 99% this is the massage am getting.

    1-
    The installer encountered an error copying files to the hard disk:

    [Errno 5] Input/output error: ‘/target/pentest/enumeration/lanmap2/ref/cache-web/bittorrent.org’

    This is often due to a faulty hard disk. It may help to check whether the hard disk is old and in need of replacement, or to move the system to a cooler environment.

    or 2-
    The installer encountered an error copying files to the hard disk:

    [Errno 5] Input/output error

    This is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower speed, to clean the CD/DVD drive lens (cleaning kits are often available from electronics suppliers), to check whether the hard disk is old and in need of replacement, or to move the system to a cooler environment.

    please help i’ve already tried 8 times.

    • finid says:

      Are you installing on vmware player using an ISO image or a VMWare image? If from an ISO image, you might want to download a VMWare image and install from it..

  4. roger says:

    The installer encountered an error copying files to the hard disk, thats what am getting when it reaches 99%

  5. D says:

    You never re-addressed the issue with the sda5 boot loader–the ‘OK’ button gets greyed out. Any ideas?

    • finid says:

      Ok, just tried the installation on several systems with different disk sizes.

      The issues seems to be related to the location of BT 5 partitions relative to the start of the disk. I found that if the boot or root partition starts at about 100 GB from the start of the disk, that is, if the disk space allocated to Windows 7 is about that size, the OK button is clickable (not greyed out).

      However, if the BT 5 partitions start at about 150 GB from the start of the disk, that is, if the disk space allocated to Windows 7 is about that size, the OK button is greyed out (not clickable).

      Problems of this sort have been reported with other installer’s when the disk space allocated to Windows is about 500 GB, but not in the range that I’m seeing with the BT 5 installer.

      One possible solution, then, is to resize the Windows partition to about what I reported here (~100 GB) and see what happens. I know it will work because I tried it on two machines. Keep in mind that the problem is not the overall size of the hard drive, but that of the space allocated to Windows, or the location of the BT 5 partitions relative to the start of the disk.

      The other solution, if you can afford to reinstall Windows, is to create the boot partition of BT 5 right after the system partition of Windows 7, that is, before the data partition or C drive of Windows 7, so that the partitioning scheme looks like this:

      sda1 ntfs (System reserved)

      sda2 ext4 (BT 5 boot partition)

      sda3 ntfs (Windows 7’s data partition)

      sda5 ext4 (BT 5 root partition)

      sda6 Swap

      Try either one and let us know what happened.

      • Midas says:

        I had similar experiences. I had another NTFS data partition after the Windows partition, and wanted to install Backtrack at the end of the hard disk, but the bootloader didn’t want to install there. So what I had to do: delete the second partition, install Backtrack there, AND to make that partition a primary one. So in other words, the bootloader didn’t want to install on a logical partition! It had to be a primary one. No idea why, but it worked for me in the end. So instead of what I wanted: 1. NTFS-Windows 2.NTFS-data 3.(log)ext4-Backtrack 4.Swap. I know have: 1. NTFS-Windows 2.(prim)ext4-Backtrack 3.NTFS-data 4.Swap

  6. XaM says:

    ..hmmm.

    This is pretty cool.. thanks for sharing.

  7. coSMIN says:

    guys I have a big problem, I have a biiiig biiig problem!!!!! After installing, I am running backtrack 5 r2 still LIVE?!?!?! I mean, after installing, I eject the installation disk, and when It boots, It still appears install backtrack on desktop. WHY???? i was logging in with the user: root password: toor, and then… startx.

    • finid says:

      That can’t be right!

      If you went past the boot menu, logged in, then startx, I don’t see how you could still be getting the installer.

      The boot menu you saw when the system booted, is it that of GRUB, or the installer’s boot menu?

  8. Dual Boot says:

    Maybe two different OS on each partition?

  9. Paul says:

    I install backtrack as described in here, works totally fine..but I need to uninstall, can I do that without causing any troubles in windows??

  10. Thank you for this detailed tutorial. I have followed the steps and everything is working fine.
    Only one thing I think it should be added to it. It is the fact that you should have the free space in the HD before beggining. And this can easily be done with the freeware EaseUS Partition Master Home.

  11. Jules says:

    When I go to change the boot loader location from sda to sda5 the OK button disables. Why?

  12. Joyce Bradsher says:

    I want to know if I choose the 1st option installing them together side by side if I have to still go to advanced options and change the sda to sda5. I also want to know it i choose the first option installing them side by side if I half to still get the easyBCD software for the dualboot. I should not need the software if the first option will install them side by side automatically. please give me some answers please.

    • finid says:

      The first option leads to an automated partition and installation, which means that you cannot change sda to sda5 or to any other thing. And yes, if you choose that option, GRUB will be installed in sda, so you will need EasyBCD if you want Windows 7’s boot manager to be responsible for presenting both OSs at startup.

      Side-by-side in this case simply means that both OSs will be installed on the same drive, but GRUB will replace Windows boot tool in the MBR.

  13. golum says:

    Hey,
    Thanks for your aticle, very helpful !
    But i have a questio:

    After doing the installation (as you discribed!) and reboot, windows 7 didn’t start automatically, the grub (1,8) started. So i chosed windows 7 and install easyBCD. There i added the backtrack and reset bootlader and MBR settings… After reboot, i get the windows bootloader (like your picture!) – windows start without problems, but if i choose backtrack(“ubuntu”) i come to the GRUB (1,8) again, where i can choose windows 7 or backtrack. How can i fix this, that it starts automatically backtrack and not the grub after windows bootloader ? Can i delete the grub from backtrack without damaging anything ?

    I would be very happy, if you help me !!!

    Best regards
    golum

    • finid says:

      You do not have to delete anything. All you need to do is change the timeout value for GRUB. By default, it is 10 seconds (?)

      Setting it to 0 (zero) should be what you need to do. To change it, open the file /etc/default/grub and look for the line: GRUB_TIMEOUT=10.

      Change it to GRUB_TIMEOUT=0, then run update-grub after you chose the file. Reboot and see what happens.

  14. Max says:

    Both have non-os data.

    • finid says:

      Backup the data from the target HDD (40 GB), then install BT5. If you use the default, BT5’s installer will create two partitions: sda1 for /, and sda5 for Swap, leaving nothing for your data.

      So, the best option is to create the partitions manually. Here’s a suggestion:

      sda1 – /
      sda2 – Swap
      free space (to be used for your data partition)

      Note: If the free space is to be used for storing your Windows data, be sure to create it as a logical partition from inside Windows.

  15. Max says:

    This is a nice article. Could you help me with my case? I have two different HDDs – 300GB SATA2 has Win 7 & a 40GB ATA which has two partitions. I would like to install BT5 on one of the 40 GB partitions.

Leave a Comment