Took me a little digging to find all the steps necessary to accomplish the installation of BackTrack 2 to a VMWare Workstation virtual machine (and then install VMWare Tools so, I thought as my first contribution to this community I would put everything in one place. Mainly so if I have to do it again I can just reference my own post and not have to dig around the net again. I will do my best to give credit where credit is due for the original posts and information. If anyone has any useful caveats to add... feel free. I am by no means a unix or BackTrack guru. Maybe this should go into the Tutorials section, but being a newbie, I don't think I'm allowed to post there yet.
First off, install VMWare Workstation (I am using version 6) this is pretty self-explanatory. Then create a "Custom" Virtual Machine with the following parameters.
Guest Operating System: Linux
Version: Other Linux 2.6 Kernal
Memory: [Whatever you want, I used 256MB]
Networking: [Whatever you want, I used Bridged]
I/O Adapter Type: SCSI drive emulation (Bus Logic)
Virtual Disk Type: SCSI
Hard File Size: [Whatever you want, I used a 7GB Hard File]
BackTrack 2 Installation
Mount your BackTrack2 .iso image and start the virtual machine.
Hit the Esc key to bring up the boot menu and boot from the CD-ROM.
The following steps are taken directly from the BackTrack 2 hard drive installation .pdf by jabra and I am just going to give the commands... if you want to see what the expected output is... check the pdf.
Now, start the xwindow interface.Code:BT ~ # fdisk /dev/sda Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Command (m for help):n [enter] Command action e extended p primary partition (1-4) p [enter] Partition number (1-4): 1[enter] First cylinder (1-456, default 1):[enter] Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-456, default 456): +50M[enter] Command (m for help):n [enter] Command action e extended p primary partition (1-4) p [enter] Partition number (1-4): 2 [enter] First cylinder (8-456, default 8):[enter] Using default value 8 Last cylinder or +size or +sizeM or +sizeK (8-456, default 456): +512M [enter] Command (m for help): n [enter] Command action e extended p primary partition (1-4) p [enter] Partition number (1-4): 3 [enter] First cylinder (71-456, default 71):[enter] Using default value 71 Last cylinder or +size or +sizeM or +sizeK (71-456, default 456): [enter] Using default value 456 Command (m for help): a [enter] Partition number (1-4): 1 [enter] Command (m for help): t [enter] Partition number (1-4): 2 [enter] Hex code (type L to list codes): 82 [enter] Changed system type of partition 2 to 82 (Linux swap / Solaris) Command (m for help): p [enter] Disk /dev/sda: 3758 MB, 3758096384 bytes 255 heads, 63 sectors/track, 456 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 7 56196 83 Linux /dev/sda2 8 70 506047+ 82 Linux swap /dev/sda3 71 456 3100545 83 Linux Command (m for help): w [enter] The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. BT ~ # mkfs.ext3 /dev/sda1 mke2fs 1.38 (30-Jun-2005) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 14056 inodes, 56196 blocks 2809 blocks (5.00%) reserved for the super user First data block=1 7 block groups 8192 blocks per group, 8192 fragments per group 2008 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 25 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. BT ~ # mkfs.ext3 /dev/sda3 mke2fs 1.38 (30-Jun-2005) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 387840 inodes, 775136 blocks 38756 blocks (5.00%) reserved for the super user First data block=0 24 block groups 32768 blocks per group, 32768 fragments per group 16160 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 27 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. BT ~ # cd /tmp BT tmp # mkdir boot BT tmp # mkdir bt2 BT tmp # mount /dev/sda1 boot BT tmp # mount /dev/sda3 bt2
BT ~ # xconfig
BT ~ # startx
Once the interface has loaded, go to K>System>BackTrack Installer or K>BackTrack>Miscellaneous>BackTrack Installer.
The fields should be filled with the following:
Source(BackTrack CD): /boot
Install BackTrack to: /tmp/bt2
Write MBR to: /dev/sda
Select "Real" for the installation method. Hit install and wait until the installation is finished. Per jabra's instructions there will be a lengthy delay around 80% because the usr.mo file is very large.
Now, before you reboot, go into a command shell and issue the following commands: (credit to bestandonly)
BT ~ # cp /boot/vmlinuz /tmp/bt2/boot/
BT ~ # cp /boot/splash.bmp /tmp/bt2/boot/
BT ~ # chroot /tmp/bt2/
BT ~ # lilo
VMWare Tools Installation
Now, exit out of the command prompt, shut down BackTrack 2 and restart. Make sure you select the "Install VMWare Tools" from the VM dropdown once you restart. Log into your new BackTrack 2 VM and issue the following commands before you start the VMWare Tools install (Thanks Nathalie, mobychien, and cyberchor).
BT ~ # mkdir /etc/pam.d
BT ~ # ln -s /etc/rc.d/ /etc/rc0.d
BT ~ # ln -s /etc/rc.d/ /etc/rc1.d
BT ~ # ln -s /etc/rc.d/ /etc/rc2.d
BT ~ # ln -s /etc/rc.d/ /etc/rc3.d
BT ~ # ln -s /etc/rc.d/ /etc/rc4.d
BT ~ # ln -s /etc/rc.d/ /etc/rc5.d
BT ~ # ln -s /etc/rc.d/ /etc/rc6.d
If you're not using VMWare 6, you may also have to issue the following commands:
BT ~ # mkdir /etc/inid.d/rc3.d
BT ~ # cd /etc/inid.d/rc3.d
BT ~ # ln -s /etc/init.d/vmware-tools S19vmware-tools
BT ~ # ln -s /etc/init.d/vmware-tools K08vmware-tools
Now, mount the virtual CD-ROM and install the tools.
BT ~ # mount /dev/hdc /mnt/hdc_cdrom
BT ~ # cd /tmp
BT ~ # tar -zxvf /mnt/hdc_cdrom/VMware-X.X.X-XXX.tar.gz (Insert the proper numbers into the x's you'll have to check the directory of the virtual tools image to find these out)
BT ~ # cd vmware-tools-distrib
BT ~ # ./vmware-install.pl
During the install process you can use the default values for most of the questions you are asked. The only one that requires an entry is when you are asked for the location of the rc0.d thru rc6.d files, the directory you will want to use is /etc
The VMWare tools will complain about not being compiled for this particular kernel and will go through a recompile in order for it to work on BackTrack. Again, all the defaults should be okay. That should be it. When the script finishes it should start VMWare Tools automatically (at least it does on 6) and will ask you for a screen resolution. I've done this on two different PCs (a laptop and a desktop) and it's worked on both. (Drag and drop worked also).


