Monday, October 6, 2008

User Technology: openSUSE 11.0 on eMac G4

This is my experience with openSUSE 11.0 on the eMac G4, 1.25Ghz, sporting a Radeon 9200 graphics card. The specs are here. Mine was the lesser of the two modles, with the 40GB drive, but 1GB of RAM.

Unlike most of my guides, this one is not for the clueless. If you don't have some experience with commandline partitioning, you'll find this a bruising experience. Other distros may typically handle Macs better, the eMac is peculiar as the low end of Mac hardware. However, the result is something which runs a good bit faster than OS X, and offers all the comforts of home for my ingrained Linux habits.

The PowerPC does not possess a BIOS such as you might expect with your average PC. The hardware expects the OS to handle just about everything. This results in the necessity of creating a Mac partition from which the hardware can boot. This HFS partition works as a bootstrap, where the installer puts yaboot -- the PPC counterpart to LILO or GRUB. The problem is SUSE's YaST isn't up to the task, at least it wasn't on my eMac. I had to use pdisk. You can find a fair HOWTO here, but it's missing some details, and assumes you'll dual boot.

My own interest called for running Linux alone. While I did attempt more than one distro, this is not a comparison review. The first one I got working was SUSE. Your mileage may vary, as always. In this case, I used pdisk to remove the Apple stuff, then put back first the 32MB Apple_HFS type for the bootstrap. For using pdisk, pay close attention to the details presented in the SUSE HOWTO. I didn't actually format any of this, just set up the partitions and labels. YaST can't figure this out, and nothing on the SUSE installer will give you useful advice, nor warn you YaST can't do it at all without the preparation by pdisk. Thus, on my 38GB drive, after the HFS section, I added a 2GB swap partition, and left the rest for Linux data. Later, when YaST installs and sets the partitions, do not apply any label at all to the bootstrap. YaST will probably detect what needs to be reformatted.

On a Mac, you capture the boot by waiting for the musical tone, then immediately pressing the "c" key, and holding it down. The initial boot is some hideous tiny console text, followed by a grey screen and more tiny text. This resolves shortly to the standard Linux console display. I chose to do a Net Install because I hoped I could trim the default package selection. YaST was unable to handle this, so I recommend you download the DVD ISO if you can, and use that. At any rate, the initial steps require a very primitive console operation, with questions which can be quite deceptive.

The first item tells you to make sure the installer is in the CD drive. The appropriate answer is simply ENTER. Wading through the menus, you would choose "network" as the installation source. You can decide for yourself which protocol best fits your situation, but I choose HTTP. A little later it will as for an IP address, but that isn't exactly right. You should type in "download.opensuse.org" or some other mirror closer to you. For the directory, it should always be the pattern: "/distribution/11.0/repo/oss/".

After a few more questions, it will begin loading the installer in RAM. This will take a surprising long time, so be patient, as it runs off 1 of 4, then 2 of 4, etc. Eventually you should see the graphical YaST installer in all it's colorful glory. At the part where you are offered the chance to select the type of install, do not at all attempt to custom select the packages. YaST consistently failed and this and crashed, forcing me to start over. Just accept the default selection for whichever desktop you prefer and prepare to adjust the packages when it's up and running.

I'm guessing the SUSE folks did not have access to any eMac machines, because there is precious little mention of them in any Novell or SUSE documentation. In particular, you will find SaX offers only one monitor profile, "iMac", which is close enough. However, the driver options for the Radeon card will be half wrong. I tested various options extensively after getting everything installed. There is very little information about running Linux on this machine on the Net, and some of it is conflicting. I found the default choice to run at 1280x960 at 24-bit is the best for sharpness and readability. You may need to run xvidtune from a terminal window to get the placement of the display fine tuned. Below I offer the modeline I got, and the relevant portion of my xorg.conf for the best display.

Modeline     "1280x960" 122.24 1280 1344 1440 1696\
960 961 964 1002 +hsync +vsync

Section "Device"
BoardName "RV280 5962"
BusID "0:16:0"
Driver "radeon"
Identifier "Device[0]"
Option "UseFBDev" "false"
Option "AGPFastWrite" "true"
Option "AGPMode" "4"
Option "EnablePageFlip" "true"
Option "SWCursor" "false"
Option "GARTSize" "32"
Screen 0
VendorName "ATI"
EndSection


You may get some slight bowing of the sides of the visible display, but it's harmless. Notes:

  • You no longer need to use the framebuffer ("UseFBDev") to get X to run. Using the default "on" will slow things down a great deal.

  • The next three items will speed things up just a bit, too.

  • While using the software pointer ("SWCursor") is much faster, it tends to corrupt the display in odd places.

  • You should enable loading the 'dri' module at the top of the config under the Module section: Load "dri"


If you plan to use anything which requires the Motif libraries (I built Nedit from SRPM) you'll need to add this at the bottom of your config:

Section "Extensions"
Option "Composite" "Disable"
EndSection


The networking and sound chipsets were detected automatically, but if you use dialup, you may be out of luck. Any modem you select will have to plug into the one empty USB port. Beware of the so-called USB "WinModems" You might consider getting an external USB hub with its own power supply if you need more ports.

Right at the start there will be several updates, but the regular SUSE Updater will likely be broken. If it fails as mine did, go through YaST and use the Online Update feature. It should handle things nicely for the first run.

Please send me any additional notes or corrections so we can fill this empty spot in the SUSE PPC lineup.

4 comments:

Jody Weissler said...

I am going to be trying out 3 distros (Open Suse, Slackintosh, and YellowDog) on an emac tomorrow. Was sucessful with Linux on ppc installs over a year ago, but have been doing intel installs this last year. Do you think older powerpc distros will actually work better than newer ones which might have been tested on newer hardware?

Broken said...

In general, yes, those who have worked longest with that particular platform are more likely to get the fine details right. I eventually found SUSE almost unusuable, and tried Debian Etch. It worked beautifully, and without any fumbling with the boot partitions, etc. I am certain Lenny will work as well, but it will be rather slow, unless you avoid the full desktops environments.

PeteM said...

I've also had some success with Linux on macs in the past, YellowDog 2.3 on a G3 iMac 233, Kubuntu 5.10 and Xubuntu 6.08 on a G3 B&W 450. Leopard is too graphics intensive and bloated for older PPC technology, so I've just ordered a used eMac 1.25GHZ to run Linux instead. I have got PPC install disks for SuSe 11, Slackware 12.1 and Mandriva 2005.

I hope to emulate your success, and appreciate the time you've taken to document what you did. I saw eMacs on eBay with Suse 11 installed, so I know it is possible.

Do you know if Suse 11 provides XFCE as a desktop? I found Xubuntu a bit spartan in the apps department, but loved the simple desktop from using FreeSBiE (uses XFCE) on PC's.

Broken said...

Yes, Pete. It's been an option since 10.3. I believe you can choose it during the installation at some point.