MacPenguin
  ::documentation::Debian 2.0 install guide  
 
 
[Debian Logo]

Debian/m68k GNU/Linux 2.0

Installation Instructions for Macintosh (v1.4)

Michael Schmitz, January 25 1999

(derived from Amiga install guide by Frank Neumann)

Ok, so you think you want to try Debian, dive into the wonderful world of free software, world-wide programming collaboration and soon-to-come world domination? Fine. Your first test will be to install the Debian base system on your Macintosh, and I hope this document will help you in getting that step done.

So, without any further ado, these are the absolutely vital steps you need to take:

step 0

Before even 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 are new to Linux or Unix in general. If you have a DAT, MO or spare harddisk, this is the chance to use them for creating a backup.

Check out if your system is suited for Linux/m68k - please read the Linux/m68k FAQ, available e.g. at http://www.linux-m68k.org, and check the Macintosh project pages at http://www.mac.linux-m68k.org.

Get the MacOS tools required to partition your disk, dump floppy images and other tools you might need. Apple software can be found at download.info.apple.com.

A word of warning (and I mean it): don't let yourself be fooled into thinking that installing Debian on a Macintosh is easy, or even possible with your particular model and configuration, just because Debian/68k happens to support Macintosh. The Mac port of Linux-m68k is just one year and a half old, and even though kernel development made considerable progress since the first Mac was booted by Alan Cox, there's still a lot to do, and a lot of bugs may be lurking out there yet. The Mac project web site lists the supported models, if your model isn't listed, assume it's not supported yet, ask on the mailing list, or give it a try, but please don't be disappointed if it doesn't work. Linux on Mac is strictly experimental. If the kernel supplied with the Debian installation files doesn't work for you, check for updates.

step 1

Get all required files from one of Debian's FTP sites, like ftp.debian.org, ftp.de.debian.org etc. A list of mirror sites can be found at http://www.debian.org/distrib/ftplist.

No matter what mirror site you use, the path should always be /pub/debian/dists/hamm/main/disks-m68k/current. These are the files you need:

  • mac/install.sit.bin (StuffIt archive of the installation files), or
  • mac/Debian-68k.image.bin (DiskCopy 4.2 image of the 'rescue' floppy), and
  • mac/resc1440.bin ('rescue' floppy image)
  • mac/drv1440.bin ('drivers' floppy image)
  • common/base2_0.tgz

The first two files are MacBinary encoded for proper FTP transfer and unpacking on your Macintosh, so use MacBinary mode for fetching them in Fetch or other MacOS FTP apps. If your FTP app doesn't automatically decode MacBinary format, decode these files using StuffIt Expander or another MacOS decoder.

The other two '.bin' files are not MacBinary encoded, just simple binary MS-DOS floppy images, so use simple binary mode for transfer. Using MacBinary mode will corrupt these files.

You'll need DiskCopy 4.2 or later to create a MacOS floppy from the boot floppy image. If you only have the resc1440.bin floppy image, you'll also need a program to dump this MS-DOS format floppy image to a 1440k (HD) floppy in your floppy drive. I don't know of any MacOS applications that will do this, so it might be easier to get someone with a Linux PC to dump it to a floppy for you. Not all versions of PC Access can read a DOS floppy with Mac binaries properly.

Why bother with these floppy images anyway, when other documentation states that Mac floppy drives are unsupported by Linux? First off, the Debian installer requires a MS-DOS floppy images (the resc1440.bin and drv1440.bin files) to install the kernel and modules later on. So you have to get these anyway; if you had to compress the floppy images for transport to your Macintosh, you need to uncompress them now. Second, using the floppy to boot the installation system saves you the step of setting the path to kernel and ramdisk for the booter, it is already set right in the Preferences file on the floppy.

