First things first
Contacts, Links & Credits
Explanation for this Document
This document has been written as a resource for all those
wanting to do an installation of NetBSD but not quite knowing
how to get their teeth into such a task.
Everything written here was part of my own installation, and
as such I have written and explained everything in the manner
that I did it myself. It should, therefore, be accurate and
clear. I would recommend reading the whole document through
prior to beginning the install. Printing it out may also be a
Please feel free to contact me
with any queries, comments or suggestions for other documents,
or future versions of this one.
Why the hell would I want to do this, anyway?
Good question. That deserves a good answer; if you happen to
have an older machine feeling lost and lonely in a cupboard.
Why not put him out of his misery and install an industrial
strength, open-source, freely-downloadable operating system
which will, once again, make him very very useful indeed.
If you have a couple of machines in your network, or a cable
modem you'd like to share with the rest of the house, installing
NetBSD on an old machine to use as a Router & Firewall is
a very appropriate step.
NetBSD is a fast-moving, very stable blend of the Unix operating
system with an emphasis on its portability to other platforms.
This, dear reader, includes Mac68k. There are other Unixes,
such as OpenBSD, which may be equally suitable, but, for the purpose
of this guide, I will focus on NetBSD. Maybe you prefer the logo.
Choosing a Machine
Assuming you don't already have a long-forgotten machine in your closet,
you are going to need to choose one for the task.
So, let's get down a few objectives, here. It must be: Mac68k,
Cheap, Low Power Consumption, Of Reasonable Speed,
At least 68020 processor (with MMU, otherwise 68030+), Nubus
or PDS slots.
Power is a consideration. If you're leaving this baby on 24/7 you want
something which can do this with the minimum of effort. You're also gonna
want Nubus or PDS slots for all those Ethernet cards. We also need at least a
68020 processor with an MMU (or 68030+ without).
Have a look at EveryMac.com
and eBay for such a Dream-Machine.
Hard Disk & RAM Considerations
You need a minimum of about 150MB of Hard Disk space, but
realistically, you'll want 1GB (trust me, I ate 350MB in 3
RAM-wise. 4MB will do. But anything less than 8MB is foolish.
8MB is fine.
Download your files
You will need a few files downloaded before you can begin the installation
(obviously). Get the following for NetBSD 1.5:
Do not attempt to un-stuff the .tgz files.
The installer works just fine as they are.
Mac OS Files
Instructions for patching Apple HD SC Setup so that
it will recognize non-Apple drives are available at:
You will need to Format and Partition your disks prior to
installing NetBSD. Most people consider this to be the trickiest
step. But if you follow these instructions, it should be fairly
Using Apple's HD SC Setup utility, select your drive and click
Initialise. About 15 minutes later the drive will be completely
Ensure that the drive is still selected and click Partition.
Click Custom. Select each partition except for the Mac
Driver and click Remove.
Now click and drag in the grey area. A box will appear. Select
A/UX Root&Usr. Type in KiloBytes the size you would like it to be.
If you are using a 1GB disk, I recommend 950000KB for this partition.
Click Done and click and drag again in the grey area. Now
select A/UX Swap put in another value in KiloBytes. I'd recommend
Click Done again and do the same one last time. This time
make it Macintosh Standard and use whatever you have left.
Click Done and quit the Program.
You now have a disk ready for your NetBSD FileSystem.
Using the Mkfs utility, select your Root&Usr partition
and click Change. In the dialog that pops up, click Do
it. Do the same for your Swap partition.
Now click the Root&Usr partition and click Format
watch the window for errors, click I read it when it finishes
and do the same for the Swap volume. Now quite out of Mkfs.
You are now ready to install NetBSD on your FileSystem!
What to install
Double click the Installer Application. Select Install from the
File Menu. Find the NetBSD files you downloaded earlier (the ones that
end in .tgz) Select each of them except kern_sbc.tgz
and click Add.
Click Done. The installation will begin and should take
about 5 hours. (You may want to get some sleep at this point).
When it is finished, select Build Devices from the File Menu.
Now quit the installer, you are ready to boot.
Double-click the Booter application. Select Booting
from the Options Menu and ensure it reads NetBSD Root&Usr
for the Partition Name.
Check the Single User mode checkbox. Leave everything else 'as is'.
Select Boot Now.
Cross your fingers.
Assuming it all goes well, you should be raced with a standard
terminal. Type the following:
You are now ready to edit the file, so type:
That is the vi editor. Move about with the arrows,
press i (aye) when you want to type. Make the change,
hit escape a couple of times, then use the quit commands
explained further down.
Quit out of vi by typing:
or if you made an error and don't want to save:
If you are using an installer version prior to 1.1h you will
now need to type the following, if not, ignore:
mount -rw /
You will fly back into the Mac OS. Follow the same booting
instructions as before, this time leaving Single User
un-checked. You now have a working system. Read on.
If you got an error when you were booting about the FileSystem
not being able to be read, type halt and reboot.
Re-format all of your partitions and install again with the
kern_sbc.tgz kernel (instead of kern.tgz) this offers superior SCSI support
in this situation. You should not, however, use it without testing
the GENERIC kernel first, since it is slightly slower.
First Things First
Add a User
No-one who has every run Unix has been completely faultless
in their operation. Unix assumes that the person running the
Root account is a master, as such he can do anything.
It seems obviously therefore, not to run as root all the time.
Therefore you're going to want to add a user.
The process is quite simple, although there are a couple of steps.
Say you wanted to add the user matthew.
Type the following:
useradd -m matthew
You have now added a user.
New password for Matthew. Type this twice.
Type exit to logout, log back in with matthew and
your chosen password to test it.
Type exit again and log back in as root. Now would
be a good time to password protect the root account. Type passwd
and choose your password, you will need to type it twice.
You should never log in as root on a normal system, merely use the
su command whenever you need full privileges. To do this you
will have to edit /etc/group to allow users to su to root.
Type the following:
Find the top line, and if you wanted the user matthew to be
able to become root, change it as follows. Note that there are
Matthew will now be able to su to root. He will, of course, still
need the root password.
Configuring for Networking
A Unix machine is as good as useless without being attached to
a network, be it the Internet or a LAN.
So... We're going to get yours configured into your Ethernet LAN.
Then we're going to use one of your other Mac OS boxes as a router
in association with IPNetRouter.
There are quite a few files which need to be edited, start with the
edding the /etc/rc.conf file:
Write the following:
hostname="Your chosen computer name"
Since I don't have a domain I wish to use with this box,
I left that blank. My 7100 running IPNetRouter has the
IP of 192.168.1.2
domainname="If you have a domain, write it here"
defaultroute="The machine running IPNetRouter"
This is mine:
Now create a file named /etc/resolv.conf by typing:
Since you are going to be connecting to the 'net on this machine,
Write the following:
domain Your domain if you have one
This will tell it to check the /etc/hosts file first, if it cannot
find the entry, it uses the nameservers. If you want it the
other way round, use:
nameserver ISPs nameserver
nameserver ISPs Secondary nameserver - optional
lookup file bind
lookup bind file
On Gellum (as I have no domain) I have it as follows:
You now need to edit /etc/hosts to let your network
know what's going on. I have mine like this:
lookup bind file
If you have multiple machines on your network. They must all
have the same /etc/hosts file.
This is the most important step, and probably the one most likely
to cause confusion. You must identify your Ethernet interface, to
allow your machine to talk to it. Type the following:
Examine the log to find something about Ethernet.
I get the following, this tells me my card (it was clearly
recognised, is of type ae0)
ae0 at nubus0 slot a: EtherNet card, 32KB memory
I therefore need to create a /etc/ifconfig.ae0 file.
If I had a sn0 interface, (built in on Quadras and Centris
machines), I would have created a /etc/ifconfig.sn0 file.
ae0: Ethernet address 02:60:8c:05:bb:05
You need to type your IP and Netmask into that file:
inet Your IP netmask Your Netmask
On Gellum, it is like this:
inet 192.168.1.1 netmask 255.255.255.0
Finally, to allow yourself to log-in via telnet from the other
machines on your LAN. Edit /etc/inetd.conf. And un-comment
(ie remove the # at the beginning of the line) the things you
want to use. This will usually be ftp, telnet,
shell, and login.
Finally type reboot and Boot NetBSD with Single-User un-checked.
You will now need to set-up IPNetRouter. That is beyond the scope
/ purpose of this document. Full instructions are right over
That's it! Your machine is ready for full action.
These are the first things I would recommend installing on your
new system. To get them over there, use an FTP client and your
user-name and password. Alternatively, FTP them direct to your machine
using the ftp command. man ftp for instructions on
how to use this. Read on for configuring / compiling.
Both nano and screen should be considered essential.
Nano is a very good text-editor. Screen allows you to have virtual
terminals, and do things in the background. Great fun!
Assuming you've downloaded your source, you need to un-tar it.
Let's start with nano; type the following:
tar xvfz nano-0.9.24.tar.gz
You now want to be inside the nano directory:
If you want to read the various README and INSTALL files. Type:
To configure it for your system, type:
This may take several minutes, make a coffee.
When it is finished, you need to make the file. Type
This may take a while. Make a pizza.
When it is finished, to make it accessible to all users, you need
to make install. First su to root.
This should be quicker. You will need to log-out and log back
in to use your new program. Let's create a new file named
Type some stuff. Hit Control-X to exit. Control is referred to
as a ^ character. To search for text you use ^W
Congratulations! You've done it. You have installed a NetBSD
system, configured it to run headless, and installed some programs.
The Man Pages are probably your most useful and reliable
resource. To read the manual entry for passwd, for example,
Hit q when you have finished, and space bar for the
Subscribe to the NetBSD Mailing List
for the best resource for all your questions and queries,
to get involved with the project, or to answer other's questions
Contact, Credits & Links
All the information here was accurate when I wrote it. If
you feel I've missed something, feel mis-led, or have a
Finally, I'd encourage you to join the
That's it. Enjoy the world of NetBSD.
You probably want somewhere to go from here. Here are other pages
with additional or useful (or both) information:
If I've missed anything, please tell me.
Without the following people, all of this really would not
have been possible:
The rest of the NetBSD Port Mac68k Mailing List.