Beowoof: a Beowulf Cluster with Power Mac 6100s running Yellow Dog Linux
How to Install Linux PPC on Power Macintosh 6100

Introduction

Motivation

Hardware

Software

Configuration

Installing Linux

Progress

Projects

Notes

Background

Michael Roeder
April, 2001. Updated August, 2004

Introduction

This document will guide you through the steps of installing Yellow Dog Linux 3.0 on a Macintosh 6100 using the MkLinux booter and a kernel specially developed for NuBus PPC Macintosh computers. It is intended for those with a little experience in Linux and a lot of experience in computers. It has only been tested specifically with 6100s but ought to work for other Macs as well. If some of the instructions sound superstitious, that’s because I fiddled with stuff and tried combinations until I found ones that work. There may even be technical reasons to do things certain ways… Please send me feedback for corrections or clarifications.

Okease see the SourceForge NuBus-PowerMac project. Please join the Linux on PowerPC Mail List.

Yellow Dog have released YDL 3.0.

The installer kernel for YDL 3.0 has been posted. I have not performed this installation, so I don't know the ins and outs.

Required Hardware

  • Any of Power Macintosh 6100, 7100, 8100; Performa 5200, 6200, 6300; PowerBook 1400, 2300, 5300: more recent is beside the point. I used 6100s, which is why I refer to a 6100 in this document.
  • Minimum 500MB hard drive: more is better.
  • Minimum 40MB RAM (4MB built-in + two 16MB SIMMs) 40MB works; more is better.
  • CD-ROM drive
  • Ethernet connection
  • Another Mac running Mac OS 7–9 with AppleShare file sharing and a reliable Internet connection on the same local network. OS X only does AppleShare over TCP, and Mac OS 7.5 does not, so they won't talk to each other.

Required Software

Tremendously Useful to Have

If you have another Mac on the network, share a folder on it. Put the MkLinux system fiddly bits and the two kernels in that folder. I do this with four folders:

  • The folder “For Control Panel” contains the MkLinux setup application.
  • The folder “For Extensions” contains the MKLinux extension and the Mach Kernel that has the YDL installer.
  • The folder “For Preferences” contains the two preferences files.
  • The folder “Replace Extension” contains the latest Mach Kernel that runs on Nubus Macs.

(The reason I went to all that trouble is that I set up a bunch of 6100s for a Beowulf cluster.)

1. Partition your Hard Drive

Boot the 6100 with the Apple 7.1 CD that shipped with the Mac, a 7.5 CD, or an 8.0 CD.

