Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm looking for a solution that would enable me to install Ubuntu and run it as a virtual machine under OS X but still be able to boot directly Ubuntu.

If possible I would like to test both scenarios: Ubuntu guest on OS X host and Ubuntu host and OS X guest.

share|improve this question
    
The general recommendation is to not use raw disk access with VirtualBox. There are several reports of corrupted data, broken drivers (since VirtualBox installs its helper drivers), etc. –  Ryan Wersal Feb 9 '11 at 20:21
    
Update: I managed to install Ubuntu on a different partition and configure to recognize the parition and default boot it by installing refit.sourceforge.net/myths - still the issue of running OS X as a virtual machine under this Ubuntu is not solved yet. –  sorin Feb 11 '11 at 11:42

6 Answers 6

up vote 5 down vote accepted

If I remember correctly, you should be able to install Ubuntu into Boot Camp, and then virtualize it using Parallels Desktop. Works great with Windows; most likely with Ubuntu as well.

share|improve this answer
    
I was able to install ubuntu only from a burned CD but configuring Parallels works, the only VM solution that worked for me so far with real partitions. –  sorin Mar 9 '11 at 16:32

I also wanted to run ubuntu native on my iMac and could not figure it out for the longest time. I refused to use virtualization software. Took a look at ubuntu's website and the instructions it provides work the best for me.

First make bootable Ubuntu USB Stick

http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx

Restart your computer.

Hold down Option ⌥ when chime sounds.

Select your installation method (i.e.: install Ubuntu along side OS X)

share|improve this answer

People have gotten VirtualBox to use a partition as a drive for a virtual machine. However, I don't believe it is officially supported. This link, while discussing windows as the guest, may point you in the right direction.

http://forums.virtualbox.org/viewtopic.phpf=7&t=20793&p=89806&hilit=raw+partition+vista#p89806

Old but still contains useful information:

http://blarts.wordpress.com/2007/12/06/how-to-run-virtualbox-using-a-physical-partition-using-ubuntu-feisty-fawn/

share|improve this answer
    
I'm running Ubuntu 10.10 under OSX fine with VirtualBox. I don't have it set up so that you can boot direct to Ubuntu, but that might be possible. –  Nathan Greenstein Feb 10 '11 at 4:35
  • installing Ubuntu as dual boot with OS X
  • running OS X from within Ubuntu:

    • install VirtualBox
    • add yourself to disk group: sudo usermod -G disk,vboxusers -a `whoami`
    • create virtual disk pointing to your real disk

    VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/OSX.vmdk -rawdisk /dev/sda -partitions 2 -relative (if your OS X is not on /dev/sda2, change disk and partition number accordingly)

    • create virtual machine with system OS X 64-bit, with disk pointing to virtual disk you've just created
    • you're ready to lunch
share|improve this answer

Your best bet is going to require a significant amount of manual work. Technically, you can't Boot Camp Ubuntu as it is a specialized way to streamline Windows dual boot installs on Macs.

However, you can use it to create an initial partition, which you delete and format for Ubuntu's use. Alternatively, you can use Disk Utility to decrease the size of your OS X partition. Then use Ubuntu's installer to modify that empty space into usable partitions for Ubuntu. From there, install Ubuntu as usual. (Be sure to hold down C while booting to ensure you boot from the disc.)

Finally, you would have to choose your virtualization platform:

  • VirtualBox supports raw disc access but has very large warnings against its usage due to data corruption concerns, etc. Chapter 9 of their manual covers raw disc access.
  • VMware Workstation supports raw disk access, but unfortunately doesn't work on OS X. Even worse, VMware Fusion doesn't appear to support setting up raw disk access from the GUI.

The workaround, should you choose the VMware approach, is to use the command line tools and manually editing config files to give you access to raw disk access. This forum thread has useful discussion on this process, as well as other concerns.

share|improve this answer

To my knowledge, you can't have an Ubuntu virtual machine (VMware, VirtualBox or even Xen) and then be able to native boot the same. Seems kind of crossed purposes to me... :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.