daemon2 daemon1


NetBSD/amiga 1.0

Karl Jeacle

January 1995   (jump to December 2020 update)

Some years back, the word on the Amiga Usenet groups was that legendary Amiga programmer Matt Dillon was going to port 4.4BSD Unix to the Amiga. This was an incredible undertaking, but if anyone could do it, Matt Dillon could. For a variety of reasons, the port never happened, and the dream of a freely available Unix for the Amiga vanished.

But in early 1993, a community of users around the world on the Internet starting working together on a version of Unix called NetBSD. Now, almost two years later, comes NetBSD 1.0.

A brief history of...

I'm not going to give yet another inaccurate history of Unix that you usually read in articles like this. Instead, I'll just refer you to an excellent book by Peter H. Salus: 'A Quarter Century of Unix' (ISBN 0-201-54777-5). This book gives an account of the first twenty-five years of Unix from the early user group meetings right through to the lawsuits of recent years.

What I will tell you, though, is that there have been two predominant 'flavours' of Unix available over the years: System V and BSD. The story goes that AT&T's System V Unix was the domain of industry and the commercial user, while BSD was the Unix of choice for academia, no doubt from its roots at the University of California, Berkeley.

Technically, NetBSD is a BSD Net/2 and 4.4BSD-Lite derived system. A fully functional Unix-like operating system which currently runs on nine different architectures. NetBSD/amiga is the Amiga port of NetBSD.

System requirements

NetBSD requires an Amiga with a 68020 or better with some form of FPU and MMU. The minimal configuration requires 4Mb of RAM and about 65Mb of disk space. To install and use a reasonable environment with the X window system, at least 8Mb of RAM and about 150Mb of disk space is required.

All the basic Amiga hardware is supported including the floppy drive, parallel port, serial port, mouse, ECS, and AGA. A4000 IDE is supported along with most SCSI host adaptors such those by Commodore, GVP, 12 Guage, IVS, Wordsync, Magnum, Warp Engine and Zeus. A2024, Retina Z2 and Retina Z3 are the only graphics cards supported. A2065 and Hydra ethernet cards are recognised.

The above describes what is 'officially' available or indeed what is supported by release 1.0 of NetBSD/amiga. But work on many other cards and devices is underway and in many cases is already complete, just not integrated into the NetBSD source tree. This includes support for A1200 IDE, Fastlane SCSI, Multiface-III Serial, and Cirrus Logic 5426 based video cards such as the Picasso-II, Spectrum and Piccolo. There is also work on supporting PC cards by using the Goldengate-II card. In fact, there are already a number of NetBSD/amiga users using NE1000 and NE2000 ethernet cards designed for PCs.

Installation

The compressed NetBSD/amiga distribution (excluding sources) isn't too far short of 20Mb. Getting this onto your system is obviously going to be a big problem unless you have a tape drive or CDROM. Of course, floppies will work if you have the patience - but finding someone willing to supply you with a version on floppies could be difficult!

The NetBSD distribution contains a 'Generic' kernel with support for all supported Amiga hardware, a bootstrap program to boot that kernel, and a boot floppy with a minimal BSD root filesystem.

The filesystem on the boot floppy is configured to allow you to make a SLIP connection, configure an ethernet, mount an NFS disk, start an FTP session, read from a SCSI tape drive or simply mount and read an AmigaDOS partition. This enables you to gain access to the NetBSD distribution sets. These sets can then be unpacked one by one onto your hard disk.

The NetBSD binary distribution comes in the following sets:

base10  The NetBSD/amiga 1.0 base binary distribution. This must be
        installed. Contains base utilities to bring the system up.
        Include shared library support.
        [ 7M gzipped, 19M uncompressed ]

comp10  The NetBSD/amiga Compiler tools. C, C++ and Fortran compilers,
        linker, system include files, system libraries, and manual
        pages for these utilities in addition to system call and library
        manual pages.
        [ 4M gzipped, 12M uncompressed ]

etc10   All the system configuration files which reside in /etc.
        [ 50K gzipped, 280K uncompressed ]

games10 The usual bunch of simple games you find on Unix systems.
        [ 1M gzipped, 3M uncompressed ]

man10   Manuals for the binaries and other software contained in the base
        set. All other man pages are included with their respective binaries.
        [ 730K gzipped, 3M uncompressed ]

misc10  System dictionaries, typesettable document set, and man pages for
        some other NetBSD architectures.
        [ 2M gzipped, 6M uncompressed ]

text10  Text processing tools including groff, and related programs.
        [ 784K gzipped, 3M uncompressed ]

