Installing VirtualBox on Backtrack 5


Hackers For Charity

Backtrack 5 doesnt come with the kernel headers installed.So you will need to download them and then proceed with installing virtualbox. The commands are listed below

root@bt # prepare-kernel-sources
root@bt # cd /usr/src/linux
root@bt # cp -rf include/generated/* include/linux/

After this is done, edit /etc/apt/sources.list as shown below and download virtualbox

root@bt # echo deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free >> /etc/apt/sources.list

root@bt # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add –

root@bt # apt-get update

root@bt # apt-cache search virtualbox

root@bt # apt-get install virtualbox-4.0

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

66 Responses to Installing VirtualBox on Backtrack 5

  1. mpieee says:

    It’s works fine xD. I were looking something like this everywhere. Thanks!!!!

  2. watathi says:

    Thanks for your feedback.Glad I could be of help

  3. j-psy says:

    It does’nt work for me, I tried a lot of solution found on google, but I still get

    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Some packages could not be installed. This may mean that you have
    requested an impossible situation or if you are using the unstable
    distribution that some required packages have not yet been created
    or been moved out of Incoming.
    The following information may help to resolve the situation:

    The following packages have unmet dependencies:
    virtualbox-4.0: Depends: libpython2.7 (>= 2.7) but it is not installable
    Depends: libssl0.9.8 (>= 0.9.8m-1) but 0.9.8k-7ubuntu8.6 is to be installed
    Depends: libstdc++6 (>= 4.5) but 4.4.3-4ubuntu5 is to be installed
    E: Broken packages

    do you got any tips please?

  4. watathi says:

    This is very strange. Are you sure you are on backtrack 5 ? The reason I am asking is because libssl0.98 and libstdc++6 is already pre-installed in backtrack5 as can be seen below.
    root@bt:~# dpkg -l |grep libssl
    libssl0.9.8 0.9.8k-7ubuntu8.6 SSL shared libraries
    root@bt:~# dpkg -l |grep libstdc++6
    ii libstdc++6 4.4.3-4ubuntu5 The GNU Standard C++ Library v3
    I would suggest you try to install a different version like virtualbox-3.1

  5. Amine says:

    It’s works fine for me too ^^
    Thanks =)

  6. j-psy says:

    Yeah it’s works fine when I install virtualbox-3.2. Thanks for your help.

  7. dark L says:

    @watathi
    Try
    root@bt # apt-get install -f
    then try
    root@bt # apt-get install virtualbox-4.0

  8. lo0p h0l3 says:

    it’s works !!! i installed virtualbox compiling myself but i found many issues purge it and installed in this ways an TADA! works

  9. cipher says:

    Works as it should. Thank you for a valuable how-to.

  10. risq says:

    Problem here: (backtrack5 x32)

    The following packages have unmet dependencies:
    virtualbox-4.0: Depends: libssl0.9.8 (>= 0.9.8m-1) but 0.9.8k-7ubuntu8.6 is to be installed
    E: Broken packages

  11. watathi says:

    @risq ,Try
    root@bt # apt-get install -f
    then try
    root@bt # apt-get install virtualbox-3.2

  12. hamid says:

    thank you dude it works for me fine really thanks

  13. moed_dev says:

    works for me as I have of BT5-amd-64-KDE in my lappie. Thanks Jhonny. I cited this yours in our national forum of the BackTrack community http://forum.id-backtrack.com. We welcome your visit πŸ™‚

  14. moed_dev says:

    I mean you Charles. Sorry for this mis.

  15. watathi says:

    Its ok moed_dev, thanks for your feedback and interest in hfc.

  16. sid says:

    nice… man thanks a lot

  17. ch!m3ra says:

    Thanks a lot Charles and keep it up Trust me this post saved me a lot of pain it’s simple,straight to the point and the commands worked flawlessly for me excellent job

  18. watathi says:

    Thanks @sid for feedback and @ch!m3ra for the positive and kind words

  19. RandyProton says:

    Will try it, thx πŸ˜‰

  20. γ‚·γƒ­ says:

    i got some problem… like diz —–>>>

    root@bt:~# prepare-kernel-sources
    [*] apt-getting linux-source…
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    linux-source is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    [*] extracting sources, please wait
    tar: linux-source-2.6.38.tar.bz2: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Exiting with failure status due to previous errors
    [*] doing stuff…
    /usr/bin/prepare-kernel-sources: line 11: cd: linux: No such file or directory
    cp: missing destination file operand after `/boot/’
    Try `cp –help’ for more information.
    make: *** No rule to make target `scripts’. Stop.
    make: *** No rule to make target `prepare’. Stop.
    ln: creating symbolic link `/lib/modules/2.6.38/build’: File exists
    [*] tada!

  21. γ‚·γƒ­ says:

    when using a solution like u give——->

    root@bt:~# apt-get install -f
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    root@bt:~# apt-get install virtualbox-3.2
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    Package virtualbox-3.2 is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package virtualbox-3.2 has no installation candidate
    root@bt:~#

  22. watathi says:

    @shirokanazi, you seem to already have the linux kernel headers installed, thats why you are getting the line “linux-source is already the newest version.”. I suggest you start with the second command “cd /usr/src/linux’

  23. γ‚·γƒ­ says:

    when i installed a package from virtualbox website,i can access virtualbox,but then,after finished creating all setting for win xp as example,there is still error..i can;t install winxp .. huhu..sory for keep asking u..but i need some help here.. here d error i got.. ——>
    root@bt:~# /etc/init.d/vboxdrv setup
    * Stopping VirtualBox kernel modules [ OK ]
    * Uninstalling old VirtualBox DKMS kernel modules [ OK ]
    * Trying to register the VirtualBox kernel modules using DKMS
    Error! Your kernel headers for kernel 2.6.38 cannot be found at
    /lib/modules/2.6.38/build or /lib/modules/2.6.38/source.

    * Failed, trying without DKMS
    * Recompiling VirtualBox kernel modules
    * Look at /var/log/vbox-install.log to find out what went wrong

  24. γ‚·γƒ­ says:

    thnx alot for ur help..i’ve emailed u my status… this is a great tutorial…thnk you…

  25. Audi says:

    Awesome help,
    It worked like a charm, but somehow i had difficulty finding this post in first place.

  26. TV2 says:

    THis is Awesome. thanks.

    i have been loking very long for this

  27. hohooo says:

    thanks for sharing keep it up

  28. BOB says:

    Thanks a lot for this ! worked at the first try

  29. Albert Pike says:

    Thank you very much! Works 100% πŸ™‚

  30. cda says:

    Works for me, it’s installing 4.1 right now. Thanks!

  31. K1ll3r B0y says:

    thnks a LOOT!

    Very good man!

  32. Worked perfectly for my VirtualBox 4.1
    Thanks!

  33. Captain Frag says:

    Excellent.Thanks so much,i was having issues installing through the package manager and this worked perfectly.Saved me at least 3 headaches and one fit of rage πŸ˜€

  34. Daniel says:

    Great post!!!
    You saved my OS πŸ˜€

  35. elad says:

    watathi – great job and well done.
    your article is great , and worked for me.
    by the way, i don’t understand why virtual-box is part of BT tools.

  36. gabybgs says:

    Thanks for the post it really helped me πŸ™‚ !

  37. prakash gamit says:

    thanks a lot
    works fine for me…

  38. KroolTea says:

    Awesome! Thank you for the info. I love when things work the first time πŸ˜€

  39. li0n hear7 says:

    yippieee!!
    100% working πŸ˜€

  40. BraneRift says:

    Works great ! Thanks for taking the time to post this !

  41. clr20palavradadopoder says:

    thanks working 100%
    obrigado por compartilhar

  42. xheinz says:

    Thanks! it’s work!

  43. Nkosis says:

    Outstanding!!!!!!!!!!!!!!!

  44. M.R.Anand says:

    hello sir u are great
    simply great
    i like your simplicity in explaining the installation.
    i referred many sites for this but nothing helped at last you only helped me
    once again thank u sir(Charles Watathi)

    by anand

  45. Mahesh Mane says:

    Thank You So much Sir

  46. Lubo says:

    Thanks, this info about VirtualBox was very valuable for me! πŸ™‚

  47. Jtech says:

    thanks, it worked great. Since this is an older post the version has changed some so instead of 4.0 I changed it to apt-get install virtualbox-4.2 and it installed the latest.. thanks alot for your tutorial as it was very helpful πŸ™‚

  48. gthbvf says:

    successful …Tada!!..

  49. Fraq says:

    Works like a charm! Thanks for writing this, otherwise this install could have been a whole lot more difficult.

  50. kriss says:

    thanks a million, worked fine.

  51. Chris Dean says:

    I spent at least 5 hours trying to get virtualbox installed without the kernel headers, then i did a google search for install virtualbox backtrack 5 and found your page.

    Worked first time thanks alot for making this post available to me.

  52. Angelo says:

    excellent

  53. Ahya says:

    it’s work virtualbox 4.2

  54. adam says:

    thx great work

  55. inuYasha_Fangirl says:

    Thanks!! It works great!

  56. awesome walkthrough. I wanted to install virtualbox and decided to check google to make sure there wouldnt be any surprises. searched “install virtual box on backtrack 5” and this was the very first link. simple

  57. Karo says:

    Thank you for your contribution. Helped me out a lot. I appreciate it.

  58. k4t434sis says:

    Thanks, out of the box fix for me

  59. Ted-B says:

    It always seems easy …when you you know what you are doing,
    Thanks for the help.

  60. SomeoneLearning says:

    awesome thanks for the help!

  61. ev0lve says:

    Awesome, simplified, direct.

  62. dave says:

    OUT FREAKING STANDING.

  63. woondark says:

    Thanks!

  64. Matt Zed says:

    Hey i keep getting this error: Error! Bad return status for module build on kernel: 3.2.6 (i686)
    Consult the make.log in the build directory
    /var/lib/dkms/virtualbox-ose/3.1.6/build/ for more information.
    dpkg: error processing virtualbox-ose-dkms (–configure):
    subprocess installed post-installation script returned error exit status 10
    dpkg: dependency problems prevent configuration of virtualbox-ose-source:
    virtualbox-ose-source depends on virtualbox-ose-dkms (>= 3.1.6-dfsg-2ubuntu2); however:
    Package virtualbox-ose-dkms is not configured yet.
    dpkg: error processing virtualbox-ose-source (–configure):
    dependency problems – leaving unconfigured
    Setting up se-toolkit (4.2.1-bt0) …
    No apport report written because the error message indicates its a followup error from a previous failure.
    svn: OPTIONS of ‘http://svn.trustedsec.com/social_engineering_toolkit’: could not connect to server (http://svn.trustedsec.com)
    dpkg: error processing se-toolkit (–configure):
    subprocess installed post-installation script returned error exit status 1
    Setting up w3af (1.2-bt2) …
    tar: pybloomfiltermmap-0.2.0.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Exiting with failure status due to previous errors
    /var/lib/dpkg/info/w3af.postinst: line 4: cd: pybloomfiltermmap-0.2.0: No such file or directory
    python: can’t open file ‘setup.py’: [Errno 2] No such file or directory
    svn: Repository moved permanently to ‘https://svn.code.sf.net/p/w3af/code/trunk’; please relocate
    dpkg: error processing w3af (–configure):
    subprocess installed post-installation script returned error exit status 1
    No apport report written because MaxReports is reached already
    Errors were encountered while processing:
    virtualbox-ose-dkms
    virtualbox-ose-source
    se-toolkit
    w3af
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    Any help would be appreciated. Because I’m new to backtrack/linux still.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s