Once you have installed the base system and want to continue installing other packages, you can find these under the directories /pub/debian/dists/hamm/main/binary-m68k (core section), /pub/debian/dists/hamm/contrib/binary-m68k (contributed packages) and /pub/debian/dists/hamm/non-free/binary-m68k (software which does not meet the Debian Free Software Guidelines (DFSG).

step 2

Unpack the install.sit file to your harddisk (a subdirectory named "debian" will be automatically created for you). I recommend to unpack the archive directly onto the main directory of a partition that has at least ~ 10 MB of free space. If you chose to install from the floppy image, just create a directory named "debian". Move the base2_0.tgz, resc1440.bin and drv1440.bin files into this same directory ("debian"). Don't rename any files in that directory. Please do not replace the ramdisk image (root.bin) with another one you might have used to install pre-release versions of Debian.

step 3

Partition your harddisk (or rather prepare partitions for Linux): There is a partitioning tool for Linux/m68k called mac-fdisk, but for now I recommend you partition your disk using Apple's HD SC Setup utility or other disk tool. If your partition editor doesn't have an option to edit the partition type, you can do this crucial step at a later stage (from the booted temporary install ramdisk). A number of disk tools (mostly the 'Lite' or 'PE' editions) lack this functionality, so make sure you get the right tool for this step. Apple HD SC Setup can be used for third party disks if patched as described in http://www.euronet.nl/users/ernstoud/patch.html. The partition editor from the MkLinux project is at ftp://ftp.mklinux.apple.com/pub/wip/pdisk/latest/ and is available as m68k version. Tim Endres' DiskTool (available at the Mac68k FTP site) does the job, as does FWB's HDT 1.8 (not the PE version though) and SilverLining (not the Lite version). This list is not complete, if you know of other options, I'd appreciate a short notice. I've only tested HD SC Setup and DiskTool, your mileage may vary.

When partitioning your disk, please keep in mind that Linux has to be launched by the 'Penguin' bootstrap program, which is a MacOS application. Consequence: you will need a working MacOS system to boot Linux, so don't destroy your MacOS startup partition in this step. If you need to repartition your only MacOS partition to free space for Linux, make sure you have all necessary media to boot and reinstall MacOS after partitioning, or get a spare disk instead. There is no way to boot Linux directly from a loader in the boot sector of your disk on a Macintosh. Destroying your MacOS partition means you will have to reinstall MacOS before you can start over again!

You should have reserved at least two partitions for Linux: One for the "root filesystem" and one for a "swap partition". The size recommendations are:

  • for the root partition,

    absolute minimum should be 20 MB (this is just enough to install the base system, and nothing else - probably enough for testing it, but not for really using it); a reasonable system starts at around 200 - 400 MB, no limits upwards.

  • for the swap partition

    about twice as large as your main memory, but rather more than that. Especially on systems with little main memory (like 8 MB RAM), don't go below 20 MB swap space.

Naming conventions: This is important because under Linux your partitions have different names than under MacOS. This is the naming scheme:

  • The first SCSI harddisk (address-wise) is named "sda".
  • The second SCSI harddisk (address-wise) is named "sdb", and so on.
  • The first IDE harddisk is named "hda", the second IDE harddisk is named "hdb", and so on.

The partitions on each harddisk are represented by appending a decimal number to the harddisk name: sda1, sda2, sda3 represent the first, second and third partition of the first SCSI harddisk in your system. MacOS uses a separate partition for the partition table and driver data, so there will be more partitions around, usually partition 1 and 2.

Here is a real-life example: Let's assume you have a system with 2 SCSI harddisks, one at SCSI address 2 and the other at SCSI address 4. The first disk (at address 2) is then named "sda", and the second "sdb". If the "sda" harddisk has 5 partitions on it, these will be named "sda1", "sda2", ..., "sda5". Analoguous for the "sdb" harddisk and its partitions.

So, now that we know the partition names, you can actually change their type from within your partition editor so that the Linux installation program can detect them:

Start the partition editor, select the disk you want to use, select the "Partition Drive" function and select/create the partition you want to use as the Debian root filesystem. For HD SC Setup, you'll have to select 'Custom' partition scheme, and create partitions with the mouse as needed. Debian needs A/UX type partitions to install on, 'A/UX Root' or 'A/UX Root Usr' should be fine for the data partitions. You may need to delete partitions to create space for new ones; HD SC Setup doesn't support just changing the partition type. DiskTool does offer these choices but allows editing the partition type.

After creating the root partition, create a partition that is to be used as a swap partition, and set the partition type to 'A/UX swap' instead.

Please note:

  • Your root and swap partitions do not need to be on the same harddisk.
  • You can have more than one partition for files besides the root filesystem - this even makes sense very often, like when seperating the user's home directories from the system file area. If you want to use more partitions, prepare them just like the root partition. (If you're only going to try Linux for a short time, it's enough tojust have a single partition for files.)
  • You can also have more than one swap partition, though that's not seen very often.
  • Write down the partition names (you know, the "sda1" etc. stuff) of all partitions that you are going to use for Linux.
  • At this point, please also write down the partition name (Linux-wise) of the partition on which you have unpacked the "install.sit" archive. You will need this later for installation of the kernel, modules and base system.

When you have made all required changes, go back to the main window of the partition editor and "Save Changes to drive". Think twice before actually clicking on "Yes" - have you chosen the correct partitions? No viable data that could get lost now? Then click OK. If required, the Macintosh will reboot after this.

step 4

When you're back at the MacOS desktop, start the Linux installation process by double-clicking on the "Penguin Prefs" icon in the "debian" directory. If installing from floppies, double-click on the  "Penguin Prefs" icon there. The Linux booter (Penguin) starts up, loads kernel and ramdisk and starts booting without further ado. (If you want to examine or change the booter settings first, hold down the 'command' key while starting Penguin.) If starting the booter from the harddisk, you will have to set the path for kernel (linux) and ramdisk (root.bin) correct for your system on the first start of the booter. Start up holding down the 'command' key until the booter has finished loading and reading the preferences file. Go to the "Settings" dialog (shortcut: command-T) and adjust the path for kernel and ramdisk by clicking on the appropriate buttons in the upper right corner of the panel. Kernel and ramdisk are in the 'debian' directory on the drive where you unpacked the install.sit archive. Save the settings to the preferences file in that directory (using command-S) and boot using the command-B shortcut. After this, the screen will change colors, a few seconds of delay, and after that a black screen with white text should come up, displaying all kinds of kernel debugging information. These scroll by far too fast for you to read, but that's not important right now. After a couple of seconds, the installation program should start automatically. If you get up to this point, you can be quite confident that you will be able to install Linux on your system. In case the installation program complains about not finding any disks or partitions to install on, try a newer kernel or check your partition types again.

step 5

So, now we're getting somewhere. The Debian installation program will lead you through the steps of preparing the partitions from the Linux side, unpacking and configuring the kernel modules and base system, and finally rebooting. Some of the presented steps are not really necessary (or even possible) on m68k platforms (the installation program is just the same as on the i386 version of Debian, and some of the i386 features are not (yet) available in the m68k version), so I'll tell you what you have to do at each step now.

Select Color or Monochrome display

If you use a black-and-white monitor, you might want to choose a monochrome display - otherwise select Color. Use the cursor keys to choose what you want, then press Return.

Release notes

This is just a screen with a few informations about Debian's goals, who built the rescue set etc.

Now we come to the main installation screen which lists all possible actions you can take, with the next logical step always being highlit at the top of the list. I recommend to strictly follow the suggested way.

Configure the keyboard

Depending on whether you have a extended or standard keyboard, select the one appropriate for you with the cursor keys and Space, then move with Tab to the OK button and press Return. Only US keyboards are supported during the installation right now, a french keymap is available once the system has been set up.

One problem persists for installation on low memory machines (up to 8 MB as far as I could determine): the installation process restarts from the 'Color or Monochrome' step if keyboard configuration is attempted. If this happens to you, there's a few things you can do: Switch to a shell using left-command+F2 for virtual console 2 (or the 'Shell' option in the list, if you have a standard keyboard), and execute the command echo -n "mac-us-ext" > /tmp/kbdconf if you have an extended keyboard, or echo -n "mac-us-std" > /tmp/kbdconf for a standard keyboard. The installation program will be fooled into assuming the keyboard has been configured, and stop offering that step as the only logical choice forever.

The extended keyboard map is hardwired in the kernel, to switch between virtual consoles on a standard keyboard you'll need to load the appropriate keymap, with the commands zcat < /etc/keymaps.tgz | /sbin/tarcat mac-us-std.bmap | /sbin/loadkmap (scary, isn't it?) and console switching should work now, with command-1 for console 1, command 2 for console 2 etc. Exit the shell, or switch back to console 1, to continue the installation.

