Deutsch English
Your feedback:
Did you like this page? vote3 Yes
vote2 Partly
vote1 No
Your comment?

Add your email address, if you want to get a response

Your name, if you like

Do not change this:
Feedback
Search

iBook G4

This page is about using Linux on an Apple iBook G4.
19-03-2006 14.51

Arguments for an iBook

iBook G4 front
  • Linux support is very good
  • Inexpensive
  • Very long battery life
  • Low weight
  • Attractive design
  • MAC OS X
  • It's interesting to have with PowerPC a different architecture than x86
19-03-2006 15.03

Arguments against an iBook

iBook G4 Back
  • 3D performance could be better
  • Not all programs are ported to the PowerPC architecture.
22-03-2006 19.44

Technical Characteristics of my iBook

  • 12.1 inch XGA TFT
  • 1.2 GHz PowerPC G4 processor
  • 256 MB RAM
  • 60 GB hard disk
  • CD-RW/DVD-ROM drive
  • ATI Mobility Radeon 9200 32 MB
  • 56K V.92 modem
  • AirPort Extreme WLAN
  • High: 3,42 cm, width 28,5 cm, depth: 23,0 cm, weight: 2,2 kg
iBook G4 Side Left
22-03-2006 19.44

Purchase

  • iBook
    I decided to buy my iBook at the Apple Store Education because they offered a discount for students and you could choose from a list of components (I selected a large hard disk).
    Apple sent the iBook directly from China over Luxembourg and the Netherlands to Germany, which took them two weeks (see als in my blog: An iBook Travels Arround the World).
  • Notebook carry caseNotebook carry case
    I decided to buy a normal notebook carry case. It's a bit larger than necessary for the iBook so I can also put accessories in it.
  • WLAN USB Stick
    D-Link DWL-122 As Airport Extreme was not support by Linux I bought a D-Link DWL-122.
  • Logitech MausMouse
    Additionally I bought an optical USB mouse from Logitech.
22-03-2006 19.47

Installation

Hard Disk Partitions

When I got my iBook the hard disk contained only one partition, which covered the whole disk. One possibility would be to use Fink but I wanted a real Linux installation.
  • Resize partitions

    The Debian installer can resize some partitions including HFS Plus ones. If it doesn't work try to remove the journal from the filesystem. In a MAC OS X terminal just enter
    diskutil disablejournal /
    and when you're finished re-enable it:
    diskutil enableJournal /
    Warning: After my Debian Installation my MAC OS X partitions was broken beyond repair. I can't say for sure what broke it but maybe the resize is to blame. So I strongly advise to do a backup before the resize.
  • Delete Partitions and Create new Ones

    Another possibility is to delete all partitions and create new ones and re-install MAC OS X. This way you can select which packages are installed, e.g. de-select languages you don't speak and add other interesting packages like for example the Xserver. Before you do this check that there are no programs pre-installed for which you don't have installation CDROMs.

My Partitions

Output from the Debian installer:
Nr. 1     23 KB Apple
134,2 MB UNUSED
Nr. 3 10,6 GB hfs+ MAC OS X
134,2 MB UNUSED
Nr. 5 26,7 GB hfs+ DATA
Nr. 2 1 MB NEWWorld BOOT-Partition
Nr. 4 500 MB Swap
Nr. 6 10 GB EXT3 Debian Sarge
Nr. 7 10 GB EXT3 Ubuntu
I don't know yet why there are those large gaps between the partitions. Today I wouldn't choose hfs+ to exchange data between Linux and MAC OS X but ext2 or ext3.

MAC OS X

The installation is quite easy, just insert the first CDROM, boot it (press c). During the installation be careful that MAC OS X does not occupy the whole hard disk (left space at the end of the hard disk for the Linux installation). There is also an option during the installation to do a custom installation where you can select which package should be installed.
If you want to be able to mount ext2 / ext3 partitions in MAC OS X try the Mac OS X Ext2 Filesystem.

Ubuntu

If you let the installer partition the free space automatically you'll have a running system within minutes without any problems.

Debian Sarge

Like Ubuntu but I had to configure the graphic card in the Xserver after the installation.
22-03-2006 23.10

Linux Configuration

Boot Manager

The boot manger yaboot is configured with /etc/yaboot.conf. Run ybin to apply changes.
boot=/dev/hda2
device=/pci@f4000000/ata-6@d/disk@0:
partition=6
root=/dev/hda6
timeout=100
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enablecdboot
macosx=/dev/hda3
#defaultos=macosx

image=/boot/vmlinux
label=Sarge_my_kernel
read-only

