My MintBook/MacBook Pro success

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Level 1
Level 1
Posts: 4
Joined: Sun Aug 16, 2009 5:38 pm

My MintBook/MacBook Pro success

Postby Lilt » Mon Aug 17, 2009 8:55 am

Okay, I now have Linux Mint working just great on my new MacBook Pro. I was surprised at how easy it was, but I did manage to screw-up my first install so I thought I'd share my experience here for other people who are trying to do the same thing I am.

My system is a MacBookPro5,2. I've set-up a triple-boot using rEFIt, booting into OSX, Windows, and Linux Mint.There are many guides for this online, so I'm not going to describe how to do it fully, but some of the guides didn't quite work for me so I thought I'd post my workarounds here.

  • Install Windows using Bootcamp (Pretty easy, I think all the guides have it)
  • Install rEFIt and enable it (A functional and powerful bootloader)
  • Use Disk Utility to shrink your OS X partition.
    Note: I found it crashed if I attempted to create a new partition in the empty space at the same time.
    My partition table was unharmed, but for peace of mind's sake I'd just re-size at this stage and use Linux to create its own partition
  • Boot from the Linux Mint CD (All boots fine, it even has wireless support!)
  • I used custom partitioning to create a single file-system in the free space, later creating a swap file under Linux.
    I think the default is to install into the free space and take some of the space from windows to create a swap partition. Some of the guides advised me I had to keep Windows as the last partition on the drive to ensure it was Bootcamp compatible, and some said rEFIt made it fine. I don't know, but I hear Swap Files work fine under Linux nowadays, so I decided to keep my partition table simple and use a swap file.

Now Linux Mint has installed, it should be fairly usable. Note that you'll still need to install a few specifics, for the multitouch gestures, sound, and so on. Note that one stage involves downloading some source and applying a patch, so just to be sure you don't miss a step (as I did the first time, just copying and pasting lines without checking they ran properly :oops: ) be sure to run:

Code: Select all

sudo apt-get install patch

So, what specifics to install? Well, I found that 80% of the Ubuntu MacBookPro 5,1 + 5,2 guide here was applicable. Do note, however:
  • That guide is for 5,1 and 5,2 models, Ubuntu has other guides for different models here.
  • I didn't need the "Kernel Boot" section (Linux Mint does use a kernel that can boot out of the box)
  • The trackpad section suggests adding a blacklist for "usbhid". I found this to work the first time, but not after my second boot, so I used Todd's alternate solution, adding the following before the 'exit 0' line in /etc/rc.local

    Code: Select all

    rmmod bcm5974 && rmmod usbhid && modprobe bcm5974 ; modprobe usbhid
  • For sound, it's important to note switching to 6-channels in alsamixer. (alsamixer in console, right until you get to Channel Mode, up arrow to set to 6 from 2)
  • As I used rEFIt, I didn't need to use elilo or grub2.

Once I'd done all of the steps on the guide, rebooting as instructed, I found that everything was working perfectly (IMHO). Compiz is great, although I turn it off when I'm not connected to a power source to save the laptop from powering-up the second GPU and toasting my knees. I even boot into Linux Mint in preference over OS X for web browsing if I have no external mouse, as I prefer being able to do a 3-finger middle-click to open a new tab to having to use option-click.

So, all in all, I'm pretty happy with my MintBook :mrgreen: . I can happily declare this my best ever Linux experience, having probably done more than 20 installs in my time. I would highly recommend Linux Mint to anyone wondering which Distro to get, for MacBook or otherwise.
Last edited by Lilt on Tue Aug 25, 2009 5:12 pm, edited 1 time in total.

User avatar
Level 7
Level 7
Posts: 1880
Joined: Wed Jun 17, 2009 7:38 pm
Location: an island in the Pacific...

Re: My MintBook/MacBook Pro success

Postby lagagnon » Mon Aug 17, 2009 12:17 pm

Thanks for your excellent contribution to the community, it makes a great change to see a really useful post such as yours, rather than the couple of trolls we have had recently consuming everyone's time and effort ;-)

Level 1
Level 1
Posts: 4
Joined: Sun Aug 16, 2009 5:38 pm

Virtualbox-ed my existing Bootcamp windows install

Postby Lilt » Wed Aug 19, 2009 9:08 am

Got my second major success working late last night: (IE: Early this morning :wink: )

I Virtualbox-ed my existing Bootcamp windows install!

I can boot it either in Virtualbox or from the disk, all settings and changes remain consistent. I'm still having one problem, which is that I can't get the GRUB ISO bootloader method working (I suspect I'll have to re-visit the guide above for elilo or similar), but if I boot drives 4 and 3 (Linux and Windows respectively) then I can use my existing install of grub to boot windows. This is a bit dangerous (It opens the possibility of booting the same operating system twice from the same disk, which can seriously corrupt data) but hey: If it works in a dangerous way then at-least it's not broken and you can still fix it :D

So. How did I do it? Well, I followed the guide for Ubuntu here, but have a few provisos I thought I'd share with you all again.
First-off, however:
Setup the jaunty repositories for virtualbox, add the Sun public key, and install the latest version of virtualbox (3.0)

You may want to register for the ubuntu forums and/or log-in. Some of the settings are listed in images which can only be seen if you're logged in, but as it looks different on virtualbox 3.0, you're possibly best to use it as a guideline.
Going step-by-step:
  1. Didn't work for me, maybe you'll have more luck. I needed to modify step 2 to -partitions 3,4. I'll hopefully have a fix for this up tomorrow.
  2. The usermod command was missed-out by one walkthrough I tried first, don't forget to add yourself to the disk and vboxusers groups, trying to do it without this is a lot harder.
    If you've set it up like I have, you'll want to change "-partitions 2" to "-partitions 3"
  3. Step 3 didn't really do it for me. I removed everything and it still wouldn't boot into the virtual machine after step 4. I don't know if this had any effect, the most important difference, for me, was the tweak I made in step 4.
  4. In this step, I modified the settings as best as I could to reflect those in the image. Enabling ACPI and IO APIC, disabling VT-x/AMD-V and PAE/NX.
    After disabling /everything/ in step 3 and making these changes, it still didn't work for me.
    What did make it work for me, however, was changing the IDE controler from the default to ICH6
  5. After I chnaged IDE controllers, I could boot into the virtual machine A-OK.
  6. This step has made some people's installs unbootable, but I found it worked fine... Proceed at your own risk.
    I rebooted into windows and installed the virtualbox drivers there. The version of the guest additions included in that walkthrough is an old one, so I'd advise searching in synaptic for the guest additions and installing them. The .iso should appear in /usr/share/virtualbox (which isn't where the manual says it will appear!)
  7. I didn't need to do this step, as my install of windows found the network driver.

