Ugly Phone Pix of rEFIt boot menu and Windows, OS X, and KDE.

My Experiences Installing Windows XP and Slackware 12.0 Linux on my Macbook Pro 17”.


Mickey Dustspeck

February 6, 2008 ( version 0.0 )


This narrative is about getting the “Triple Boot” Scenario working on a MacBook Pro 17” which was purchased in January 2008. I did not use Apple Bootcamp, which was problematic for several reasons.

Among the pages I have found useful in this effort are:


“Triple Boot via BootCamp”


This page is a very good tutorial for doing exactly what I did here, except that they use different distributions of Linux, and there is a small out-datedness, in the use of the Mac OS X “diskutil” command. It doesn't really use BootCamp.


“Slipstreaming Windows XP with Service Pack 2 (SP2)”


Useful and informative, except that the following link is more thorough.

Value of this page for me is that the Nero procedure worked, whereas the following page used something else to burn the CD.


"Automatically Slipstream Windows XP with SP2 and All Post-SP2 Security

Hotfixes with a Single Command"


This guy (ross) maintains a batch file which will download Windows XP SP2 and a whole wad of patches, and then make a set of files for an up-to-date Windows install CD from it.


“Gnome Partition Editor”


I always keep this in the drawer anyways, but it’s particularly useful in this effort, although you can’t use it indiscriminately. It’s like a free sort of “Partition Magic” sort of thing.




In January 2008, I bought a new Macbook Pro 17". The original reason to move to an Intel Mac was that I had a need to support Mac users in various projects. I wanted to run Mac OS X, Windows Vista, Windows XP, and Linux with KDE, since, after the move to Intel architecture, everybody knows that Mac is the open platform that welcomes all operating systems, right? As it turns out, no…


The principle set of obstacles tend to come from the use of the GPT/EFI disk partitioning by Mac OS X Leopard on the Macbook, which is different from practically every other OS deployed anywhere, although it’s not really an Apple thing, GPT/EFI is problematic since there are many disk tools that don’t work with it, and others seem to work in varying degrees.


About BootCamp (which I did not use): Of course Apple's concept named "Bootcamp" isn't really software or a suite of software, or a coherent concept, really. It's just the name that Apple places on anything that Apple has done with regard to installing Windows on an Intel Mac. The original version was "Beta" which was downloadable in about 2006/2007, and the newest version is "incuded with Leopard" which is included with Leopard (Mac OSX.5). With Beta, you had to download the Bootcamp package from Apple, and then use it to make a driver disk, which you would hand to Windows. Now, one uses one's Leopard install disk #1, which apparently has drivers for Intel Macs on there.


I ran into two documentation incompatibility issues during my install process, the first being that all of the available documentation that I could find on line applied to the BootCamp Beta download, and the other being that OS X Leopard “diskutil” no longer allows one to specify “Linux” as a partition type. (I suspect it never did; I think that it now will not allow unknown partition types, whereas in the past, it did allow them.)


Also notable is that you no longer need to run BootCamp to create a driver disk for Windows. If you got Leopard DVDs with your Mac, you use Disk 1 as a Windows driver installer. Therefore, BootCamp is not used at all in this procedure, where it was used in the reference page only to generate the driver disk.


One note of caution (or anti-caution?) – if something doesn’t boot on the first try, don’t get all panicky and short of breath, it may very well be that you will recover it two steps hence. Keep the faith, to reasonable limits.


Frequently Questioned Answers


Yes, I already know about VMware, Parallels, VirtualBox, and the fact that some people like Steve Jobs more than themselves. These things are really outside the scope of today’s discourse.


Monday, Monday


Little did I know what lay in store as I set out to install 4 (yes 4, which expectation was afterward reduced to 3) operating systems on the Macintosh Macbook Pro. I had just spent the weekend running both Windows XP and Mac OS X on the MbP over the weekend, and things were mostly good. I had installed Windows with Apple’s prescribed “BootCamp” procedure.


Despite all the rhetoric out there in the trenches, the two operating systems are pretty much the same thing. I have spent significant time working with both and I prefer neither. Often, when working in one, I forget what OS I am in.


