[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Potato Installation guide



Here it is and hopefully reasonably complete and correct.  I would be
grateful if anyone identify's errors and omissions would let me know and I
will put them right.  This document is very similar to the slink guide so
most should be familiar

Attachment: %debian-mac.txt
Description: application/applefile



			Debian/m68k GNU/Linux 2.2 (Potato).

			Installation Instructions for Macintosh (v2.0).

			Mark Scott June 2000

About this Guide.
This guide is intended to help you install the Debian/m68k GNU/Linux (Debian) base system onto your 68k based Macintosh.  The most recent version of this document is on-line at the Linux/m68k web site (www.linux-m68k.org/dists.html).

Introduction.
Debian for Macintosh, or other computers using the Motorola 68000, is less than four years old.  Considerable development progress has been made but there is still a lot to do, and a lot of bugs may be undiscovered.  Debian is not commercial software so installation is challenging and may not be smooth or even possible for your hardware.  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.  Debian will not run on machines without a paged memory management unit usually this means you will need a 68030 or better cpu.  You may succed with a 68020 processor plus seperate fpu.

Debian distributions known by various names.  This version, 2.2  is known as potato, the previous version 2.1 is known as slink and the version before is woody.  You may find this helpful when navigating WWW and FTP sites.

Before you start.
Backup your current System, you can do a lot of damage very easily if you are new to Linux or Unix in general. If you have a spare hard drive or other media, this is the chance to use it for creating a backup. You will be required to partition your hard drive if you wish Linux to reside on the same hard drive as the MacOS.  This can be a lengthy and tedious process but is also highly dangerous. If in any doubt backup before going any further and ensure you have the original system and software disks to hand.
	
	Check out if your system is suited for Linux/m68k
	(www.linux-m68k.org/status/sysreq.html)
	Read the Linux/m68k FAQ (www.linux-m68k.org)
	Check the Macintosh project web site.

Tools you will need.
MacOS tools required to prepare your system for Linux installation.  You will need Disk Partitioning software.  As part of the partitioning process you will need to edit the partition type.  If your chosen editor lacks this functionality you will be able to do it as part of the installation process.  You will need DiskCopy 4.2 or later to create a MacOS floppy from the boot floppy images.
If you only have the resc1440.bin floppy image, you will also need a program to dump this MS-DOS format floppy image to a 1440k (HD) floppy in your MAC floppy drive. I am not aware 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 or DOS Mounter can read a DOS floppy with Mac binaries properly.

Files you will need.

Installation by downloading files from FTP sites.

Files can be obtained from one of Debian's FTP sites (ftp.debian.org). A list of mirror sites can be found at www.debian.org/distrib/ftplist.  Please choose the site closest to you.  No matter which site you use, the path to locate the files should always be 	:/pub/debian/dists/potato/main/disks-m68k/current/

These are the files you need:.
	mac/macinstall-floppy-hfs.img (Image archive of the installation files)
	This archive contains all the files you need to install Debian you will 
	still need the 	base system file base2_2.tgz.

If you wish you may down load the files separately.

You will need these files.
	mac/Debian-m68k-2.2-Mac.img.hqx 	(Rescue floppy image)
	mac/images-1.44/resc1440.bin 		(boot floppy image)
	mac/images-1.44/drv1440.bin		(drivers floppy image)
	/base2_2.tgz					(base System).

Note the disk image files are encoded for proper FTP transfer and decompressing on your Macintosh.  The other files (mac/resc1440.bin and mac/drv1440.bin) are not MacBinary encoded, using MacBinary mode will corrupt these files. so use a simply binary transfer protocol. The file /base2_2.tgz is a gzipped encoded file and will transfer properly.  If your FTP application doesn't automatically decompress these files, decode using StuffIt Expander or other decoder. Do not decompress the base2_2.tgz file this will be done for you as part of the installation process.  You need these images because the Installer requires MS-DOS floppy images (the resc1440.bin and drv1440.bin files) to install the kernel and modules.

Unpack the macinstall-floppy-hfs.img file to your hard disk,a sub folder named "debian" will be automatically created for you.  You will need at least 10MB free disk space for this file.  If you chose to install from the floppy images, create a new folder named "debian".  Move the base2_2.tgz, resc1440.bin and drv1440.bin files into this folder. Do not rename any of these files.

Partition your hard disk
I recommend you partition using Apple's HD SC Set-up utility obtained from ftphqx.info.apple.com/Apple_Support_Area/Apple_Software_Updates/US/Macintosh/Utilities or other proprietary 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 ram disk).  There is a partitioning tool for Linux/m68k called mac-fdisk.

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 Set-up 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 a 68k version.

DiskTool (available at the Mac68k FTP site ftp.linux-m68k.org/pub/linux-mac/mac-utils/), FWB's HDT 1.8 (not the PE version) and SilverLining (not the Lite version) all have the required functionality.  This list is not complete, if you know of other options, please let me know.

When partitioning, please keep in mind that Linux will be launched by the 'Penguin' bootstrap program, which is a MacOS application. This application will shutdown your Mac and start Linux.  Therefore you need a working MacOS system to boot Linux, so if you destroy your MacOS start-up partition in this step you will have to reinstall the MacOS before you can start over again !.
If your Mac's hard drive has only one partition make sure you have all necessary media to boot and reinstall MacOS after partitioning, or get a spare hard disk instead. You cannot boot Linux directly from a loader in the boot sector of your disk on a Mac.

You should reserve at least two partitions for Linux.  One for the "root file system" and another for a "swap partition".  Size recommendations are:-

Root partition
The 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, with no upper limit.

Swap partition
At least twice the size of your main memory.  Especially on systems with little main memory eg 8 Mb RAM.  Do not go below 20 Mb for swap space.

Naming conventions
This is important because under Linux your partitions referred to with different names than under MacOS.  This is the naming scheme:
	The first SCSI hard disk is referred to as "sda"
	The second SCSI hard disk if you have one is referred to as "sdb", and so 
	on.
	The first IDE hard disk is referred to as  "hda", the second IDE hard disk 
	is named "hdb", and so on.

Note you do not need to rename your hard drives when operating your MacOS.
The partitions on each hard disk are represented by appending a decimal number to the hard disk name: sda1, sda2, sda3 represent the first, second and third partition of the first SCSI hard disk 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 an example, assume you have a system with 2 SCSI hard disks, one at SCSI address 2 the other at SCSI address 4.
The first disk (at address 2) will be named "sda", and the second "sdb".  If the "sda" hard disk has 5 partitions on it, these will be named "sda1", "sda2", ...,"sda5".  Similarly for the "sdb" hard disk and its partitions.  Note Linux refers to all components of a system as devices.  The full name of your hard drive will be /dev/sda"n" where n is the number of each partition.  Now that we know the partition names, you can change their type from within your partition editor so that the Installation program can detect them.

Start your chosen 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 file system.  For Apple's HD SC Set-up select 'Custom' partition option, and create partitions as needed.

Debian needs A/UX type partitions to install Linux on, 'A/UX Root' or 'A/UX or Root&Usr' should be fine for the data partitions. You may need to delete partitions to create space for new ones; HD SC Set-up doesn't support just changing the partition type.  DiskTool offer's these choices and allows editing of the partition type.

After creating the root partition, create a partition to be used as a swap partition, set the partition type to 'A/UX swap'.
Note:
	Your root and swap partitions do not need to be on the same hard disk.
	You can have more than one partition for files besides the root file 
	system.  For example separating 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 to just 
	have a single partition for files.

Write down the partition names, "sda1" etc., of all the partitions you are going to use for Linux.  Also write down the partition name, Linux-wise, of the partition in which you have unpacked the "Install.sit" archive i.e sda3 or whatever it is.  This will be a partition accessed by the MacOS you will need this information later in the installation process.
When you have made all required changes go back to the main window of the editor and prepare to"Save Changes". At this point be very careful, a mistake will cause you to loose valuable data.  Double check you have the right information in the right place before you save your changes.

Start the Linux Installation process.
Double-clicking on the "Penguin Prefs" icon in the "debian" folder starts the Installer.  If installing from floppies, double-click on the "Penguin Prefs" icon there. The Penguin starts up, shutsdown the MacOS, loads a kernel in a ram disk and starts the installation program.  If you want to examine or change the settings first, hold down the 'command' key while starting the Penguin.
If starting the Penguin from your hard disk, you need to set the path for the Kernel and ram disk (root.bin) correct for your system on first start.  Start up holding down the 'command' key until Penguin has finished loading and reading the preferences file.  Go to the "Settings" dialogue (shortcut: command-T) and adjust the path for Kernel and ram disk by clicking on the appropriate buttons in the upper right corner of the panel.  The Kernel and ram disk 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. The Penguin will shut down the MacOS and start the installation process.

If installing from CD-ROM, double click on the "Penguin Prefs" icon in the /install/mac directory on the CD.  The path to Kernel and ram disk image should not require adjustment here.

The screen will change colours, a few seconds of delay, and after that a black screen with white text should come up, displaying all kinds of kernel debugging information. 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.  If the installation program complains about not finding any disks or partitions to install on check your partition types and paths again.

The installation program will lead you through a series of steps, preparing the partitions for  Linux, unpacking and configuring the kernel modules and base system and finally rebooting.  You move through the information presented in each screen by using the cursor keys, use the TAB key to confirm your selection and Return or Enter to move to the next step.  Some of the steps are not necessary or even possible on m68k platforms  The installation program is the same as the i386 (Intel based systems) version of Debian and some features are not available in the m68k version.

Select Colour or Monochrome display.
Make your choice.

Release notes.
A screen with some information about Debian's goals, who built the rescue set etc.

The main installation screen.
This lists all the actions you can take, with the next logical step highlighted at the top of the list.  Please follow the recommendations unless you know what you are doing or like to live dangerously.

Configure the keyboard.
Select the one appropriate for you.

Initialise and Activate a Swap Partition.
After pressing Return, you will see a list of partitions that the installation program has found as being prepared by you for use as a swap partition.  There is probably only one choice, and it should have the same partition name you wrote down while you were preparing that partition with your disk utility.  If the installation program doesn't offer any swap partitions to chose from, switch to a shell (Execute a Shell in the menu) 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 these steps for all of them.
When asked if you want to do a bad-block scan, you can safely skip this step, select "No".  SCSI disks should not have bad blocks, and map out these sectors automatically should some appear.  When asked whether you really want to initialise this partition as a swap partition, think twice, press Return.  At this point the swap partition will be initialised, formatted and ready for Linux

Initialise a Linux partition.
Similar to the previous step, but this time referring to partitions used to carry files.  You will be presented with a list of partitions that the Installer found to be valid as Linux file system partitions. Again, for each of the partitions you have chosen to use sda4 etc., accept it by selecting it from the list, skip the "Bad-block scan" and (when you are sure) select "Yes" to initialise the partition.  You will then be asked if you want to mount the currently active partition e.g. sda4 as root ("/") partition. Say "Yes" here at the first partition you use.

Install Operating System Kernel and Modules.
Installing from your Hard Drive.
Select "Hard disk: File system on the hard disk".  Specify the partition where you unpacked the "Install.sit" archive eg /dev/sda3.  Enter the path to the directory containing the installation files.  In the simplest case, if you unpacked the archive directly into a folder at the top of the directory tree, just hit Return.  This is because "/debian" is already set as default for the directory name; otherwise you will have to type the path yourself.  It must 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).

