Friday, February 26, 2010

Installing Ubuntu on MacBook (via VirtualBox).

Today I have installed Ubuntu (under VirtualBox) on my 13,3" MacBook White. Ahead, I'm going to describe everything you should know, in order to get Ubuntu and Mac OS X on the same MacBook. I want you to know clearly. Ubuntu will run inside Mac OS X, it won't be installed separately. In order to boot Ubuntu, Mac OS X needs to be already booted. They're going to run at the same time.

So, let's get started. First, you need to get VirtualBox from here, and a image of Ubuntu from here (please choose your country). Install VirtualBox like any other application for Mac OS X, and start it. Let the image of Ubuntu like it is.

Now, on VirtualBox, do the following:
  • click "New"
  • click "Next"
  • give it a name and at operating system select "Linux", and at version select "Ubuntu"
  • select an amount of memory to allocate to Ubuntu (do not give it more than your current free RAM memory; 512 MB are really enough if you don't have more) and click "Next"
  • be sure that "Create new hard disk" is selected, and click "Next"
  • click "Next"
  • check "Dynamically expended storage" and click "Next"
  • here just select the size for Ubuntu, and click "Next"
  • now click "Finish"
As you can see, on the left column of VirtualBox, your new Ubuntu appeared. Now do these:
  • click "Start"
  • select "OK"
  • when the window appears, click "Next"
  • now, at the Media Type select "CD/DVD-ROM Device", and at Media Source click on the folder from the right, click "Add", and select the recently downloaded image of Ubuntu. Select it and click "Select"
  • click "Next"
  • click "Finish"
Now the image of Ubuntu is going to be booted automatically. Install it like usually. Don't worry about the partitions, let it install itself on the entire hard drive, because it's a virtual one, made by VirtualBox. None of you data will be affected.

After the installation of Ubuntu is completed, give it the requested reboot. Don't worry if Ubuntu moves hard, it is normal at this moment. Now, on the window of Ubuntu, click on "Devices" (the button is up, on the silver bar), and select "Install Guest Additions". On the window that appeared, select just to open the folder. Now, drag the file named "VBoxLinuxAdditions-x86.run" on the desktop of Ubuntu. Continue by doing the following:
  • on Ubuntu, go to "Applications" --> "Accessories" --> "Terminal"
  • here, on Terminal type: "cd Desktop" (without quotes)
  • type in Terminal: "sudo sh VBoxLinuxAdditions-x86.run"
  • now you have to enter your password (that one you have entered when you installed Ubuntu; type it, and even you don't see anything, it is there; tap enter when done, or if you haven't entered a password, just tap enter)
  • wait for a few minutes
  • when installation is completed (last line is like the line you saw at the start), close the Terminal
If any reboot is requested, accept it. When you are ready, open the Terminal again and:
  • type "sudo gedit /etc/X11/xorg.conf"
  • enter again the password you have entered during installation, and tap enter
  • on the window that has appeared, modify where it says "Modes" with the resolution of your monitor (on my MacBook White 13,3" it is 1280x800)
  • save that file and close it
  • restart the operating system
After restart, Ubuntu should already be running on the selected resolution, on full screen.

Now you can change many settings in VirtualBox (while Ubuntu is shut down), as the video memory allocated to Ubuntu. Be sure not to give it too much, as the operating systems are sharing their resources. For Desktop Effects, 3D acceleration should be enabled, but on my Ubuntu (10.04 Alpha 3), the mouse disappears when the 3D acceleration is on.

So, that's all. Congratulations if you succeed. Your new Ubuntu installation is completed. Enjoy!

P.S: This works also for the installation of Ubuntu under Windows, because all you need to to is 100% the same.

6 comments:

  1. how do you install it on a 13" MacBook black?

    ReplyDelete
  2. @Anonymous: install what? everything is the same, even you're using white or black 13" MacBook or MacBook Pro.

    ReplyDelete
  3. I seem to hit a snag at the very end of installation.....my forward button is greyed out so I cannot finish installation. I tried downloading Ubuntu again but no go.....HELP!!

    ReplyDelete
  4. Hey dude....still cannot get ubuntu 10.10 installed on Virtualbox on my macbook 13.3". Am at a loss now coz it tries out perfectly, but the very last spot of installation, right after I put in my password, the forward button is greyed out.
    After all the waiting,I can't move forward....n it has this message saying,"Ready when you are..."
    Any suggestions?

    ReplyDelete
  5. Moron! It was a joke!

    ReplyDelete