Installing Ubuntu Hardy Heron on a MacBook

Yes, dear reader, I committed the heresy of purchasing an Apple [[MacBook]]. I obviously didn’t do it for MacOS X, for which I couldn’t care less, but for the hardware, which is quite good. I was looking for a laptop as small as possible, keeping price low (it cost 799 eur), and screen not too small (this one has a 13″ one. Maybe even 12″ is acceptable. 13″ sure is).

You can see some pictures of it at my MacBook gallery.

If you, like me, are used to PCs, then there are a few things to note:

  • It has a different layout in the keyboard. Most prominently, some keys are missing: Del, PgUp, PgDn, Home, End. Some others (Win key, AltGr) have substitutes that can be mapped. Also the equivalent to AltGr and right Ctrl are kind of swapped: the key closest to the SpaceBar is right “cmd” (could be right Ctrl), and the farthest one is left “alt” (could be AltGr)
  • The [[touchpad]] has a single button, and tapping on it won’t click. There is no zone on it to use as vertical scroll, either. Luckily the latter can be fixed via software, so that in Ubuntu the touchpad does behave correctly: you can tap-click, and you can scroll with a smooth movement of a finger. The single-button issue is not present in USB mice: they work “normally”.

I would like to outline here the process of installing Ubuntu (Hardy Heron) in this machine. For that, I recommend reading (as I did), the following links:

Repartition of the hard disk

My Mac came with 120 GB (109 real) of HD, all of it devoted to OS X. Unfortunately, the Ubuntu installer can not cope with resizing of [[HFS Plus|HFS+]] partitions. Fortunately, OS X itself can. You can make use of [[Boot Camp (software)|Boot Camp]] as follows: go to Go->Utilities->Boot Camp Assistant. There you can (should) reduce the existing HFS+ partition to the bare minimum (in my machine it was 22GB, because OSX already uses 17GB, and it won’t accept less than 5GB of free disk). Leave the rest unassigned, and quit.

Installation of multi-boot system

The first hurdle in our Linux installation is that the Mac machines do not have a “normal” [[BIOS]]. The BIOS is important for Linux/Windows installations, so this is a drawback. Macs come with a thingie called [[Extensible Firmware Interface]] (EFI), instead. However, there is a nice little tool called rEFIt that can help us with it.

To install rEFIt, you can follow the instructions at its Sourceforge site. I followed the Automatic Installation with the Installer Package instructions. Basically I downloaded the Mac disk image from the download page, opened in the Mac OSX file browser, double-clicked it to open it, then double-clicked on the rEFIt.mpkg file inside, and followed the instructions.

This will make the rEFIt menu appear in the next reboot, but only if you hold some key while booting (I think it’s “C”). If you want the menu to always appear, do the following in a terminal, inside Mac OSX:

% cd /efi/refit
% ./enable-always.sh

Installation of Linux OS

After doing the above, you should reboot with an Ubuntu installation CD inserted. If the EFI installation was correct, you will be presented with the rEFIt menu, in which you will have two big icons (OSX and the Linux CD), and five small ones below (“Start EFI Shell”, “Start Partitioning Tool”, “About rEFIt”, “Shut down computer” and “Restart computer”).

Use the left-rigth arrow keys to select the Ubuntu CD, and press Enter. At that moment, or after installing Ubuntu (I don’t recall), the computer could complain saying: “No bootable device — insert boot disk and press any key”. If so, reboot and, in the aforementioned rEFIt menu, choose the second small icon, “Start Partitioning Tool”. This tool will prompt you to update the [[Master boot record|MBR]]. Accept, and let it do its magic.

When booting with the CD, you will have the option to make an absolutely normal Ubuntu installation. The Ubuntu MacBook page says that Boot Camp will complain if you make more than two partitions in total. It will, but for me this is ridiculous, since OSX is already eating up one. There’s no way I will install any Linux in a single partition (withouth even swap!). If you do not care about opening Boot Camp ever again (I don’t), do a totally normal install. I created two 8.5GB partitions for / (one for Ubuntu, another one unused for the future), a 750MB swap partition, and the rest (73GB) as /home (potentially shared among the two Linux I could install).

After the installation, reboot and you will find the aforementioned rEFIt menu. Choosing the penguin icon on the right side will take you to the [[GNU GRUB|GRUB]] screen you probably are accustomed to. What this means is that you have to go through two boot menus when booting, but that’s a minor issue, I think. The first menu is an EFI menu, in which you choose OSX or GRUB. The second one is the GRUB menu that lets you choose among different installed kernels.

And I think that’s it…