Open the Utilities folder, then open Apple HD SC Setup. Click the Drive button until the disk you want to use is selected. Click Initialize to get rid of all the existing partitions. Click Partition, then Custon. Delete the big Mac partition, then create at least these partitions:

  • Mac OS: 25MB (25600kB)
  • A/UX Swap Slice 1: 3x your physical RAM size. (For 40MB physical RAM, that means 120MB swap space, or 122880kB.)
  • A/UX Root&Usr Slice 0: Everything else. (On my ~500MB drive, that left me with ~380MB, enough to install Linux and have a coupla hundred MB free.

If you have two hard drives, say the 500MB drive that came with the 6100 and a second 1GB drive, a simple partitioning scheme that works is to make the Apple drive contain the / and swap partitions and let the big one contain the /usr partition. Use the Apple tool to parittion the disks. The installer's tools apparently has problems.

2. Install Mac OS

Install Mac OS onto the small partition. You want a couple of MB free for the MkLinux booter and the Linux kernel. System 7.1 and 7.5 leave plenty of room with a basic install. OS 8 takes up a lot of room and needs extra fiddling to get it small enough. 7.5 is ideal because it supports TCP/IP without a lot of fiddling about and was available from Apple’s web site for free.

If you’re installing System 7.1 or 7.5, then you can do an Easy Install.

If you’re installing Mac OS 8, then install a minimal system and manually choose the packages you want:

  • CD-ROM
  • Open Transport
  • AppleTalk
  • File Sharing
  • Memory control panel
  • Monitors control panel

Throw away all the cruft that the installer leaves behind such as help files and the Audio CD Player DA.

Reboot with the new Mac OS.

3. Install YDL Linux

BootX doesn’t work. These instructions use the MkLinux booter.

  1. With the Network or AppleTalk control panel, set the Mac to use Ethernet.
  2. With the chooser, make a connection to your other Mac. If you set that one up to do file sharing, then you can download all the Mac kernels on that one and transfer them to the Linux Mac. This lets you spend as little disk space on the Mac OS as possible.
  3. With the Memory control panel, turn off virtual memory.
  4. Install the MkLinux booter. In the System Folder...
    • Put lilo.conf and MkLinux prefs into System Folder:Preferences.
    • Put MkLinux Booter in System Folder:Extensions.
    • Put MkLinux in System Folder:Control Panels.
    • Put the kernel with the YellowDog Linux installer in System Folder:Extensions.
  5. Rename the kernel to “Mach Kernel.” (Whatever kernel you use, you always name it “Mach Kernel” and put it in the Extensions folder.)
  6. Reboot the Mac. As part of the Mac boot process, a dialog box will come up asking if you want to boot into Mac OS or Linux. Choose Linux. You will get a screenful of text and eventually the Red Hat installer. If you have the Yellow Dog disk or the Red Hat Unleashed book, then you will have instructions on how to install Linux. Use Fdisk, not Disk Druid.
  7. X seems to work better if you install both KDE and Gnome. (My Gnome-only instllation broke. I reinstalled from scratch and selected KDE as well as Gnome and everything worked fine.)
  8. After it has installed all the packages, there will be a window that says ‘An error occurred during setup “Configure Mouse” of the install.’ Select “Menu.” Go through each of the items one by one, skipping the mouse item. The items you need to do are...
    • Networking
    • Time Zone
    • Services
    • Root Password
    • Install Bootloader - write down the modification you need to make to the lilo.conf file.
    • Configure X
    • Exit Install
    Then go back to the top of the list and do Continue Install.
  9. It finishes and puts “Complete” in upper right corner of the screen. At this point you can reboot. Sometimes it breaks in this step. It seems to help to let it rest for a few minutes before rebooting.
  10. When you’re done, reboot the Mac. When the MkLinux dialog box comes up, choose Macintosh.
  11. Replace the kernel with the stable one.
    • Throw the old System Folder:Extensions:Mach Kernel file away
    • Copy the stable one from your Mac OS Mac to System Folder:Extensions
    • Rename it Mach Kernel.
  12. Edit the lilo.conf file
    • Change the line
      rootdev=/dev/sdb5
      to what the step Install Bootloader told you in step 8 above. (sd means scsi disk. In this example, b means the second scsi device [by scsi device number] on the bus and 5 means the 5th partition on that device.)
    • Uncomment the line
      mach_options= video=ariel2fb:
  13. Reboot the Mac and let it boot into Linux.

If everything went well with the install, then you should eventually get to a Linux prompt. If you’re building a command-line system, then you’re done.

4. Configure X Windows.

Reboot. Select MkLinux. You should see the usual Linux startup stuff followed by a Linux prompt.

Once you have a usable command line going, you need to do a few Linux administration chores.

Add the CD ROM to the fstab.

Append the line

/dev/scd0 /mnt/cdrom iso9660 noauto,ro 0 0

to the file /etc/fstab. Sometimes the existing line with /dev/cdrom works fine. If so, then just leave it.

Set the X mouse to the Apple Desktop Bus mouse.

#mouseconfig ADB

Warning: Do not run #mouseconfig all by itself with no parameters. It will crash your computer. (Well, it did mine, anyway.) And do not run this from inside the Yellow Dog install program. It will crash your computer. (Well, it did mine, anyway.)

Mount the Yellow Dog installer CD ROM

Stick it in the drive, then issue the commands

#mount /dev/cdrom /mnt/cdrom

#cd /mnt/cdrom/YellowDog/RPMS

Install the Mac X server.

#rpm -i XFree86-Xpmac-.ppc.rpm

Install a missing font file.

#rpm -i XFree86-100dpi-fonts-3.3.6-11.2.ppc.rpm

Create a symbolic link.

#cd /usr/X11R6/bin

#rm XF68_FBDev

#ln -s Xpmac XF68_FBDev

so that when Xconfigurator looks for XF86_FBDev it uses Xpmac. (Yes, that’s 68, not 86 in the ln command.)

Run the X configurator.

#Xconfigurator

If you want to change resolution/depth from Linux, use fbset. If it’s not installed, do “yup install fbset” and “man fbset.” For example, “fbset -xres 832 -yres 624 -depth 8” should change the resolution/depth to 832x624-8bit. If this doesn’t work, check that ariel2fb is being used. “cat /proc/fb” should show “0 ariel2fb.” Remember that the 6100 is not capable of 1024x768, only 832x624 or 800x600 depending on your monitor.

5. Start X Windows.

#startx

If all works right, you will have a workable X system. If X ever does anything seriously unhappy, press command-F1. This will kill X and give you some debug messages. You might be able to make sense of them and reinstall the missing bits.

Once you’ve got X working correctly, you may want your Linux box to boot into X by default. Eit the file /etc/inittab. Change the line

id:3:initdefault:

so that it reads

id:5:initdefault:

Some dark and quiet night, run

#yup update

and let it update all your packages to the latest ones. This will take forever. If you’re on a cable modem, please let us know whether your neighbors actually paper your yard for hogging all that bandwidth.

More information on yup can be found at Yellow Dog Linux.

Useful Unix Commands

ifconfig - sets up ethernet interfaces

route - sets up routes for ethernet interfaces

ipfwadm - sets up ip forwarding (if you are building a firewall)

netcfg - once you have X working, this makes setting up networking easy.

tcpdump - spies on network packets your network card receives.

Xconfigurator - sets basic X operating characteristics.

netstat -i

arp -a

dmesg - shows boot messages

df - lists all the mounted volumes and their sizes

Useful Unix Files

/etc/inittab - contains the runlevel: 3 for command line, 5 for X.

/var/log/messages - contains all that stuff that appeared on the screen that you couldn’t read as it booted up.

/etc/lilo.conf - does not exist in LinuxPPC for Macintosh. Look for it in the Mac OS disk in System Folder:Preferences: lilo.conf.

/etc/resolv.conf - local file for domain name lookup; points to name server.

References

Linux PPC for NuBus Power Macs

Linux on PPC-Nubux Mailing List Please direct questions to the list, not to me. I haven’t been playing with this project in a while.

Red Hat Linux 6 Unleashed by SAMS

MkLinux by Rich Morin

Power Mac 6100 Upgrade Guide

Acknowledgements

Matthew Duhan - for giving the crucial details in how to really do the install. His instructions are the core of these instructions. But please don’t take him to task for any errors here.

Takashi Oe - for building the Linux/Nubus kernels, and for spending a Saturday night telnetting into my 6100 to build a special kernel so my Asante ethernet card will work in the Beowulf cluster I’m building.

Want your name here? Find an error or a place where these instructions could be improved, and email me.

  Beowoof: a Beowulf Cluster with Power Mac 6100s and Yellow Dog Linux. Updated 20020402.
home page: http://www.sonic.net/~mroeder/beowoof/index.html
author's home: http://www.sonic.net/~mroeder/index.html
contact the author: Michael Roeder