I have installed Ubuntu 9.04 in a VirtualBox on my MacBook Pro for exactly the same reason (to try out ). The installation is fairly trivial. First, download the Ubuntu Live CD and VirtualBox. In VirtualBox, create a virtual machine and enable mounting of the CD for the VM.
![Dvd player for mac Dvd player for mac](/uploads/1/2/5/6/125601631/266808887.png)
Insert your Ubuntu installation CD or DVD in the computer's drive, or plug in the USB flash drive that holds the Ubuntu installer. Restart your Mac and hold down the Option key (Alt if you're using a PC keyboard) as it restarts to get the Mac's OS selection screen. Pick the Ubuntu install disc from the options.
Boot the VM into the Ubuntu Live CD. From there you can very easily install Ubuntu on the VM. Of course, to allow for a smooth user experience you need to be able being generous with the resources available to the VM. However, as the whole process of getting Ubuntu to run doesn't take much effort it is always worth a try. I'm currently doing both on my Macbook: I use VirtualBox in Mac OS X to play with different Linux distributions, and use on a separate partition for development work. I would say either choice will likely serve. There are, of course, drawbacks to either solution, so here's how I would approach your decision:.
What exactly do you need from your Linux server? You mentioned compilation and debugging - are you compiling Project Euler assignments or the full Linux kernel? Different projects will require different mounts of processing power.
I do development and was able to use the Linux version of 3 (Eclipse-based) in VirtualBox on my Mac. It was a bit clunky at times, but I was able to get some solid work done and didn't have to muck with dual-booting. Will you need to crossover between operating systems? This is my primary annoyance with dual-booting. When I develop something in one system, I often want to use it on the other, and have to reboot. Synchronizing two different operating systems on the same hardware is not terribly fun; I could try and mount the drives in each OS, but I've never had good luck with that. How hefty of a Linux environment do you need?
If you're only going to be using Emacs/Vim for development, can you forgo the X server and just install a terminal-based version of Ubuntu in a VM? Do you need your systems resources to be primarily focused on desktop management? If so, installing on a separate partition (or another hard disk drive, as others have mentioned) will likely be the better option. How concerned/prepared are you with/for system maintenance? When I first installed Ubuntu on my Mac (9.04, I believe), I regularly experienced wireless and video issues after kernel updates.
Most of the time, these were easily resolved; other times, it was a big pain. I eventually moved to Sabayon because it seemed to support the hardware better than Ubuntu (I was shocked, believe me), but I still have instances where I have to fix my wireless drivers.
It's not a big pain, IMHO, but it's still wasted time. Anyway, to sum up, here's what I would suggest: If your project won't consume a terrible amount of resources (e.g.
Large compilation tasks) and doesn't necessarily need a hefty display environment, consider a VM. I really like VirtualBox, but there are other options, of course. This also reduces your need for system administration should a distribution update break compatibility with your hardware, and allows you to stay with in Mac OS X. If your project will need to consume many resources, requires a hefty desktop environment (e.g. Development:), and needs free reign on your hardware, install it in a separate partition and use.
As others have mentioned: make sure you install your boot-loader on the same partition as your Linux distribution; doing otherwise risks blowing away Mac OS X (which I learned the hard way:) One other note, if you pick a VM environment: if you need a desktop environment, consider something lighter than Gnome/KDE. I used when developing in a VM and it worked very well.