Trouble with Ubuntu installation in VirtualBox

9,162

Solution 1

3D acceleration in a VM

When installing more recent versions of Ubuntu we do rely on the presence of a graphics card capable of 3D acceleration needed for Compiz and Unity.

In a bare metal installation such a graphics adapter almost always is present. Ubuntu will then load the appropriate driver on boot. This is different in a virtualized machine where a virtual graphic card providing (limited) 3D capabilities will only be installed with a driver provided by the guest additions.

Guest Additions from root shell

As we can not log in or boot the graphical desktop to aid us with mounting the Guest Additions iso we will have to do that from the command line after we boot into a root shell.

We first have to load the Guest Additions .iso from Virtual Box Manager ("Devices") to be presented as /dev/cdrom (alternatively /dev/sr0) to the guest OS. We then additionally need to mount the CD in our guest Ubuntu to be able to install them.

From a root shell where we gained read/write access to our virtual hard disk (see link above) we can do so with the following commands:

mount /dev/cdrom /mnt              # or any other mountpoint
cd /mnt
./VBoxLinuxAdditions.run
reboot

Troubleshooting

  • Sometimes we still may not be able to boot to the desktop. Then we may try if an update of Ubuntu resolves the issue. From a root shell run:

    apt-get update && apt-get dist-upgrade
    reboot
    
  • If we still can't log in, we may try if we can do so from TTY. Enter the virtual terminal by pressing HOST + F1. Login with the administrator user and password you gave on installation of Ubuntu (the password will not be displayed, not even asterisks). Then start the login manager lightdm as follows:

    sudo lightdm
    

    Sometimes after we had done this once, we may be able to do a normal reboot and login as usual.

  • If we are unable to even start the graphical installer we may have an issue with the host graphics driver. We can try to install with a text based installation or in 12.04 from the Alternate CD. You may also try with nomodeset on boot.

Related Questions

Solution 2

Even I faced the same issue. After lots of searching on the web,I finally realized that virtualization was disabled in BIOS settings which was causing this issue.

I Enter in to BIOS settings, search for Virtualization and Enable it.

Problem is solved!! !

Solution 3

I had this black screen of death when I tried to install Ubuntu 12.04 LTS in Virtualbox under Windows 7. It may sound odd but rebooting my Windows machine solved the problem for me.

Share:
9,162

Related videos on Youtube

Sam
Author by

Sam

Updated on September 18, 2022

Comments

  • Sam
    Sam over 1 year

    I'm having some problems getting Ubuntu to install. I'm running Windows XP Home (32bit) on an older Dell Dimension 2350 with 1GB ram, trying to install either Ubuntu 12.04 LTS (32Bit) or 13.04 (32Bit) inside VirtualBox. Both versions of Ubuntu don't make it past the purple screen with the loading dots. When I change over to the "non-graphical" version, with the scrolling text, it starts to list a series of tests that are either [ok] or [fail]. There are only a few that fail, and my search on those indicates that they're not that important. There are a few settings for this VM that I've tried tweaking based on other searches for an answer (such as Enabling IO APIC, switching the Chipset to ICH9, changing the Video Memory size, Enabling 3D Acceleration, and Enabling PAE/NX. More or less, I get to the same point.

    (Once I got to the screen with Desktop in the upper left corner, and the red-ish background. But an error came up that basically said there was an error, and that I could send off a report or hit cancel. I hit cancel, and instead of the installer coming up, nothing happened)

    The last check that is run is "Stopping System V runlevel compatibility [ok], and a bunch of Starting [ok]s. Then I get a black screen, then a half purple half black screen graphical error. Sorta looks like snow, I don't know how else to describe it. After a while. That goes away and is replaced by a black screen again. Nothing else happens.

    enter image description here

    I like to think I'm fairly good at solving problems and following instructions, but I don't even know how to go about diagnosing this. Most of the solutions I've seen seem to involve entering things into a command line, but doesn't the OS have to be installed to be able to do that?

    This is a for fun/learning experience project, so it's nothing too pertinent. But I would like to figure this out.

    • Admin
      Admin almost 11 years
      Which Virtual Box version do you run? Try upgrading to a recent version. Are you able to boot a live session "Try out Ubuntu"?
    • Admin
      Admin almost 11 years
      Should be the most recent. Oracle VirtualBox 4.2.12 r84980 I'll give the live boot a try.
    • Admin
      Admin almost 11 years
      Same result. I get the same weird graphical screen as I posted above.
  • Sam
    Sam almost 11 years
    I assume the process for booting into the root shell should be the same whether on a virtual machine or not, correct? I can't seem to be able to get to that point.
  • Takkat
    Takkat almost 11 years
    It is exactly the same. Press and hold pressed the left shift key while booting (grey Oracle VBox window).
  • Sam
    Sam almost 11 years
    I am able to get to the installation menu where I can turn on the nomodeset on boot option, which I am currently trying. As this is an older computer, I wouldn't be surprised if it were the graphics card.
  • Sam
    Sam almost 11 years
    Just missed your last response. I'll try that again next, but I hadn't had success getting that to work before. It'll probably take a good 20-30 minutes or so with this try.
  • Takkat
    Takkat almost 11 years
    Yeah virtual 3D driver or not, the host GPU needs to have at least some basic 3D capabilities for Unity. You may have more luck with Lubuntu or Xubuntu on an old machine ;)
  • Sam
    Sam almost 11 years
    This is where my computer knowledges starts to get fuzzy, haha. This is the card I have, which if I'm reading it correctly, does have 3D capabilities. intel.com/support/graphics/intel845g/sb/cs-009078.htm#1 I'm at the same part in the install where it usually hangs, and sure enough it has. Any reason why I can't seem to get to the grub2 menu?
  • Sam
    Sam almost 11 years
    Well, I tried installing Xubuntu, as well. Same result. I'm going to try Linux Mint, and see where that gets me. The only thing I've been able to get working so far is Damn Small Linux, which was my first attempt at fooling around with VirtualBox. Any ideas of where to go next for a solution?
  • marcinj
    marcinj over 9 years
    funny, but just had the same