Archive for the ‘dual boot’ Category

Quick answer is VirtualBox. Free for personal use, and there is a GPL version. I’m trying out the PUEL version (free to check it out, free for personal use, not free for commercial use ($50)).

Step 1. Download and install the linux host. I’m using 64bit CentOS, linux, and the final download location was

rpm -ivh ./VirtualBox-3.1-3.1.4_57640_rhel5-1.x86_64.rpm

next add your users to the vboxusers group. Wow, seems to be no easy one liner to do that (normally just edit /etc/group). Usermod doesn’t take a group name (only the id), so here is a quick hack for you (group “vboxusers” exists after rpm installation above):

usermod -G `grep vboxusers /etc/group | awk -F: '{print $1}'` cameron

Suggest you just edit /etc/group :).

Now run Applications -> System Tools -> Sun VirtualBox

Click New

Click Next

Enter in a name (I used “windows7”), enter in the Version type (I’m using “Windows 7 (64 bit)”) and hit Next.

Now you need to choose the amount of memory. My machine has 6gig on it, and a quick look on top shows that I’m “only” using 2g. So I set the size to 3gig. My thinking here is that if I have the VM running, I want it to run well, if I need the memory back, I’ll shut down the VM. Click Next.

Now we need to choose a virtual hard disk. I googled around a little to see if I could my existing install, but that doesn’t really seem to be possible. Some information is here:

so I insert my windows 7 cd and hit next. and get a warning about running in 32bit mode… [TODO]

and now a warning about the CD/DVD drive:

There is a reboot during the installation:

Enter your product key. I’m using the one that is already installed on the box. We’ll see how that goes!

Well that went surprisingly well… It’s a shame that you can’t have it run off the same install that I already have (like I will do on my macbook), and perhaps this is not the end of the licensing story.

One thing that I always found annoying was that in Parallels, I would hit Control-Option to get back to the mac, but the parallels screen would stay there (in my case CentOS 64bit). I generally have goo separation of tasks between Mac and CentOS, so when I switch, I want all of the Parallels windows to go away. Turns out the solution is really easy: Apple Spaces. This post describes how I set it up.

1. Select Apps -> Utilities

2. Select Spaces

3. The first time a message appears saying that Spaces is not setup. Click “Set Up Spaces”.

4. Next check “Enable Spaces”, check “Show Spaces in menu bar”.  Next, I really just wanted two screens so that I can easily toggle between them, so I hit – on  Rows (Whoops, I highlighted the wrong one 🙂 ). Then click the “+” to add an application, and choose Other…

5. Click on Parallels Desktop, and click “Add”.

Next I clicked just to the right of Parallels Desktop, and changed the space to Space 2. And I wanted to use the “alt” key (the option key), to do the switching, so I changed “To switch between spaces:” and “To switch directly to a space” to use the alt key (see picture).

So now when I want to switch between CentOS and mac, I use the arrow keys “Alt-Right” and “Alt-Left”.

So much better now.


After some significant pain, I setup linux dual boot for the mac, but what I really want is to sometimes boot into linux, and sometimes just access the linux from my macos.  So you think no worries, Parallels supports Boot Camp, just use that. Wrong.  For Parallels to use a file system it needs to be mountable by the mac. CentOS uses ext3, and by default the mac doesn’t support ext2/ext3.  So

  • Step 1. Install CentOS using Boot Camp.  (see here…) TODO
  • Step 2. Reboot into MacOS, and install Mac Fuse
  • Step 3. Install fuse-ext2 (see Mount Ext2/Ext3 file system from a mac)
  • Step 4. Create a new Parallels install using the custom settings and boot camp partition. Here are the step-by-step screen shots.

Create New Virtual Machine

Choose Boot Camp Partition, click Continue

Select Version: More Linux -> CentOS Linux

Click Continue

Virutal Machine Type: Click Custom

CPU and Memory Options: I like 1G of main memory, click continue

Hard Disk Options: choose Boot Camp Partition, click Continue

I only have one disk, but pick the right one, click Continue

I like Shared Networking (Recommended), click Continue

Optimize for Virtual machine (Recommended) seems like a good choice, after all if you want to optimize for the mac, then don’t run the virtual machine.  You can always change this later.

Pick a name and a location for the Virtual machine, click Create.

