| |
DB9ER > APPLE 24.11.96 17:19l 190 Lines 8092 Bytes #-10927 (0) @ EU
BID : 24B60BDB0IZ
Read: DH9MEC GUEST DK3EL
Subj: MkLinux-Howto-2.asc
Path: DB0AAB<DB0AHO<DB0KFB<DB0CZ<DB0LX<DB0RBS<DB0GE<DB0IZ
Sent: 961124/1421z @:DB0IZ.#NRW.DEU.EU [JO31NE, Op: DL6EE] $:24B60BDB0IZ
de DB9ER @ DB0IZ.#NRW.DEU.EU (Dieter)
to APPLE @ EU
4. SETTING UP YOUR SERVER FOR NETBOOTING.
First, you need to know the Mac's ethernet address. If you don't
already know it, you can find out from Open Firmware. To get into the
Open Firmware user interface, make sure your serial connection and
terminal (or emulator) are ready, then reboot (or power-on) the Mac.
When the chord sounds, hold down the command (apple), option, O and F
keys until the chord finishes - you should then hear a beep from the
terminal.
Another way to get into Open Firmware is to get the Milo-MacOS.sit.bin
file, unpack it and copy the Boot Variables application to the Control
Panels folder. Then open it and select "All variables" from the File
menu. Click on the "auto-boot?" box to deselect it. If you have a
7500 and 7600, and you want OF's user interface to talk to the screen
and keyboard instead of the serial port, you can set the input-device
field to "kbd" and the output-device field to "/chaos/control".
Once you are talking to OF's user interface, enter the commands "dev
/bandit/gc/mace" and ".properties". You should see some output like
this:
name: mace
device_type: network
AAPL,connector: ethernet
reg: 00011000 00001000 00008200 00000100 00008300 00000100
AAPL,interrupts: 0000000e 00000002 00000003
local-mac-address: 00a0400e cbf2
address-bits: 00000030
max-frame-size: 00000800
mac-address: 00a0400e cbf2
The value for mac-address is the ethernet address, in this case
00:a0:40:0e:cb:f2.
On your server, you need to have bootpd and tftpd installed, and you
need to have entries for them in /etc/inetd.conf. Suitable entries
look this these:
bootps dgram udp wait root /usr/sbin/bootpd bootpd
tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
If you change /etc/inetd.conf, be sure to send a SIGHUP signal to
inetd to cause it to re-read /etc/inetd.conf.
You need to create a /tftpboot directory, and copy the XCOFF linux
kernel image (vmlinux.coff) into it, making sure it is world-readable.
Bootpd needs a configuration file /etc/bootptab. On my server, it
looks like this:
.default:td=/tftpboot:hd=/tftpboot:sm=255.255.255.0:
powermac:ha=00A0400ECBF2:bf=vmlinux.coff:ip=150.203.162.41:tc=.default:\
:rp=/data/ppc-root:
You will need to change the ha (hardware address) and ip (IP address)
fields, and possibly the sm (subnet mask) field. If you are not using
an NFS-root, you can remove the rp entry.
If you are using an NFS-root, you will need to set the rp (root path)
field to the path where the Mac's root directory is on your server,
and make sure it is exported with root access to the Mac. You should
edit the etc/fstab file to look something like this:
server:/data/ppc-root / nfs rw
/proc /proc proc defaults
With an NFS-root, you could usefully configure various other files in
the etc directory at this stage, particularly profile, localtime,
sysconfig/network, sysconfig/ifcfg-eth0.
Next you need to set OF's "boot-device" variable to "enet". You can
do this through the OF user interface with this command:
setenv boot-device enet
or you can do this with the Boot Variables application.
The default root device is sda1, which will usually not be correct.
When booting from disk, linux will by default set its root device to
the device it was booted from, but when netbooting, you will need to
set the "boot-file" variable to something like "root=/dev/sda7" or
whatever your root partition is. Alternatively, for booting with an
NFS root, you can either use "root=/dev/nfs" and/or the nfsroot option
as in "nfsroot=/data/ppc-root".
Then reboot the machine (if you are talking to OF's user interface,
use the "boot" command). You should see a message with IP address of
the server and the name of the file it's loading followed by a
spinning cursor. When the load finishes, you should see messages
"loading XCOFF" followed by some information about the sections in the
XCOFF file. Then you should see the Mac's console come on showing the
Linux boot-up messages.
5. CONFIGURING YOUR LINUX INSTALLATION
Hopefully the previous steps will get your Linux booted up
successfully to the point of printing a login prompt. At this point
you can log in as root, with no password. The first time you log in,
it will prompt you about whether you want to configure the network.
Answer the questions, then it will create some configuration files and
log you out.
There are a few configuration files that you will then have to
change. The files /etc/sysconfig/network-scripts/ifcfg-eth0 and
/etc/sysconfig/network-scripts/ifup-eth are designed to work with a
1.3 series kernel and need to be modified to work with the 2.0
kernel. In the ifcfg-eth0 file, the value on the NETWORK line should
be the AND of the IPADDR and NETMASK values. In the ifup-eth file,
the line that says "route add -net ${IPADDR}" should be commented out
and the following line should be uncommented.
Similarly, the ifup-lo script needs to be modified: on the line that
starts with "route add -net", change "-net" to "-host".
The X server that comes with MkLinux will not work with native Linux,
since it uses some Mach system calls. There is an X server binary for
native Linux available in
ftp://cap.anu.edu.au/pub/linux-pmac/Xpmac.tar.gz
Assuming you want to run X, get this file and unpack it in the
/usr/X11R6.1/bin directory. Then remove the symlink
/usr/X11R6.1/bin/X and create a new symlink pointing to Xpmac.
There are some files that contain messages proclaiming that you have
installed MkLinux, which you will probably want to change. You will
need to modify /etc/motd, /etc/rc.d/rc.local and possibly also
/etc/release_id. You can remove the /mach_servers directory.
Also, you can profitably change /etc/inittab to enable multiple
virtual consoles by uncommenting the lines that begin with 2:234,
3:234, ... 6:234. Then you can switch between virtual consoles by
pressing command-1 to command-6.
You should get the milo distribution (milo-0.04.tar.gz) from the ftp
site and install it. Unpack it in /usr/src, cd to the milo directory,
then run "make install" as root.
You should also get the PowerMac version of the clock program.
Get clock.tar.gz and unpack it in /. Its main function is to read the
RTC and set the system time, correcting for whatever time zone you
have set (specifically, the time zone file pointed to by the symbolic
link /usr/lib/zoneinfo/localtime). For clock to work, you will have
to create a /dev/adb node with the following commands:
mknod /dev/adb c 10 140
chmod 600 /dev/adb
If, like most people, the RTC on your Mac stores local time, you will
need to change the single line in /etc/sysconfig/clock to read
CLOCKMODE=LOCAL (instead of GMT).
Lastly, the nvsetenv program is very useful - it allows you to
manipulate OF's environment variables under Linux. It comes in
nvsetenv.tar.gz on the ftp site, along with a script called "macos"
that shuts down Linux and reboots MacOS. Unpack the tar file in
/sbin. You will also need to create a /dev/nvram node as follows:
mknod /dev/nvram c 1 10
chmod 644 /dev/nvram
6. SHUTTING DOWN / BOOTING MACOS
You can shut down the system using the key combination control-shift-
power (the key at the upper right corner of the keyboard). This
combination is equivalent to the ctrl-alt-del combination on Intel
machines, and its effect depends on the crtlaltdel entry in the
/etc/inittab file. Note that command-control-power resets the machine
- you can use this if the machine freezes up.
To boot MacOS, the easiest thing is to use the macos script that comes
in nvsetenv.tar.gz. In an emergency, you can reset the machine and
hold down the command, option, R and P keys. This resets the
parameter RAM and should result in the machine booting MacOS, with all
settings reset to their default values. Note that when you boot
MacOS, it resets Open Firmware's environment variables to their
default values, so from then on, the machine will boot MacOS.
73 Dieter DB9ER@db0iz.deu.eu
Read previous mail | Read next mail
| |