Linux: Open Source and my MacBook

I have a love hate relationship with my MacBook. I adore the little bugger. I love how everything just works. I like the screen. I like the software. However, I really don't have much love for Apple, the company. I've been getting the itch to edge a little bit more toward the open source side. This should not be surprising since I'm a Linux zealot at heart.

One thing that was a real turnoff for me is that Apple stopped releasing binary installers for standalone Darwin. The PureDarwin project is hoping to pickup where OpenDarwin left off, however, it's obviously tough going. I'll keep my eye on it, but I don't think it'll be production-ready any time soon.

I've given up, to some degree, on VMware and VirtualBox. They're useful, but they're not the sort of thing you want to live in on a day-to-day basis. They're just not fast enough. They're better for occasional use.

I was really intrigued to discover Elive. Some guy took Debian and Enlightenment 17, tweaked it out for a Mac, and then released it as an ISO. Interestingly, he asks, rather forcefully, for a donation before you can download the ISO. I've heard that the system is absolutely beautiful, but since it's mostly a one-man show, it's obviously not perfect.

The documentation for getting Ubuntu to run on a MacBook is definitely not a one-man show. It's amazing how well they've documented everything. Don't get me wrong--it's still a total pain in the rear getting everything working just right, but still--they're to be commended.

In order to dual-boot Linux, you need to install rEFIt, which is basically a bootloader. It installed quite easily for me. You also have to have some room for a Linux partition. In theory, Apple's Disk Utility and BootCamp can both resize your existing partition in order to make room for another operating system. As you might imagine, this doesn't work out so well in practice.

I was immediately impressed when I heard that those tools could resize a partition. I thought to myself, boy, they sure must be smart if they can move files around in the partition in order to make room at the end of it. Unfortunately, I was too right. If you've been using your Mac for a while, Disk Utility will report "no space left on device" when you try to resize the partition, even if you have plenty of space. That's because the drive will be a bit fragmented, and it doesn't know how to move the fragments around. Apparently, this is a super common problem. However, it's not so common that Apple will admit to it in their documentation.

There are three solutions. One is to copy your system to a second disk and then copy it back. This basically defrags the partition. The second is to buy a $100 defrag tool. I'm broke right now, so neither of those are acceptable options. The third is to just wipe your hard drive and start from scratch. Ah, I fondly remember the days in college when I had time to do things like that ;)

I think I'm just stuck. I don't have another 12 hours to mess with this, and I'm short on funds to just "make the problem go away." I have this wonderful machine that I love, but, as a lot of Linux enthusiasts will say, it's like wearing a pair of golden handcuffs.

