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.
For this assignment you will need to download Ubuntu Desktop 12.04 from here. Make sure you get the 32 bit version. The download should be a 695 MB ISO file.
To run your VM, you will need to use Virtualbox. If you are on an edlab machine that is booted into linux, you can find "Oracle VirtualBox" under the
Applications menu, or you can just type
VirtualBox at the command line. Cancel the message window that asks you to install a new version.
Note: If you are not in the edlab, then you will need to install virtualbox on your own system. It supports Windows, Linux, and OS X, but you are on your own to figure out how. In total, you will need about 5GB of disk space available for the downloaded files and VM disk. If you do not have enough space on your hard drive, go to the edlab!
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, e.g. the Edlab computers, reduce the file size to 5 GB.
IMPORTANT: For Edlab Users (and others with small disk drives) By default, VirtualBox will create all new virtual machines inside your home directory. Normally this would be fine, but the Edlab systems are setup so your home directory has a small disk space quota. Since a virtual machine disk takes up a lot of space (3-4GB), you will need to change the disk location at the "File location and size" prompt so that it will store the VM disk in a different directory: use
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.
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.