Debian GNU/Linux on Apple iBook

This page describes how I installed Debian GNU/Linux on a sparkling new Apple iBook (the tangerine kind) in the summer 2000.

I can't guarantee that doing the same will work for you, of course.

If you're installing on a newer iBook (the non-clamshell white kind), I suggest reading Branden Robinsons page on the subject. I've used that on a friends iBook with success.



The harddisk of the iBook has to be partitioned, so that MacOS doesn't use all of the disk. I chose to have a 1GB partition that I had MacOS install itself on, and the rest I use for GNU/Linux.

Booting Linux

To boot Linux on an iBook you need a PowerPC-kernel and a program called yaboot. Both can be found at Ben's Linux page

The kernel and yaboot is placed in the System folder and two configurationfiles are then created: yaboot.conf and bootinfo.txt (also in the System-folder).

I got some of the information on how to do that from the linuxppc-user mailinglist-archive: Some yaboot instructions. Here's my files:




iMac,1 PowerMac1,1 PowerBook1,1 PowerMac2,1 PowerMac3,1 PowerBook2,1
GNU/Linux-PPC Yaboot bootloader
" get-key-map" " keyboard" open-dev $call-method
dup 20 dump
5 + c@ 08 = if
" Booting MacOS ..." cr " boot hd:,\\:tbxi" eval
" Booting Yaboot ..." cr " boot hd:,\\yaboot_0.8" eval

After making those files, the iBooks "Open Firmware" (which resembles the BIOS on x86-machines somewhat) needs to be told to use the bootinfo.txt: Reboot the iBook and hold down option-apple-o-f (yes, that is four keys) while it starts. You'll get a prompt and enter these three lines:

setenv boot-command boot
setenv boot-file   hd:9,\\bootinfo.txt
setenv boot-device hd:9,\\bootinfo.txt

This way the iBook will automatically start Linux when booting unless you hold down the space key during power-on - then it will start MacOS.

Installing Debian

We'll be installing Debian from the net via the net-connected box. You need bootpd and tftpd on the box, and some configuration of those, so that the iBook can get it's install ram-disk via the ethernet.

When you reboot the iBook with the yaboot.conf shown above, Linux boots on the iBook and requests the ramdisk from the box running bootpd and tftpd and then the Debian installer starts. Partition the harddisk and install the base system. When that's done, you need to reboot and use (one of) the newly created partition(s) as the root-partition, instead of the ramdisk as before - so hold down space while rebooting, wait for MacOS to come up, and edit the yaboot.conf to read something like this:


and reboot. Linux should now boot from the harddisk and the rest of the Debian install can be completed.

Congratulations! Debian GNU/Linux on the iBook!! :-)

Danish keyboard on the console

There was only German and French keymaps in /usr/share/keymaps/macintosh/, so I created mac-dk-latin1.kmap.


After trying different things I decided to install XFree 4.0.1. I followed the instructions on penguinppc.org, and after some work by Ani Joshi on the driver, it worked! (8, 15 and 24-bit modes!)

Danish locale in X

I used to set LC_ALL to "en_DK" in /etc/environment, but Morten Brix Pedersen investigated and found out that that is not the preferred way to have the computer speak English and still know that I am Danish. That piece of information simplifies this section tremendously. Just add two lines to /etc/environment; these:

... and you're done.

Danish keyboard in X

Since /usr/X11R6/lib/X11/xkb/symbols/macintosh/ only has "us", I had to try and make a "dk" myself. I think I succeeded pretty well - the only quirk that remains is that shutting down the X-server is done by pressing ctrl-option-backspace (and not ctrl-alt-backspace)).

To have the <LTGT> (</>) key work, it has to be added to /usr/X11R6/lib/X11/xkb/keycodes/macintosh - my edited version can be downloaded: macintosh.

This is the Xkb-part of my /etc/XF86Config:

    XkbKeycodes "macintosh"
    XkbSymbols	"macintosh/dk"

Attaching a three-button USB-mouse

After I got X working on the machine, I purchased a three-button USB-mouse (try using Gnome-panels with the built-in one-button pad!), and much to my amazement, it worked out-of-the-box! I just plugged it in, and Linux recognized it and X too. Cool!





Section "ServerLayout"
    Identifier "iBook"
    Screen	0 "iBook Screen" 0 0
    InputDevice	"Mouse0"	"CorePointer"
    InputDevice	"Keyboard0"	"CoreKeyboard"

Section "Files"
    RgbPath	"/usr/X11R6/lib/X11/rgb"
    FontPath	"/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
    FontPath	"/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
    FontPath	"/usr/X11R6/lib/X11/fonts/Type1/"
    FontPath	"/usr/X11R6/lib/X11/fonts/misc/:unscaled"
    FontPath	"/usr/X11R6/lib/X11/fonts/cyrillic/:unscaled"
    FontPath	"/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath	"/usr/X11R6/lib/X11/fonts/misc/"
    FontPath	"/usr/X11R6/lib/X11/fonts/cyrillic/"
    FontPath	"/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath	"/usr/X11R6/lib/X11/fonts/100dpi/"

Section "Module"
    Load	"xie"
    Load	"pex5"
    Load	"glx"
    Load	"GLcore"
    Load	"dbe"
    Load	"record"
    Load	"type1"
    Load	"speedo"

Section "ServerFlags"

Section "InputDevice"
    Identifier	"Keyboard0"
    Driver	"keyboard"
    Option	"XkbKeycodes"	"macintosh"
    Option	"XkbSymbols"	"macintosh/dk"

Section	"InputDevice"
    Identifier	"Mouse0"
    Driver	"mouse"
    Option	"Protocol"	"IMPS/2"
    Option	"Device"	"/dev/mouse"
    Option	"Buttons"	"5"
    Option	"ZAxisMapping"	"4 5"
    Option	"SendCoreEvents"

Section "Monitor"
    Identifier	"iBook Monitor"
    VendorName	"Apple"
    ModelName	"iBook"
# ?
    HorizSync	30-40
# ?
    VertRefresh 60-70

Mode "800x600-60"
    # D: 39.954 MHz, H: 37.835 kHz, V: 60.247 Hz
    DotClock 39.955
    HTimings 800 856 984 1056
    VTimings 600 601 605 628
    Flags    "+HSync" "+VSync"


Section "Device"
   Identifier	"iBook Video"
   Driver	"ati"
   VendorName	"ATI"
   BoardName	"Mach64 3D Rage LN Mobility (AGP)"
   BusID	"PCI:0:16:0"
   VideoRam	4096
#   Option	"no_accel"

Section "Screen"
    Identifier	"iBook Screen"
    Device      "iBook Video"
    Monitor     "iBook Monitor"
    DefaultColorDepth 24
    SubSection "Display"
        Depth       1
        Modes       "default"
        #Virtual     1280 960
    SubSection "Display"
        Depth       4
        Modes       "default"
        #Virtual     1280 960
    SubSection "Display"
        Depth       8
        Modes       "800x600-60" # "default"
 	Viewport    0 0
        Virtual     800 600
    SubSection "Display"
        Depth       16
        Modes       "800x600-60" # "default"
        #Virtual     1280 960
    SubSection "Display"
        Depth       24
        Modes       "800x600-60" # "default"
	Viewport    0 0
        Virtual     800 600
    SubSection "Display"
        Depth       32
        Modes       "800x600-60" # "default"
        #Virtual     800 600


Because I liked the idea of having a notebook, and the iBook was the machine that fitted the bill the best: rugged, good screen, very weird design (not those boring business-type machines, please!), nice processor, has the ports that are needed, and not a lot of superfluous ones.

Re-installing Mac OS 9

I'm selling my iBook, so I thought I'd add information on how to re-install the original Mac OS 9 for the buyer to use (I'll give the next owner an Ubuntu PowerPC-cd, in case they want to try GNU/Linux).

First step is undoing the Open Firmware changes - the easiest way to do this is to hold down the apple, alt, p and r-keys while turning on the computer. Wait for the startup-sound to play two to five times. (Before I learned about this, I just said 'setenv boot-command mac-boot' and 'setenv boot-file ""' to Open Firmware. It worked. I think I should have said 'setenv boot-device ""' as well, though. Not sure).

Next pop in the original install cd, hold down the c-key and turn on the computer.

Use the disk-utility to format the harddrive; one partition. Start the installation program. Go to apple.com and download a number of upgrades from the Mac OS-version on the cd to the newest (9.2.2). Install, reboot, rinse, lather, repeat.


2005-01-29: Added information on re-installing Mac OS 9 only
2003-01-06: Removed dead link, added another (thank Stephane Lentz).
2002-03-28: Removed the part about sound and modem. Sound and mixer works fine with kernel-image-2.4.18-newpmac (modprobe dmasound_pmac), and I got the modem working long time ago.
2001-04-22: Changed the section on X and locales. Much simpler solution.
2000-12-14: Added information to make the </> key work.
2000-10-01: Changed XF86Config to be more readable.
2000-07-26: Updated the XF86Config to be a real XFree 4-one.


Feedback, suggestions for improvements etc. are welcome.
0.0040 s