I love how well suspend works, how well the wireless works, how long my battery lasts (almost 5 hours!), and how nice my screen is (I really don't understand why it's so much nicer than every Dell I've ever owned). However, I think I'd like to find a way to make my Mac even more open source. I'm already running MacPorts, and I use open source alternatives for just about everything. (By the way, I must admit that I paid for VMware Fusion and for The Missing Sync.) Perhaps it's just my OCD talking, but I want more!

So I spent two days trying to make my Mac more open source, and I didn't really get anywhere. Hopefully this blog post is helpful somehow to someone. If any of you out there in the Python world have helpful suggestions, I'm all ears :-D

Comments

I tried out gOS. It's based on Ubuntu and features Google Gadgets. I can easily see how this would make a lot of sense for a low-end PC.

Older versions of gOS used Enlightenment, which gave me hope that it would run decently fast under VMware. However, since the newer version is based on Ubuntu, it's just as resource-heavy as Ubuntu. I guess that's not the end of the world--I like Ubuntu.

I'm thinking about giving stock Ubuntu a shot, but with e17. I might also consider trying out Xubuntu, but using a $1000 Mac to run Xubuntu just seems wrong ;)

By the way, VMware told me that my Mac didn't have accelerated 3D graphics. Gees, sometimes it just sucks that I always buy the cheapest laptop I can find. At least this MacBook is a big step up from the $300 Compaq I was running Ubuntu on before ;)
Holy moly!

http://opengeu.intilinux.com/Home.html
Michele said…
Here is my experience installing Ubuntu on a Macbook:
http://www.artima.com/weblogs/viewpost.jsp?thread=240272
(definitively a lot of work).
As of now, I would not buy a Macbook,
but I would buy a netbook, especially
since the advent of the recent netbooks
based on the AMD Neo processor.
dm said…
Yeah, it just wouldn't be right to have to pay for a partition resizing tool in the switch to linux...

I'm surprised the ubuntu live CD installer can't handle HFS+ resize, but even if not, Parted has claimed to support HFS+ resize for a while now:

http://www.gnu.org/software/parted/manual/parted.html#resize
(even if fragmented)

Some older posts on ubuntu forums suggest you need to switch off journaling using diskutil first:

http://ubuntuforums.org/showthread.php?t=89960

Probably worth reading through that thread before trying. The Parted mailing list archive also has traffic on this. I can't personally attest to any of it because I don't buy evil :D

OpenGEU looks pretty, but is apparently a release behind?
rgz said…
You give a new meaning to the idiom "You deserve what you paid for".
Alec said…
Or... I've got a 170G sata drive and a Sata->USB adapter laying around if you want to borrow them... still takes time but it's a free option. Lemme know!
DZC said…
I'm not sure what your specific needs are of course, but I've found this approach to work well for me:

I install a minimal Ubuntu (like JEOS) to a VirtualBox instance on my MacBook. It's set up to be as minimal as possible -- no sound, X, etc. Then I set it up as a local server -- mounting it's file system via SSHFS (or NFS or whatever you like) to the Mac OS side.

Then I can use Mac OS Terminal, Textmate, Firefox, etc. for development. The only major downside so far is the ~10% CPU VirtualBox seems to use at idle.
Michele, dm, and dzc, thanks for your comments :)

Alec, you are da man! If I get some more free time, I might have to take you up on your offer ;)
OpenGEU does look really nice. It is a release behind Ubuntu, as dm said. After thinking about it a bit, I think trying to run it under VMware full-time will probably just be frustrating. VMware is very helpful, but by it's very nature, it's not exactly the most responsive thing in the world.
If I wasn't broke, I'd be tempted to ust buy one of these: http://system76.com/index.php?cPath=28--a laptop specifically built for Ubuntu, with much higher resolution than my MacBook, and the Ubuntu logo built right into the case: http://system76.com/popup_image.php?pID=89&image=1
I gave OpenGEU a shot. You can read about it here: http://jjinux.blogspot.com/2009/08/linux-opengeu.html
S.C. said…
I don't know if you're still working on this (I just happened across your post google-hopping for different distros on Macbooks) but here is what I did; excluding some caveats it works pretty well:

1. Install bootcamp - give the Win partition plenty of room (for 2 OSs)
2. Install Windows (for ease of the next few steps I recommend Vista or higher because of the built in partition resize tool).
3. Once in the Windows installation is finished, boot into it and resize the partition to create enough room for linux.
4. Launch your distro choice from Windows. Ubuntu, Debian and OpenSUSE take care of rebooting from Windows into the installer. You just have to make sure your bootcamp partition is the one set to boot first out of EFI.
5. Follow standard install and POOF! Linux on your mac.

Yes, some space is wasted on the Win install, but this way you use bootcamp to startup Linux. I like it because it isn't running as a VM - I can boot straight into it, and I don't have to use refit. Also if you need access to any windows drivers (i.e. ndiswrapper) just reboot and grab them.

The only downside is wireless is a !#&%! to get working in OpenSUSE 11, not so much in Ubuntu, haven't tried Debian.
Cool, thanks for the tips. I eventually just wiped my drive and started from scratch. I have OS X and Ubuntu running under reFIT.

I'm happy to be using Ubuntu again. The thing that drove me crazy the most is the trackpad. See: http://jjinux.blogspot.com/2009/09/linux-least-bad-synaptics-configuration.html. I still haven't gotten Skype or my webcam working, but it's "nice to be home" ;)

Tell me if you find anything that really works for you.