Level 1
Level 1
Posts: 4
Joined: Sun Aug 16, 2009 5:38 pm

Re: My MintBook/MacBook Pro success

Postby Lilt » Fri Aug 21, 2009 9:10 pm

Okay. After reading more into EFI/GPT, hybrid GPT/MBR setups, and more about the capabilities of rEFIt, I decided to be a little more adventurous with my setup. This page, on GPT fdisk, was very useful in educating me in the ways of GPT. I'll try and condense things down for you all:
  • GPT, a subset of EFI, is a replacement for the soon-to-be-outdated MBR partition table
  • GPT will probably eventually become the standard, as MBR can't address more than 2TB.
  • Following the standard, It can support up-to 128 partitions.
  • Apple's OSX is EFI/GPT capable, as is Linux (albeit with one quirk).
  • Windows, however, must be booted from an MBR partition
  • The GPT standard, however, is incompatible with using MBR partitions on a disk.
  • It does, however, leave an MBR on the disk so that non-GPT partitioning utilities know not to mess with the space.
  • It is possible to go against the standard, and point the possible 4 MBR partitions at areas on the disk which contain GPT partitions, creating a hybrid.
  • The problem is, however, that because it's not standardized everyone does it differently.
  • Also, GPT is 100% incompatible with extended partitions, so you can't create a hybrid with extended partitions.

So, can I get it to do what I want? And if so, how?
  • Yes, You can probably get a hybrid setup to do what you want. See the bottom of this page for quirks you'll want to avoid. In brief:
    • Windows needs to be allocated as a primary partition
    • OSX has a good handle on the whole GPT thing, but loses it when there are multiple protective GPT partitions.
    • I'd also like to note that I've found the Disk Utility (at-least the GUI version) that came with OSX to be lacking in several ways. I unwisely went back to it and it wiped my partition 4 and took a chunk out of partition 3 the size of partition 4 when I used it to resize partition 2.
    • Linux gets the point as long as there's one GPT partition somewhere in the first 4.
  • When partitioning a hybrid setup, you need to be careful which partition table you're using. If you update one and not another, you can quite easily lose data.
  • Bootcamp notably alters both the GPT and MBR records. This makes it a nice good choice for the initial resize of your HFS+ disk, as then you know you'll be able to see the partition when you make more sub-partitions.
  • Windows, when it sees a hybrid MBR, assumes it's dealing with an MBR disk and so writes/reads to/from from the MBR.
  • When Linux, or gparted in any case, sees a GPT disk it only writes/reads to/from the GPT.
  • It's possible to synchronize your MBR and GPT using gptsync in rEFIt, see here for details.

That's a lot of facts. What about a how-to?
Okay. Multi-booting a mac in 7 easy(ish) steps, assuming a 'virgin' install of OSX.
  1. Open the Bootcamp assistant (Finder -> Applications -> Utilities -> Boot Camp Assistant)
  2. Allocate a BIG chunk to windows on partition 3, enough for windows and all of the other partitions you want to make (resizing HFS+ is a pain, best to do it in one step)
  3. Install Windows completely
  4. Install the Bootcamp drivers using your leopard disc (or download them and burn to a disk)
  5. Boot back into OSX and install & enable rEFIt (you'll need to run /efi/ from the console to enable it). Note that if you shrink the Bootcamp and add partitions after it then Bootcamp will stop being able to boot Windows, but rEFIt will still be able to boot to windows, and you'll always be be able to boot OSX.
  6. Insert your favorite Linux distro CD (Linux Mint is still one of my best Linux experiences to date. I am now testing the 64-bit version, working fine so far) and use the installer to shrink windows and repartition (I added another 4 partitions, taking my total to 7, for checking out Distros and other OSes with. I still have the 4th primary partition which I could put another version of a GPT-lacking OS on (Windows) if I so desire).
  7. Before you boot into windows, you'll probably want to run gptsync from rEFIt. This is because the install tool modified the GPT tables but windows reads the MBR. I tested without it, and windows was OK (it ran a chkdisk, rebooted, and everything was fine), but it's still probably unwise.
This probably isn't the best system, it means that if you point an uneducated (non-gpt) partitioning tool at the drive then it'll see a big open space where there should be a protective partition. The GPT fdisk guide suggests putting all GPT partitions together at the start of the disk, and I think this makes sense given that OSX falls over if there's more than one GPT partition on a disk. I wanted the numbers to all be in order on the disk, however, as I think the 1,2,4,3 order I had before was what caused the Mac Disk Utility to break my original setup.

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 4 guests