Installing Debian Potato on a M68k-based Macintosh in 10 mostly simple steps

Version 0.52

Alfred de Wijn (dwijn at

1. A bit of history and a word of advice

The first Macintosh based on a Motorola 680x0 processor was booted into Linux somewhere mid 1997 by Alan Cox. And a lot has happened since then. Quite a number of models are now supported, some better than others. The 2.2 series kernel is far more stable than it's predecessor. Linux/Mac68k is definitely out of the 'strictly experimental' phase. However, it's not finished (and could use your help!). The Linux/Mac68k project site lists a number of models and their status. If your model is listed as 'unsupported', you can ask around on the mailing list, or just give it try anyway. If your model is supported, or partially supported, installing Linux might still not be very easy. But don't be discouraged! This guide should help you through all the basics.

This document assumes the reader has at least a basic understanding of installing a Linux system.

2. Check the web site

Check if your system is suited for Linux/M68k. Check the Linux for Mac M68k project pages at, read the Linux/M68k FAQ, available at various places, and check the 2.2 kernel status page status page. If it's suited, go right ahead. If it's not, well, try it anyway.

3. Backup

Just after thinking of starting to install Debian on your Macintosh, you should make a backup of your current system. It's not like Debian will erase all data on your harddisks immediately when it starts up, but you can damage a lot easily if you're not careful. You will after all probably end up repartitioning your harddisk anyway.

4. Tools and files you will need

5. Partitioning the harddisk

For this step, you will need a partition utility. There's lots of these around. I've used Apple HD SC Setup, available at Apple's web site.

Different setups require different actions now. We'll begin to split in two parts now: installing on a disk that will be used exclusively for Linux (section 5.1) and installing on a disk that is to be shared between MacOS and Linux (section 5.2). Please note there are a lot of ways of partitioning the harddisk. I'm only covering the two most common in relative detail.

Please note it is also possible to partition your harddisk later during the debian install. You can then remove an old MacOS partition to replace it with your new Linux partitions, or partition a whole disk. In any case, it's not covered in this guide, and I strongly suggest you read all help the Debian partitioning utility provides as well as reading what this guide has to say about partitioning is MacOS. You can fall back to the Debian utility if this fails.

Installing on a disk that will be used exclusively for Linux

First of all: remember you need to boot into MacOS before you can boot Linux--you need at least one MacOS partition of about 10 MB for some comfort. Also please note that if you are installing on a machine with a NCR5380 SCSI controller (i.e. anything with a 68020 or 68030 processor) and you do not have a (fast) internet connection (to download appoximatly 15 MB), you will need to have a Mac partition to store a couple of files on the same harddisk as your Linux root partition will be on. Read section 6 for more information. You can get around this, but you will need a different kernel. If you know what you're doing, read section 7.10 now. If you're not adventurous, plan on only being able to use one device for now.

You have two options: you can either start installing Debian directly, or you can partition your harddisk first. If you choose the former, you're on your own, and you can skip the rest of this chapter. Don't come running to me when it doesn't work. The Debian installer will prompt you to partition the harddisk at some point.

If you choose to partition now, start your favorite partitioning software. I'm assuming you're using Apple HD SC Setup. It's freely available from Apple's web-site. Select the correct harddisk and double-check that. Then click on partition. Now press custom. By clicking in the grey area, you can add a partition.

If it's not there already, you have to add a Mac Driver partition now. Go ahead and do that now. MacOS will get messed up if any connected drive has a Mac style partition table but doesn't have the driver partitions.

Swap partition

First create a partition of type A/UX Swap slice 1. The size of this partition determines the size of your virtual memory, and as such you can run Linux without it. I don't recommend that though. The size you want to make it depends on how much real memory is installed, what programs/etc. you want to run, the size of your harddisk and the position of Neptune relative to your neighbor's mother-in-law's birthplace. Don't make it too small though. If you have enough room on your disk, aim for 20 MB or twice as much as your real memory, whichever is bigger.

Root partition

Second, create another partition, of type A/UX Root slice 0. You can choose to fill up the rest of the disk with this, or you could leave space to create even more partitions. Normally, you won't really need multiple partitions. If you plan on a simple install, go for one big partition. Note the root partition has to be at least 20 MB.

Other partitions

Optionally create even more partitions. Once you're done, quit the utility. If everything has gone right, you are now be ready to go to the following chapter.

Installing on a disk that will be shared between MacOS and Linux

First of all: make a backup if you haven't done so already. I really mean it this time. You need a backup because a) you're playing with a harddisk with data on it you (presumably) don't want to lose and b) you're probably going to end up resizing partitions, and then you'll lose data.

You'll need to boot MacOS from a floppy or another harddisk of some kind (like a ZIP). It can be done using a bootfloppy, and a utilities floppy, but it involves a lot of floppy switching if you have just one diskdrive. You can get the image for a System 7.5.3 bootdisk from Apple's site. On the utilities disk you need to put the partition manager.

Please note you can also get a copy of the full version of System 7.5.3 from Apple's ftp servers. System 7.5.3 is recommended, however on Macs with little memory it might be better to run System 7.1.

So, after you've back-upped everything important and stuff that you can't easily reinstall, boot from some other device than the harddisk you want to use to install Linux on.

Open your favorite partition manager. I'll assume you're using Apple HD SC Setup, freely available from Apple. Select the correct harddisk and double-check that. Click on partition, then custom. Most probably you will see two partitions; one named Mac Driver or similar, and one big partition.

Some harddisks have more than one MacOS partition. If you have such a configuration, you could choose to replace one of the partitions with the partitions you will need for Linux. Or you could remove all partitions. You will need at least, say, 40 MB total disk space for a very minimal installation.

I'm assuming you are in the situation of having just one MacOS partition. Click on the big partition, and then think 'Have I backed everything up?' If the answer is yes, go ahead and press remove. Otherwise, stop right here, and start again at the top of this document. Now actually read it. MacOS will get messed up if you delete the Mac Driver partition, so don't do that.

Swap partition

See section 5.1.1.

Root partition

See section 5.1.2, just don't fill up the whole disk. Leave enough space for your MacOS partition. Also, don't make the Linux Root partition smaller than 20 MB.

MacOS partition

Fill up the rest of the disk any way you like.

At the very least, you will need a stripped version of the System software, the penguin booter and a kernel in this partition. For the System software, you can use the Minimal software for this Macintosh option when installing the system. It should be around 1 MB. Penguin 18 and a kernel should also be about 1 MB. Then, you still need to store a couple of disk images that are needed during the installation. These could be stored on some other medium (like a ZIP) that is available under Linux. So roughly, a minimum MacOS partition would be about 5 MB in size.

6. Getting ready for the first boot

Now you've repartitioned your harddisk, you may need to reinstall software and restore files from backup. Do that now.

Later on, you will need a file called base2_2.tgz It's about 15 MB big. You can choose to get it to you local Machine now. If you want to leave it somewhere remote, e.g. when you're installing with a MacOS partition smaller than 15 MB, you need to have it somewhere you can access it over either an http connection, or via an NFS mount. If this doesn't make a whole lot of sense to you, don't worry. If you have an Internet connection, you can get it from one of the Debian mirrors.

Please note that if you are installing on a machine with a NCR5380 SCSI controller (i.e. a pre-68040 machine) and you want to get base2_2.tgz to your local machine, you will have to put it on the same harddisk your new Linux partion is on. If you try to install the base system from a SCSI harddisk to a second SCSI disk, or from a SCSI CD-ROM to a SCSI disk, you will encounter problems due to limitations of the Linux driver for the NCR5380 SCSI controller. You will be able to get around this later, see section 7.10. Read it now, and decide what you want to do. If you choose to fix the problem, you will need to download a new kernel and modules now. You can get them at A 2.2.17 kernel will do fine.

If you're getting the Debian packages off a CD-ROM and you don't have a NCR5380 based mac, you're fine as well. If you do put it on the local machine, put it somewhere you can remember, like the root of the MacOS partition.

Expand the archive macinstall.tgz. I'll assume you will extract it in the root of your MacOS partition. If you didn't, remember the exact directory you put it in, as you will need that information later (oh, and, don't put it on the desktop if you don't know what you're doing). It should create a folder named mac. Open this folder, and extract the Penguin-18.hqx file. This will create the Penguin booter. Double-click it. This will open the Penguin booter. Select "Settings" from the File menu. Click the button labeled Kernel and choose the file called linux. Now click the button labeled Ramdisk and choose the file root.bin. In the command line field, enter the following: root=/dev/ram

Click OK to exit the Settings dialog, and press [cmnd]-D to save your settings as the default. If you trust me or your backup, you can press [cmnd]-B now. Otherwise, check the settings, and press [cmnd]-B later. Linux will now boot, and start up the Debian install program.

7. Installing and setting up

Configure the keyboard

Select the appropriate keyboard. Your keyboard is an extended keyboard if it has a row of keys labeled F1 through F12.

Initialize and Activate a Swap Partition

If you've followed all the instructions, the installer should recognize a partition. The bad-block scan can be skipped.

Initialize a Linux Partition

Again, the installer should recognize a partition. It will ask you if you want to retain kernel 2.0 compatibility. If you're unsure what to answer, say no. Again, the bad-blocks scan can be skipped. After it's done initializing, go ahead and mount that partition as the root filesystem. Remember the device's name (/dev/sda[number]), since you'll need that information later.

Install Operating System Kernel and Modules

Installing a kernel is a bit stupid at least, since the kernel used for booting is always on the MacOS partition. Go ahead and do it anyway. We will remove the kernel later.

It will ask the medium you will use to get the files needed from. Select harddisk. It will come up with a partition. If you've followed my example, it should be /dev/sda5: HFS. The HFS shows this is a partition with a 'Hierarchical File System', that is, it's a partition that would normally be visible under MacOS. If multiple partitions show up, most likely they are numbered in the same order as they appear on the desktop, counting from low numbers at the top of the desktop. Once you've selected the partition, it will ask for the directory you put the Debian archive in. The installer has mounted the filesystem under /instmnt. This should be all right if you've extracted the macinstall.tgz file in the root of the partition, so just press enter. It will then prompt you to either select the exact path to the directory named Mac the installer archive created from a list, or to enter it manually. I suggest using manually only when list doesn't work.

Configure Device Driver Modules

Select all drivers you wish to install. Most likely, you don't want to install any modules at all. If you do want to install a module, please note that none of the modules requires additional parameters.

Configure the Network

If you're not on a network, please do go through this step. This step also sets up the hostname.

The help screen on this step suggests that you don't answer "Yes" to the question whether your computer is connected to a network if this connection is PPP, i.e. a temporary one (makes some sense, as PPP is often assigned dynamic network addresses). I strongly recommend to follow this suggestion and complete the network configuration after booting the disk based system. The 'pppconfig' utility is included in the base system to this purpose.

If you are connected to a Network, you need to enter:

Install the Base System

Now, we're going to extract and install the base2_2.tgz file I was talking about some time ago. If you've followed the example, you need to select harddisk as the medium you'll use to install the system from. If you're installing from a CD, you'll have to do the same. If you left it remote, you'll have to use either network (to get it from a Debian mirror) or nfs.

In the example, it's on the MacOS partition, so I'll select harddisk, then accept the partition, accept /instmnt, and then choose list. After the installer's done building the list, choose the one that seems most appropriate (most likely the first one). Now, the installation of the base system will start. This could take a while, on my IIci (25MHz 68030) it took just under 10 minutes.

Configure the Base System

Choose the appropriate time zone. The hardware clock will most likely not be set to GMT.

Reboot the System

After you're done configuring the base system, don't bother trying to make Linux bootable from the harddisk, and don't bother creating a bootdisk. Floppy disk drives are not supported under Linux, and directly booting into Linux isn't either. You will need to boot into MacOS before you can boot Linux. It's likely to stay that way, since Linux requires a number of parameters that are passed by the Penguin booter from MacOS, and depends on MacOS initializing certain things. Select reboot system to reboot. If you have a NCR5380 based Mac, don't reboot just yet, but read the next section first.

7.10 Getting around the NCR5380 SCSI controller limitations

If you have a NCR5380 based Mac, see section 6, this section is for you. If you do not plan on using more than one SCSI device, e.g. only your harddisk, then you do not need to perform the steps in this section. I do recomend it though, since it will increase the thoughput of SCSI devices by a factor of 10 or so. If you have a 5380 based Mac and plan on installing from a CD-ROM, you will need to perform these steps.

First, you need to install the modules you downloaded in section 6. So switch to the second terminal (use [cmnd]-[rightarrow] to switch), unpack them and install them in /lib/modules/. You can now reboot, so switch back to the first terminal ([cmnd]-[leftarrow]) and select reboot system.

Once you're back in MacOS, open the file boot. This will open the Penguin booter. Press [cmnd]-T to open the settings. You will need to tell the booter to use the kernel you downloaded. Once you've done that, you only need to specify the root partition, which is explained in the next section.

If you're rather confused by all this, feel free to send a message explaining what you don't understand to the linux-mac68k list, see section 9

8. Booting your newly installed system

Once you're back in MacOS, double-click on the Penguin icon. Press [cmnd]-T to open the settings. Under the tab options, look at the kernel parameters. It should say root=/dev/ram in the command line. Change the /dev/ram to the device you used as root partition. You can optionally check the autoboot option, to boot directly when the file is opened (this can be overridden by holding down the [cmnd] key while opening the file). If you have a small screen, you may want to reduce the font size. Adding video=font:8x16 or video=font:8x8 will give you a smaller font, so more characters will fit on your screen. When you're done, press the ok button. Don't forget to save the preferences ([cmnd]-D), and then boot Linux.

When Linux has finished booting (this could take a while), the installation will continue.

Enable MD5 passwords

If you're unsure, just say yes. This will enable the use of more secure passwords.

Enable shadow passwords

Most likely, you will want to install shadow passwords. Say yes.

Enter a password for root

The root password is very important. Please read all the text on the screen.

Create a normal user account

You will probably want to create an account for yourself. Go ahead and do that now, just follow the instructions on the screen.

Remove the PCMCIA package

If your Macintosh doesn't have a PCMCIA adapter, you don't need this, and you can safely remove it.

Setup ISP to install

If you want to install your system from the internet, and are using a ppp connection (e.g. a modem) to connect to an ISP, press yes and follow the instructions. Please note the modem port is /dev/ttyS0 and the printer port is /dev/ttyS1. If your ISP login procedure requires commands other than your username/password combination, you can configure more options in the Advanced Options menu in the Properties menu.

Otherwise, just press no. You can allways set up or change a dialin procedure later by entering pppconfig on the command line.

Installing more packages

Now, you can choose how you would like to install more packages. Choose the appropriate one. Then, dselect will be started. The instructions should now be sufficiently clear for you to install a complete system.

Note you do not have to install extra packages to have a functioning system; with the system you have now, you should be able to perform the most basic of tasks, such as telnet, ftp, and editing files with vi.

You can also choose not to install extra packages now, and do it later by running dselect or apt-get from the command-promt. Some people prefer apt-get over dselect.

9. Feel good (or not)

Once you're done with that, you should have a working installation of Debian on your Macintosh. If you do, sit back and enjoy. If you don't, try to find out what went wrong. Maybe try installing again, but doing things just a little differently. If it still doesn't work, there's a mailing list you can send email to.

Explain in detail what goes wrong. Sometimes, there's useful information on other consoles; use cmnd-[arrowkey] to switch to other consoles. If you have an extended keyboard, you can also use cmnd-[F-key]. Nobody can help you if you just say "it doesn't work". Also, please make sure the answer isn't in a FAQ somewhere.

10. Acknowledgments (in quasi-random order)