stocksy.co.uk
"the site for those who crave disappointment"

Sponsored Links

Debian Linux m68k on a Mac LC 475

4th Feb 2006, 09:46:27

By James Stocks

I finally have an ethernet card for my LC! Time to install Linux <grin>.

PDS Ethernet Card

Debian Linux took a long time to install. Not counting the time it took me to faff around with Penguin settings, Debian took over eight hours to install, not including installing the Mac OS! You will want to set aside a whole day for this one.

My LC 475 has only a single Conner 1 GB drive, so I knew I would have to partition this. When I installed System 7, I allocated a 500 MB partition, but it became apparent that 500 MB was far more than System 7 needed and far less than I would want for debian. I created a new 100 MB partition and transferred the System 7 installation to that, allocating the rest to Debian. If you don't have any unpartitioned space on your disk, you won't be able to do this juggling act and will have to reinstall System 7. Freshly installed, Debian took up 300 MB + 80 MB swap space, but you'll need more than this if you intend to install any software.

System 7

Installing the ethernet card was a breeze, just pop out the blanking plate at the back and drop the card in. Tools required ; none. System 7 picked up the card right away, listing 'ethernet' as an available interface for AppleTalk in the Network control panel.

I was not able to get System 7 to talk to my OS X Tiger Macs, since it complains about an incompatible version of AppleTalk. Who'd have thought it? Fortunately, I have an FTP server I can use. Any OS X Mac can act as an FTP server.

In order to get a TCP/IP stack, I installed OpenTransport 1.1.1 (Disk 1, Disk 2, Disk 3, Disk 4). I also copied Fetch 3.0.3 over, it's an FTP client small enough to fit on an HD floppy.

Next, I downloaded the Penguin boot loader and uploaded it to my FTP server. I grabbed the Debian m68k businesscard image. The only files needed from this image are:

so I mounted the iso in OS X and uploaded just those files to the FTP server. I used Fetch to retrieve the files in System 7.

The Penguin is a loader for Linux that is launched from within the Mac OS. There is a boot loader called EMILE that can boot Linux natively, but I did not investigate this because I already had Penguin working when I found out about it! I would love to hear form anyone who has tips for getting EMILE working.

Booting the Debian Installer

Penguin is easy to configure. Choose File -> Settings, then set vmlinuz-2.2.25-mac as the kernel file and initrd22.gz as the ram disk. I set the command line to be root=/dev/ram ramdisk_size=13000. I had to increase the ramdisk size so that the installer had enough room to boot, otherwise it gave an "attempt to access beyond end of device" error. Hit cmd+b to boot the installer. The Penguin HOW-TO is useful.

The Debian installer booted and asked me to choose a language, and how packages should be retrieved (I chose http). The installer used DHCP and configured the ethernet card automatically. Then came partitioning. I told it to use the partition at /dev/sda4 as an ext3 partition mounted on root, and the /dev/sda5 partition as swap space. I was asked whether the installer could unmount the partitions in order to make changes, I answered yes.

You will have a lot of time to fill while it installs the base system! My LC took about 4 hours 30 minutes. When the base system is installed, the Mac will reboot and load the Mac OS.

Booting Debian Linux

To boot Debian and complete the installation, Penguin needs to be instructed to use the Linux partition as the root device. Choose file -> Settings and choose kernel-2.2.25-mac as the kernel again, but do NOT use a RAM disk. In my case, Debian's root partition is /dev/sda4 - the fourth partition of the first disk on the SCSI bus. The command line this time is just root=/dev/sda4.

When the Mac rebooted, it asked me about my timezone, to set the root password and to create a new ordinary user, nothing too surprising. I was prompted to select my APT mirror, I chose to get packages through http from the UK debian mirror. At this point I got a lot of console messages saying Unexpected IRQ 3 on Device 00000000, but it seemed to be working so I left it to get on with things for a few hours.

About 10 minutes before it finished installing, Debian asked me to configure my Mail Transport Agent. Since I already have a mail server, I chose to use that as a smarthost, but it would be safest to accept the defaults if you're unsure. Hurrah! It welcomed me to Debian and invited me to log in.

Once I was logged in, everything seemed to be working OK, except for that damn Unexpected IRQ 3 on Device 00000000 message popping up every so often. A little Googling showed that a couple of people got around this by disabling console logging:

$ su -
# vi /etc/init.d/klogd

Change the KLOGD="" line to KLOGD="-c 4" and then

# /etc/init.d/klogd restart

to restart the kernel logging daemon. man klogd for more info.

What about X?

# apt-get install x-window-system

This installs twm, a basic window manager and the XFree86 X server. It requires an additional 84 MB.

Some 'gotchas' I encountered: Set keyboard type to macintosh_old or the keys will be all mixed up! The mouse should be /dev/adbmouse. For everything else, you should be able to select the defaults or use common sense. startx should start twm, but for me it would segfault unless I commented out the GLcore and DRI lines in the modules section of /etc/X11/XF86config-4

If you think you made a mistake, you can reconfigure XFree86 and friends by typing

# dpkg-reconfigure xserver-xfree86

Still to do:

Get one of Christian T. Steigies' more recent kernels to boot.

See also Macintosh LC 475.

New Comments

Some Rights Reserved