A full complement of source distribution sets is also available.

Features

Almost everything you'd expect to find in a BSD derived system like SunOS or Ultrix is included with NetBSD. Configuring and administering the system is similar, as is porting applications.

A major advantage of running NetBSD is its networking software. Why run AmiTCP when you can run the original software? An Amiga based NetBSD system can perform just about any Internet related task imaginable.

Another feature which some NetBSD/amiga users may find useful is its binary compatibility with the sun3 architecture. NetBSD can run SunOS binaries which ran on early Motorola 680x0 based Sun workstations.

As can be seen from the binary distribution sets listed above, NetBSD is pretty complete. However, lots of popular applications from the Unix world either have been ported or will port without too much trouble to NetBSD. Some ready-to-run applications I've FTP'd include xv, Mosaic, fvwm, top and lha.

It is important to note that NetBSD is a complete operating system, and hence replaces AmigaOS. Both systems can coexist on one hard disk, and files can be shared, but only one system at a time can be running. I suppose you could argue that NetBSD wasn't very system friendly, as it completely takes over the system... :-)

The competition

MINIX was created by Professor Andrew S. Tannenbaum of the Vrije Universiteit in Amsterdam as a teaching aid for students taking his course in operating systems. The version distributed by Prentice-Hall only supports 68000 and floppy based systems. Patches for CBM SCSI and 68020/030 support must be acquired elsewhere. There is no support for the 68040 or IDE drives. See my article on MINIX in the October 1992 CUGI Newsletter.

Commodore's Amiga Unix (AMIX) was the first commercially available full implementation of System V Release 4 Unix. While a fine product, it was never a commercial success and was dropped by Commodore some time ago. Major disadvantages include no 68040 support and the fact that it is obviously no longer supported.

Linux is probably the most successful of the freeware Unix implementations on Intel platforms. Originally designed to make exclusive use of 80x86 features, it has been a difficult task to get a Motorola 680x0 port up and running. However, some dedicated programmers have done just that, and Motorola versions (including one for the Amiga) are available. Linux on Motorola is progressing rapidly, but is still probably about one year behind the NetBSD Motorola effort. Linux on Intel is ahead of both.

AmiNIX and ANIX are both very new on the scene, with little known about either. Both are the work of individual programmers, and while promising great things, probably fall a good deal short of what's currently available.

Where to find it

The 'Meeting Pearls Vol.1' CD had a copy of NetBSD 0.9, but this release is now long out of date. At the time of writing, NetBSD 1.0 has just been released, so by the time you read this, a number of CDs will probably be available containing the full 1.0 release. 'Meeting Pearls Vol.2' promises to have a full copy of the NetBSD/amiga 1.0 distribution.

Although 1.0 has been released, development is still under way with much work being carried out on support for as many third-party cards as possible. So, it is likely that in addition to the stock 1.0 distribution you will receive kernels or sources with support for a wider range of Amiga equipment.

If you're lucky enough to have Internet access, you can find the latest version of NetBSD/amiga at:

ftp://ftp.uni-regensburg.de/pub/NetBSD-Amiga/

You could also try reading the Usenet newsgroup comp.unix.amiga for general discussion on Unix implementations for the Amiga.

Conclusion

Running a prerelease of NetBSD on my Amiga 4000/040 with Picasso-II, I was impressed. An X display of 1152x900 in 256 colours was as usable as any X terminal or low-end Unix workstation. Of course, you're not going to get DEC Alpha performance on an Amiga, so applications will run slower, but for most day-to-day tasks, performance is more than acceptable.

There's not much more I can say. It's BSD Unix for the Amiga. And it's free.


desktop


NetBSD/amiga 9.1

December 2020

It's 25 years later and I've decided to try NetBSD on the Amiga again. Here are some observations and notes on a few things I had to do along the way.

NetBSD is heavier now. System requirements are 24MB of RAM and a few hundred MB of disk space. Lots more RAM if you want to run X11. While 1.0 was very usable and almost snappy on my 25MHz 68040 with 16MB of RAM, 9.1 is very slow on my 40MHz 68040 with 128MB of RAM. It works but everything takes time. Presumably a 68060 would ease the pain slightly.

Installation is well documented. In summary, create your partitions using HDToolBox, use xstreamtodev in AmigaOS to write a miniroot filesystem to the swap partition and then reboot into that swap partition to run the installer.

I have a Hydra AmigaNet ethernet card and a local NFS server so I was able to download the distribution sets onto my local server and do the NFS install. I originally tried to install using FTP direct from the NetBSD FTP server but had some problems with FTP sessions timing out during the install.

