Installation of SuSE Linux 7.1 on the Apple PowerBook G4 (500MHz)

Contents:

  1. Summary
  2. Hardware
  3. Linux distribution
  4. Installation
    (a) Partitioning of the hard disk
    (b) Reinstallation of MacOS
    (c) Installation of the SuSE boot folder
    (d) Installation of SuSE Linux
  5. Configuration of Linux/MacOS dual boot
  6. Configuration of X11
  7. Network setup
  8. Mouse button configuration
  9. Startup and configuration files
    (a) /etc/lilo.conf
    (b) /etc/XF86config
    (c) /etc/init.d/boot.local

1. Summary

SuSE Linux 7.1 PPC installs on the PowerBook G4 "out of the box". If you follow the installation instructions exactly as given by SuSE you should have no problem getting the software installed and the system running, including a dual boot configuration managed by LILO (NOTE: there is a small error small error in SuSE's specification of '/etc/lilo.conf', so do read on). After the installation you should have a working X windows and sound. Touchpad and external USB mouse are automatically detected. With little more effort, still following the manual, you will be able to optimize the X window configuration (using SaX2), a PPP and TCP/IP network (using YaST), and even the Apple Airport wireless connection (although I haven't tested the latter as of this writing).

There were no hickups during the installation except, maybe, my tendency to skim-read installation instructions when thorough attention is warranted. The rest of this document is written especially, but not exclusively, for those who feel themselves equally challenged by a similar attention disorder.

Why did I choose the G4?

The G4 is reasonably light (2.4kg/5.3 pounds), fast, expandable (up to 1GB RAM), has an internal DVD, and IMHO is the sleekest notebook currently around.

Why did I choose SuSE?

I've had good experiences installing SuSE Linux 6.4 and 7.0 on Intel PC notebooks. Also, SuSE is generally acclaimed to be one of the best Linux distributions available.

Back to top

2. Hardware