Initialize and Activate a Swap Partition

When pressing Return, you will see a list of partitions that the installation program has found as being prepared by you for usage as a swap partition. Probably there is only one choice, and it should have the same partition name you wrote down under MacOS while you were preparing that partition in your disk utility. If the installation program doesn't offer any swap partitions to chose from, switch to a shell, >and run the command mac-fdisk -l. The output of this command should help you in troubleshooting the problem. If you have chosen to use several swap partitions, repeat the following step for all of them:

  • Press Return to accept the selected partition
  • When asked whether you want to do a bad-block scan, you can safely skip this step, so select "No" here using Tab and then Return. SCSI disks should not have bad blocks, and manage to revector these automatically should some appear.
  • When asked whether you really want to initialize this partition as a swap partition, think twice, then, when being sure, press Return.

At this point the swap partition will be "formatted" -- that is, some information is written to it to mark it as swap partition -- which only takes a second (you'll hardly be able to read the text that appears at the top of the screen - ignore that for now).

Initialize a Linux partition

This is very similar to the previous step, but this time it's not about swap partitions, but about "real" partitions which are supposed to carry files. Just as before, you'll be presented with a list of partitions that the installer found to be valid as Linux filesystem partitions. Again, for each of the partitions you have chosen to use, accept it by selecting it from the list and pressing Return, skip the "Bad-block scan" and (when you are sure) select "Yes" to format (initialize) the partition. After that, you will be asked whether you want to mount the currently active partition as root ("/") partition. Say "Yes" here at the first partition you use. Other partitions can be mounted somewhere under this mount point afterwards.

Install Operating System Kernel and Modules

As I assume that you are installing from files on a harddisk, you will have to select "Harddisk: Filesystem on the harddisk" here. Next you need to specify the (MacOS) partition on which you unpacked the "install.sit" archive. After that you also need to enter the path to the directory containing the installation files - in the simplest case (that is, if you unpacked the .sit archive directly into the main directory of a partition), you just hit Return because "/debian" is already set as default for the directory name; otherwise you will have to type the path yourself. It has to begin with a "/", followed by the directory components leading to the files (e.g. "/tmp/newstuff/debian" if the files reside in the directory /tmp/newstuff/debian/ on that partition). Next you are asked whether you want to select the files from a list or enter the path name manually; you have to press Return here to select the installation files from a list of choices. The installation program will not find only the correct and only available installation files itself but offer HFS metadata files as well. In the example above, where you used /debian as installation file path, the installation program will offer /instmnt/debian/.finderinfo and /instmnt/debian/.resource before the correct path /instmnt/debian, so just scroll down twice and hit Return.

The harddisk LED will blink for a while as the kernel and modules are unpacked onto the root partition, and after that you get back to the main screen.

Configure Device Driver Modules

This step is only necessary if certain device drivers need to be loaded very early when Linux starts up later; like, an Ethernet driver has to be pre-loaded so that the networking can already be initialized at boot-time. For a stand-alone system you probably don't have to configure anything here, but you should still select this item so that the installer can build a list of available kernel modules. When you see the next screen, you can immediately go to "Exit: Finished with modules. Return to previous menu".

If you do need to configure a device driver for your system, please follow the on-screen explanations for selecting modules to be pre-loaded - after each selection, the installation program will first ask if the selected module should be installed, then display help text explaining possible module options (mostly empty) and prompt for module parameters. Only a few modules are available for the Mac kernel, none of which require module parameters, so just leave the module paramteters empty. When done, select the "Exit" item.

Once your Linux system is installed, you can get back to the configuration of modules at any time by starting the "modconf" program.

Install the Base System

Just as with the "Install Operating System Kernel and Modules" step, you need to specify where the base system archive is located. This file should be named "base2_0.tgz". If you have put it into the same directory as the other installation files, you already know what to do now: Select "harddisk: Filesystem on the harddisk", pick the correct partition and (if necessary) enter the path name to the directory containing those files. Again, everything should be in the place the installer expects to find it but the HFS metadata get in the way and confuse the installer, so press Return, scroll down to the proper path and press Return again after this to accept the default options.

At this point you've got a few minutes time (depending on the speed of your processor/harddisk) while the base archive is unpacked onto the Linux root partition. On a slow Mac, unpacking the base system takes around 30 minutes, be patient.

Configure the Base System

In this step you just set the timezone that you're in - this should be pretty intuitive. For instance, for Germany the selection "CET - Europe" (first screen) and "Berlin" (second screen) should be fine. When asked whether your system clock is set to "GMT" (Greenwich Mean Time), you will likely answer with "No" as most Macs will use the local time instead of GMT.

Configure the Network

We're almost done! This last step to do is to set up your networking if you are so lucky to be connected to a net. If you have no network, all you need to enter is your hostname (under Linux, every computer has a name!). Pick something you like - your girlfriend's name *sigh*, a famous artist/writer/composer/character/actor/whatever. Just one word, please.

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

  • Your network's name
  • The IP address of your computer
  • The netmask
  • Your broadcast address
  • Your gateway's IP address, if one is available
  • Your nameserver's IP address, if there is one available.
  • Your type of connection - Ethernet, PPP, Slip or whatever else.

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 answer "Yes" nonetheless - to my experience, you will not be prompted for your network configuration otherwise, leaving this step to be done manually. My installation wouldn't connect to the FTP server without knowing what name server to use ...

The network configuration step doesn't completely set up PPP or SLIP for you, just stores the configuration data for you. For these configurations, you'll see error messages about 'network device not available' now (and on the later boot from disk), ignore them, and configure PPP or SLIP later.

Well, that's it! Ignore the next suggested step ("Make Linux bootable directly from harddisk") and instead select alternative 2: "Reboot the System". After a few seconds, the Mac should reboot automatically into MacOS. If the Linux kernel hangs on attempting to reboot, just press the reset button.

So, one last step is required from you before you can boot your freshly installed Linux: Go to the directory containing the installation files and start up the Penguin booter, holding down the 'command' key. Go to the 'Settings' dialog (command-T), and locate the kernel options line (should look like root=/dev/ram video=font:VGA8x16 or such). The important thing to change is the entry root=/dev/yyyy. In this line, replace the yyyy with the Linux-wise partition name of the root partition onto which you installed the system - like sda1, hdb3, whatever it was, you figure. The 'video=font:VGA8x16' is my recommendation especially for users with these tiny screens like on a SE/30; the kernel would pick a prettier (6x11) font but the console driver for this font can hang the machine, so using 8x16 (or 8x8, on the small displays) is safer. If you don't want to start Linux immediately each time you start the booter, uncheck the 'Auto Boot' option.

Save that file, using the 'Save Settings As Default' option.

If you installed from floppy disks, copy "Penguin-15" and "linux" to a folder on your harddrive, and create the Preferences file as described above.

Now you can just double click on the "Penguin" icon in that folder to actually start the system, booting from the just installed harddisk instead of the ramdisk filesystem.

The boot sequence will take quite a bit longer than when you installed the system because a database of filenames has to be built ("Locate" database). After that, you are automatically logged in, and need to take these steps:

  • Set a password for the root user (the administrator account)
  • Create another (unprivileged) user account
  • Activate (or not) the "Shadow passwords" (recommendation: Yes, use it!)
  • Determine whether you want to continue installing the system via a PPP line or not (untested).
  • Set an "installation profile" of packages you want to install.

After these steps, you are automatically thrown into the "dselect" program which is the interface-driven package installation manager. My personal preference is to quit that program as soon as possible and rather install packages manually via the "dpkg" program, but your mileage may vary. You should at least set the access method and update the packages list here; I have so far used disk based and FTP based installation methods with success. Selection of packages has already been performed if you didn't skip the "installation profile" above, so there should be no need to select packages by hand using dselect.

When you quit this program, you get logged out and can log in as root or as an unprivileged user if you created one before.

At this point you have a running basic Debian installation on your Macintosh, and if this all worked out (more or less) well for you, I'd definitely love to hear about it! :-)

A few tasks are still left to do, such as configuring PPP or SLIP (if that's your network option). For PPP, edit /etc/ppp/peers/provider (replace /dev/modem with your serial line here, i.e. /dev/ttyS1 for the first SCC port; there's no /dev/modem anymore) and /etc/chatscripts/provider (enter your username and password for your ISP account, plus change the 'name' and 'word' to whatever the prompt at login is. Some configurations require you to send the string 'ppp' to start up PPP after login, just add another expect/send pair after the password for that. "pon" and "poff" start and stop the connection, respectively. SLIP is more hassle; look at the "/etc/init.d/network" startup script where the "ifconfig" command has already been inserted for you, and add a "slattach" command before this, if you use static SLIP. Dynamic SLIP should be set up using "dip", so you'll need to install this package. If you didn't answer "Yes" to the question if your computer is connected to a network, you will have to create the file /etc/resolv.conf containing the line "nameserver <ip-addr>" where <ip-addr> is the address of your ISP's name server host.

One more hint: To cleanly shut down a running Linux system, you must not just reboot with the reset switch on the front of your Macintosh, or turn off the computer - instead, press the key combination Ctrl-Alt-Del (yeah, just like on a PC :-) to shut down the system in a controlled manner. That's Ctrl + LeftAlt + Delete_right_of_Return. Or log in as root and type shutdown -h now if you don't like the key combo.

More information:

Good luck in the wonderful world of Debian/m68k!

History of this installation guide:

v0.1July 20th, 1998First version, only ASCII text
v1.0August 3rd, 1998Pushed to HTML, small additions & typo corrections

Macintosh version:

v1.0August 9th, 1998First version, based on Frank Neumanns Amiga version
v1.1August 29th, 1998Updated for 2.0r2
v1.2September 5th, 1998More warnings ...
v1.3September 24th, 1998Even more warnings ...

Michael Schmitz, Last change: September 24th, 1998

 
 
Valid HTML 4.01 Transitional Valid CSS! sourceforge.net Copyright © 2000-2010 Linux/m68k for Macintosh Project.