Notes on installing Ubuntu under Sun's Virtual Box

  1. Download and save the Ubuntu ISO distro. You don't need to burn a disk - you can install from the ISO file. Save it to your desktop. You can delete it when the install is finished.

  2. When installing, the Vbox witll want you to set a size for the virtual disk to be used by Ubuntu. Set the disk size to something like 20 GB or more - the default size is too small.

  3. If you screw up, be sure to erase the virtual disk before you start over - it's usually in C:\Documents and Settings\user\.VirtualBox\VDI\

  4. You might want to increase the base memory to 512MB. This depends upon how much real memory your have.

  5. Once the Vbox is created, created, under the Details tab, click CDROM/DVD and then Mount CD/DVD then ISO Imaage File then point the file name to your ISO file.

  6. After you've installed Ubuntu, undo the previous step or it will keep booting from the install disk.

  7. Start the virtual machine (cleverly labeled Start button) It should boot from the ISO and begin the installation as per normal. Click you mouse inside the window and the mouse will be captured by the window. To uncapture, hit the right hand control key on your keyboard.

  8. Once installed reboot. Be sure the CDROM ISO is not the boot device (see above).

  9. The screen size will be 800x600. To make it adjustable, in the box running Ubuntu, click Devices then Install guest additions. Ubuntu must be running when you do this.

    Guest Additions:

  10. Printing is supported from Vbox Ubuntu but it is tricky as there are not Linux drivers for many printers.

    The easier way is to copy the file to be printed to Windows and then print from Windows using an editor such as Notepad (load the file into Notepad then have Notepad do the printing).

    To copy files from Ubuntu to Windows, you must setup shared folders. I will go over this in class next week but here are the detailed instructions (some images are attached). Note: The first 9 steps are only done once and never again.

    This looks more complicated that it is so don't panic. It basically involves telling Vbox what folder(s) to share then telling Ubuntu to mount it/them (that is, make it/them available).

    1. Start Ubuntu in the Vbox.
    2. Right click on the small folder icon you see at the lower right of the Vbox/Ubuntu window. (see image).

    3. You will see a box pop up which will allow you to select which folders from Windows to share with Ubuntu (see next image).

    4. Click on "Machine Folders" then on the folder icon to the right with the green plus sign (see image).
    5. You will see a new pop-up window. click on the folder with the green ^ (see image).

    6. Another window will pop-up. Use this window to navigate/locate the folder you want to share. You can click on a disk if you want to share the entire disk (as I do next). When you've selected a folder or disk, click OK.

    7. Next you see a box (see image) with the name the folder will have (you can change this; be sure the name has no blanks in it). Permanent should be checked (unless you want to do this each time) and Read Only should NOT be checked. Then say OK.

    8. Now you will see (see image) a box showing the folder to be shared and its name (C_DRIVE in this case). Remember the name and the case of the letters (upper/lower).

    9. In a terminal (command prompt) window, create a directory where your shared folder will reside (see image).

    If everything goes ok, you do not need to do steps 1 thru 9 again. They are permanent. Each time you start your Vbox before you can use the shared folders, you need to mount them. You do this by becoming root and running the mount command:

    sudo mount -t vboxsf C_DRIVE shared

    You will be asked for a password. Where I have "C_DRIVE" above, you insert the name of the folder to be shared. Where I have "shared" above, you use the name of the directory you created to mount the shared folder in. Everything else should be exactly as shown.

    You do this command once and only once per session. However, this command will be in your command history and can be re-executed without re-typing (example to be given in class).

    If you browse the folder ("shared" in this case), you will see files from Windows. If you want to copy an Ubuntu file to the shared folder, do:

    cp filename ~/shared

    where "filename" is the name of the file to be copied and "shared" is the name of the directory in which the Windows folder is mounted. The above will not work correctly unless you have done the mount command. Also, if there already is a file with the same filename in the Windows folder, its contents will be replaced with the Ubuntu file contents.

    There is a way to automatically mount the folders. I'll do that later.

  11. Shared Clipboard

  12. Run the update manager (you will probably notice a red arrow in the upper right after a few minutes - click it and do what it says). Alternatively, you can run it from System | Administration.
  13. The Synaptic Package Manager (Under System | Administration) can be used to load additional software. No development packages are installed by default.
  14. Good packages: C/C++ (seach for C++), autoconf, PostgreSql.
  15. Odd things: the Apache2 cgi-bin default is in /usr/lib/cgi-bin

    To enable user directories, go to /etc/apache2/mods-enabled and type a2enmod userdir.