UNIX FOR FREE

Simon N Goodwin explains how to run the big boys' operating system on your Amiga.

One of the great strengths of the Amiga is its ability to emulate other computer systems. If you want to run a really wide range of software, for computers large and small, the Amiga is the most flexible platform you can get, and it keeps getting better.

Commercial emulators like Emplant, PC Task and ShapeShifter work well at converting the Amiga into a mainstream business machine, but there is another important class of 'serious' computer besides Mac and PC. These are the 'Unix boxes', workstations that run professional Computer Aided Design and graphics applications, university time-sharing systems, telephone exchanges, big business databases, BT's WirePlay service, and most of the Internet.

NetBSD is the best implementation of Unix for modern Amigas, and it's free. In fact NetBSD is not an emulator, but a replacement operating system. The 'Net' in the name refers to two things - the fact that this is a networking, multi-user, multi-tasking system and the way that it was developed, by a group of enthusiasts communicating over the Internet.

BSD stands for Berkley Standard Distribution, after the US university where it was born.

Unix story

Unix has been around longer than microcomputers - it was originally a minicomputer system invented by Dennis Richie and Ken Thompson at Bell Labs, part of US t elecommunications giant AT&T, in the early seventies. Unix was the birthplace of the 'C' programming language - almost the entire system is written in C - and this makes it relatively easy to convert between hardware platforms.

C is derived from BCPL, the UK-developed language originally used to write Amigados. Most of Amigados was translated from BCPL to C for the release of Amiga Workbench 2, and many developers use C in preference to assembly language, the Amiga's native tongue. But most of the routines in the Kickstart ROM are written in assembly code, which saves space and time but makes it relatively hard to convert the Amiga system to run on other processors.

Strong and flexible

Unix is extremely powerful and very cleverly designed. The price you pay for this versatility is that the system is big and it takes a long while to learn your way around.

Unix systems have a mouse-based graphical interface, like the Amiga's Workbench and Intuition. The Unix equivalent is X Windows, a very powerful and fairly friendly system that was developed at MIT years before anyone had a computer powerful enough to run it. NetBSD can run X, and it's much easier to use it that way rather than from the shell.

The standard Amiga graphics driver is monochrome, although ECS and AGA colour could be implemented; there are already colour drivers for most Zorro display cards. Ideally you'll have a three button mouse but a standard Amiga mouse is usable by pressing both buttons at once to emulate the missing switch.

Software

Today there are two 'free' versions of Unix for the Amiga: NetBSD and Linux. Linux is the most popular version for IBM clones but the Motorola versions, principally for Amiga and Atari, lag a long way behind

NetBSD runs on about a dozen processors - don't confuse it with FreeBSD or BSD386, which are custom BSD Unix versions for Intel-based computers.

Unix is a mainstay of education and some of the best freely-distributable software in the world has been devel oped on and for Unix systems, most notably by the Free Software Foundation, who believe that if they're going to spend their lives writing the best software around, they want as many people as possible to use it.

The generic name for their project is Gnu, which stands, recursively, for Gnu's Not Unix, symbolising that it's new, and old, and whacky, all at the same time. Gnu programs always come with complete C source code and replace standard AT&T tools with all-singing, all-dancing versions, often with silly names. There's a compiler to generate new compilers, in C of course, called Bison, named after the Bell Labs program YACC (Yet Another Compiler Compiler). Oleo is the Gnu X spreadsheet. Gnu's implementation of the Postscript graphics language is called Ghostscript, and drives almost any printer, and screen display too. Emacs is the ultimate text editor which lets you assign any action to any key or combination.

Many GNU projects have been converted to run on the A miga's own operating system but the latest and best versions expect to run on a real Unix system, with access to the full set of tools and accessories, and the quality of these Amiga conversions tends to vary wildly depending on the skills of the converter and the number of other people who take an interest.

Necessary Hardware Unix was developed on large computers and needs substantial hardware resources - either the old 68851 on some 68020 systems, the full 68030 (not the EC version in the first A4000 and some A1200 accelerators) or,
preferably, a 68040.