During that halcyon weekend, I also did some reading about the process of adding a third system, and things didn’t look too promising. Specifically, I had spent a lot of time on the “Triple Boot via BootCamp” page, which actually bypasses BootCamp’s partitioning. What seemed clear was that I needed to go back to square one, and do the procedure from scratch.


Square #1


In order to normalize things, I had to delete the Windows partition, resize the Mac OS X partition back to cover the whole disk, and then begin the procedure. Of course, I actually went through the install process about half a dozen times, and did this various ways, but I think that the best way is with Gparted. Ostensibly, one could do it with the “gpt” command line utility, but when I tried that, it complained about some thing or other that needed to be fixed on each partition before I deleted it. Gparted just deleted it.


After deleting the Windows (an or Linux or other) partition, I booted OS X and used


“diskutil resizeVolume /dev/<device> <maxsize>”


to make the OS X HFS partition fill the entire disk again. The original partition, fresh from Apple, on my 250 GB hard drive was 232.6 GB, as reported by “diskutil list” at the command line. In my subsequent tries to restore it, I always got it up to 232.something, which seemed to be close enough.



Obstacle #1


Then, following the instructions further, I used diskutil to resize the HFS (Mac OS X) partition, and make two partitions which would hold Linux and Windows.


But this happened:


bash-3.2# diskutil resizeVolume /dev/disk0s2 77G "Linux" Linux 77G "MS-DOS FAT32" Windows 78G


Linux does not appear to be a valid file system format

Valid filesystems: "Journaled HFS+" "HFS+" "Case-sensitive HFS+" "Case-sensitive Journaled HFS+" "HFS" "MS-DOS FAT16" "MS-DOS FAT32" "MS-DOS FAT12" "MS-DOS" "UDF" "UFS" "ZFS"


Which raised the questions, “If I can’t specify Linux here, when can I specify it?” and, “What partition type should I specify here to have a salvageable scenario later?”


The answer, or rather an answer turns out to be: “not MS-DOS FAT32”. If you specify a partition that Windows XP would consider installing into, then you dare not specify it here. This is because Windows will want to install to it. After the approximately 24 hours that it took me to figure that out, I ended up using “UFS” here so that Windows would ignore it. Mac OS picked it up and in fact showed it on the desktop as a usable drive, but not later after I changed the type.




The installation of rEFIt went OK, although after running the auto-installer, I still had to go back and run the manual enabler to get it going. It is installed in the root of your Mac OS X partition, and then “blessed” with the “bless” command so that it becomes the primary boot thingy, and also allows for the syncing of the GPT/EFI tables with the MBR tables. MBR is the sort of partition tables used by most machines until now, GPT/EFI is the scheme now used by OS X, and one feature of GPT/EFI is the existence of an MBR for compatibility’s sake.


rEFIt manages the syncing of the GPT with the MBR, which is critical to the process. Just keep in mind that if your booting on some OS on some partition stops working at some point, power off (hold the power button down until the machine goes dark) and then when rEFIt pops up, right-arrow over to the “Start Partitioning Tool” icon and hit enter/return. It will then show you a comparison of the GPT partition table and offer to sync them if they don’t match. If they don’t match, you probably should sync them. I have seen some docs that use rEFIt to do something and then there’s a state where you’re maintaining a fragile balance by avoiding syncing GPT to MBR, but I am not aware that this is the case in this scenario.


Selecting the “Partitioning Tool”

What happens


Something rEFIt could really use, especially when working with Apple hardware (of course, that’s probably the bulk of rEFIt’s use), is a CD eject button. I must have started OS X or Windows a dozen times just to eject a disk.


The Windows XP install


Using my slipstreamed Windows XP SP2 install disk, and my license key, I easily installed windows on partition 4. There are various references that stated that Windows must be in the last partition on the drive, which may or may not be accurate when one doesn’t install with BootCamp. I did it anyways, as finding out it was still critical might cost another day, or two.


