LL10 – Virtual Machine (VM) Ubuntu Installation

First — Do not install Ubuntu with the Ubuntu Textbook’s instructions as we will install into VMWare or another Virtual Machine (VM).  To this extent, please read this and all subsequent pages in their entirety before proceeding so that you have the big picture. 

Also you may notice that Ubuntu has launched the next LTS (14.04) but we will remain with 12.04 LTS since our text maps to the 12.04 version.  I comprehensively recommend you install and implement the 32 bit version  since it is the most robust.

Required Reading:  Getting Started with Ubuntu Linux 12.04 Prolog & Chapters 1-3  (see syllabus or early LLs for download).

Ubuntu Desktop (for general use and DB10)

Note many topics in Chapter 3 can be skimmed as it is only necessary to be aware of the functionality’s existence and users can return to read this material as necessary.  It is important to understand the menu system (top menu, launcher and Dash for search), graphical file navigation and management, system settings and specifically networking, Office applications, and Ubuntu One cloud integration.  Multimedia (photos, music & videos) is optional.

Also, please explore the Ubuntu Desktop Guide as necessary here: https://help.ubuntu.com/12.04/ubuntu-help/index.html

I will not be assigning additional reading from the Getting Started with Ubuntu Linux text however you should minimally peruse the table of contents and understand what is available as you will need this resource in the future.

Virtualization & Virtual Machines (VM) Background

A VM appears to the end-user to be complete physical machine. What this means is a VM abstracts the hardware components up a level as it is itself a process running on a machine and provides this hardware abstraction to guest operating systems.  Ok, let’s see if I can distill this further.  A VM is a process running on a system (i.e. it is an application being run by an OS on a computer).  We will call the actual physical computer the “Host” computer and the VM will be called the “Guest”.  The host has an architecture (e.g. Intel) and the host OS (e.g. Windows, Mac or Linux) abstracts the details of the host architecture to provide a consistent platform for its applications (e.g. MS Word, Google Chrome, etc.).  You know this as you can install and update applications on your computer and then later add a new printer or some other hardware device as the OS manages the interface.  When you added the new hardware device everything still works and as an example, you did not have to update your word processor to work with the new printer.  The host OS handled this interface.

Ok, so now we install a VM (the VM is an application running on the host OS just like MS Word) and this VM provides an exact architectural replica so that we can install a guest OS in the VM.    Now once we install a VM on a host OS, and install a guest OS in the VM, we can install applications in the guest OS.  In the guest instance, neither the OS nor the applications realize they are in a VM as they simply see the normal interface (i.e. the OS sees the architecture and the applications see the OS).  Now if the word processor installed in the guest OS wants to print a file, it asks the guest OS to print the file exactly as presented above.  The guest OS uses the interface as presented by the VM to print the file.  The guest OS is unaware the VM is actually an application running on the host OS so the VM asks the host OS to print the file using the same system call that a word processor running on the host would use. Hardware Virtualization speeds this process up by creating hooks allowing the guest VM residing in application space on the host VM to access the host’s hardware directly.

http://www.intel.com/content/www/us/en/virtualization/virtualization-technology/hardware-assist-virtualization-technology.html

For further reading on VMs please see: http://en.wikipedia.org/wiki/Virtual_machine

Virtual Machine Graphic

Virtual Machine Uses

So why do we do use VMs?  They offer many advantages that include:

Isolation – if a VM or a program in a VM crashes, it does not compromise other processes running on the host OS.  To provide an example you are familiar with, if you are running a system with no VMs and your MS Word crashes, your Chrome Browser should not crash.  A VM is simply another application on the host OS so if the guest VM, its guest OS or one of its programs crashes, your system should remain intact.  Microsoft Windows was probably not a good example – 🙂

Security – see isolation description above but consider if your guest VM/OS/Browser were to get a virus.  The VM/OS is simply an application (i.e. just another file) with no access to your host system so the threat is sand-boxed.

Greener or less power consumption – our computers are powerful and can multi-task so we can use computing resources more effectively.

Software development – see isolation above.

Uniform desktop support – this is my favorite as every client is running the same architecture.  Honestly, this is the only way I can teach the this CISS 100 Ubuntu component but there are still slight variations.

 

Desktop Virtual Machines

There are several desktop VMs out there and  they are listed below. We will implement VMWare as a first choice since it is the most robust and the CIS Dept is part of the VMWare Academic Alliance.

VMWare – for Mac OSX (i.e. Fusion) and Windows (i.e. VMWare Workstation). This is proprietary software (costs money) but we have an academic alliance with VMWare (VMAP) so we can provide it to students for free and this platform works without a hitch.

VirtualBox (VB) – for Mac OSX, Windows and Linux.  This is an Open Source solution maintained and distributed freely by Oracle.  The Virtual Box Manual located is here: http://www.virtualbox.org/manual/UserManual.html.  Be aware of the open source VirtualBox solution as you may want to explore this down the road.