The first boot takes a long time. You would be mistaken for thinking the system had crashed as building font caches and system databases for the first time is slow. When the login prompt appears, even logging in is slow. I realised that this was partly down to man page databases being built in the background and it's possible to turn this off.

First thing to do on logging in was to set the time correctly with ntpdate, set a root password and then create a user with something like:

# mkdir /home
# useradd -m -G wheel -s /bin/csh -c "Karl Jeacle" kj
# passwd kj

To enable remote logins, use "service sshd onestart". The first time this was run took more than an hour to create the host ssh keys. If you can live with telnet, just edit /etc/inetd.conf, uncomment the telnet line and "service inetd restart".

On trying to log in remotely, however, you will get an error complaining that all available ports are in use or no ptys are available. Fix this by making some more ptys:

# cd /dev
# ./MAKEDEV pty0
If you want to add packages, you can see a list of what's available at http://cdn.netbsd.org/pub/pkgsrc/packages/NetBSD/amiga/9.1/All/

I installed the tcsh package using:

# PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages/$(uname -s)/$(uname -m)/$(uname -r|cut -f '1 2' -d.)/All/"
# export PKG_PATH
# pkg_add tcsh

Finally, I added the following lines to /etc/rc.conf to set the time, start ssh, disable postfix and stop the background man database from building at boot:

sshd=YES
postfix=NO
makemandb=NO
ntpdate=YES
ntpdate_flags="-b -s"
ntpdate_hosts="w.x.y.z"

X11

In older versions of NetBSD there were several different Amiga-specific X11 servers to choose from. You installed a server based on what kind of graphics chipset you had.

In recent versions of NetBSD, these are no longer used and instead there is a single Xorg binary that uses NetBSD's wscons (Workstation Console) framework. Xorg uses a driver called wsfb, and wsfb, in turn, uses a driver for your specific hardware.

Unfortunately, there is no wsfb driver for the native Amiga chipset so X11 is not possible on a stock Amiga, but there is support for some RTG cards. CyberVision, Picasso, Piccolo, Spectrum, Domino, Merlin and oMnibus cards can all work with wsfb. There is also a working ZZ9000 driver that will hopefully make it into the next release.

When you install NetBSD, the default kernel does not support running X11 on the Amiga. You need to boot using the netbsd-WSCONS kernel. This is available on the FTP site along with the distribution sets and AmigaOS binaries. Boot it from the Amiga using loadbsd or copy it into the root directory on NetBSD and then specify it at the boot prompt on starting NetBSD.

A small config file is required. Place the following in /etc/X11/xorg.conf.

Section "InputDevice"
    Identifier "Keyboard0"
    Driver "kbd"
    Option "Protocol" "wskbd"
    Option "Device" "/dev/wskbd0"
EndSection

Check dmesg output to see where you graphic card appears. Cybervision 64 is /dev/grf5. To see available screen modes, use "grfconfig /dev/grf5". To load in new modes, create a file such as /etc/gfxmodes with the following lines and then add something like "grfconfig /dev/grf5 /etc/gfxmodes" to your rc.local. (Thanks to Alain Runa for this advice.)

c 40000000 800 600 4 800 840 968 1056 600 601 605 628 +hsync +vsync
1 40000000 800 600 8 800 840 968 1056 600 601 605 628 +hsync +vsync
2 40000000 800 600 16 800 840 968 1056 600 601 605 628 +hsync +vsync
3 40000000 800 600 24 800 840 968 1056 600 601 605 628 +hsync +vsync
4 40000000 800 600 32 800 840 968 1056 600 601 605 628 +hsync +vsync
5 65000000 1024 768 8 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
6 65000000 1024 768 16 1024 1048 1184 1344 768 771 777 806 -hsync -vsync
7 108000000 1280 1014 8 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
8 122000000 1400 1050 8 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync

At this point, a simple "startx" should launch X11 for you.

Conclusion

All of these years later, it's really quite amazing that running NetBSD on the Amiga is possible at all. There is a small team of volunteers working on the NetBSD/amiga port keeping it alive. Hats off to them for all of their hard work over the years.


desktop

(Note: Firefox is running remotely and using X11 forwarding to display on the Amiga.)



Information on the Demon Pictures

The BSD Demon pictures were drawn by John Lasseter. The pictures are Copyright 1988 Marshall Kirk McKusick. All Rights Reserved.

Non-commercial and personal use of the following GIF is permitted. Mass production or commercial use requires explicit written permission. Permission may be obtained by writing to:

Marshall Kirk McKusick 1614 Oxford St Berkeley, CA 94709-1608 USA