Debian Sarge on New 12″ Powerbook with 802.11g Wireless!

12inch Powerbook With Debian on it I bought a 12″ G4 Powerbook on Mar. 13. (Tech details later).

I dual-boot OS X (10.3.7) and Debian GNU/Linux. What follows explains how you too can run Debian alongside OS X on this great-looking hardware. You also get 802.11g wireless!

Requirements:
0. G4 Powerbook & OS X CD. HOWTO for those built after 1-05.
1. Wired Ethernet Connection (used during install).
2. USB Mouse (trackpad support not automatic + provides right mouse button).
3. ZyAIR G-220 Wireless B/G USB-Key (find low price @ pricegrabber) (Or try any other device using the ZyDAS ZD1211 chipset).
4. 1 Blank CD-R.

Note:
What this HOWTO won’t get working: suspend.
What simply isn’t supported yet: Airport Extreme.

HOWTO:
0. So long as you have a wired ethernet connection you can use later during the install, download the Debian Net Install Image from this page: http://www.debian.org/devel/debian-installer/
It’s the netinst CD image, with Debian base, click on the “powerpc” link. Burn that image onto your blank CD-R. Confirm that the CD is OK.

1. Insert the OS X Panther CD and use the Disk Utility to partition the drive into two partitions. I used HFS+ for each.

2. Install OS X on the SECOND partition. (You now have about an hour to go to another computer and sign the petition to get Broadcom to release details on the chipset in Airport cards and to call them at (949)450-8700 to discuss this nicely. Follow up with a hand-written letter about how you buy hardware that you know will work on GNU/Linux systems and then to send it to Broadcom Corporation 16215 Alton Parkway P.O. Box 57013 Irvine, California 92619 USA).

3. Once OS X is installed and working, put the Debian Net Install CD in and reboot. Hold down the ‘C’ key to boot from CD-Rom. Install Debian. The only default choice I changed was for the graphics driver. I chose the nv driver because these Powerbooks have the NVIDIA GeForce FX Go5200. The installer will guide you through partitioning, but basically you’ll make an 820k newworld boot partition near the front, a swap partition, and a root partition (which can be subdivided some more if you like). I chose not to mess with the crufty “free space” partitions that Mac leaves behind because some say they’re important while others say they aren’t. I didn’t want to have to start over for 128 megs.

4. The default install left me with an 800×600 display that was too bulky for my tastes. Once things are working edit /etc/X11/XF86Config-4 so that Section “Screen” has a DefaultDepth of 24 and that the Depth 24 SubSection has a mode of “1024×768″ listed before the others.

Getting Wireless G to work

5. While you still have that wired ethernet connection, download the latest zd1211 driver. I had success with the version from March 15.

6. Also use apt-get or dselect to make sure you have some needed packages: apt-get install gcc kernel-package kernel-source-2.6.8 libc6-dev tk8.3 libncurses5-dev fakeroot wireless-tools

7. Once that’s done go to /usr/src and look for the kernel-source-2.6.8 directory. You need to create a symbolic link like this: ln -s kernel-source-2.6.8 linux
Then do an ls -l to confirm there’s now a link to /usr/src/linux. Then make one more symbolic link (which will be used in compiling the zd1211 driver) like so: ln -s /usr/src/linux /lib/modules/2.6.8-powerpc/build [UPDATE: THIS LAST LINK IS PROBABLY UNNECESSARY WITH MORE RECENT VERSIONS OF THE ZD1211 DRIVER]

8. Type make menuconfig and accept all the options as they are.

9. Go to the directory where you put the zd1211 driver and unzip and untar it with something like: gunzip -dc *zd1211*.tar.gz | tar -xvf -

10. cd into the new zd1211 directories and find the Makefile. Open it in a text editor and find the line that looks like: KDIR := /lib/modules/$(KERNRELEASE)/build and change it so that it looks like: KDIR := /lib/modules/$(KERNRELEASE)-powerpc/build [UPDATE: THIS IS UNNECESSARY WITH MORE RECENT VERSIONS OF THE ZD1211 DRIVER]

11. Type make clean | make | make install

12. This step might not be necessary but then I did: cp -r /lib/modules/2.6.8/net /lib/modules/2.6.8-powerpc and I added that powerpc path to /etc/modutils. I think what really got the module ready for use was: depmod -a

13. Type modprobe zd1211 and do an lsmod to confirm it’s there.

14. Edit /etc/network/interfaces to include this:
# The ZyAIR G-220 USB Key 802.11b/g
auto wlan0
iface wlan0 inet dhcp

15. You may have to plug and unplug the ZyAIR somewhere in here to make it work, but what works for me is this:
ifconfig wlan0 up (now both ifconfig and iwconfig will show the device)
iwconfig wlan0 essid default (now wlan0 found my access point)
ifup wlan0 (now it receives an IP address and I’m on the net!)
Also, don’t have it plugged in when booting up or you get an infinite loop that prevents booting.

Battery Monitor
16. I have a working battery monitor in Gnome. I think I did this: apt-get install gpmudmon-applet and then right click on the panel, click add to panel, then select Pmud monitor. (At the same time I installed several other packages so I’m not completely certain this is the one that did the trick. I’d welcome confirmation.)

Trackpad Support
17. So, all this time you’ve been working without the Apple trackpad. Annoying. You can get it working by following the instructions here. You can also read the debian-powerpc thread discussing this driver. I believe you’ll need at least a 2.6.11 kernel for this to compile and on my 2.6.12-rc2 kernel it compiled but the trackpad was so jumpy I found it unusable. I’ll update this as support improves.

Bluetooth Support
18. Bluetooth will work, but I haven’t tried this yet. Read about it on the debian-powerpc mailing list.

Sound
19. Getting sound to work requires recompiling the kernel with appropriate patches. I describe how to get sound working on a post-February 2005 12″ G4 Powerbook in a separate post.

Technical Details on my Powerbook
Processor: PPC 1.5GHz
uname -r : 2.6.8-powerpc
gcc –version : 3.3.5 (Debian 1:3.3.5-8)
lsmod | grep hci : ehci_hcd ohci_hcd usbcore ohci1394 ieee1394

I’ll try to update this as I get more things fixed. Email brianwc at berkeley edu or leave a comment here with problems and corrections.

Creative Commons License
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.

One Response to “Debian Sarge on New 12″ Powerbook with 802.11g Wireless!”

  1. freelance script Says:

    Thanks bought a 12″ powerbook on ebay this was what I needed.

    Thanks
    Steve

Leave a Reply