CSCI251 - Systems and Networks

Lab2 - Operating System Installation

Wednesday Jan 20, 2009

Discussion

Introductory Comments

The computer assigned to you for this course has been set up specially for CSCI 251 labs. You do not have superuser (aka 'root') privileges on the machine as thses machines are be used by other users for other work and the risks associated with giving such privileges are too high. However, for many of the assignments in CSCI 251 the students will need that highly privileged access to the machine.

The solution to this problem is to use an operating system within a virtualized environment. In that virtualized OS the student has complete privileges. There are various virtualization implementations available and we have chosen VirtualBox, which was developed by Innotek. Sun Microsystems has recently purchased Innotek and now supports VirtualBox and will keep it as free, open software.

You will find a special partition on the hard disk mounted as /<username> for which you have full access. You will use this partition to store all the files that have to do with the virtual machine you will set up.

The VirtualBox environment is already present on OS251. In this lab, you'll install a minimal Debian Gnu/Linux within that virtualized environment. Our terminology will be
You will have superuser privileges for lenny, but not for OS251. You will have your ordinary user account on OS251 and another on lenny.

Why install a minimal guest? It won't even have X Windows (the GUI)! We could actually install a fully featured Linux. The main reason for this is that we can learn much more by starting from a minimal system. For example, we'll eventually install X Windows. Another reason is that we avoid getting a really bloated system.

How VirtualBox Operates

A typical PC operating system uses a hard drive (or equivalent) and RAM. The guest will use a 'hard drive image' stored within the OS251 file system and a portion of the available RAM. You will use the directory /<username>  to store that hard disk image. 

In passing, we note that VirtualBox can be installed on a a variety of OS's other than Linux. Similarly, the guest OS installed into that virtual environment need not be Linux. This is a developer's dream. It is, however, X86 specific. For this course, virtualization is not the focus, just a handy tool; we are sticking with Linux for the host and the guest.

Instructions

Task #1: Download the Debian installation CD image

Task #2: Set up Vbox parameters for the virtual machine

These steps precede the actual installation of the guest. Their purpose is to set up an identity for the virtual machine and to set up a hard disk and other 'hardware' for it.
We now have a machine identified as 'lenny' with 256MB RAM and 8GB. You should see a new entry on the left panel of the VirtualBox OSE window with the machine status shown as 'Powered off'.

Task #3: Install Debian on the virtual machine

Now we will 'insert our CD' into our virtual machine and power it on. 'Inserting the CD' can be done in one of the following two ways:
  1. use the CD drive on the host machine and physically insert a CD
  2. attach an iso image to the CD drive
We will use the second method to save a CD-ROM.
From here on, the installation process is identical to one done on a physical machine.
The installer will now scan the CD drive and load necessary software and drivers, including the one for the network card.
Now the installer will take you to the disk partitioning step.
The partition table is now written to the hard drive and filesystems are created. After that, the installer starts installing the base system. This will take a few minutes to complete. When it prompts:
Now the installer is ready to access the Internet to get the rest of the files. It wants to know from where to get the files.
At this point the 'Software Selection' screen will appear.
Installation is now complete. The installer will ask you to remove the CD-ROM. For that , you will select 'Devices -> Unmount CD/DVD-ROM' from the menu bar and then select 'Continue'. The CD is now 'ejected' and the machine should boot from the hard disk.

When the login prompt appears, login as user. Try out your system. The instructor might suggest a few commands to run.

Task #4: Show your work

Show the running system to the instructor. Once he's satisfied, make sure he enters that fact in his record for this lab.

Before you logout from the host machine, make sure you shutdown the virtual machine by running

    shutdown -h now

as root user.