When Windows XP Setup gets to the drive partitioning step, look carefully at what it’s offering you. At various times during various iterations, I had it trying to install on partition #1, which is the Mac service partition, or on some general-idea of the disk-at-large partition, or something. Stare at the blue and white screen that asks you to select a partition to install Windows onto, until you have established that it does appear to be the partition that you intend to install Windows onto – same size, position, etc. If it isn’t it, do over from some previous step. One quirk of the disk data that’s displayed that seems to be Ok – for instance on my machine I was installing Windows on partition 4, which was lettered as C: in the list, and it said that it was a 78 GB partition on a 230 MB disk. This is, of course not possible, and it seemed to be using the size of partition #1 (the Mac service partition). I ignored this quirk and everything turned out OK, so far.


After the first iteration, I stopped doing the Windows install follow through immediately, that is, instead of doing the driver installs and Windows updates, I simply installed and continued on to Linux, so I could do less wasted work if I ended up starting over, again.

DO NOT PANIC, as I said. My Windows partition stopped being bootable in the process somewhere. I knew that when I installed Linux, that LILO would offer to boot Windows for me, and I didn’t worry about it. As it turned out, when LILO was installed, it offered Windows, and then booted it, after which Windows also booted OK from rEFIt, and has worked since. Actually, I also booted Gparted and set the bootable flag on the Windows partition, which did not initially help.


Slackware 12.0 Linux


For those of you who thought Linux was an operating system invented by Red Hat Corporation, what the heck are you doing on this page? Ha, OK, I’ll continue. I use Slackware, the oldest surviving Linux distribution, because it has what I need, and I have worked with every conceivable flavor of Unix at some point during the last 25 years. I don’t want pretty little widgets to configure network interfaces for me, because I have known what to type in any of the various flavors of the “ifconfig” command for many years. It also, to borrow the Apple (inaccurate) marketing slogan, “just works”. It is probable that my journey is pertinent to other common distributions, especially if they install LILO, but there may be differences. I don’t know what challenges there may be in using distros that install GRUB, maybe some, maybe none.


In order to get Slackware installed, I did the aforementioned fiddling which netted me a UFS partition, used Gparted to change the type, and then to format it as ext2. I don’t use journaling file systems because of the Jack Audio Server, which doesn’t like journals. When I choose a journaling FS these days, I use ext3. For a while Patrick V, the shepherd of Slackware, preferred ReiserFS, but has recently moved to ext3.


There are things you can do in Gparted, and things you can’t do in Gparted. Actually, you can do darned near everything in Gparted, but some of it won’t work with the Macbook Pro OS X Leopard GPT environment. Three things you can do, apparently, and get away with it, are 1) change flags (like the bootable flag), 2) change types (like changing from UFS to ext2), and 3) create file systems (format).


When I booted the Slackware 12.0 DVD (use >= Slackware 12.0, if you possibly can – there are significant upgrades from 11.0) I chose the default boot, went on to check the disk from the Linux perspective. Slackware offers two (at least) partition editors, fdisk and cfdisk. Friendlier cfdisk doesn’t work with the GPT/fake-MBR environment, and etc. Fdisk works better. Since the disk is a SCSI emulated SATA drive, it shows up at /dev/sda, and the Linux partition is /dev/sda3.


Typically, at about this point, in most Linux installations, I would add a swap partition and the installer would set it up, but there’s a problem. With the Mac service partition, the Mac OS X partition, the Linux partition and the Windows partition, we’ve reached the 4 total configurable primary partitions for the drive. There aren’t any more. Of course, you can do extended partitions, and place two pieces on a primary, but again, I’m not looking forward to reinstalling one more time – maybe another day. The solution to the swap problem is to create files on the Linux drive (with the “dd” program) and make them into swap files with the “mkswap” program. Look for the “mkswap” man page, either on the net, or on an already installed Linux machine for details.


But before you can make swap files, you need to prepare the “target” partition as Slackware calls it. Run the setup program, ignore the “set up your swap partitions” item, begin instead with “set up target partitions” (or whatever it’s called), and follow through with the package installs. I usually just unselect Gnu Emacs, Tex, and text games, and let the rest install fully, by choosing “full install” in the next screen.


I installed LILO in the root partition’s (my /dev/sda3) superblock, not the MBR. When asked to set a console resolution, I always select the top-most “standard console” (or something like that), because, it just works. Who really needs a 1920 x 1280 console, anyways?


