Debian PowerPC

Update (20021028): See here for more detailed instructions about installing Debian GNU/Linux 3.0 (woody) on an ibook.

Here's a bit about my experience installing Debian GNU/Linux 2.2 (potato) on my macintosh laptop (powerbook G3, bronze keyboard, Lombard) and some of the problems I've run into:

The first problem was paritioning. The MacOS Drive Setup utility is good enough to create a partition to give you free space, but that's about all. After that you have to boot from the CD and partition using the mac-fdisk program. In addition to creating a linux parition and a linux swap partition, you need to create a special bootstrap partition (of type Apple_Bootstrap and size 800 K located directly after all of the other weird little partitions) in order to boot yaboot to boot linux or macos.

After installing the linux base system, but before rebooting, you need to mount the linux parition and edit /target/etc/yaboot.conf so that it points to the the bootstrap partition and the other partitions you want to boot to. In my case this was /dev/hda9, /dev/hda11, and /dev/hda13. I needed the lines "default = Linux", "macos=hd:13", "partition=11", and "image=/boot/vmlinux-2.2.18pre21" as well as to comment out the nonvram line. I also updated my yaboot.conf file after installing Mac OS X. (Note: OS X wants to be the first partition and will move the Apple_Bootstrap partition; if you install OS X, make sure you have a Linux CD handy.)

The command 'mkofboot' can then be used to copy the bootstrap to the bootstrap partition and tell open firmware to boot to it. I copied /target/etc/yaboot.conf to /etc/yaboot.conf (which is just in ram) before running the command mkofboot -b /dev/hda9 and then rebooting. I found some excellent documentation on mac-fdisk and yaboot.

Other than that, installing was pretty easy. After installing, I did a bit of setting up. I upgraded all of the packages and installed ssh, joe, traceroute, and some other programs. I turned off all of the services in /etc/inetd.conf and reloaded inetd. I also removed lpd, nfs, and some other things that I don't need.

I editted gpm and XF86Config to use the mouse which was /dev/input/mice with the protocol IMPS/2. I installed a whole bunch of window managers to try out and finally got gnome and gnome-sawmill. I had an interesting problem where I was using gnome essentially without a window manager, so I set that in the Gnome Control Center. Also, in order to get my delete key to work, I had to re-enable the xkeyboard extension by commenting out the line "XkbDisable" in /etc/X11/XF86Config. I also remapped keys to act as the second and third mouse buttons (/proc/sys/dev/mac_hid/). All of this is documented in much greater detail on another site. To switch back from X to the console, I have to perform a key sequence that rivals the Vulcan death grip: command-function-F7 and option-control-function-F1.

I messed around with window managers and themes a bit. I am using an Aqua them in Sawmill. I changed the size of my gnome-terminal, by changing the font size in Settings -> Preferences of gnome-terminal. I put the gnome tasklisk in my gnome panel (Add Applet -> Utility -> Tasklist) and some other icons. All of the icons are in ~/.gnome/panel.d/default/.

I was finding it confusing having lots of terminals open logged in to other machines, so I put a couple of lines in my .bash_profile on other servers so that when I ssh to them the titlebar of the console changes. I found out how to do this from the xterm mini-HOWTO
(if [ $TERM == xterm-debian ]; then
PROMPT_COMMAND='echo -ne "\033]0;${HOSTNAME}\007"'

The modem on my laptop is /dev/ttyS0. I tried using minicom, ppd, and the ppp that comes with gnome, but have had the best luck with wvdial, as I am dialing up to what it considers a "weird ISP". Nevertheless, wvdial almost connected all by itself. No mucking about with Windows DUN scripts.

I have installed a couple of programs in ways non-standard enough to warrant documentation. For some reason, I couldn't get netscape installed as a debian package (this could be just me, as I seriously messed some things up switching to testing) so I used alien to install the rpm. I also installed mol (mac on linux) from the rpm. After installing mol, I needed to copy over a mac rom image using "strip_nwrom" (mount -t hfs /dev/cdrom /mnt/; strip_nwrom "/mnt/System Folder/Mac OS ROM" /usr/lib/mol/rom/rom.nw") and run "molvconfig" to choose appopriate monitor settings. I edited /etc/molrc to increase the ram_size, specify hard drives to mount, and configure the mouse. mol is started with the "startmol" command. I wanted something to tell me about my battery so I installed pmud, gkrellm, and gkrellm from testing. I also installed micq, so I have command line ICQ now.

When I installed Linux on my PowerBook last January, I used potato. Over the summer I upgraded to woody. This went remarkably smoothly, except that the X Server for X 4 for my video card didn't work quite right and had these, well, dancing pixels. I later had some problems with Debian packages of 2.4 kernels and sound, sleep, and gpm. I suspect the most recent kernels have fixed these problems. Oh, the kernel module for sound is "dmasound", and modconf is your friend. The "backlight" command will blacken the screen as will (on certain kernels) the brightness function key on the keyboard. Oh, and I finally have working airport. Unfortunately, I didn't document it, so take a look here.

If you have any questions, email me and I'll try to help.