Even a cut-down system needs at least 64Mb of dedicated hard disk space - two or three times that to be comfortable - and a fast drive. It's much easier to install the system from CD, Ethernet, SLIP or tape, rather than lots of floppies. You can use command- line programs with just 4Mbs of fast memory, but X Windows is unbearably slow in any less than 8Mb.

The system supports all the standard Amiga ports, including serial, parallel, floppy, mouse and IDE disks, ECS and AGA displays and most SCSI controllers for hard disk, CD-ROM and tape streamer support. Ethernet works via Hydra Amiganet, Golden Gate and Commodore A2065 interfaces. The only third party graphics board fully supported in version 1.0 was Retina, but this has since been joined by Picasso II, Piccolo and Spectrum, all based on the Cirrus chipset, and CyberGraphix.

Of course, NetBSD comes with complete source code for the entire system, so there's nothing to stop you writing new device drivers, or hacking the existing ones, if you have the necessary low-level knowledge.

Getting it

Versions of NetBSD are available over the net and on several CDs, including the Gateway and Meeting Pearls sets. You could also download it from the home site, ftp.netbsd.org, or demon (ftp.demon.co.uk) in the UK, but it will take a few hours. There was a version 0.9 for the Amiga but version 1.0 was the firs t official full release, on the Meeting Pearls 2 CD - since then it has been supplanted by version 1.1, available on the Gateway 2 CD. This review is based on several months running an A4000 Warp Engine with NetBSD 1.0, which - despite the low version number - is both complete and reliable.

What you get

The minimal NetBSD distribution comprises 17Mb of programs compressed with Gnu ZIP. You can copy these to an Amigados partition and install from there, but sooner or later you'll probably want to install the source code as well (around 5 Mb, compressed) to compile a custom version on your own machine.

There are hundreds of programs and utilities and programming is supported by GNU C, C++ and Fortran compilers, the GNU assembler, and Emacs.

All the documentation is provided in the form of 'Manual pages' and anyone familiar with Unix will find the system-specific information they need, but bear in mind that Unix comes in two main flavours - System 5 or 'East Coast' Un ix, and the Californian BSD version. You can do much the same things either way, but some file locations and commands differ.

Source for thousands of other programs and utilities is widely and cheaply available on the net and CD compilations. Look out for TeX, PBM Plus, a great graphics converter, Xfractint, HylaFAX and ISPELL, an interactive spellchecker (with British dictionary).

Installation -
Amiga side

Installation is complicated - it requires you to set up special partitions for your Unix files, using the 'advanced options' of the Amiga's HDToolbox utility - and you need at least a passing familiarity with Unix commands and conventions to get the NetBSD side up and running. The installation instructions are pretty good but you need to read and understand it all before you start.

NetBSD needs at least two hard disk partitions - one for swap space, used to hold information that will not currently fit in memory, and one for the system files, known as the 'root'. It helps to set up a third partition for your own 'user' files, but you can put these in the 'root' too. You may want to add more 'local' partitions if you're on a network, or plan to support more than one user - Unix is a multi-user system, and NetBSD runs as a network even if yours is the only 'station' connected.

The procedure for setting up NetBSD partitions is much the same as you'd follow to reserve space for PC Task or ShapeShifter. NetBSD only supports partitions, rather than so-called 'hard files' mixed in with Amiga data. This complicates installation but boosts performance. Hard Files are many times slower than real partitions, and unbearably slow if more than a few megabytes in size.

Once you've got the BSD partitions set up you can use a public domain BFFS (Berkley Fast File System) handler to make them accessible from the Amiga workbench or shell. This works fine for reading, but has not been tested for writing. In practice this doesn't matter as NetBSD is quit e capable of mounting and reading files in Amiga partitions, so you can write files to whichever system you're currently using and read them from the other. LOCK BFFS: ON protects the Unix files from accidental
Amiga writes.

Unix side

