Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/historic/2nd-edition/NeXT-cube

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


How do I get my NeXT Cube to run Plan 9

Configuration

Terminal
NeXT Cube'040 25 MHz
Server
DEC XL Server 590 running NeXTSTEP 3.3 and u9fs

=======

Set up u9fs

1. Download and patch u9fs for NeXTSTEP

The u9fs downloaded from AT&T plan 9site does not compile on NeXTSTEP
due to the lacking of some library functions like strdup. However, it
is trivial to patch it. I have put together the diff. I assume that
the source code for the u9fs is installed at
/usr/local/plan9/unix/src/u9fs and the plan 9 distribution is
installed in /usr/local/plan9.

  # cd /usr/local/plan9/unix/src/u9fs
  # patch  <  u9fs-patch-for-NeXTSTEP.diff.txt

Before compile the file, take a look at the Makefile. There is a flag
for whether the underlying arch is big or small endian. Make sure to
set it properly according to the NeXTSTEP machine you have.

  # make

2. Install u9fs

I install u9fs in /usr/local/plan9/unix/bin.

  # make install

/etc/inetd.conf

Add the following entry to the /etc/inetd.conf.

  # Plan 9 file server
  u9fs stream tcp nowait root /usr/local/plan9/unix/bin/u9fs u9fs /usr/local/plan9

Services in NetInfo database

Run the following command as root to add the u9fs services to the
service databse.

  # echo u9fs 564/tcp u9fs | niload services .

Restart inetd

  # ps -aux | grep inetd
  # kill -HUP [inetd pid]

3. Copy Unix authentication files

The u9fs uses UNIX style authentication and runs with chroot(). You
need to copy several files into the /usr/local/plan9/etc directory.

/usr/local/plan9/etc/hosts

Download the files from NetInfo:

  # cd /usr/local/plan9/etc
  # nidump hosts . > hosts

Make sure the IP for the NeXT machine and the IP for the file server
is in there.

/usr/local/plan9/etc/passwd

You need to add at least two users none and boote to the NeXTSTEP
system. The shell and home directory of these two users are not
important. Fire up UserManager.app to add the users. Then, add the
passwd information to the passwd for u9fs.

  # cd /usr/local/plan9/etc
  # nidump passwd . > passwd

/usr/local/plan9/etc/hosts.equiv

  # cd /usr/local/plan9/etc
  # echo next > hosts.equiv
         ^^^^ file name for you black machine

/usr/local/plan9/.rhosts

If you are running u9fs as root, you also need this files.

  # cd /usr/local/plan9
  # echo none next > .rhosts
         ^^^^^^^^^^^^^^^^^^^^^^^ put all account for Plan 9 user

4. Edit the /lib/ndb/local in Plan 9

Check the man page on ndb file format. The terminal needs this file to
make the network function properly.

=======

Set up netboot for NeXT

1. Configure bootp

Edit /etc/bootptab

Here is the content of my /etc/bootptab.

  # directory contain boot
  /usr/local/plan9

  68020/9nextstation

  %%

  next 1 00:00:0f:00:9b:ba 192.42.172.2 68020/9nextstation

Restart bootpd

Run these commands as root.

  # ps -aux | grep bootpd
  # kill -9 bootpd
  # /usr/etc/bootpd

2. Get boot program for NeXT machine

The boot is located in /private/tftpboot/boot. Copy it to
/usr/local/plan9.However, the newer version does not do the
initialization properly and this causes the plan 9 to hang during boot
time. I used the boot from NeXTStep 2.1. If you don't have access to
NeXTStep 2.1 boot, peter@plan9.com sent me a suggestion about how to
get boot in 3.x to work. See the following.

Boot the black machine

Here is the moment you have been waiting for.

1. Get into ROM monitor

Press Cmd-Cmd-~ and type halt.

2. Netboot the NeXT

Use the following command to net boot the NeXT in ROM monitor.

  > ben 68020/9nextstation

If you are using boot from NS 2.1, you should see the Plan 9 coming up
on the screen. If you use later version of the boot program, the
system will hang with Exception #4. Don't panic yet. The following may
fix it. Thanks to peter@plan9.com.

A quick fix if you don't have an early version boot program is to
start the kernel manually with the following commands to the ROM
monitor, after the exception occurs:

  > r pc
  ? 4000000
  > c

This changes the program counter to the correct entry point 4000000
and then execution is begun at that point.

I haven't tried that but let me know if you do. If everything goes
well, you need to tell the black box what is its IP and where the file
server is.

3. Login to Plan 9

It does not matter what value you set the authentication server since
it will not be used by the client.

[boot message ...]
root at (tcp il)[il]: tcp
my ip address[no default]: [IP of the next machine]
my net mask[no default]: [netmask]
my gateway[no default]: [IP of the gateway]
file server[no default]: [IP of the file server]
authentication server [0.0.0.0]: [RET to take default] [
user[none]: [RET]

4. Plan 9 on black box

At this point, you should be running Plan 9 on the NeXT box. The NeXT
mouse should be working and use Alt-RightMouseButton to get the middle
mouse button.

=======

How about security

The u9fs uses Unix security model and it will allow the connection
with no password. If your file server is on the net, you may want to
protect it with tcp wrapper or TISfirewall toolkit.

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.