NOTE: This tutorial assumes you are running VirtualBox with a Windows system. After installing BT4, you can use the virtual machine created with this guide to boot you BT4 HDD Install while using windows. Useful if you want to check something quickly, or just upgrade your distro, without the hassle of rebooting your computer.
NOTE 2: While testing this method, I noticed VirtualBox is way too slow booting and installing BT4 compared to VMware Workstation. The reason for this was that VirtualBox doesn't allow me to use my 2 processor cores, it would only allow to use one. Either way, if you have dual cores, quad cores and such, and if you have VMware Workstation available, I advise you to follow my other tutorial: http://www.backtrack-linux.org/forum...rkstation.html
Installing BT4 to HDD using VirtualBox
Step 1: Resizing Windows partition
In order to follow this tutorial, I advise to resize the windows partition first, freeing some space for your BackTrack installation.
I've used a freeware named EASEUS Partition Master - Home Edition, you can use another program if you like or, in case you have Windows Vista/7, the disk manager included with this versions. Don't forget you'll have to free enough space for BackTrack and for the swap partition.
Step 2: Creating the virtual machine
Open a command prompt and navigate to the VirtualBox installation folder (in my case it's C:\Program Files\Oracle\VirtualBox).
Type VBoxManage internalcommands createrawvmdk -filename c:\mydrive.vmdk -rawdisk \\.\PhysicalDrive0
"c:\mydrive.vmdk" is the location where the "mydrive.vmdk", the configuration VMDK file of your physical drive, will be created. NOTE: Choose an existing directory. Failing to do so will result in an error message.
"\\.\PhysicalDrive0" is the physical drive of the host computer. 0, 1, 2 numbers can be seen from Disk management in Windows, under Computer Management. Your main drive should be 0.
This was my output:
Now that we have the configuration file for our hard drive, let's create the virtual machine and assign the VMDK file as the "virtual" drive.
C:\Program Files\Oracle\VirtualBox>VBoxManage internalcommands createrawvmdk -filename c:\mydrive.vmdk -rawdisk \\.\PhysicalDrive0
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8
(C) 2005-2010 Oracle Corporation
All rights reserved.
RAW host disk access VMDK file c:\mydrive.vmdk created successfully.
Open VirtualBox and click on "New". A virtual machine wizard will appear. Click "Next" and type the name of your virtual machine (I like to call mine "HD Boot", you're free to choose a different name).
Click "Next" and select the amount of RAM you want to use with your virtual machine. Again, "Next" and select the "Use existing hard disk" option. Click on the little icon with a folder and a green arrow pointing up, which will open up the "Virtual Media Manager". On that window, click "Add", navigate to the direction you indicated on the command prompt and open the configuration file you created previously (something.vmdk). Hit "Select", then "Next" and finally, "Finish". Your virtual machine is now created.
Step 3: Installing <<Back|Track 4
Once the virtual machine is created and in order to install BT4 into the HDD, you need to select the BackTrack4 ISO file as the virtual CD-ROM Drive. In the main window of VirtualBox and with your new virtual machine selected, click on the link "Storage". The settings window will appear.
Select the "Empty" CD-ROM drive and bellow "Attributes", at the right of the option "CD/DVD Device", click on the folder with a green arrow icon. "Virtual Media Manager" will appear again, just click "Add", navigate to where you have BT4 ISO file and open it. Hit "Select" and then "OK".
Change the boot order under "System" so that the CD-ROM boots first. Your virtual machine is now fully set up.
Once BackTrack is fully booted, start the graphical interface by typing "startx" and once it is fully loaded, open the file "install.sh". Select your location and keyboard layout.
On the "Prepare your disk" window, select "Manual" and hit "Forward". Once the next window appears, select the "free space" and click on "New partition". Enter the desired amount of swap you want and change the filesystem to "swap". Once the "swap" partition is created, select the "free space" again and click on "New partition". Here you only need to change the mount point to "/". Ok, you can now proceed with the installation. Once it's finish, you can boot your newly installed BT4 using the same Virtual machine you used to install it. Just be sure to change the boot order and put the hard drive first.