Installation on the Unix side is largely automated. You start by unpacking a compressed archive onto a double-density floppy disk. This is a tiny BSD system, with just enough files to load the rest. Start this by running LOADBSD, a short Amiga program that kicks out the Amiga operating system and begins to load NetBSD from your chosen device.

Warnings and error messages appear as loading takes place, but these are documented and most can safely be ignored. Once you have loaded all the files and answered some questions about disk usage you must run the 'Configure' script and answer questions about your 'network'.

Once this is done you must reboot the system, and ed it various files to tell it about your devices, timezone and other local specialities. Beware - you must give a Unix machine warning before a reboot, 'unmounting' file systems and issuing the HALT command. If you use the Amiga three-key Reset without precautions you're very likely to corrupt the file system. At best this will cause a delay as FSCHK fixes the problem - at worst you may lose files or whole directories.

At the third reboot you should have a full, working Unix system which you can start from Amiga OS with a single command. I can confirm that the procedure works, as long as you follow the instructions to the (case-dependent) letter - but it helps a lot to have someone familiar with Unix at hand, especially the first time you
install NetBSD.

Problems

NetBSD is unusually reliable, especially in view of its size and complexity. Any problems have almost always been of my own making, and never led to loss of data. As a Net product, NetBSD is well supported as long as you own a modem. Questions and replies are regularly posted on the Amiga mailing list. To join this list, visit the netbsd home page (http://www.netbsd.org) and press the appropriate button, or send mail to majordomo@netbsd.org with the command 'subscribe port-amiga' followed by your name in the body of the message.

Customising

One of the beauties of NetBSD is that you get complete source to the entire system, and you are encouraged to re-build it to suit yourself. The resultant version is likely to be smaller and faster. You also get the chance to add support for new devices which have not yet found their way into full distribution.

At the last count there were 'experimental' drivers for the Emplant SCSI controller, MSDOS floppy disks, mono and stereo Amiga audio, and PC card via the 'Golden Gate' bridge board. ATAPI CD support is in the works. You can download patches for Picasso graphics, Ariadne Ethernet adaptors, A4000T SCSI, and Commodore's 2410 display on 68040 systems. There is also a replac ement boot block that allows you to go directly into NetBSD, bypassing Amiga OS. If you become nostalgic you can over-ride this with the Amiga startup preferences or by command as NetBSD starts.

Conclusion

If you want to run Unix software, and you already own an Amiga with Memory Management hardware, NetBSD is the way to go. It's stable and relatively efficient, although you need plenty of RAM and a big hard drive to use it in earnest. CD's will come in handy for installation, and X looks much better in full colour on a graphics card. If you've already got the hardware, give it a try - you won't be wasting your time.

Drive controllers supported by NetBSD

Make Model
Type

Commodore A1200 IDE

Commodore A2091 SCSI

Commodore A3000 SCSI

Commodore A4000 IDE

Commodore A4000T SCSI 2

Commodore A4091 SCSI 2

CSA 12 Gauge SCSI

CSA Magnum SCSI 2

DKB A4091 SCSI 2

GVP Series II SCSI

GVP GForce SCSI

IVS Trump Crd.SCSI

IVS Vector SCSI

MacroSystem US Warp Eng. SCSI 2

Phase Five CyberStm. SCSI 2

Phase Five Fastlane SCSI 2

PP&S Zeus SCSI 2

Supra WordSync SCSI

Utilities Unltd. Emplant SCSI


Current NetBSD platforms

Amiga

Apple Macintosh

Atari TT & Falcon

DA 30

DEC Alpha AXP

HP 300 & 9000

IBM PC & clones

PC 532 (NS32532)

PMAX

Sun 3 & SPARC


Getting it

CD sources

Meeting Pearls 2 CD: NetBSD 1.0

Gateway 1 CD ROM: NetBSD 1.0, TeX, X11R6

Gateway 2 CD ROM: NetBSD 1.1

Infpomagic BSDisc: NetBSD 1.0 & 1.1

FTP sites

USA ftp.netbsd.org

UK ftp.demon.co.uk

Germany ftp.uni-regensburg.de

No rway ftp.unit.no

Updates are in /pub/NetBSD.