Parallels – for Mac OSX.  This is proprietary software (costs money) but works without a hitch.

Microsoft Virtual PC – This is built in/available for free for Win7/Vista/XP  has solved some student’s problems where they could not install VB.

Hyper-V – for Win 8 (free) and this works but it seems to need a recent machine that was built for Win 8 rather than an older machine that is upgraded to Win 8.

You will also find a USB/Live CD option that is available to students with very old computers.

Virtual Machine & Ubuntu Installation

Please read through all documents in their entirety before you begin your installation but first the big picture – you will:

1. Register and download VMWare Workstation 

2. Install your VM 

3. Download Ubuntu

4. Install Ubuntu in your VM

In this LL10’s submenu you will find VM (VMWare, VirtualBox, Virtual PC, HyperV etc.) & Ubuntu OS installation instructions for the items listed above.  We will install the VM first and –  as a first option we will use the VMWare. 

If you have an old computer that you are no longer using or expect to use you may turn this into a dedicated Ubuntu Linux box and this will work well but be sure to get everything you need off it.

So without further ado, let’s jump in.

Again, most problems come from rushing through this installation, not following the instructions or a lack of attention to detail but again, no one has ever taught you these exact principles as Comp Sci is not taught in our High Schools….

Again, please read through all documents in their entirety before beginning and you may want to perform your downloads in the background (while making coffee, dinner, overnight, before you leave for the night or go skiing, etc.) as they can take some time depending on your connection speed.  Having said this you may wish to quickly read through this document and get some downloads going as you encounter them.  Also, it may be beneficial to download at the College or Library if their download speeds exceed your home download speed.  To this extent I provide the Ubuntu Download instructions here so that you can begin the download and the Ubuntu download is common component for all installations (e.g. all Virtual Machines and USB installations).

Again, note we are installing Ubuntu in a VM not directly on your Hard Drive as installing on your Hard Drive will erase your system.

Ubuntu Desktop Download – Again, please read this completely first before proceeding with your download 

Ubuntu downloads are here:

PC (Intel x86) desktop CD – Use this for almost all PCs. This includes most machines with Intel/AMD/etc type processors and almost all computers that run Microsoft Windows, as well as newer Apple Macintosh systems based on Intel processors. Choose this if you are at all unsure.

64-bit PC (AMD64) desktop CD Choose this to take full advantage of computers based on the AMD64 or EM64T architecture (e.g., Athlon64, Opteron, EM64T Xeon, Core 2). If you have a non-64-bit processor made by AMD, or if you need full support for 32-bit code, use the Intel x86 images instead.

Again, please download to your desktop rather than letting your OS download it to documents or downloads or where ever.  You may have to edit your browser’s download options to download to your desktop and this function is found in your browser’s options or preferences.

You will need to choose the correct Ubuntu Desktop distribution and I highly recommend you choose the 32 bit version as it will have better compatibility with the following exception:   If you have a UEFI Win 7/Win8 machine you will be better off with the 64 bit version and you can quickly determine if you have UEFI by going into your BIOS setup (enter F2, F8, F12, etc. upon booting your machine) and seeing if your mouse works (mouse is enabled in UEFI BIOS whereas your mouse will not work in basic EFI BIOS).

The download can take some time so plan accordingly (i.e. go get a cup of coffee and read the book or even better have a look around the Ubuntu site at Long Term Support, Windows side by side installation, USB Installation, etc.).  Since these downloads are significant, I recommend you download these from a reliable high speed network (e.g. your home, the College, a library).  Also note the Ubuntu site states you will need to create a CD or USB stick to install however this is not correct for VM installations as the VM is an application already running on the Host OS. Lastly, note, for some people the download will hang at 6xx MB.  If this happens, please pause and restart your download and it should finish.

Now once you download the .iso, DO NOT DOUBLE CLICK IT OR ACTIVATE IT.  This .iso will be used as the VB Ubuntu installation media and we don’t want to install Ubuntu directly on our host overwriting our host OS.  Again note, you are not installing this or mounting this in your host OS as it will be installed in the VB VM.  

Cryptographic Hashes (MD5/SHA1SUM) in Forensics and Data Validation

As information… since I never miss a chance to add an important skill … :), cryptographic hashes are used in both security (Linux Password File Encryption) and to verify data integrity.  This is one of the tools used in computer forensics as investigators will take a hash of the hard drive to serve as a fingerprint that verifies the integrity serving as a basis for the chain of custody.  So if you are ever a manager and you suspect foul play, the first step of proper law enforcement is to get a hash of the harddrive/USB drive/etc.  Do not just begin poking around as you will corrupt the chain of evidence and invalidate any case you have. We have seen this as every file/directory has a modify bit (go back to files and review if necessary).  If you touch a file (just by viewing it) you have corrupted the evidence and it is no longer admissible in court unless you can prove it is in its original state (hence the MD5 fingerprint).

