|I purchased a 2Ghz MacBook Pro with 1GB RAM and 100GB hard drive at the beginning of April 2006. I used Linux as the primary OS for a while, and have recorded some of my experiences here. I am not updating this site, so it will become out of date.Please see http://www.sourcepoint.com.au/macintoo/forum for discussion about running linux on macbook pros.|
My email address is email@example.com and I welcome any comments about this website. I've made this as a hopefully-useful supplement to the excellent Wiki http://www.mactel-linux.org. The current website has the potential advantage that it's simpler to read than a Wiki, and the presentation is possibly more coherent.
I upgraded to kernel 188.8.131.52; here are the files I gathered from around the internet for this upgraded.
This website is mainly based on things I learned from http://www.mactel-linux.org, in particular, the (greatly appreciated!) hard work of Edgar Hucek (especially on kernel hacking). If you are considering using Linux on a MacBook Pro, you should definitely visit the above site and the user mailing list and developer mail list archives, and the sites linked to from them. This site on the Macbook (not pro) is very nice. Also this posting is very useful.
Windows XP?: I'm not running Windows XP on this computer. If you want to, you might find Apple's Boot Camp very interesting. Warning -- everything described on my web page here assumes you have not used Boot Camp to do anything; indeed, I wrote most of this before Boot Camp was released.
Warning: Note that you probably shouldn't exactly follow my instructions. They were written pre-bootcamp. There is a new proprietary fast graphics driver for the video card, but it only works if you setup your system using bootcamp (to enable BIOS emulation). Similar remarks apply to the new code that somebody wrote for adjusting the brightness.
NEW: I reconfigured my laptop to tri boot OS X/ XP / Linux. This was the only way I could find to have both OS X and Linux and get legacy BIOS emulation, so that I could get accelerated 3d graphics, etc. I took rough notes which you can find here.
This is the output of parted on my computer after I got everything setup nicely.
root@sha:/home/was/computer/macbook# parted /dev/sda GNU Parted 1.7.0rc1 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Disk /dev/sda: 100GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 20.5kB 210MB 210MB fat32 primary boot 2 210MB 21.6GB 21.3GB hfs+ primary 3 21.6GB 27.0GB 5450MB hfsx primary 4 27.0GB 29.0GB 2000MB linux-swap primary 5 29.0GB 100GB 71.0GB ext3 primary
$ mkfs.ext3 /dev/sda5 $ mount /dev/sda5 /mnt $ cd / $ time cp -arv bin data etc lib media opt sbin srv tmp var boot dev \ home root share usrThis will take a while and copies everything except the /proc and /sys filesystems, which are specially mounted by the kernel (and it makes no sense to copy them over). (If somebody does this, please email me with how long it took, since it should be the same for everyone.)
(From Nathalie Casati) Just to say I followed your howto to install linux on a macbook pro. Here are my results for point 5 : real 2m57.428s user 0m0.236s sys 2m34.002s
$ mkdir /mnt/share $ mkswap /dev/sda4then edit /mnt/etc/fstab so it looks as follows:
# /etc/fstab: static file system information. # $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $ # # noatime turns off atimes for increased performance (atimes normally aren't # needed; notail increases performance of ReiserFS (at the expense of storage # efficiency). It's safe to drop the noatime options if you want and to # switch between notail and tail freely. /dev/sda5 / ext3 defaults 0 1 /dev/sda4 none swap sw 0 0 /dev/sda2 /osx hfsplus auto,ro 0 0 /dev/sda3 /share hfsplus rw,users 0 0 #/dev/loop/0 / squashfs ro 0 0 #/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 #/dev/fd0 /mnt/floppy auto noauto 0 0
$ cd /Volumes/osx $ sudo bless --folder . --file refit.efi --setBoot --labelfile refit.voliconAlso, create a directory /Volumes/osx/Linux by copying the directory /efi/elilo from the Linux live boot CD. IMPORTANT! You must edit /Volumes/osx/Linux/elilo.conf or Linux won't be able to mount the root device when it boots up. In particular, you must have root=/dev/sda5 in your kernel append options (or /dev/sdax for approproriate x if you set things up differently than I did). Also, you can safely delete the initrd's, which are only needed for the live boot CD (as far as I can tell). But if you do that make sure not to list them in elilo.conf.
cd linux-184.108.40.206 patch -p1 < path-to-the-patch/imac-2.6.16.patch
make -j4 make install make -j4 modules make modules_install
image=vmlinuz-220.127.116.11 label=l description="Custom Linux 18.104.22.168" append="video=imacfb:i17 root=/dev/sda5 acpi=force libata.atapi_enabled=1 gpt"
Obviously, I would be very happy if somebody figures out how to control the screen brightness directly in Linux! This would also be very good for improving battery life.
NewThere is now a new program that can be used to adjust the backlight.
I highly recommend using only a small HFS+ partition for sharing files. There seems to currently (as of 2006-04-03) be no robust trustworthy file system that is supported by both Intel OS X and Linux 22.214.171.124, except FAT32, which doesn't support symlinks, users, etc. Since your personal data is probably extremely important, keep it in an ext3 partition.
keycode 115 = Alt_L keycode 116 = Alt_RYou then have to run
xmodmap $HOME/.xmodmapto make this take effect. (You should add this somewhere that is run when you start X windows. What's a good place??)
NOTE: For some reason in KDE alt-tab works differently if I use the apple key instead of the actual alt(/option) key. I don't understand why. By differently, I mean that with the apple key alt-tab automatically switches to the last window, whereas with the alt(/option) key I get a list of windows and can page through them. Fortunately, Itai Seggev told me that the following more complicated xmodmap file does works perfectly for me. I've also put some bindings so function keys work.
clear mod1 clear mod4 keycode 64 = Alt_L ! Set Enter to switch langujage group while depressed keycode 108 = Mode_switch ! Turn Command into Alt and Meta. keycode 115 = Alt_L Meta_L ! set modifier keys add mod1 = Alt_L Meta_L keycode 101 = F1 keycode 212 = F2 keycode 160 = F3 keycode 174 = F4 keycode 176 = F5 keycode 214 = F7 keycode 215 = F8 keycode 216 = F9 keycode 217 = F10
I was able to compile the closed source radeon drivers somehow, but they don't work since I haven't enabled BIOS emulation yet. My "working directory" might be of interest to you.
New: The drivers do work now that I've switched a triple-boot Boot Camp system. Relevant mailing list discussion:
From: "Roberto Griso" To: Mactelfirstname.lastname@example.org Subject: [Mactel-linux-devel] Another time to Ati Driver Question Date: Fri, 21 Apr 2006 06:35:44 -0700 Hello, i try to install new ati driver on my linux system. The installation on Xorg and the modprobe action for the fglrx module works very well, but wharn i try to start an X session, it exits with the follow error message : (EE) fglrx(0): No V_BIOS found (EE) fglrx(0): PreInitInt10 failed SetVBEMode failed (EE) fglrx(0): R200PreInit failed (EE) Screen(s) found, but none have a usable configuration. Anyone has the same problem? ------------- From: Matthew Garrett To: Roberto Griso Cc: Mactelemail@example.com Subject: Re: [Mactel-linux-devel] Another time to Ati Driver Question Date: Fri, 21 Apr 2006 15:36:14 +0100 The ATI driver will only work under the legacy CRM, because it's horrid. Please do bitch at ATI about this. ------------- From: gimli To: Roberto Griso Cc: Mactelfirstname.lastname@example.org Subject: Re: [Mactel-linux-devel] Another time to Ati Driver Question Date: Fri, 21 Apr 2006 16:36:57 +0200 You must boot with BootCamp to get the ATI driver work.
was@sha:~/install/macbook$ uptime 12:36:07 up 4 days, 23:46, 1 user, load average: 1.29, 0.71, 0.28And I've booted into both OS X and Windows in the meantime!
On Tue, 04 Apr 2006 02:15:16 -0700, Ryan Newton wrote: > I am writing in response to your statement on the site that: > > "I highly recommend using only a small HFS+ partition for sharing > files. There seems to currently (as of 2006-04-03) be no robust > trustworthy file system that is supported by both Intel OS X and > Linux 126.96.36.199, except FAT32, which doesn't support symlinks, users, > etc. Since your personal data is probably extremely important, keep > it in an ext3 partition." > > I'm curious, among the things you've tried, have you tried this > implementation of ext2 for Mac OS? > > http://sourceforge.net/projects/ext2fsx/ I very much wanted to use that, but it didn't work for me. I tried the binary available there, but was unable to get it to mount any ext2 partition on my laptop (I tried a number of different things with no success at all). The program lists my ext2 partitions, but always says they have errors that must be fixed before they can be mounted (though they don't). I was careful to try this with an ext2 (not ext3) partition. My guess is that perhaps the ext2fsx program has not been completely adapted to work on Intel Macs, but I'm not sure. In fact, the last update to the ext2 drivers on the sourceforge website was in February and added support for OS X 10.4. The comment is that: "1.4d1 is now available from the Files section (ext2fsx_dev package). Read only support (for now) and be prepared for kernel panics and/or system hangs. I've been spending quite a few weekends working on this, so any appreciation is welcome." So even if the ext2 drivers did work they would be read-only right now, and there would be system hangs. -- William
On Tue, 16 May 2006 10:17:28 -0700, Christopher Zwach wrote: > I was looking through your site on running GNU/Linux on the MacBook > Pro line of laptops from Apple while doing some research into > possible linux-usable laptops to take with me to college. First off, > I want to comment on how informative and helpful your site has been in > my research. I also wanted to mention that during additional research > I was able to find an update that you may find useful regarding audio > playback on the MacBooks. Apparently, audio can be enabled to play > through the headphone jack on the MacBook Pro by loading the > snd-hda-intel module > (http://forums.gentoo.org/viewtopic-p-3287309-highlight-sound.html#3287309). > However, playback through the built-in speakers still appears to > remain unsolved. > Enjoy! Thanks for the tip. Does it work for you with kernel 188.8.131.52 (which is what I'm using to get hibernate working). Somebody who got hibernate to work emailed to the list that sound worked with 184.108.40.206 but stopped working with 220.127.116.11, for some reason (?).
REGARDING VMWARE: hello, big thanks for http://modular.math.washington.edu/macbook/ I won't bother you too long. just want to know which build of vmware have you been able to work with kernel 18.104.22.168 ? everything works fine ? no crash ? I have same macbook as you and want to work with linux everyday but needs windows xp virtualization. I am using kernel 22.214.171.124. It's the latest VMware, build 19175 for Linux. It has been absolutely 100% rock solid for me so far; it's the best VMware install/environment I've used. And having a dual core processor really makes things much nicer, since I can let something build on the vmware machine while using Linux and not notice a slowdown.
On Mon, 22 May 2006 11:18:27 -0700, Chris Spencer wrote: > Thank you very much for the time you spent to create the tutorial. I now > have an almost fully functional copy of Ubuntu working on my MacBook. I > have one problem that I'm curious if you encountered, and if you did how you > resolved it. > > Currently whenever I boot, I automatically log in as root, and whenever I > try to "logout" I, again, am automatically logged in as root. I'm fairly > new to the linux environment, so it may be an obvious fix that I am just not > familiar with. > > Did you face this challenge when you made this tutorial? If so did you find > a resolution? I had this problem (which is with the live boot CD) and I resolved it. I don't remember at all what I did, except that it was fairly standard (but possibly not at all obvious) Linux sysadmin work. Once you have KDE (say) up you can use the GUI to configure it to autologin as a given user on startup. That might solve your problem, assuming you've made another user account. Another problem is that sudo seems totally broken on the liveboot CD. I got around this by downloading the source code to sudo and building from source. Much to my surprise that worked perfectly first try.
Date: Wed, 07 Jun 2006 16:43:23 -0400 From: Chris Tartamella Subject: MBP Linux First, I wanted to thank you for the useful info you've put on your site. It's been invaluable to me over the past week or so as I've gotten Linux going on my MBP. A few comments that might help the novices/clear up some uncertainties: 1) After installing OSX and BootCamp, it is a REALLY good idea to install rEFIt. I know its not necessary, but it works so flawlessly that I wouldn't install without it. 2) I haven't done this yet, but some notes on creating a swap file under Linux? 3) Rather than use the mount --bind, I used chroot'd to /mnt and installed lilo there through apt-get. This might be cleaner? 4) If you use rEFIt, the part about doing the MBR in Windows is unnecessary. Some of these things i learned by combining your directions and others on the mactel-linux site and probably a few others google unearthed for me. Alas, I have no links. I do have a question though. I'm trying to get my mouse buttons mapped properly. I've recompiled the kernel with the latest imac patch from the site, and the keys in sysctl.conf are being read properly. However, when I read a keycode from xev and put that in sysctl.conf and reboot, that key does not have the proper mapping. In fact, I've found that sometimes other keys get that mapping. Did you have this problem? What keys are you bound to now (and what number if I may ask.) I had found a kernel patch (It's small and I've atached it here) meant for ppc Macs. This enables the Ctrl-Click and Option-Click as it is found in Mac OS. Some hacking is still required though. I tried it with mine and after rebooting with the new kernel my keyboard didn't work at all. Maybe this is of use to you? Finally, have you had any luck with sound? Thanks again for all the invaluable information.
Date: Fri, 9 Jun 2006 23:38:10 -0400 To: email@example.com Subject: Re: Gentoo on the MacBook Pro Hello William, I had finally committed to fixing my broken graphics support as I do a considerable amount of professional and academic 3d development and your site helped out a great deal. Just sending a thank you! Regards, Brandon Nardone
On Sun, 18 Jun 2006 03:32:52 -0700, Ludovic Rousseau > I found your very nice page  and have some comments. I also have a > Mac Book Pro (17"). > > - If you have a file ~/.Xmodmap (note the capital X) it should be > loaded automatically. At least I have this Under Debian. Thanks! > - Linux does not support HFS+ in write mode if the journalisation is > used. I had to remove journalisation ("diskutil disableJournal /" > under Mac OS X) to be able to write to my HFS+ partition. See . I did this as well 3 times. Each time after a few days of normal uses I completely *trashed* my HFS+ partition. It would work fine from Linux but not OS X, and seemed beyond repair. I had to completely restart the entire install process to recover. So use HFS+ in write mode at your own risk. (Things may have improved since April, though!) > Bye, > >  http://modular.math.washington.edu/macbook/ >  http://gentoo-wiki.com/HOWTO_hfsplus#Disable_Journaling
Date: Mon, 26 Jun 2006 21:02:18 -0700 To: "Damien Sandras" Subject: Re: Sound support Reply-To: firstname.lastname@example.org From: "William Stein" Organization: University of Washington On Mon, 26 Jun 2006 10:46:23 -0700, Damien Sandras wrote: I would like to buy a new laptop, and would also like the Macbook Pro. It's a great laptop! However, I've read in your report that sound doesn't work. Does it work now or are you still having problems? It doesn't work for me yet, but other people report success. I haven't done anything to try though. It probably works with sufficient work; things are confusing and unstable though, since Linux support is new, and work on it is pretty random. I haven't actually had time to try any of the new kernel patches since I've been so busy with my job lately. Also, have you been able to try the isight in the laptop? I don't think anybody has had success with it yet under Linux. Of course it works fine under OS X. william