Friday, June 28, 2013

Ubuntu 12.04 guest OS runs in "Low Graphics Mode" on VirtualBox 4.2.14

As the title says, this entry is about the persistent issue with running Ubuntu 12.04 as guest OS on VirtualBox 4.2.14 running in "Low Graphics Mode" - meaning it won't let you boot into Ubuntu with its nice graphical user interface, instead you're stuck with the shell/terminal. If you google (yes, that's officially a word) this issue, you'll find some discussions of it like in this forum: VirtualBox Forum. Before I move on, a couple notes which may or may not be important:
  1. I used Ubuntu 12.04 Desktop edition 32-bit version
  2. I'm writing this based on my recent experience with the issue where my Host OS is Windows 7 (SP1) 64-bit. But I think it happens regardless of the kind of Host OS (MacOSX, Windows...)
  3. I tried increasing my video memory to 48MB but it does not solve the issue

The only known solution for this problem so far is installing the VirtualBox Guest Addition package. Once you get the Guest Addition installed, the problem goes away. However, I did run into some problems trying to install the Guest Additions. Hence, I am writing this note to help any of you who might encounter similar problems (but also for my own notes). I apologize in advance for not having screenshots that would greatly help the explanations below. I'll try to reproduce the issue and update this post with screenshots as soon as I can. So here goes...

I'm going to skip the steps of installing VirtualBox and the Ubuntu as guest OS. I'm going to assume you are at the point where you've installed those two, and as you load your Ubuntu VM, you're seeing this issue.

 

Mounting the Guest Additions .iso

The scenario:
  • I've launched my Ubuntu VM
  • It gives me a message "Running in Low Graphics Mode"
  • I choose to "Continue running in Low Graphics Mode"
  • The VM launches into shell, I logged in
  • Now I'm in the shell prompt
Now I'm trying to mount the Guest Additions .iso to install it.  I do:
  1. On the VM menu bar, go to: Devices > CD/DVD Devices
  2. Choose: VBoxGuestAdditions.iso
  3. I noticed I don't have a checkbox next to it after I selected it, but there's no error messages.
I tried looking around for the mount point for the VBoxGuestAdditions.iso, under: /media and /mnt by typing the following in the shell:
  • ~$ ls /media
  • ~$ ls /mnt
 And both directories remained empty.  This means the mount somehow didn't work. I tried to unmount/re-mount this a few times, even manually pointing to the .iso file (in Windows, it's under: C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso), nothing works.

Solution:
  1. Download the Guest Additions .iso for VirtualBox 4.2.14 from the archive: here.  
  2. Download and save the .iso somewhere (maybe your default \Downloads folder).
  3. Mount the .iso by:
    1. On the VM menu bar, go to: Devices > CD/DVD Devices
    2. Click on "Choose a virtual CD/DVD disk file..."
    3. Find your VBoxGuestAdditions_4.2.14.iso file (do you remember where you saved it?), click on the file, and click Open.
  4. If all goes well, now when you reopen Devices > CD/DVD Devices menu, you'll see a checkbox next to "VBoxGuestAdditions_4.2.14.iso"
Wait, we're not done yet.  After I did this, when I ls on the /media and /mnt folders again, I still don't see anything mounted. I guess I have to mount it manually.

Mounting:
  1. In the Ubuntu shell, do:
    • ~$ ls /dev OR ~$ ls /dev/sr0
  2. If sr0 exists, then you're in luck! That's what you need to mount. Otherwise, I have no answer.
  3. Create a directory as the mount point for your VBoxGuestAdditions_4.2.14.iso:
    1. ~$ mkdir /media/disk1
      • Note: I don't remember if you have to use sudo mkdir /media... or not. If you get permission error then you probably do. "/disk1" is a name I arbitrarily chose, so you can use any name you want if you so choose.
  4. Edit the fstab file to let the system know you're adding a mount point.
    1. ~$ sudo vi /etc/fstab 
      • Make sure to use sudo to get permission to write the file
      • I use vi, but you can use any other text editor you like, e.g. pico)
    2. Add a new line to the file (the last line in the screenshot):
      /dev/sr0     /media/disk1   auto   ro,noauto,user,exec 0  0
    3. I'm not sure how important the exact spacings between those entries are, but  I tried to make the first character line up with the first character of the column name when I can.
    4. Save the file and close the text editor.
    5. Mount the .iso using:
      1. ~$ sudo mount /dev/sr0 /media/disk1
        • Yes, you have to use sudo due to permission requirement
    6. If all goes well, now you can go to the directory and execute the script to install the Guest Additions:
      1. ~$ cd /media/disk1
      2. ~$ sudo sh VBoxLinuxAdditions.run
The Guest Additions should install. Reboot after it's finished installing, and the "Low Graphics Mode" message should not appear anymore and take you to Ubuntu login screen.

Hope that helps.