If installing from CD-ROM.
Change "/debian" to "/install/mac".  Next you are asked whether you want to select the files from a list or enter the path  manually.  Press Return to select the installation files from a list of choices presented to you by the Installer.  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 to the correct path and hit Return.
The hard disk will operate for a while, the activity light may also blink, as the kernel and modules are unpacked onto the root partition, and returns you to the main screen.

Configure Device Driver Modules.
This step is necessary if certain device drivers need to be loaded very early when Linux starts up later.  For example an Ethernet driver has to be pre-loaded so that networking will be initialised and ready at boot-time. For a stand-alone system you probably don't have to configure anything here, but you should still select this item This will enable the Installer to build a list of available kernel modules. When you see the next screen, select "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 selection, the installation program will ask if the selected module should be installed, then display help text explaining possible module options (mostly empty) and prompt for module parameters.  Few modules are available for the Mac kernel, none of which require module parameters, so leave the module parameters empty. When done, select "Exit". Once your Linux system is installed, you can get back to the configuration of modules at any time by starting the "modconf" program.

Configure the Network.
This last step will enable networking if you are connected to a Network.  The help screen suggests you  answer "No" to the question whether your computer is connected to a Network.  I advise you follow this suggestion and complete the Network configuration after booting the system.  The 'pppconfig' utility is included in the base system for this purpose.  If you are not all you need enter is your hostname.  Linux requires every computer to have a name, pick something you like just one word please with no gaps or spaces.

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.