image=/boot/vmlinux-2.6.8-powerpc
label=Sarge_default_kernel
read-only
initrd=/boot/initrd.img-2.6.8-powerpc

image=/pci@f4000000/ata-6@d/disk@0:7,/boot/vmlinux
label=Second_Linux_Installation
root=/pci@f4000000/ata-6@d/disk@0:7
append="root=/dev/hda7 ro quiet splash"
initrd=/pci@f4000000/ata-6@d/disk@0:7,/boot/initrd.img

Kernel

My iBook G4 kernel config for pre 2.6.17 kernel, my iBook G4 kernel config for 2.6.17 kernel.

Modules

Some interesting modules that are loaded:
agpgart
apm_emu
bcm43xx
cdrom
ehci_hcd
evdev
firmware_class
hfsplus
ide_cd
ieee80211
ieee80211_crypt
ieee80211softmac
ohci_hcd
radeon
sbp2
scsi_mod
snd
snd_mixer_oss
snd_page_alloc
snd_pcm
snd_pcm_oss
snd_powermac
snd_timer
soundcore
sungem
sungem_phy
therm_adt746x
tsdev
uninorth_agp
unix
usbhid
zlib_deflate

Filesystems

I mount my linux root filesystem with the noatime option because I hope that the hard drive won't have to wake up so often and I need less energy. I considered to use ext2 instead of ext3 to save even more energy but I think the disadvantages outweigh the energy save.
I also created a partition for data exchange between MAC OS X and Linux. After I discovered that Linux can read and write hfs+ I went for that.
/etc/fstab
/dev/hda6 /         ext3    defaults,errors=remount-ro,noatime  0 1
/dev/hda4 none swap sw 0 0
/dev/hdc /cdrom iso9660 ro,user,noauto 0 0
/dev/hda3 /macos/ hfsplus ro,noauto,noatime 0 0
/dev/hda5 /data hfsplus rw,auto,users,noatime 0 0
/dev/sda1 /usbstore vfat rw,noauto,users 0 0
However sometimes I can no longer write to that partition. What helps is to boot into MAC OS X and run a file-check. There are rumours that it should also help to install hfsplus and do hpmount /dev/hdaX once, but that never worked for me. You should disable the journal under all circumstances.
diskutil disablejournal /
As I already mentioned, drop hfs+ in favour of ext2 / ext3 is another possibility.

Xserver

Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
# Trouble with recent ati driver
# HorizSync 28-51
# VertRefresh 43-60
EndSection


Section "Device"
Identifier "ATI Radeon Mobility 9200 M9+ (RV250)"
Driver "radeon"
BusID "PCI:0:16:0"
Option "UseFBDev" "true"
Option "AGPMode" "4"
# introduced for vga output
Option "MacModel" "iBook"
Option "SWcursor" "on"
EndSection
Enable
CONFIG_FB_RADEON=y
in the kernel. I had no success to get the VGA out working with my old Xserver. It should by no problem to use the VGA out with Xorg 6.8.2 (however VGA out in Xorg 6.9 may be broken). With a recent xorg with a recent ATI driver the VGA output now works.
# xrandr --output --VGA-0 --auto

# xrandr -q
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1400 x 1200
LVDS connected 1024x768+0+0 (normal left inverted right x axis y axis) 246mm x 184mm
1024x768 60.0*+
800x600 60.3
640x480 59.9
VGA-0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 408mm x 300mm
1400x1050 60.0 +
1280x1024 75.0 59.9
1280x960 59.9
1152x864 75.0 74.8
1024x768 75.1 70.1 60.0*
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
S-video disconnected (normal left inverted right x axis y axis)

Switch between internal and external display

# xrandr --auto --output VGA-0 --mode 1400x1050 --output LVDS --off
# xrandr --auto --output VGA-0 --off

Keyboard

iBook G4 German KeyboardIf you own an iBooks with a German keymap you probably have to configure it after the installation.

Keyboard with the Konsole

dpkg-reconfigure console-data
Looking for keymap to install:
mac-ibook-de
This should do it, unless it fails with this error:
/usr/share/keymaps/mac/mac-ibook-de.kmap.gz:310: syntax error
syntax error in map file
key bindings not changed
Loading /etc/console/boottime.kmap.gz
This is Debian bug #299577.

Keyboard with the Xserver

I didn't find a read to install layout, but Debian bug #291699 contains a patch to get one.
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbVariant" "nodeadkeys"
Option "AutoRepeat" "250 20"
EndSection

Interesting programs

  • cpufreqd in battery mode /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq should indicate that your CPU saves energy.
  • gnome-applets contains a modul to show how long your battery will last. (need the apm_emu module).
  • pbbuttonsd

