NetBSD 6.1 on the Amiga 1200

2015/05/31
Amiga


So I urgently need a computer with a decent operating system and I have this Amiga lying around. Also, today is International Amiga Day, so using an Amiga today is probably a good idea. As NetBSD runs on pretty much anything (that has a MMU), the Amiga should do just fine. The A1200 I am using here is pretty much a standard A1200 with only a turbo card and a PCMCIA network card added. I am using a compact flash card as a hard disk replacement. I have modded it to output an S-Video signal, but that has no influence on the software. It allows me to easily and cheaply connect a normal VGA monitor to the Amiga (through a S-Video to VGA converter box) with pretty good video quality.
As NetBSD needs a MMU to run, the 68030 CPU I am using here is pretty much the lowest-end CPU that can run NetBSD on the Amiga. 68020s on the Amiga usually do not come with the optional external MMU because AmigaOS does not have any memory protection or virtual memory support and as such does not need a MMU. The 68EC030 lacks the MMU, so it can't be used with NetBSD either.

When it comes to RAM, the 128 MB I have installed are plenty for running a basic NetBSD setup on the Amiga. Even when X is running with a few xterms and other simple programs it uses only about 24 MB of RAM.

Installing NetBSD on the Amiga isn't all that difficult when following the instructions in the INSTALLATION.txt file which is included on the instalation disc. There are a few obstacles on the way, though.

Installation

Amiga installation


The Installation takes quite some time (about ~3 hours when doing full install on my machine).

If for some reason you need to restart the install, make sure there is nothing ("nothing" as in "no filesystem whatsoever") left on the target partition, because otherwise the kernel tries to boot the (possibly) incomplete installation from the target partition instead of the miniroot file system from the swap partition. Overwriting the start of the target partition with arbitrary data helps in that case (e.g. copying some arbitrary file to it with xstreamtodev).

X

X running on the Amiga 1200


X windows works, but takes a long time to start (about 9 minutes from running "startx" to a basic TWM desktop). For most part of those 9 minutes, the screen is completely white. Then the typical X default background pattern appears and TWM (along with an xterm and xclock) is started. This only takes a few seconds. Once X has started, the performance is pretty okay for such a slow machine. The programs which should be started by default when running X can be configured in the /etc/X11/xinit/xinitrc file. By removing all unnecessary fonts (keeping only the fixed width fonts in /usr/X11R6/lib/X11/fonts/misc), the startup time can be reduced a lot, to about one minute total. The X server runs in a 640x400 grey scale mode by default. I haven't yet bothered creating a proper configuration file, so I have no idea if color modes can be used with reasonable performance.

Unfortunately, at first xterm did not work at all, complaining about not enough PTYs being available:
Error 32, errno 2: No such file or directory
Reason: get_pty: not enough ptys
This is because NetBSD does not mount the ptyfs pseudo filesystem by default. Mounting it on /dev/pts fixes this problem. To permanently mount it on boot, the following line should be added to /etc/fstab:
ptyfs /dev/pts ptyfs rw
For that to work, you have to use the GENERIC kernel, not the INSTALL kernel.

Networking

My PCMCIA network card (3Com Megahertz 589E 10 MBit ethernet) unfortunately does not work, due to some Amiga specific PCMCIA bug in the NetBSD kernel. Because of that I had to download all the neccessary files from within AmigaOS and then install NetBSD from the local AmigaOS partition. This also means, that connecting to SDF from NetBSD on that machine is not possible, yet.

Starting NetBSD from within AmigaOS

Besides booting NetBSD directly, it is also possible to boot NetBSD from within AmigaOS with the loadbsd utility. Unfortunately, the loadbsd 2.x versions that are in the "installation/misc" directory of the 6.1 release on the NetBSD FTP server do not support the ELF binary format of the 6.1 kernel. loadbsd version 2 simply spits out an error and quits:
loadbsd: unknown binary: Undefined error
With loadbsd version 3 booting the kernel works fine, though.

That's about it, so far. Have you done anything cool with your Amiga recently or installed NetBSD on some old or obscure hardware? Leave it in the comments or write me an e-mail.
j0n^sdf

Comments

2015-11-08 11:28:52
nice!

Regarding the booting time:
put makemandb=NO in /etc/rc.conf
put run_makemandb=NO in /etc/daily.conf

aply this patch ro rc.subr

Index: etc/rc.subr
===================================================================
--- rc.subr 7 Oct 2014 19:09:45 -0000 1.96
+++ rc.subr 12 Aug 2015 06:14:04 -0000
@@ -814,19 +814,9 @@ $command $rc_flags $command_args"
_have_rc_postprocessor()
{
# Cheap tests that fd and pid are set, fd is writable.
- [ -n "${_rc_postprocessor_fd}" ] || return 1
- [ -n "${_rc_pid}" ] || return 1
- eval ": >&${_rc_postprocessor_fd}" 2>/dev/null || return 1
-
- # More expensive test that pid is running.
- # Unset _rc_pid if this fails.
- kill -0 "${_rc_pid}" 2>/dev/null \
- || { unset _rc_pid; return 1; }
-
- # More expensive test that pid appears to be
- # a shell running an rc script.
- # Unset _rc_pid if this fails.
- expr "$(ps -p "${_rc_pid}" -o command=)" : ".*sh .*/rc.*" >/dev/null \
+ [ -n "${_rc_pid}" ] || { unset _rc_pid; return 1; }
+ [ -n "${_rc_postprocessor_fd}" ] || { unset _rc_pid; return 1; }
+ eval ": >&${_rc_postprocessor_fd}" 2>/dev/null \
|| { unset _rc_pid; return 1; }

return 0

after you did these 3 things your NeBSD will boot in about 3 Minutes:-)

hope this helps

Leave a comment

Name
E-Mail
Website
Homepage
Comment