Install the Base System.
Specify where the base system archive is located this file is named "base2_2.tgz".  If you put it into the same directory as the other installation files, you  know what to do now.  Select "Hard disk: File system on the hard disk", pick the correct partition and (if necessary) enter the path name to the directory containing those files.

If you are installing from CD-ROM, select "CD-ROM" and enter "/install" as the path.  Press Return, scroll down to the proper path press Return accepting the default options.  At this point you've got a few minutes time (depending on the speed of your processor/hard disk) while the base archive is unpacked onto the Linux root partition. On a slow Mac, e.g. IIsi, unpacking the base system takes around 30 to 45 minutes, be patient this is a good time to make a cup of coffee or whatever you prefer and relax.

Configure the Base System.
Select the timezone that you're in.  Use TAB to select your nearest city location. When asked whether your system clock is set to "GMT" (Greenwich Mean Time), you have a choice most users use the local time instead of GMT.  You choose.

Ignore the next suggested step, "Make Linux bootable directly from hard disk", this is not possible on a Mac.  Select "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 at the back of your Mac.

One last step is required before you can startup your freshly installed Linux directly.  Go to the directory containing the installation files and start up the Penguin, holding down the 'command' key.  Go to the Settings' dialogue (command-T), and locate the kernel options line which should look like root=/dev/ram video=font:VGA8x16 or similar.

