Sunday, April 08, 2007

Installing back|track 2 (final) on VMWare Workstation 5.5 on Windows XP

Having had an issue when trying to boot back|track 2 after installing it to a virtual disk in a VMWare virtual machine and having resolved the issue, I thought it might be helpful to publish a step-by-step guide.

So here it is:

  1. Download the back|track 2 iso from remote-exploit.org which you'll need later.
  2. Load VMWare Workstation and start the New Virtual Machine Wizard (Ctrl+N or File > New > Virtual Machine).
  3. Choose to create a custom configuration and choose the New Version 5 format if you're asked.
  4. On the next page choose Linux operating system with version "Other Linux 2.6.x kernel".
  5. Give new virtual machine a name and choose a place for it's virtual disk and stuff.
  6. For the next four pages accept the defaults for number of processors, memory, networking and I/O adapter.
  7. Choose to create a new virtual disk.
  8. Choose SCSI.
  9. Choose a disk size (at least 3GB - I made mine 4GB).
  10. Make your own decision as to whether to "Allocate all disk space now" - I prefer to have the virtual disk pre-allocated rather than allocated on the fly.
  11. Make your own decision as to whether to split disk into 2GB files - I guess this boils down to your filesystem. On NTFS there should be no issues with huge files, but I always elect to split them into 2GB files anyway.
  12. Finish the wizard. If you've opted to pre-allocate disk space, wait until it's done.
  13. Change the settings for the virtual machine's CD-ROM and choose to use the back|track 2 iso image you previously downloaded. Ensure the "Connect at power on" is checked. When started, the VM will check the CD drive for a boot volume and with the iso image mounted it will boot off the back|track 2 Live CD iso image.
  14. Start the VM and wait for the green back|track 2 login screen.
  15. Login as root
  16. Password is toor
  17. Type fdisk /dev/sda and hit Enter
  18. Type n and hit Enter
  19. Type p and hit Enter
  20. Type 1 and hit Enter
  21. Hit Enter (Using default value)
  22. Type +50M and hit Enter
  23. Type n and hit Enter
  24. Type p and hit Enter
  25. Type 2 and hit Enter
  26. Hit Enter (Using default value)
  27. Type +512M and hit Enter
  28. Type n and hit Enter
  29. Type p and hit Enter
  30. Type 3 and hit Enter
  31. Hit Enter (Using default value)
  32. Hit Enter (Using default value)
  33. Type a and hit Enter
  34. Type 1 and hit Enter
  35. Type t and hit Enter
  36. Type 2 and hit Enter
  37. Type 82 and hit Enter
  38. Type w and hit Enter
  39. Type mkfs.ext3 /dev/sda1 and hit Enter and wait.
  40. Type mkfs.ext3 /dev/sda3 and hit Enter and wait.
  41. Type cd /tmp and hit Enter
  42. Type mkdir boot and hit Enter
  43. Type mkdir bt2 and hit Enter
  44. Type mount /dev/sda1 boot and hit Enter
  45. Type mount /dev/sda3 bt2 and hit Enter
  46. Type startx and hit Enter and the X window system will load with a desktop.
  47. When the desktop has loaded, load the backtrack installer via K > System > Backtrack Installer.
  48. Leave the "Source(BackTrackCD)" blank (This resolves the issue I had)
  49. Type /tmp/bt2 in "Install BackTrack to"
  50. /dev/sda should automatically appear in "Write MBR to"
  51. Choose either the Live or Real installations.
  52. Click Install and wait for the installation to complete.
  53. Close Backtrack Installer. Log off and at the command prompt type poweroff and hit enter.
  54. Change the VM settings for CD-ROM so that the iso image is no longer being used.
  55. Start the Virtual Machine.
  56. Click into the window and if you're not going to add any boot paramaters just hit Enter.
  57. Voila
The remote-exploit.org guide to installing to a Hard Drive on which this guide is based misled me into typing /boot into "Source(BackTrackCD)" in the Backtrack installer and I have seen quite a lot of forum posts that attest to the fact that this worked fine in back|track 2 beta, but in the final version, back|track hangs at boot time.
Leaving this field blank resolves this issue in this instance and I hope it will for you too.