CS197U: A Hands-on Introduction to Unix

Setting up an Ubuntu VM in VirtualBox

NOTE #1: There is a lot of information on this page. Please read it carefully.

NOTE #2: There are a number of options that you can change when creating your VM and installing Ubuntu, e.g. disk size. Feel free to play around with these, but if things break it might be harder for me to help you figure out what went wrong.

NOTE #3: If you are getting errors like "FATAL: No bootable medium found!" when starting the VM, then you failed to properly mount the Ubuntu ISO. In other words, the virtual machine is looking for an OS to boot from, but the virtual hard disk is blank and the virtual CDROM is empty. To solve this, you need to mount the Ubuntu ISO you downloaded such that it shows up in the VM as a disc in the virtual CDROM drive. To do this stop the VM, select "Settings" > "Storage" tab > Click the disk with the plus sign > "Add CD/DVD" device. > Choose your Ubuntu ISO file.

Downloading Ubuntu

For this assignment you will need to download Ubuntu Desktop 14.04(or any other version you might like) from here. Make sure you get the 32 bit version. The download should be a 1GB ISO file(for Ubuntu 14.04). In all, you will need at least ~6.5GB disk space for running Ubuntu VM on VirtualBox (You can allocate more if you have space in your own machine).

Installing/Starting VirtualBox

To run your VM, you will need to use Virtualbox. Click the big icon says "Download VirtualBox 5.0" and find the correct VirtualBox packge for your operation system. For example, if your computer is running Windows, click x86/amd64 link after "VirtualBox 5.0.4 for Windows hosts" to start downloading the Virtualbox. Later, install the Virtualbox based on the instructions.

Creating the Virtual Machine

Now you can create the new VM by clicking the "New" button on the user interface. The prompt will ask for your the VM's name. You can use whatever name you would like, but a good choice would be "Ubuntu 197u". Make sure the selected VM type and version is Linux and Ubuntu respectively.

After clicking next, choose the amount of RAM you want to give the VM. The default, 512 MB, is fine for our purposes so just click next again. Use the default values for the next few screens until you get to the "File location and size" prompt. If your machine is space limited, reduce the file size to 5 GB.

VirtualBox will now create a new blank VM for you to work with. The VirtualBox window should be updated to list the virtual machine you created. Press the "Start" button to boot up the VM.

Installing Ubuntu

VirtualBox will ask you to select your start-up disk. You should click the folder button to the right of the drop down. At which point you need to navigate to the location where you saved the Ubuntu ISO file (the one you downloaded earlier) and select it. After you click "start" you should see Ubuntu begin to boot up. VirtualBox may popup a number of info boxes, but you can probably just ignore them.

VirtualBox may warn you about keyboard capture. Fortunately, Ubuntu plays nice with VirtualBox, so you probably do not have to worry too much, but the prompt basically says that when you are using your VM it traps your mouse and keyboard inside of the VM. If you want to access windows outside of the VM then you may need to press the host key. By default, it should be Right Ctrl in Windows.

After Ubuntu boots up, you should click the "Install Ubuntu" button. On the next screen, make sure to check the boxes for "Download updates while installing" and "Install this third-party software". Just continue to follow the prompts to install Ubuntu. All of the default options should be fine.

While Ubuntu is installing, you can read about some of the cool features it offers. I suggest you check some (or all) of those features out!

Ubuntu could take anywhere from 30 minutes to 1 hour to install depending on your machine.