You need to change the entry  root=/dev/yyyy.  Replace the yyyy with the Linux name of the  partition onto which you installed the system e.g. /dev/sda1, you wrote this down earlier.  The 'video=font:VGA8x8' is recommended especially for users with tiny screens, the kernel would pick a prettier (6x11) font but the console driver for this font can hang the machine, so using 8x16 or 8x8 is safer at this stage.  You can change this at any time.

If you don't want to start Linux immediately each time you start, uncheck the 'Auto Boot' option.  Save that file, using the 'Save Settings As Default' option.  If you installed from CD-ROM, copy "Penguin-18" and "Linux" to a folder on your hard drive, and create the preferences as described above.
Now double click the "Penguin" icon to start your  freshly installed Linux from the  hard disk instead of the ram disk file system.  The boot sequence will take longer than when you installed the system because a database of filenames has to be built.  You are then automatically logged in as root, the privileged or superuser, and need to take these steps:

	Set a password for the root user (the administrator account)
	Create another (unprivileged) user account
	Activate Shadow passwords giving you improved security a good idea !
	Determine whether you want to continue installing the system via a PPP line 
	or not, and configuration of the PPP connection scripts.
	Set an "installation profile" of packages you want to install.

After these steps, you are automatically directed into the "dselect" program the interface-driven package installation manager.  Packages give you the ability to do work with your new Linux.  Packages can be found in the following directories:-
	/pub/debian/dists/potato/main/binary-m68k/		Core section
	/pub/debian/dists/potato/contrib/binary-m68k/	Contributed section
	/pub/debian/dists/potato/non-free/binary-m68k/	Packages not conforming to 
													the Debian Free Software 
													Guidelines

