Make Ubuntu The Default Boot on a MacBook (rEFIt) Dual-Boot System

By | 2007/05/03

Today has been a personal bug-squashing day for little things related to my MacBook. I am teaching a class this week that calls for quite a bit of lab time from the students so I took the time to look into some of the bugs. The first on the list was activating the keyboard lighting on the macbook, which was simple enough. The second, and basis for this quick tutorial, is setting Ubuntu to be the primary boot within the rEFIt boot loader.

To update your boot loader so that Ubuntu will boot first you’ll need to boot into OS X to edit a config file. (note: I did not try any method of mounting the OS X partition to make the changes, is that possible?).

UPDATE: after typing the above I actually took the time to *try* and it’s already default mounted on my machine. Nothing special there. …what you find when you actually take the time to look huh :).ย  It is mounted read-only however.

Once booted into OS X you’ll want to edit the file “/efi/refit/refit.conf” and update a line near the bottom of the file from:

#legacyfirst

to

legacyfirst

(yes, just uncommenting that line)

At this point the rEFIt boot loader will boot Ubuntu as your primary and OS X as your secondary. I notice the rEFIt config file is oddly similar to a grub.conf. I also update the timeout from 20 to 5. Who wants to wait 20 seconds for it to make a choice? Enjoy.

12 thoughts on “Make Ubuntu The Default Boot on a MacBook (rEFIt) Dual-Boot System

  1. Hans

    You can mount a mac partition rw, if you disable journaling in OS X before booting into linux. Works fine, but it’s a pain to enable/disable journaling all the time, and I prefer to leave journaling on rather than off, when in OS X.

  2. Ubuntu Tutorials

    Hans – so I suppose it’s just as easy to reboot into OS X, update the file and come back because you’d have to go in and out again to turn off journaling anyway.

    Thanks for the tip

  3. dade

    You can throw away refit and use bootcamp. No boring config files and boots faster.

  4. erik

    Or, you can just ditch the fruit os completely and install Ubuntu as the only os. No need for bootcamp, or refit. I did that on my mini and it was wonderful.

  5. John

    I thought the improvements in Feisty eliminated the need for rEFIt. Check with Colin Montgomery on this – he’s been heading this up. Though I much favor Ubuntu over OSX, I see maintaining an OSX partition is useful for a) firmware updates and b) some things run on OSX and not available for Linux.

  6. Ubuntu Tutorials

    erik / John – if either of you have any links to how this can be done I would be very interested in seeing it. When I tried a base Ubuntu installation on this machine (no OSX, bootcamp, rEFIt, etc) the machine would not boot…

  7. peter

    i just got my macbook yesterday ๐Ÿ™‚ followed this guide:

    https://help.ubuntu.com/community/MacBook

    for feisty, and am dual booting osx and ubuntu with bootcamp (no rEFIt…): the apple people in manchester even helped me do it!

    problem is, i don’t know how to make bootcamp boot from the `windows’ (no joke) partition by default… any ideas?

    do you think it’s too late to go with rEFIt now—will it mess up the setup i have now?

  8. Jim Baker

    Will this tutorial work on a Powerbook G3 Pismo?
    Thanks.

  9. Ubuntu Tutorials

    Jim – I don’t know, I don’t have that type of hardware to test. I’d be interested to hear what does/doesn’t work for others in a similar situation but I can only guarantee it works on Feisty, for the C2D macbook.

  10. Gabriel Patiรฑo

    I’ve installed Ubuntu (Feisty) as the only os in a MacBook C2D, and the only problem I have is that it takes some 30 seconds to ‘find’ which device/partition use to boot.

    If I keep the ‘D’ key pressend before turning on the machine, it boots quickly. Maybe I need to mark the partition as bootable but don’t know too much about how efi works…

    Someone could post something about this?

    Thanks

  11. John

    Awesome tutorial. Very helpful. Nice 1 with changing the partition booting sequence and shortening the time-out! (anything to elim mac os and boot into windows and ubuntu faster!)

  12. James R

    @erik
    And I did that, but I could never get it to boot back to Mac OS X ever again ๐Ÿ™
    Even if I remove the HD out of my Imac and reformat it, it still won;t boot to OSX DVD ๐Ÿ™
    Any idea what I can do Guys ?

Comments are closed.