VirtualBox 2.1 Installation Guide

This will explain how to install and configure VirtualBox to run on your Crunchbang system.

There are two version of VirtualBox to choose from:

  • Personal Use and Evaluation License (PUEL)
  • Open Source Edition (OSE)

There is a webpage that details the differences between the two editions, but here is a quick listing of the differences:

  • Remote Display Protocol (RDP) Server
  • USB support
  • USB over RDP
  • iSCSI initiator
  • Serial ATA controller
  • Gigabit Ethernet Controller
  • Web Services

This HOWTO will be using the PUEL edition because I need to have USB support in my virtual machines, and the OSE version does not support USB.

Installing VirtualBox 2.1.0 (PUEL)

There are a number of ways to install VirtualBox onto your system.

  1. Using apt-get
  2. Graphical installation
  3. Command Line installation

Using apt-get

By far the easiest ways to install VirtualBox (and any other software) is by using apt-get in Terminal Emulator.

  1. Open up Terminal Emulator (Openbox Menu > Terminal Emulator)
  2. At the prompt, type:
    $sudo nano /etc/apt/sources.list

    or

    $gksu gedit /etc/apt/sources.list
  3. Enter your password.
  4. You will need to add the appropriate line to your /etc/apt/sources.list file:
    deb http://download.virtualbox.org/virtualbox/debian intrepid non-free   ## #! 08.10
    deb http://download.virtualbox.org/virtualbox/debian hardy non-free      ## #! 08.04
    deb http://download.virtualbox.org/virtualbox/debian gutsy non-free      ## #! 07.10
    
  5. Put the line that corresponds to your version of Crunchbang in your file, either by retyping it or copying and pasting it. Then save the file.
  6. You will need to install the Sun public key to your system. You can do that with one command:
     $wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add - 
  7. You will need to update your repositories with the new addition that you made, so go back to Terminal Emulator and type:
     $sudo apt-get update 
  8. Now to install virtualbox with apt get, type:
     $sudo apt-get install virtualbox-2.1 

That will run the installer and get VirtualBox 2.1 installed on your system. There are some additional steps to get it configured that will be later in the document.

Graphical Installation

This method is the next easiest method to install VirtualBox onto your system.

  1. Make sure that you have gdebi installed on your system.
     $sudo apt-get install gdebi
  2. Download the appropriate DEB package from VirtualBox at http://www.virtualbox.org/wiki/Linux_Downloads
  3. Go to your download location.
  4. Double-click the .deb package that you downloaded. (virtualbox-2.1_2.1.0-41146_Ubuntu_intrepid_i386.deb at the time of writing.)
  5. Click the 'Install Package' button in Package Installer
  6. Enter your password
  7. Click the 'Forward' button on the Creating group 'vboxusers' box.
  8. Click 'Close' when the installer finishes.
  9. Close Package Installer
  10. Add yourself to the 'vboxusers' group
    1. Go to Users/Groups (Openbox Menu > System > Users/Group)
    2. Click on the 'Unlock' button
    3. Enter your password and hit the 'Authenticate' button
    4. Select your USERNAME and hit the 'Properties' button
    5. Select the 'User Privileges' tab
    6. Click in the box next to 'Use VirtualBox' and hit 'OK'
    7. Close 'Users/Groups'
    8. Logout/Login for the Group changes to take effect
  11. You are ready to start up VirtualBox.
    1. Bring up a Run dialog box
      1. Openbox Menu > Run Program
      2. Press ALT-F2
    2. Type 'VirtualBox'
  12. Accept the Personal Use and Evaluation License (PUEL) by scrolling all the way down and pressing the 'I Agree' button
  13. Register your VirtualBox
  14. Make some virtual machines!

Command Line Installation

This method is the most advanced method to install VirtualBox onto your system.

  1. Make sure that you have gdebi installed on your system.
     $sudo apt-get install gdebi
  2. Download the appropriate DEB package from VirtualBox at http://www.virtualbox.org/wiki/Linux_Downloads
  3. Install VirtualBox to your system:
    1. Open up Terminal Emulator (Openbox Menu > Terminal Emulator)
    2. Navigate to where your download is located.
    3. Use gdebi to install the package:
       $sudo gdebi virtualbox-2.1*.deb 
    4. Enter your password.
    5. Say 'Y' to question about installing software package
    6. Hit 'OK' to the Creating group 'vboxusers'
  4. Add yourself to the 'vboxusers' group with the command:
     $sudo gpasswd -a USERNAME vboxusers 
  5. Logout/Login for the group change to take effect
  6. You are ready to start up VirtualBox.
    1. Bring up a Run dialog box
      1. Openbox Menu > Run Program
      2. Press ALT-F2
    2. Type 'VirtualBox'
  7. Accept the Personal Use and Evaluation License (PUEL) by scrolling all the way down and pressing the 'I Agree' button
  8. Register your VirtualBox
  9. Make some virtual machines!

Installing USB Support

Getting USB support working is a little harder with the Intrepid release, but still rather easy.

  1. Open up Terminal Emulator (Openbox menu > Terminal Emulator)
  2. Type in the following:
     $gksu gedit /etc/init.d/mountdevsubfs.sh 
  3. Add the following lines to the END of the do_start() function:
    	#
    	# Magic to make /proc/bus/usb work
    	#
    	# These following 4 lines were uncommented to make USB devices avabilable in vmware
    	#
    	mkdir -p /dev/bus/usb/.usbfs
    	domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    	ln -s .usbfs/devices /dev/bus/usb/devices
    	mount --rbind /dev/bus/usb /proc/bus/usb 
  4. Save the file and REBOOT your system.

When you go back into VirtualBox settings for one of your virtual machines, you should see an entry for USB present.

Installing Guest Additions

There are different ways to install Guest Additions; here's a quick one:

  1. Boot your CrunchBang machine in VirtualBox
  2. Make sure you have installed the following packages: linux-headers-generic build-essential
  3. In VirtualBox, click Devices/Install Guest Additions - this will mount the virtual Guest Additions 'CD' image
  4. Open a terminal and type sudo thunar - after entering your password, it will bring up the Thunar file manager with root/sudo access.
  5. Browse to the VBOXADDITIONS_* virtual CD that should now be visible in the left column of Thunar
  6. Click (or double-click, depending on your settings) on the appropriate file. For 32-bit CrunchBang, you'd currently use VBoxLinuxAdditions-x86.run
  7. A terminal will open and begin the installation. After it's complete it'll ask you to 'Press Return to close this window . . .'
  8. Restart CrunchBang and you should be good to go.

You can, of course, install via terminal as well, but this may be a touch easier for those with terminal-phobia. =)

 
howto/virtualbox.txt · Last modified: 2009/01/14 19:20 by corenominal
 

Copyright © 2009 CrunchBang Linux. Some rights reserved.