Now MD5 & SHA Hash Functions/Cryptographic hashes also allow you to confirm the integrity of the files you download. This is important since the most common cause of malfunctioning installations and errant behavior is a result of incomplete/incorrect downloads and we will do this from this point forward.

The md5sum and sha1 hash algorithms take a file as input and produce as output a message digest of the input, which is a highly unique fingerprint. This enables you to verify that your downloaded files are unaltered from the original.  If your calculated hash matches the message digest we provide, you are assured that the file was downloaded intact.

The SHA hash functions are a set of cryptographic hash functions designed by the National Security Agency (NSA) and published by the NIST as a U.S. Federal Information Processing Standard.   SHA stands for Secure Hash Algorithm. sha-1 and MD5 utilities are available for Windows and Linux and Mac.   Most Linux installations provide a sha1sum command for sha-1 hashes and a md5sum command for calculating MD5 message digests.

MD5 Ubuntu Download Verification

Note I will describe my application of MD5 but you will find SHA-1 hashes and their use is nearly identical.  A quick description of their similarity and use is here.

Mac OS: MD5 verification is straightforward on the Mac and its Linux/Unix kernel as this is a core component of the OS’s functionality.  As background, please read Apple’s documentation, How to Verify a SHA-1 Digest: http://support.apple.com/kb/HT1652.

MD5 generation: In Finder, browse to /Applications/Utilities.  Double-click on the Terminal icon.  A Terminal window will appear.  In the Terminal window, type: “openssl md5? (md5 followed by a space).  Drag the downloaded file .iso from the Finder (desktop)  into the Terminal window.   Click in the Terminal window, press the Return key, and compare the checksum displayed to the screen to the one on the download page. Instructions on checking an sha-1 checksum on a Mac:

SHA-1 generation: In Finder, browse to /Applications/Utilities. Double-click on the Terminal icon. A Terminal window will appear.  In the Terminal window, type: “openssl sha1 ” (sha1 followed by a space). Drag the downloaded file from the Finder into the Terminal window. Click in the Terminal window, press the Return key, and compare the checksum displayed to the screen to the one on VMware’s download page.

Now I tend to do everything from the command line without dragging and dropping so I did the following.

I opened the terminal and issued the following command in the Mac OSX terminal after downloading the .iso to my desktop and navigating to the desktop directory in Terminal (perform a ls to see where you are and then probably cd desktop).

$md5 ubuntu-12.04.2-desktop-i386.iso

This returns: MD5 (/Users/jameslooby/Desktop/ubuntu-12.04.2-desktop-i386.iso) = 90a4c7bd3901cd980cd4b48198e84eb1

I then check this against the Ubuntu MD5 Hashes located here and note you will have to find your downloaded version on this page: https://help.ubuntu.com/community/UbuntuHashes

My MD5: 90a4c7bd3901cd980cd4b48198e84eb1

Ubuntu MD5:90a4c7bd3901cd980cd4b48198e84eb1

Windows OS 

Windows does not provide a built-in utility for generating MD5 Hash values. The two options are a command line verifier or a graphical verifier.  Of course the graphical verifier is easier but you may choose which one you would like to use.

Command Line (cmd.exe) Verification:  The File Checksum Integrity Verifier (FCIV) can be used on Windows based products to verify both MD5 and SHA-1 values. Please see http://support.microsoft.com/kb/841290 for details on FCIV which is a command line utility (i.e. cmd.exe).   Another command line Windows MD5 utility is  MD5: Command Line Message Digest Utility.  http://www.fourmilab.ch/md5/

Graphical Verification: WinMD5 is a nice utility and can be downloaded from here: http://www.winmd5.com/  Simply download the file, extract the executable and run the .exe.  It is intuitive as you simply browse to your downloaded .iso on your desktop.

Once you computer your MD5 you will need to verify it against the Ubuntu MD5 Hashes located here and note you will have to find your downloaded version on this page: https://help.ubuntu.com/community/UbuntuHashes

Assignment (note there are more assignment components in the submenu installation instructions)

Compute the MD5 Hash of your Ubuntu Download and contrast this with the appropriate MD5 Hash on: http://releases.ubuntu.com/12.04/  Take a screenshot and paste both the screenshot and the correct hash in your LL10 pdf labeling this item “MD5 Verification”.

VM and Ubuntu Guest OS Installation

You should now move on to the submenu to register and download VMWare and implement your VMWare guest Ubuntu OS.

Note, many Windows 8 users with new machines have minor problems with VMWare and in this instance, Windows 8 Hyper-V seems to work better.  If you are a Windows 8 user and experience VMWare issues of if you simply want to bypass VMWare you may implement Hyper-V at your discretion.

Windows 7 users can also use Microsoft’s Virtual PC and if you are here as an outside user just for giggles you may of course implement and do all of the Linux Labs using the free Open Source VirtualBox.

 ….

Prof Looby

Virtualization Resources

[listyofiles folder=”wp-content/uploads/os-virtualization” options=”table,filesize,icon”]

Leave a Reply