Package selection has already been performed if you didn't skip the "installation profile step" above.  I advise you, at least, select the media you are going to install packages from and update the package listing.  The package listing file is in each of the directories above.  You can complete installation and configuration when ready.  When leaving this program, you are logged out automatically and can now log in as root or as an unprivileged user if you created one before.  If you skipped the installation profile step you will need to select packages using the "dselect" program.  Detailed help is provided within the program and is a good place to start when using this package especially for the first time. 
Hopefully you now have a basic Debian Linux installation running on your Macintosh.  There are, however, a few tasks left for example configuring your network protocol.

Configuring your Network Protocol.
You will need to do this if you wish to use a Network and did not configure PPP or SLIP earlier.
Edit /etc/chatscripts/provider (entering 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 send the string 'ppp' to start up PPP after login, just add another expect/send pair after the password for that. Rename and save the file with a name of your choice
The commands "pon" <your filename here> and "poff" <your filename here> start and stop the connection respectively.  By default only the root user has permission to use these files.  Of course when logged in as root you may grant this privilege to any other user.  This is probably a good idea as it is very easy to do damage when looged in as root unnecessarily.

SLIP is more difficult.  Examine the "/etc/init.d/network" start-up script the "ifconfig" command has already been inserted for you.  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 answered "No" to the question is 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.

Shutting down the System.
To shut down a running Linux system, you must not reboot with the reset switch on the front or back of your Macintosh, or turn off the computer.  Linux must be shutdown in a controlled manner, otherwise files may be lost and disk damage incurred.  You will need to perform recovery procedures which are detailed in any good book on Linux or Unix.  You have a selection of shutdown options, press the key combination Ctrl-Alt-Del, Control-Shift-Power should also work. Or log in as root and type shutdown -h now, if either of the key combinations do not work or you prefer to type commands.

More information sources :-
		The Debian GNU/Linux homepage.
		The Linux/m68k domain's homepage.
		The Macintosh project pages.
		Visit us on IRC, channel #linux68k, server irc.lame.org (or connected 
		servers).
		hundreds of other Linux- or Debian-related Web sites around the world.
		comp.os linux.m68k.

History of this installation guide:.
v0.1	July 20th, 1998		First version, only ASCII text.
v1.0	August 3rd,1998		Pushed to HTML, small additions & typo corrections.
Macintosh version:.
v1.0	August 9th, 1998		Based on Frank Neumann's Amiga version.
v1.1	August 29th, 1998		Updated for 2.0r2.
v1.2	September 5th 1998		More warnings .
v1.3	September 24th, 1998	Even more warnings .
v1.4	February 11th, 1999		Modified for Debian 2.1.
v1.5	March 6th, 1999			Addition of CD install option.
v2.0	June 13th, 2000			Rewrite for Potato, minor format changes, 
								additions and minor corrections.
Acknowledgements 
Frank Neumann 		for generating the Amiga install guide on which the first 
					Mac Guide version was based.
Michael Schmitz 	for authoring the previous Guides used as the template for 
					this Guide and helping many, including me, install Linux on 
					a Macintosh.
Adam di Carlo		for managing the boot-floppies area of the Debian CVS which
					contains this, other Guides and much much more :-)
Christian Steiges	for building new distributions and being tolerant under 
					extreme provocation.

and the many others who have contributed in some way to the Debian Project.

Disclaimer and small print
Published under the Terms of the Debian GNU/Linux Licence.  All trademarks, mentioned explicitly or not, are acknowledged and are the property of their respective Owners.  This guide draws on many sources including the experiences of the Linux m68k user base.  However the responsibilty for all errors and omissions remains mine alone.

Mark Scott, Last change: June 13, 2000.


Reply to: