Ubuntu on an ibook g4
*\* Deze post in het engels voor toekomstige referentie **
Lately, I went to FOSDEM and watched some people with linux installed on their iBooks. It looked neat. I knew Linux supported PowerPC (I’m don’t have an x86 powerbook) but I didn’t know how flaky or good. After seeing several demo’s, I was sold. So, I’d give Ubuntu a try on my iBook. For future reference, I’m going to make a small backlog of my actions.
First of all, I backed up my data. I can’t stress enough to anyone trying to accomplish this: back up your data. And once again for those in the back: make a backup of what you think is important!! You’ll be messing with partitions and your hard disk. Don’t take this lightly.
I started with downloading the install disk from Ubuntu.com. I choose the ubuntu-6.10-desktop-powerpc.iso (Edgy Eft!). On my pc (also, Ubuntu equipped) I burned the ISO file on a blank disc.
Next, we are going to shrink the OSX partition. I followed the information from this thread on the Ubuntu Forums.
Boot on your ibook Mac OSX. The OS is normally default installed on one continguous partition spanning the almost the entire disk (safe for a small bootstrap partition). As Ubuntu (and, by far, all hard disk installed OS’es) live on seperate partitions on a hard disk, you’ll need to shrink your OSX partition to make room for Ubuntu.
The OSX partition uses the HFS+ filesystem. HFS+ supports journaling, so first, we are going to do is disable it. Check through finder and ‘get info’ on your hard disk wether journaling is enabled. Now, we are going to disable journalling. Open a terminal and enter these commands:
This shows your hard disk name. Normally this would say Macintosh HD. This information you’ll need to disable journaling. Now do this in your terminal:
sudo diskutil enableJournal Macintosh\ HD/
sudo diskutil disableJournal Macintosh\ HD/
It should say that journalling has been disabled. Okay, that was the OSX part. Now insert your freshly burnt Ubuntu install disc and reboot your Mac. Press the C button while rebooting to get it to boot from the cd. Press enter when you are presented with the boot: prompt. The live ubuntu desktop will appear at last. Now, go to Applications, Accessoires and open a terminal in ubuntu.
Now we are going to shrink the HFS+ partition with Mac OSX and your data to make room for Ubuntu.
This prints information about your hard disk. Typically you’ll see two entries. The second one is the most important one. You’ll have to note: the partition number (in most cases: 3), the start block of the HFS+ partition (most likely 134Mb) and the size of the partition (I have 60Gb, so that’s that). You’ll need the resize command from parted. It uses following syntax:
resize PARTITION_MINOR_NUMBER START_BLOCK_SIZE_FROM_PRINT_OUTPUT END_BLOCK_SIZE
Say, you want to resize the 60Gb partition to 30Gb, you’ll have to use following command:
(parted) resize 3 134MB 30GB
Press enter and watch how the partition is being resized. This operation shuffles around with data on your hard disk and the outcome is not always guaranteed. As I gathered from the thread, the more memory, the better as ‘out of memory’ errors are possible. I also found testimonies from people with broken OSX installations afterwards. So, no guarantees here. Last chance to back up your data before you execute this command.
Once completed (in my case, it took half an hour), you’ll have finished the hard part. Now, it’s time to install ubuntu. Click the ‘install’ button on the desktop and follow the wizard. I choose the ‘belgian keyboard layout’ but you can change that later on anyway, so you can choose whatever suits your layout best. Once you arrive at the ‘partitioning’ part, choose ‘use largest continguous space’. Ubuntu will autocreate the necessary partitions (swap and ext3) on the newly freed space. Next, let the installer work it’s mojo.
In the end, the installer will ask to reboot the system and eject the disc. Once the system comes back up, it’ll present you with a sober yaboot boot menu. If you don’t press any key, it will boot Ubuntu by default and present you the login screen.
In my case, Mac OSX seems to have survived the installation and boots up nicely. So, now I have a dual boot system. Just remember, neither partitions can see eachother altough Ubuntu (Linux) supports the HFS+ filesystem. Which will take some fstab tweaking.
That wraps it up for now. Next: finetuning the installation (wireless support, upgrade packages to the latest version, etc.)