Installing VirtualBox 2 On A Debian Lenny Desktop

November 12, 2010 by: jennyamy

This tutorial shows how you can install Sun xVM VirtualBox 2 on a Debian Lenny desktop. VirtualBox is available as a package from the official Debian Lenny repository, but it’s very old (version 1.6.6), therefore I explain how to install the current version (2.1.4 at the time of this writing). With VirtualBox you can create and run guest operating systems (“virtual machines”) such as Linux and Windows under a host operating system. There are two ways of installing VirtualBox: from precompiled binaries that are available for some distributions and come under the PUEL license, and from the sources that are released under the GPL. This article will show how to set up VirtualBox 2 (2.1.4 at the time of this writing) from the precompiled binaries.

As of version 2 VirtualBox supports 32 and 64bit host and guest operating systems (if you want to install 64bit guests your processor must support hardware virtualization and, of course, the host operating system must be 64bit as well).

This document comes without warranty of any kind! I want to say that this is not the only way of setting up such a system. There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!

Installing VirtualBox From Precompiled Binaries

First, we install the packages gdeb, gedbi, and gdebi-core. Open the Synaptic Package Manager (System > Administration > Synaptic Package Manager):


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

You can use the search function to find the three packages. Select them for installation and click on Apply. Close Synaptic after the packages have been installed:


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

Open Firefox and go to http://www.virtualbox.org/wiki/Linux_Downloads. For Debian Lenny, click on the i386 or AMD64 link (depending on if you have a 32 or 64 bit host operating system) right of Debian 5.0 (“Lenny”):


Click to enlarge


(JavaScript must be enabled in your browser to view the large image as an image overlay.)

In the Firefox download dialogue, select Save File…


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

… and download the package, e.g. to your desktop (/home/falko/Desktop in this example):


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

After the download has finished, open a terminal (Applications > Accessories > Terminal)…


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

… and type

su

to become root.

Then run

gdebi /home/falko/Desktop/virtualbox-2.1_2.1.4-42893_Debian_lenny_i386.deb

to install VirtualBox (make sure you use the correct path; also the package name can differ, for example if you have downloaded the amd64 version or if there is a newer version – use the TAB key to use autocompletion in the terminal).

During the installation you will see the following message. It says that the user that runs VirtualBox – that’s the user you’re logged in as on your desktop – must be a member of the vboxusers group:


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

To add the user falko to the vboxusers group, we run

usermod -G vboxusers -a falko

in the terminal, delete the VirtualBox package…

rm -f /home/falko/Desktop/virtualbox-2.1_2.1.4-42893_Debian_lenny_i386.deb

… and close the terminal afterwards.

To start VirtualBox, go to Applications > System Tools > Sun xVM VirtualBox (if you don’t see the VirtualBox launcher, log out of the desktop and back in again):


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

When you start VirtualBox for the first time, you are prompted to accept its license:


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

Afterwards, type in your name and email address to register your VirtualBox installation:


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

Click on OK in the registration confirmation window:


Click to enlarge
(JavaScript must be enabled in your browser to view the large image as an image overlay.)

That’s it! You can now use VirtualBox to create virtual machines:


Click to enlarge

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
Have you found this script useful? Please support author by PayPal donation.

Comments

4 Responses to “Installing VirtualBox 2 On A Debian Lenny Desktop”
  1. R S Chakravarti says:

    Deleting the .deb package seems an unnecessary step.

    Why not get it with apt-get (after editing /etc/apt/sources.list and adding the key)?

    You mentioned obvious things like accepting the licence and registering but stopped there.
    I would have liked to read about how to create a virtual machine.

    Please reply by email. Thank you.

  2. pomoc prawna says:

    Das war wie ein hilfreicher Artikel! Ich bin gerade erst mit meinem Blog und ich hoffe, es wird so gut wie Ihre. Grüße!

  3. I like this weblog very much, Its a real nice office to read and obtain information. “There is hopeful symbolism in the fact that flags do not wave in a vacuum.” by Arthur C. Clarke.

  4. It’s remarkable to pay a visit this website and reading the views of all friends regarding this piece of writing, while I am also zealous of getting knowledge.

Leave a Reply