OpenBCM V1.13 (Linux)

Packet Radio Mailbox

DB0FHN

[JN59NK Nuernberg]

 Login: GUEST





  
DB9ER  > APPLE    24.11.96 17:11l 172 Lines 7414 Bytes #-10927 (0) @ EU
BID : 24B60ADB0IZ
Read: DH9MEC GUEST DK3EL
Subj: MkLinux-Howto-1.asc
Path: DB0AAB<DB0PV<DB0MAK<DB0SON<DB0SIF<DB0BID<DB0EAM<DK0MWX<DB0IZ
Sent: 961124/1419z @:DB0IZ.#NRW.DEU.EU [JO31NE, Op: DL6EE] $:24B60ADB0IZ
de DB9ER @ DB0IZ.#NRW.DEU.EU   (Dieter)

to APPLE @ EU

	Booting Linux on a PCI-based Power Macintosh.
	=============================================

	Paul Mackerras	<Paul.Mackerras@cs.anu.edu.au>
	Dept. of Computer Science
	Australian National University.

This document describes how to install and boot the native Linux
kernel for PCI-based PowerMacs.  At present the kernel is known to run
on the 7500 and the 7200.  The kernel now includes support for the 604
processor as well as the 601, so it should run on the 7600 and 8500,
but it does not boot successfully on these machines yet.

There is a mailing list for users of native Linux on PCI-based Power
Macintosh; to subscribe, send email to listproc@samba.anu.edu.au with
a line in the body saying

subscribe linux-pmac <your name>

If you have problems getting Linux going on your PowerMac, you are
welcome to email me, of course, but be aware that I get a *lot* of
email and I can take weeks to respond.  You will almost certainly get
a much faster response by sending a question to the mailing list.


1. INGREDIENTS.

Linux can either be booted from disk, or you can net-boot it from
another server machine over ethernet.  

To boot Linux on a PCI PowerMac, you will need:

- a PCI PowerMac with >= 8MB RAM and a reasonable amount of disk
- the MkLinux DR2 release (for the userland).
- The following files from ftp://cap.anu.edu.au/pub/linux-pmac:

	Milo-MacOS.sit.bin
	Xpmac.tar.gz
	clock.tar.gz
	milo-0.03a.tar.gz
	nvsetenv.tar.gz
	vmlinux

(Note: if you are fetching these files under MacOS, be sure you set
your ftp client to binary mode before fetching the *.gz files or the
kernel binaries vmlinux or vmlinux.coff.  Apparently Fetch tends to
think the kernel binaries are text files, which doesn't help.)

For netbooting, you will also need vmlinux.coff as well as:

- another machine (the "server") running some flavor of Unix
  (e.g. linux) which you can configure to run bootpd and tftpd
- an ethernet connection between the Mac and the server
- an IP address for the Mac on the same ethernet subnet as the server

The boot process uses the Open Firmware (OF) in the machine's PROM.
In the event that things don't go smoothly, you may need to talk to
OF's user interface.  OF's default is to use the modem port, which
means you would need a serial connection from the Mac's modem port to
a terminal or terminal emulator at 38400 baud, 8 bits, no parity, 1
stop bit.

It is possible to set up OF to accept input from the keyboard and send
output to the screen (except on the 7200, where it doesn't seem to
have a driver for the screen).  However, these settings (and any other
settings you might have made) get reset to the defaults when you boot
MacOS.

On PowerMac 7500 and 7600 machines with only 2MB of VRAM installed
(out of the possible 4MB), it is currently necessary to make sure the
VRAM is installed in the "A" bank (or bank 1), not the "B" bank (bank
2).  MacOS can happily use the VRAM in either bank, but Linux can't
(yet).

On PowerMac 7200 and 8200 machines (and other machines with the
"platinum" display adaptor) the driver currently only works if 1MB of
VRAM is installed.  If you have more VRAM, you will have to remove the
extra for the driver to work.


2. SETTING UP A LINUX FILESYSTEM.

The initial steps for setting up Linux are very similar to those for
setting up MkLinux, so the README files that come with MkLinux are
useful.  As for MkLinux, you need a root partition and optional swap
and usr partitions.  The swap partition is optional for Linux, but is
highly recommended.  The root partition should be at least 50MB if you
have a usr partition (of at least 200 MB), or at least 250MB if you
don't have a usr partition.  You can use the Apple HD/SC utility or
some other tool (such as the FWB tools) to create these partitions.

Note: if you are partitioning the disk which you normally boot MacOS
from, and you want to reduce the amount of space allocated to MacOS,
you'll have to:
	- back up everything you want to keep
	- boot off CD-ROM or floppy
	- run Apple HD/SC to partition the disk
	- reinstall MacOS from CD-ROM or floppies
To boot off CD-ROM you need to put the CD-ROM in, then open the
"Startup Disk" control panel and select the CD-ROM, then restart.

Once you have created your linux partitions, the next step is to
install MkLinux DR2.  This will set up your root, swap and usr
partitions.

***IMPORTANT***: You must remove the MkLinux Booter extension from the
Extensions folder in the System folder before you reboot.  The MkLinux
Booter extension will crash your system if you reboot with it in the
Extensions folder.  You could also remove the Mach Kernel file from
the Extensions folder and the MkLinux control panel from the Control
Panels folder.  You *can't* use the MkLinux control panel to set the
machine to boot linux.


3. SETTING UP BOOT BLOCKS ON DISK.

If you plan to boot from disk, get the Milo-MacOS.sit.bin file and
unpack it.  This contains the following:

* Boot Variables - a control panel (actually a small application) for
setting Open Firmware environment variables from within MacOS.

* Milo - an application for installing boot blocks on your root
partition.

* first.b, second.b - first and second stage bootstrap images, used by
Milo.

Put a copy of the vmlinux kernel binary in the same folder as Milo.
Milo copies the kernel binary to the root directory as well as
installing the first and second stage bootstraps.

Next, move the Boot Variables application to the Control Panels
folder.  Then run Milo and tell it which partition to install the
bootstrap on.  This should be the root partition for linux.  You also
need to tell it which is the swap partition and which partition (if
any) is the /usr partition, so it can create the /etc/fstab file
correctly.  When Milo finishes, it will tell you OF's name for your
linux root disk.

The next step is to open the Boot Variables application and set the
boot device to be the disk containing your root partition, using OF's
name for the device.  This will be a name something like "scsi/sd@1:0"
where "scsi" is the name for the SCSI host adaptor (actually it is an
alias), "sd" refers to a SCSI disk, "1" is the SCSI target ID, and "0"
means to use the first bootable partition.  Ideally you should be able
to put an explicit partition number there instead, but if you do, you
will trigger a bug in OF and the system will crash when booting.

On machines with two SCSI buses, such as 7500s or 7600s, the host
adaptor for the internal SCSI bus  is called "scsi-int" and the one
for the external SCSI bus is called "scsi".  On machines with one bus,
such as the 7200, the host adaptor is called "scsi".

While you have Boot Variables open, if your machine is a 7500 or 7600,
you can set OF to talk to the screen and keyboard instead of the
serial port.  Select "All variables" under the File menu, then set the
input-device field to "kbd" and the output-device field to
"/chaos/control".  However, OF isn't very good at initializing the
video device, and sometimes it doesn't succeed properly.  If this
happens, and you really need to see OF's output, you can only reset
and try again.

Finally, close Boot Variables and restart your machine.  Once MacOS
shuts down and reboots, you will hear the reset chord twice.  Then
there should be some disk activity for a few seconds, and then Linux
should start running!



Read previous mail | Read next mail


 26.10.2026 02:48:19lGo back Go up