Trackpad

iBook G4 TrackpadWith this option tapping on the trackpad won't issue a mouse click.
/etc/pbbuttonsd.conf
# [MODULE PMAC]
TPMODE = notap

Second and Third Mouse Button

Emulate the middle and right mouse button with F10 and F11:
echo 1 > /proc/sys/dev/mac_hid/mouse_button_emulation
echo 68 > /proc/sys/dev/mac_hid/mouse_button2_keycode
echo 87 > /proc/sys/dev/mac_hid/mouse_button3_keycode
Permanently enable configuration:
/etc/sysctl.conf
dev.mac_hid.mouse_button_emulation=1
dev.mac_hid.mouse_button2_keycode=68 # F10: middle button
dev.mac_hid.mouse_button3_keycode=87 # F11: right button

Sleep

iBook G4 Sleep With kernel 2.6.13.3 my iBook sleeps without any problems, even when I activate GLX and DRI. Don't forget to configure
Option "AGPMode"   "4"
Otherwise the whole systems freezes after a wake-up from sleep.

hal

Some day I noticed that the optical drive keeps on spinning if a disc is inserted.

This seemed the process which caused it:
hald-addon-storage: polling /dev/hdc

See also Bug #370186.

# hal-device
udi = '/org/freedesktop/Hal/devices/storage_model_MATSHITACD_RW_CW_8123'
storage.media_check_enabled = true (bool)
info.addons = { 'hald-addon-storage' } (string list)

In order to disable the
info.addons
entry for this drive, just add the following file /etc/hal/fdi/policy/ignore_my_cdrom.fdi.
03-05-2010 01.13

Network

DHCP

In the default configuration the DHCP client waits very long for an answer from a DHCP server findet. This will speed up the boot process if no DHCP server is available.
/etc/dhcp3/dhclient.conf
timeout 45;
retry 30;

WLAN

D-Link DWL-122

D-Link DWL-122Before the build in Airport Extreme was supported under Linux I used the USB WLAN stick D-Link DWL-122 with linux-wlan-ng,


apt-get install linux-wlan-ng linux-wlan-ng-firmware linux-wlan-ng-firmware-files linux-wlan-ng-source
cd /tmp/; linux-wlan-ng-build-firmware-deb
dpkg -i ./linux-wlan-ng-firmware-files_0.2.5+dfsg+prism2dl-1etch1_all.deb
cd /usr/src/; tar xjf linux-wlan-ng.tar.bz2
module-assistant auto-install linux-wlan-ng
modprobe p80211
modprobe prism2_usb prism2_doreset=1

Problems that may occur:
  • config.h not found
    Create an empty file with that name
    touch /usr/src/linux/include/linux/config.h
  • p80211: Unknown symbol wireless_send_event
    The current kernel misses support for wireless networks, enable the following options
    CONFIG_NET_RADIO=y
    CONFIG_NET_WIRELESS=y
Join a wireless network called WLAN1:
wlanctl-ng wlan0 lnxreq_ifstate ifstate=disable
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
wlanctl-ng wlan0 lnxreq_autojoin ssid=WLAN1 authtype=opensystem
ifconfig wlan0 up
dhclient wlan0

Airport Extreme

The driver is here: Airport Extreme Linux and here is an Airport Extreme Linux HOWTO.
Ab Kernel 2.6.17 ist der Treiber für die Airport Extreme Karte (bcm43xx) schon im Kernel. Wenn man das Modul erfolgreich geladen hat (benötigt Firmware Dateien die man sich vorher besorgen muss) fehlt nur noch eine schöne
/etc/network/interfaces
auto  eth2
iface eth2 inet dhcp
wireless_essid YOUR_SSID
## for web "security"
#wireless_enc on
#wireless_key ABCDEFGHIJKLMNOPQRSTUVWXYZ
## script to be run afterwards?
#up /usr/local/bin/optional/script/eg/for/vpn
I advice to give your network devices statical names (z.B. with an udev rule). Otherwise the build in Firewire may device to use eth2 from time to time.
# cat /etc/udev/rules.d/local-interfaces.rules
KERNEL="eth*", SYSFS{address}="00:48:54:55:af:00", NAME="mywlan"
(lower case letters for the MAC address)
Recently I had this error:
kernel: SoftMAC: Open Authentication with 01:23:45:67:89:00 failed, error code: 13
It helped to disable the WEP authentication (not the WEP encryption) in the WLAN access-point.
12-05-2007 21.07
Powered by PHP Created with Xemacs Valid XHTML 1.0! Valid CSS!