In association with heise online

24 September 2008, 12:01

Open Steps - Installing Ubuntu Linux on Windows using VirtualBox 2.0

Dj Walker-Morgan

Open steps - a step by step guide to open source applications. In this edition, we work through the steps needed to install Ubuntu Linux on VirtualBox running on a Windows system

We will need VirtualBox 2.0 and an ISO image file of Ubuntu Linux 8.04. These can be downloaded from the VirtualBox and Ubuntu download pages.

Once these are downloaded, we install VirtualBox using its installer and then run it.

We click on the "New" button in the toolbar to create a new virtual machine and then click "Next" on the "Create Virtual Machine" dialogue to go to the form for naming the virtual machine.

On this dialogue, we enter the name "Ubuntu 8.04" and select "Ubuntu" as the operating system type. This will set up reasonable defaults for later on in the install process. We then click "Next". A memory allocation window appears, but we will leave the memory allocation alone for now, at the default 256MB, and click the "Next" button.

VirtualBox now needs us to create a virtual hard disk for the virtual machine to write to. We click on the "New" button and then click the "Next" button on the "Create New Virtual Disk Wizard" dialogue.

The default disk size is 8GB, so we click the "Next" button, and return to the previous dialogue. The new virtual hard disk should already be selected, so we click the "Next" button.

We are now on the last part of creating a virtual machine and a summary of what we have just selected is displayed. We click the "Finish" button, and return to the main VirtualBox screen.

We can now see on the left hand side, the virtual machine we just created and on the right hand side are details of settings for the selected virtual machine. Also note in the toolbar that the "Start" button has now been enabled, but we don't want to click that quite yet. Before we start our new virtual machine, we need to put a virtual CD in the virtual machine's drive. Although it is not obvious, each of section headings on the display of settings is actually a clickable link. We click on "CD/DVD-ROM" heading in the settings to go to the CD/DVD-ROM settings dialogue.

This displays the settings for the virtual machines CD/DVD-ROM drive. We check the box for "Mount CD/DVD Drive", and then the option for "ISO Image File". We want to add the Ubuntu ISO image to the VirtualBox library of virtual CDs at this point, so we need to click on the folder icon to the right of the combobox under "ISO Image File".

Now we click on the "Add" button in the toolbar and select the ISO image file of Ubuntu Linux that was previously downloaded. This returns us to the Virtual Disk Manager where the image we just added is selected. Click Ok. The settings should now show the ISO Image file selected. We then click on OK to return to the main VirtualBox window, and click on the Start button to power up the virtual machine.

A new window will appear, this is the virtualised PC booting up. It should then boot off the ISO image file of Ubuntu and prompt for a language. Upon selecting "English" and we see the Ubuntu boot menu.

We are going to install Ubuntu on the virtual hard disk, so we press cursor down to go to the "Install Ubuntu" option and hit return. At this point, dialogues may pop up from VirtualBox telling us which key to press to stop the virtual machine capturing your mouse pointer and keyboard. The key is also displayed in the bottom right hand corner of the window. If the dialogue has appeared, we acknowledge it by clicking "Ok" and then we press the return key, which is captured by the virtual machine.

Ubuntu will now start its installation process. We are given another chance to change the language in use; we click the "Forward" button. We are asked to select out time zone; and click "Forward". We are asked to select our keyboard; again, we click "Forward".

Ubuntu then asks how we want to prepare disk space. We will leave it on "Guided - Use Entire Disk" and click "Forward".

On the next screen, we enter our full name, a user name, a password (twice) and give a name to our Ubuntu Linux system. When we have done that, we click "Forward". Ubuntu then summarises the installation process. We're keeping this to the defaults, so we click "Install". Ubuntu now starts repartitioning our virtual hard disk and copying system files to it.

After some minutes have passed, it will announce it has completed. We then click "Restart Now". Ubuntu will shut itself down finally getting to this next screen.

If we just pressed enter here, the virtual machine would restart and boot off the virtual CD-ROM again. We use the capture key to release the mouse pointer and click the Windows Close button (the red X in the top right hand corner). VirtualBox will now ask us how we want to close with the virtual machine.

We select power off the machine. We can't eject the virtual CD-ROM, so if we power down, we can go back to the CD-ROM/DVD settings from the main VirtualBox window, and clear them. With those settings cleared, we can now restart the virtual machine, clicking the "Start" button in the VirtualBox toolbar and boot up our installed Ubuntu Linux. When booted, Ubuntu prompts us for the user name and password we created earlier. Once we have logged in we should see this:

This is the Ubuntu Linux desktop. There’s no audio, hence the crossed out speaker in the menu bar, but the network should configure itself. We click on the Firefox icon in the top menu bar and browse our open source news site.

There’s one more step to go. We don't want to be pressing the capture button all the time to move between Linux and Windows. We need to install the "Guest Additions" to the Linux to make it operate more seamlessly. Close Firefox, and press the capture key, then select the "Devices" menu, and "Install Guest Additions" on that menu.

After a moment, a new virtual CD should appear and automatically open in Ubuntu’s file manager.

We now need to start a terminal to install the appropriate additions. Click back into the virtual machine and select the "Applications" menu, then the "Accessories" menu and finally the "Terminal" menu item.

A terminal window will now appear. In that window we type

sudo sh /media/cdrom/

and hit return. We will be prompted by "sudo" to enter our password and then the Guest Additions will be installed.

Once this is complete, the terminal should look as above. We now need to restart the Ubuntu Linux virtual machine by clicking the red power button in the top right and selecting "Restart". When Ubuntu restarts, we'll be able to freely move the mouse between the virtual machine and the host machine.

Print Version | Permalink:
  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

  • July's Community Calendar

The H Open

The H Security

The H Developer

The H Internet Toolkit