I will keep on writing when I have time, at least about how to make WiFi work, and also how to configure [[Compiz Fusion]]. Yes, the X3100 graphics chip that the MacBooks carry is blacklisted, as not working with CF. But, believe me, it does work!

6 Comments »

  1. Super Jamie said,

    June 26, 2008 @ 12:51 pm

    Buying a Macbook is not heresy. Whilst a tad overpriced, they’re quite well-designed hardware-wise, and you can get some pretty neat accessories like a SATA HDD bay that replaces the optical drive – giving you a small light laptop with two hard drives!

    Acting like you are superior to other human beings because of the operating system you use, or brand-snobbery, is heresy. And is not something just limited to users of one OS ;)

    Enjoy your Macbook! If I didn’t have my Dell Vostro 1200, I’d probably get an old iBook G4 myself.

  2. isilanes said,

    June 26, 2008 @ 15:18 pm

    Let me disagree. Acting like you’re superior because of the OS you use might be arrogance and ignorance, for example. But definitely not heresy. OTOH, using something else than your OS of choice could be defined as heresy (from your POV). But recall that “heresy” does not imply that the orthodoxy is “better”.

    Also, arrogance is not desirable in general, but this doesn’t mean that the arrogant can not be right. Assuming that would be a strawman argument. I said that I couldn’t care less for Mac OSX, and that’s true. If other people is happy with it, it’s fine with me.

  3. Super Jamie said,

    June 27, 2008 @ 0:07 am

    Given the choice, especially with something as realistically unimportant as a computer operating system, I’d choose to err on the side of humility, than that of arrogance. Though, arrogance can be good in some situations, but we’re getting off-topic.

    I’ve never used OSX, simply because I’ve never had the hardware or the chance to do so. Also, because I just can’t be bothered learning a whole new way of learning to use the computer, when I have no need to.

    From what I’ve seen of friends who have it, it’s just a different way of getting stuff done, not as amazingly rock-solid as all the fanboys would have you believe, and those who use it seem to be quite satisfied with it. If the chance arrives, I’d learn it, if not then I’m more than pleased with Linux at the moment.

    Of course, I’d absolutely love to buy a Macbook, completely wipe Boot Camp, and dual boot Ubuntu and XP on it. Just to make some fanboys rage ;)

  4. isilanes said,

    June 27, 2008 @ 12:48 pm

    Hey, looks like I’m defending being an arrogant SOB! I really think that you can never err on the side of humility, and you can seldom be right by being arrogant. But that’s off-topic.

    I don’t agree with you on your opinion that what computer OS you use is unimportant. Maybe from a (really naive) technical point of view it its, but there are cultural, economic and social components that are important.

    The struggle of the free software movement for a society that relies upon open and free solutions for software and culture is really an important one. We live more and more in a society that is controlled by computers. All information is shared through computerized paths, such as the Internet. Every piece of knowledge, culture and entertainment, such as books, movies and music, is being stored in computer media. An important part of our relationship with others is made through e-mails and the like, and even our relationship with the government or our bank is being increasingly moved to electronic means.

    Our access to all of the above is crucially determined by the software we have available. If we let companies like Microsoft or Apple dominate the software market, they will dictate what format all of our information should be encoded in, and what means we should use to access it. More fundamentally, they could end up deciding (maybe following the government’s orders) what we can read/hear/know, and when. They could force us to pay for unnecessary “upgrades”, to be able to access the very same information we could read the week before. They could choose to show us the “truth” they wanted.

    Not to mention that proprietary software can (and has been proven to, in the past) contain not only unwanted bugs, but even malicious [[Backdoor (computing)|backdoors]] such as those Windows had (has?) so that third parties (such as the [[National Security Agency|NSA]]) can access your computer and all your sensible (and private) data in it.

    And if we wanted to analyze the software tools they are providing us, we could even go to jail for just trying to. We would have to let them abuse us!

    You really deem that unimportant? I don’t.

  5. Kevin Chadwick said,

    November 7, 2009 @ 0:26 am

    In your dual boot system, did you have both systems on the same hard drive and was arch linux installed first (outside of platter) and with the same partition setup and sizes and the same number of programs installed on each, because whilst boot times differing makes sense, the program times should be comparable, they are quicker the second time because the data is already loaded into ram.

  6. isilanes said,

    November 9, 2009 @ 12:41 pm

    This MacBook is not the computer where I installed Arch (you might be referring to this article). That would be my desktop. However, I agree that the comparison between Ubuntu and Arch should be made after some use has been given to them, and the same functionality is working on them. For example, it would not be fair to compare a fairly bare-bones Arch install with an Ubuntu running dozens of daemons, such as an Apache server and so forth.

RSS feed for comments on this post · TrackBack URI

Leave a Comment