After the install, you can set up swap files, this time I just change to directory /mnt, which is where Slackware setup had mounted my new root drive, and made four each 2 GB files with dd. I set up each with a “/sbin/swapon /<filename>” statement in /mnt/etc/rc.d/rc.local. Unfortunately, I forgot to mkswap them, but the after install boot worked OK anyways. If you start up your system with no swap, you will not immediately have trouble, until you do something heavy. On the initial boot after a fresh install, you’ve got time to set up swaps. After you have run swapon on your swap files, look at file /proc/swaps to see how things turned out. If it’s empty, things didn’t turn out. If it’s a list of your swaps, things probably turned out OK. After that initial boot, what was in the /mnt/etc/rc.d directory would be in /etc/rc.d (for instance).


After I created a user (adduser), I re-logged in and did “startx” to start up KDE (which I chose from a list of X window managers in the install) and KDE started up, with mouse and everything. Unfortunately, touchpad tapping is enabled, but I am sure that will be relatively easy to change, I did it once before on my late Thinkpad, which uses the same brand of pad as Apple. The screen resolution needs work, but a plain install gets you a usable KDE system.




Gnome Partition Editor is available as a self-contained live CD ISO image, which is only a 50-some megabyte download. I’ve already sprinkled the above narrative with comments on its use, but there are still a couple of comments to make. First, you need a USB mouse handy, as the Gparted live CD didn’t acknowledge the Macbook’s touchpad. I found a nasty old optical USB mouse, and it worked great. I unplugged it as a precaution during the Windows install, lest Windows develop an affinity for it and ignore the touchpad, and in the end both mouses worked fine simultaneously with KDE, Windows and OS X. The other not really very important point is that Gparted offers a boot option which will make ejecting the CD possible. Choosing this option, one line below the default, may save you one of those CD ejection reboots I was talking about.


Attempting to note procedure from memory


Here is what I did, from memory. This is not a published procedure, because I am not doing it as I type, it’s just the shadow of an actual procedure.


1)       Normalize the machine to make OS X fill the whole disk. This step is really only necessary to recover from previous attempts. Reboot once after doing it, just for fun. If your machine is fresh out of the box, with no prior attempts to install Windows or Linux or anything, then skip this.


2)       Do the diskutil resizeVolume step that specifies your new target partitions for Windows and Linux. For the Linux partition, specify type “UFS”.


3)       Download and install rEFIt. You could do it later, but that would be disobedient.


4)       Boot from a Windows XP SP2 installation CD. If your install CD doesn’t have SP2, see the above references for “slipstreaming” a new install CD. This is legal, if your copy is legal. It is in fact a documented Microsoft Admin procedure (need ref).


5)       Install Windows, noting the cautionary note above in the windows section. Manage the fact that rEFIT will auto boot into Mac OS X on the two or three Windows installer reboots. After the first reboot, select Windows from hard drive from within rEFIt, but do not “Hit any key to boot from CD”.


6)       Once Windows XP is installed, reboot into Mac OS X, just for fun, and then reboot to rEFIt and let it check the sync of the GPT to MBR. Reboot into Mac OS X, just for fun.


7)       Boot from the Slackware CD or DVD, hit enter at the syslinux prompt to boot, choose your keymap, login as root, run fdisk /dev/sda to see if the disk looks like you think it should look, and then run setup.


8)       Skip swap setup, choose target partitions, select packages, install everything, etc.


9)       When you exit Slackware setup, the CD or DVD will eject. If it doesn’t, you can do an “eject /dev/hda” (during a regular non-install day, you would type “eject /dev/cdrom” or “eject /dev/dvd”, but the aliases aren’t there in the install environment).


10)    Set up some swap files. I do multiples, because of something I think I may have read once. Follow your conscience.


11)    Eject all CDs and DVDs. If you do not, you may not realize that a boot process is not working because it will boot the CD, and you’ll be confused.


12)    Try booting each OS, in turn. If things get stuck, and don’t seem to be proceeding, hold down the power button for something like 10 seconds, until the machine shuts itself off. You do need to be patient, though sometimes, staring at something makes it take longer.


13)    If the Windows partition complains about no boot disk, power off and boot the Linux choice from rEFIt. When LILO pops up, choose Windows, to see if it works that way.



Get married and have kids. Grow tomatoes, potatoes and chili peppers. Buy a used car, adopt a dog.