I tried to run backtrack 4 beta on virtualbox (to install it, not just run it as live cd), it was not easy but I finally did it.
First, using .vmdk version of backtrack 4 did not work, on each boot it failed on a kernel-panic VFS error. I installed it from livecd as follow:
- I assume you’re familiar with virtualbox (ie. have it installed and already ran virtual machines (VM))
- download bt4 iso version (http://www.remote-exploit.org/backtrack_download.html)
- while it’s downloading, create the virtual-machine you’re going to use to install backtrack (personnally I created it with an expanding disk (grant at least 5Go, 8Go highly recommended) + don’t forget to grant lan + usb
- once iso has been downloaded, mount it on your VM as cdrom and start your VM
- boot on BT4 live cd (at this point you don’t have many options doh!)
- once at login screen, login (id = root / pwd = toor)
- next, follow instructions found here: http://www.offensive-security.com/documentation/bt4install.pdf
basically the following steps are advised, with slight modifications – especially a potential typo that made all the process fail – I recreated the steps right here:- create your partitions (all as primary disk, hda1 = /boot (50 M0 is enough); hda2 = swap (512 Mo is enough); remaining 7.5G0 as main partition “/” and flag first partition as bootable) – this can be done throug “cfdisk” command – don’t forget to adapt “hda” to your own situation (you will see it appear when creating partitions with cfdisk) and write changes to the disk upon leaving cfdisk
- set the type of your partitions:
- “mke2fs /dev/hda1″ (set boot partition under ext2 format, readable by kernel);
- “mkswap /dev/hda2″ + “swapon /dev/hda2″ (to activate swap space)
- “mkfs.ext3 /dev/hda3″ (here I preferred to set ext3 format instead of reiserfs as stated in pdf doc)
note: at this point you may have some error messages where swap partition cannot be formated because already in use (=> run “swapoff /dev/hda2″ prior to running other commands) & idem with /dev/hda1 | /dev/hda3 (ensure you unmounted them prior to running the commands, via “umount /dev/hda1″ & “umount /dev/hda3″) — this may happen if your first install failed after having partitionned the disk and you rebooted without having recreated a fresh virtual storage HD
- now you simply need to create folders in order to mount your parititions in the following order:
- mkdir /mnt/bt4
- mount /dev/hda3 /mnt/bt4
- mkdir /mnt/bt4/boot
- mount /dev/hda1 /mnt/bt4/boot
- now create all system folders: mkdir /mnt/bt4/{tmp,proc,dev,sys}
- copy all data from live cd (WARNING: this will take a long time and result in something like 5Go for your virtual HD):
cp –preserve -R /{bin,dev,home,pentest,root,usr,boot,etc,lib,opt,sbin,var} /mnt/bt4 - now we need to associate devices to our dumped disk content:
mount -t proc /proc /mnt/bt4/proc
mount -t bind /dev /mnt/bt4/dev - we log into our dumped system: chroot /mnt/bt4 /bin/bash
- update your lilo.conf to ensure root & boot values point to correct disk/partitions (basically in my case, I replace ‘boot=/dev/sda’ & ‘root=/dev/sda1′ with ‘boot=/dev/hda’ & ‘root=/dev/hda3‘, save your changes
- update /etc/fstab to make sure swap partition is mounted (insert following line : “/dev/hda2 none swap sw 0 0″) and root partition too (“/dev/hda3 / ext3 default 0 0″)
- run “lilo -v” (to update lilo on verbose mode)
- “shutdown -h now”, once your VM is turned off, unmount BT4 live cd
- pray and start your VM. If you’re lucky, BT4 will load

That’s it!
As previously admited, I did not get lucky the first time. Basically I tried it something like 10 times, each time ending up in a “Kernal panic – not syncing: VFS:Unable to mount root fs on unknown-block(9,9)” blah blah.
In the end, I recreated my entire virtual HD from scratch, used ext3 as partition type (and not reiserfs) and above all ran ”mount -t proc /proc /mnt/bt4/proc” vs. ”mount -t proc proc /mnt/bt4/proc” as stated in the doc (take not on slash before second “proc”). I believe this was the root of the problem.
Good luck.
(now that it boots on VirtualBox, I’ve successfully installed guest additions — mkdir /mnt/cdrom; mount /dev/hdc /mnt/cdrom; /mnt/cdrom/VBoxLinuxAdditions-x86.run — but wifi usb keys do not seem to be recognized at all => if you have any hint on this, feel free to share)
sources
- http://www.remote-exploit.org/backtrack_download.html
- http://forums.remote-exploit.org/bt4beta-howtos/20126-bt4-beta-hard-drive-install.html great info can be found in this post, read all the pages in case of a problem
- http://www.itsolutionskb.com/2009/04/how-to-make-a-backtrack-4-hard-drive-installation-step-by-step-guide/
Great guide, got me up and running in no time! I managed to get my Alfa USB Wireless working out of the box. I just plugged it in, once VirtualBox had recogniesed it, i switched over control from my mac to bt4 and it works! The Alpha is based on the rtl8187 chipset. Hope that helps!
I”m glad you found it useful.
My usb wifi is based on rt2501, is recognized when running os other than bt4 inside vbox but does not even show up on ‘lsusb’ when in bt4. I don’t really know who is guilty then… If I find anything, I will post it. Thx for your help.
well thx to your post, I gave it a last try and it works! my wifi dongle is up and running. In fact it works only if I run “/etc/init.d/networking start” prior to inserting my dongle. I hope it will helps some folks.
Ah great! I’ve just tried mine without running the “/etc/init.d/networking start” prior to inserting, and it still seems to work! It takes a few seconds for it to recognise it, but it shows up as a device after running “iwconfig”. Once it’s plugged in it comes up as being called ‘wlan0′ rather than the usual ‘lsusb’.
Everything does seem to work with it, although i seem to be having a few issues with wireless injection using aireplay-ng. Have you tried injection with your rt2501 device?
cheers
Andy
Well injection is working! I was trying to do it on the wrong interface, doh!
Thanks for all your help, it’s made setting Backtrack up a breeze rather than a pain!
I’m glad you got it working. Cheers!
I’ve tried doing this as well…But I can’t find the iso image after I download it. I’ve tried to download a dos program to boot the disc as well but apparently I need the same thing to boot the dos program. My com doesn’t have a disc drive so I assume this is a part of the problem…Any idea?
What do you mean when you say “But I can’t find the iso image after I download it”?
Let’s say you’ve downloaded the iso on your desktop. Once your download is finished, you should have .iso file on your desktop, right?
Now:
That should do it, your vm should boot on your .iso file. Then when in bakctrack, follow remaining instructions to install it on your expanding vdi drive.
There is no need for DOS drive or god knows what, you don’t even need a physical cd-player at all, virtualbox creates a fake one with the iso file.
I hope that helps,
Regards, Remy
hi there
hi buddy i get stuck here, why i cant any connetion
how you configure or setting your connection, can you show me step by step because im very new about ubuntu , its make me learn from zero again after knowing slax
where are you stuck exactly?
did you manage to successfully install bt4?
are you having trouble to get usb device working?
vbox wo’nt recognize my wireless usb. I get error when VBOX_E_HOST_ERROR (0x80BB0008)
Hi there!
I´m a Linux noob and have the following problem with the installation: Everything´s working fine till I have to edit the /etc/lilo.conf. That file doesn´t exist at all! Typing “lilo” tells me that its not installed.
How could this happen? I followed the tutorial exactly, all I had to change was “sda1″ to “hda1″ etc.
it might be because your version of backtrack is using grub instead of lilo.
In that case, see http://tolearnfree.blogspot.com/2009/07/how-to-install-backtrack4-using-grub-of.html (point 4) for appropriate changes to grub/menu.lst (note: with grub, I believe you don’t need to run an equivalent to “lilo -v”, changes will be automatically applied upon reboot)
Thanks for the tips, worked like a charm loading bt4 beta!!
Just a heads up for anyone trying to install bt4 pre-release…they’ve made things way easier. You just follow the instruction on the remote-exploit wiki:
https://wiki.remote-exploit.org/backtrack/wiki/Parallels
Basically a couple of commands and a few clicks and you’re done.
i’ve followed all your instructions but now its telling my the main partition is readonly.. have i missed something in the fstab config?
mount -t bind /dev /mnt/bt4/dev
must be
mount -o bind /dev /mnt/bt4/dev
thanks for this tutorial!
thanks for spoting this!
Hi remy,
I had a couple of goes at this. It all seems to go smoothly but I get a message
FATAL: No bootable medium found!
I don’t have lilo so I made the following in /boot/grub/menu.1st
title Backtrack4
rootnoverify (hd0,2)
kernel /boot/vmlinuz vga=791 root=/dev/hda3 ro autoexec=xconf;kdm
boot
I am going to give it another go — but I cant see where I differ from your instructions.
Bye
BT4 Login and password?
usually, login is “root” and password is “toor”
i try, pdf from remote exploit and from you in virtual box but no one can be,,what wrong with this,,,what should i do
mount -o bind /dev /mnt/bt4/dev
not
mount -t bind /dev /mnt/bt4/dev
Got it up and running, but cannot see anything when I input airmon-ng, no interface shows up!? My wireless card (atheros ar5b91) is supported, dont know why it isnt showing up, any idea why?
I would do the following steps: up” so that it will show up when you run airmon-ng
1. ensure usb device got captured by virtualbox (right click on bottom right usb icon and ensure usb device shows up and is checked)
2. run “sudo ifconfig” and then sudo “iwconfig”
If device shows up, simply run “sudo ifconfig
If device does not show up, run “sudo lsusb” and check if device appears here. If it does not appear, there’s big trouble ahead (usb port is working?)
Good luck