When you start up the vm .. done

And soon enough you see the CentOS linux running inside my mac.

I needed to mount an ext3 file system which is on my dual boot mac (I’m doing that to allow parallels to run from “boot camp”). So my idea is to just mount the drive.  To do that:

  • I installed macfuse, then fuse-ext2 from:

Once downloaded and extracted, then

cd fuse-ext2-0.0.7
sudo make install
mkdir -p /mnt/sda3
fuse-ext2 /dev/sda3 /mnt/sda3

Segmentation fault

damn, there is a bug in fuse-ext2.c, first line! edit fuse-ext2/fuse-ext2.c, comment out this (line 324)

//debugf("version:'%s', fuse_version...

And I see there is a file, so lets do this instead:

make distclean
sh ./

then double click on the installer from the finder: fuse-ext2-0.0.7.dmg

sudo fuse-ext2 /dev/disk0s3 /mnt/sda3
cd /mnt/sda3


Note that it is mounted as ext2 (and ext3 is backward compatible with ext2), and the net effect is that you lose the journal.  That sounds bad I hear the non-techies (and some techies) say. Well, the best thing about ext3 is the journal, and what it does is provide a fast way to recover the file system if (and when) it is not shut down cleanly (like power out). The downside of not having the journal is that after an unclean shutdown, it can take a while to go through all the files and make the file system clean again.

I want to get linux running natively, as well as from parallels. So the first step is to install linux direct to the hard drive. This one would think is straight forward, but the grub bootloader fails with CentOS install (silently) so you have to go back in and do this yourself.

The Setup:

  • on a 15″ 2.8Ghz MacBook Pro that I bought in late 2009 (from HongKong if it matters).
  • 4G of memory (2x2G)
  • 320G, 7200 RPM drive.
  • MacOS 10.6.2,
  • Parallels 5.0 build 9310
  • BootCamp 3.0.1 (uh oh, maybe that was a source of problems .. 3.1 is available)
  • Install MacFuse and fuse-ext. This will save you a lot of pain.
  • Partition your drive. Strangely, just don’t use BootCamp, use disk util.
  • Parition your drive. Strangely, just don’t use BootCamp, there is no need.

Using diskutil to partition:

This is certainly the recommended way.  You can resize, and repartition all in the one go.

diskutil blah blah .. TODO

Using Bootcamp to partition:

  • applications -> utilities -> boot camp assistant, click continue

insert pic

  • drag size to be 200GB for windows .. 97 gb for windows, click partition

insert pic

  • If you have problems partitioning, kill the parallels processes (which are prl_.. and prl_…)
  • Click Quit and Install Later

Now for the CentOS install.

  • put centos 5.4 CD into the drive and reboot (apple -> Restart…)
  • hold down the ‘c’ key. This will boot from the CD.
  • hit Enter – (see other article on the CentOS setup)
  • When you get to the partitioning part, chose a custom layout.  You don’t need a swap (although you can have one). You just need /. Which is what I did.
  • Delete the /dev/sda3 vfat parttion  (click on it, then click delete, then click delete)
  • Click “New”
  • Set the mount point to /
  • Set the size to maximum allowable size (or pick a size)
  • Click OK
  • Click Next
  • ignore swap partition (click yes).
  • You can install the bootloaded on sda3 if you want, but it’s going to fail anyway. So pick no bootloader.
  • Click Next (install takes 12-15 minutes once started on my 320Gb 7200 pm drive).
  • click reboot after CD comes out.
    • hmm .. again the linux is hung there, so 5 seconds pressing the power button to power it down, then press again to turn it back on.

Now if we reboot into linux (using refit, or holding down the option key on startup), we probably see that it fails with “Can’t find operating system” or similar.  This is because grub failed to install, so we need to reinstall it.

  • Place the CentOS 5.4 CD (mine is 64bit) in to the CD, reboot, and hold down ‘c’.
  • At the prompt type linux rescue.
  • Choose all the default options (no need for network) and finally get to a shell prompt
# chroot /mnt/sysimage
# grub-install /dev/sda3
Installation finished. No error reported.
This is the contents of the device map /boot/grub/
Check if this is corrrect or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(hd0)     /dev/sda

Which was infact correct. I many times did get the error that it couldn’t load the stage1 file.