Apple PowerBook G4 (titanium) [http://www.apple.com]

3. Linux distribution

SuSE Linux 7.1 PowerPC Edition (http://www.suse.com)

Back to top

4. Installation

(a) Partitioning of the hard disk

If you have installed (SuSE) Linux on Intel PC platforms before, you might be used to partitioning the hard disk at the beginning of the Linux installation from within the installation program itself. This is not yet possible for PPC platforms, but don't despair: Apple provides 'Drive Setup', a convenient partitioning tool that lets you specify MacOS and Linux type file systems. I found Drive Setup much more convenient than partitioning from within the Linux installation program.

Step 1: Boot the PowerBook from the MacOS installation CD that is shipped with it. To do so, start up the G4 and press the <c> key (c for cdrom?) during the startup sound and then put the installation CD in the DVD slot. You could also load the installation CD while the PowerBook is running and restart from MacOS; but you still have to press <c> during the startup sound. You will know that you have booted from CD if the (usually plain) background image switches to one with lots of CDs on it. If that isn't the case after booting has finished, you have most likely not booted from CD and have to reboot. Try pressing <c> a little longer, for example.

Step 2: Open 'Drive Setup' in the 'Utilities' folder of the system CD, select the internal hard drive, and click 'Initialize'. This button is only active if indeed you have booted from the system CD (reboot if it is not).

In 'Drive Setup' you can specify the number of partitions (file systems in other words) that you want to subdivide your hard disk into. For a dual boot system you will need at least four partitions. Depending on the size of your disk and the way you plan to utilize it, you may want to add more. 'Drive Setup' allows you up to 15 or 16 partitions. For my dual boot, single user configuration I have chosen the following partition:

Partition Type Purpose Size Required
1 MacOS HFS+ (extended) MacOS 5Gb yes
2 MacOS HFS (standard) Boot sector 32Mb yes
3 UNIX/Swap Swap 256Mb yes
4 UNIX/Root / 5Gb yes
5 UNIX/Home /home 17Gb no
Note:
Tip:

Now let 'Drive Setup' format the hard disk and eradicate MacOS.

(b) Reinstallation of MacOS

Since you have the installation CD still loaded, simply reboot from CD (don't forget to press <c> during the startup sound) and follow the instructions for MacOS installation. Since the 32MB HFS partition designated to hold the Linux boot sector is too small for the MacOS operating system, the installer automatically selects partition 1.

(c) Installation of the SuSE boot folder

Reboot MacOS from hard disk. Besides giving you feedback on whether the installation was successful, it also allows you to free the DVD drive, which you will need in the steps below. Now is as good a time as any to install any other MacOS software you fancy. Except, of course, if you worry about screwing up the Linux installation and having to reformat your hard disk again. So maybe you want to wait with any other MacOS installations until you are sure that your configuration is there to stay.

Now load CD #1 of SuSE Linux and copy (drag and drop) the 'suseboot' folder from the SuSE CD to the HFS partition (partition 2 above). Don't edit anything. LILO will do this for you later (see below).

(d) Installation of SuSE Linux

Reboot the PowerBook from the SuSE CD #1, which should still be in the DVD drive (press <c> during startup sound) and start the Linux installation. Follow the online instructions while having your SuSE manual handy. Selecting the graphical interface to YaST (the SuSE installation manager) is a good idea.

YaST, together with the manual, will guide you through the installation. Even if you have never installed Linux before, you should experience little to no difficulties. YaST is a well designed tool, and the manual is comprehensive and written clearly.

Two points of the installation procedure deserve mentioning:

At the end of this step you should have Linux installed on the PowerBook and should be ready to log on. If not, take comfort from Laurie Anderson:

"We begin again, we try
we begin again
down by the muddy river"

Back to top

5. Configuration of Linux/MacOS dual boot

In order to configure your notebook for dual boot setup, you need to edit the '/etc/lilo.conf' file. To do this, either log on as root or 'su' to root from a terminal window.

Follow the instructions in the SuSE installation manual, but make note of the following exception: SuSE suggests the "image" part of the file to read

    image = /boot/vmlinux
            root = /dev/hda12
            label = linux
            append = ""
            copy
    # "copy" is needed for the January 2001 Macs
    

However, there is no linux kernel named "vmlinux", only one "vmlinux-2.4". Consequentially, the "image" entry has to be as follows:

     image = /boot/vmlinux-2.4
             root = /dev/hda12
             label = linux
             append = ""
             copy
     # "copy" is needed for the January 2001 Macs
    

(I have attached my complete /etc/lilo.conf file at the end of this document.) Run "lilo" from a shell prompt after you finish the editing. This will edit entries in the suseboot folder (partition 2 above) and should complete without error. You are now ready to boot either Linux or MacOS. To select between the two press the <alt> key during the startup sound. <space> will not work.

Back to top

6. Configuration of X11

SuSE provides "sax2" for X11 configuration. You can start "sax2" from any shell window; if you are not root, you are asked for the root password. If you have a working X11 configuration, you can either select to change the current settings, or you can let SaX do the guessing from scratch.

Mouse
I have an Apple Optical USB mouse, which SaX recognizes. The touchpad works as well.
Keyboard:
You can select language layout, velocity, general settings, and fonts. Make sure not to set the repeat rate of your keyboard too high; otherwise you will face difficulties in typing later on.
Video card:
The G4 has a ATI Rage mobility M3 AGP 2x, which SaX recognizes. If not, you can find it in "Properties" of the Graphics Device Setup window.
Display:
The G4 display supports 24 bit at 1152x768 resolution. Since 1152x768 is not in the list of screen resolutions, you need to specify it in the "Expert" subwindow (click "Properties" in the Desktop Setup window); scroll down to "Create special resolution", enter X (1152) and Y (768) resolutions under "Special Mode", and click the arrow button next to it. This will insert 1152x768 in the list of resolutions in the "Colors" subwindow of "Properties". Select it together with "16.7 Mio. [24 Bit]" in the "Colors" entry.
Testing your configuration

When you click "Finish" in the SaX window you are asked whether you want to test your configuration. You can also "Save" your configuration. However, it is generally a bad idea to save settings you haven't tested, because you are running the risk that X11 can not be started properly if it is configured incorrectly.

Testing the configuration starts "xfine2" to fine tune your settings. A setting of 1152x768 and 24 bit should bring up a dark blue screen with several arrows. In theory you should be able to move and resize the display, but I wasn't able to change the image (which fills the whole screen). At this point you can save the configuration.

If your screen stays dark or looks scrambled, then your configuration is incorrect and can potentially damage the display. The hot key combination "<ctrl> <function> <delete>" should get you out of this (the keys have to be - and remain - pressed in sequential order). <function> is the key with the apple mark, next to the <alt> (or <option>) key on the U.S. keyboard. Note that the more common hot key combination "<ctrl> <alt> <delete>" does not get you out of X11.

Back to top

7. Network setup

The built in modem and ethernet card, and the add-on Airport card are recognized by the system. You can use YaST for the configuration. The SuSE installation manual is exhaustive.

I have tested the modem and the ethernet card, and both are working without problems. I also see the activation of the Airport card during start up, but I have not yet been able to get the wireless connection to work.

Back to top

8. Mouse button configuration

If you have a typical Apple one-button mouse, then you are lacking two crucial mouse buttons for accessing many Linux features. If you don't want to attach a three-button mouse, you can emulate the additional mouse buttons by assigning them to special keys. SuSE suggest <F11> and <F12> for second and third mouse button by adding the following lines to '/etc/init.d/boot.local' (not '/sbin/init.d/boot.local'):

      echo "1"  > /proc/sys/dev/mac_hid/mouse_button_emulation
      echo "87" > /proc/sys/dev/mac_hid/mouse_button2_keycode # F11
      echo "88" > /proc/sys/dev/mac_hid/mouse_button3_keycode # F12
    

(in order to work with the mouse buttons right away, you have to execute '/etc/init.d/boot.local' first). This works, but to access the third (and usually more often used) mouse button you have to press both, <fn> and <F12> together. <F11>, on the other hand, works without pressing <fn> first. Since I rarely use mouse button two, I have changed SuSE's suggestion to

      echo "1"  > /proc/sys/dev/mac_hid/mouse_button_emulation
      echo "88" > /proc/sys/dev/mac_hid/mouse_button2_keycode # F12
      echo "87" > /proc/sys/dev/mac_hid/mouse_button3_keycode # F11
    

which assigns the second mouse button to <F12> and the third one to <F11>. I have attached my /etc/init.d/boot.local file below.

Back to top

9. Startup and configuration files

(a) /etc/lilo.conf
(b) /etc/XF86config
(c) /etc/init.d/boot.local

/*