Go to the previous chapter.

Frequently Asked Questions and their answers

This chapter contains a list of Frequently Asked Questions (FAQs) and thir answers. It is divided into three sections.

See section Where can I find more information on NetBSD? for information on where to find the files and documents mentioned in the answers.

Installing a new system

Installing the system is probably the most painful part of running NetBSD-Amiga; this section should hopefully answer most of the questions which will arise, in conjunction with the installation document (See section Where can I find more information on NetBSD?).

How do I get NetBSD?

The first thing you should do is find the file getting-NetBSD, which details exactly where to find all the files you'll need. You can probably find it the same place you found this FAQ. See section Where can I find more information on NetBSD? for details.

How do I install NetBSD?

There is another document you should read, called (I seem to remember) something logical like INSTALL; once again, you should be able to find it wherever you found this FAQ. See section Where can I find more information on NetBSD? for details.

Does NetBSD run on the 68040?

Thanks to Michael L. Hitch (osymh@montana.edu), yes it does!

How can I autoboot into MultiUser mode

The loadbsd program has a number of options to control the boot process - type

loadbsd -?

to see all the options. The one you need in particular (for the current version of LoadBSD, anyway) is -a.

NetBSD always asks me for a root device

Make sure you are using the latest kernel and version of LoadBSD. Note that LoadBSD has an option, -b, to explicitly force it to ask for the root device on boot - make sure you aren't running LoadBSD with that option enabled!

Also, ensure that your hard disk (in particular DOSType IDs etc.) is configured properly so that NetBSD can locate the root partition correctly.

Where can I find ixemul.library version >= 39.46

Well, you don't strictly speaking need it; If LoadBSD pops up a requester asking you for version 39.47, click OK and LoadBSD will continue using version 39.45.

If you don't have any version of ixemul.library (where have you been living? :-), have a look on an Aminet site.

NetBSD refuses to boot into MultiUser mode

Make sure the line which reads

name_server=NO

in the file /etc/netstart does indeed read NO; named will hang the machine if there is no network attached when it starts.

I keep getting cksum errors when I try to install!

This (and other bizarre symptoms) could be the result of a bug in your SCSI host adapter's DMA controller or ROM - I have seen this with an A2091. (It also seems to depend on the phase of the moon and other sundry factors). The solution is to switch DMA transfers off in the kernel. To do this using binpatch (see FAQ&AS.HARDWR.BINPAT for details) type

binpatch -s _sbic_no_dma=0x1 kernelfile

(not forgetting to replace kernelfile with the name of your kernel image!). You should now be able to boot & install using programmed-IO (PIO) instead of DMA.

NetBSD tells me: init FATAL error: console: Interrupted system call

You forgot to install libexec/getty.

Which distribution should I use?

At the time of writing, there are two principle distributions you could look at, NetBSD-1.0 and NetBSD-Current. Which you choose really depends on what sort of system you are looking to run. If you want a stable, out-of-the-box, install-and-forget type system, go for the NetBSD-1.0 distribution. The NetBSD-Current distribution is for the OS hackers amongst you; it is in a state of constant change, but as a result it'll be the first place to find neat new features etc. The choice is yours!

See section Where can I find more information on NetBSD? for information on where to find the relevant files.

Does NetBSD run with the PROTO-Chip?

Yes; the only problem which may occur is that some hard drives do not like to be enabled in sync mode; it depends on your kernel patches, the hard drive, controller etc. etc. if you'll find this problem. To disable Sync mode in the kernel is a binpatch job, and involves something like (I'm not sure of the exact symbol name, I'll update this later) patching the symbol _inhibit_sync to zero.

Teething troubles

If you think its all over once you've finished the installation, you're mistaken! There are numerous little things that need tweaking and configuring before you can sit down and let the system run itself. Happily, once these things are set up, very little further work is necessary, bar day to day adding of users, adding new services etc.

Why can't I su to root?

For a user to switch user (su) to root, they must be a member of the group wheel. Make sure that in the /etc/group file there is a line like

wheel:*:0:root,tjw1

The comma-separated list indicates which users are members of the wheel group - add any users you wish to be able to su to root here; note that although the user still requires root's password, the wheel group should really be restricted to system administrators only.

Where is the uptime command?

Make the following link:

ln -s /usr/bin/w /usr/bin/uptime

you can now use the uptime command as expected.

What packages can I install to enhance NetBSD?

Since NetBSD is basically a flavour of Unix, more or less anything written for Unix can probably be ported (or already has been) to NetBSD; the list is enormous! See section Where can I find more information on NetBSD? for details of mailing lists and newsgroups to subscribe to.

What about X-Windows?

X servers for NetBSD-Amiga are available for the standard custom chips, and also available (or in development) for a number of graphics cards. See section Where can I find more information on NetBSD?, as usual, for details of how to find the NetBSD-Amiga-X-FAQ.

...And networking?

Networking is an integral part of the BSD system, and already a part of your kernel; support is currently available for serial IP protocols (SLIP, PPP) over the built-in serial port, and also some ethernet cards. See section Where can I find more information on NetBSD? for information on locating the excellent NetBSD-Amiga-Networking-FAQ.

Can I access AmigaDOS files from NetBSD?

The ADOS file system driver for NetBSD-Amiga can currently mount AmigaDOS file systems read-only; support for writing to AmigaDOS partitions may be added at a later date. For more information on how to mount AmigaDOS filesystems, see the mount and mount_ados man pages.

How do I create device files?

There is a shell script (in the /dev directory) called MKDEV which creates device files for any of the standard device drivers. To create, say, the view00 device, type (from a root shell)

cd /dev
MKDEV view00

How do I create accounts and change user information?

There are two utilities which allow you to edit the password database in relative safety - vipw and chpass. vipw allows you to edit the master password file directly, to add new users and manually change user information, and chpass lets you alter information such as password expiry dates, group IDs etc. for a given user. You should always use these two utilities to edit the password database because of the password shadowing system used by NetBSD.

Adding a new user

The easiest way to add a new user is to run the vipw command to edit the master password file, and add a new entry with the user's username and userid (which must be unique), but all other fields left blank. Now run the chpass command, specifying the new user's name, eg.

chpass tjw1

You can now edit the user's password, finger information, group etc. etc. in comfort.

For more information on the vipw and chpass commands, see the relevant manual pages.

How can I reboot straight into NetBSD?

Do the following (as root):

mv /sbin/reboot /sbin/reboot.amiga
echo "cp /vmunix /dev/reload" >/sbin/reboot

You can now use the reboot command to reboot into NetBSD, and reboot.amiga to reboot into AmigaDOS.

Why doesnt the ps command work?

For programs that use the kernel symbol table to retrieve information (like ps), you must make sure that there is a copy of your kernel image named /vmunix. You may also want to make a link from this file to /netbsd.

Hardware, drivers and binpatching

This section details certain specific hardware problems you may run into. See section Where can I find more information on NetBSD? for details of how to obtain the file compatibility-list; this lists the devices known to work with NetBSD. The file projects details drivers which are being worked on.

How do I get a serial terminal to work correctly?

The file /etc/ttys tells init which ports to run a getty (ie. login) program on. Edit the file, and (supposing you had a 19200bps vt100 terminal on the serial port) add or edit a line to read

tty00 "/usr/libexec/getty std.19200" vt100 on insecure

tty00 indicates the internal serial port, the std.19200 tells getty what serial parameters to use - look in /etc/gettytab for details of other speeds etc. - and the vt100 indicates what terminal emulation to use; look in /usr/share/misc/termcap for details of other terminal emulation names.

Note the insecure entry - this means that you (or an imposter, more importantly) cannot boot up in single-user (ie. root access) mode via that terminal without the root password. Normally the only terminal regarded as secure would be the local screen.

Does NetBSD work with the Retina video card?

A qualified yes! With a Retina card, NetBSD tries to open a screen with a resolution of approximately 800 by 600, with a display rate of 75KHz. Not all monitors are capable of handling such a high display rate - indeed, it could cause some damage - so it comes highly reccomended that you use binpatch to set the symbol _retina_default_mon to one of the following values depending on the resolution/refresh rate your monitor can handle:

@xref{FA binpatch.

Can I use IDE hard drives?

Yes; thanks to Michael L. Hitch (osymh@montana.edu) for making it possible.

How do I use binpatch?

What is binpatch, anyway?

binpatch is a very useful little utility which allows you to change the value of variables in a compiled binary (in particular, the NetBSD kernel) without needing to recompile; it uses the symbol table information included in the binary to locate where the variable's value is stored, and directly modifies it. This is very useful for setting certain flags in the kernel necessary to make it boot on your system (until you are in a position to compile a kernel to your own requirements!).

You should be able to find the binpatch program for AmigaDOS from the same site you downloaded the loadbsd program etc. - See section Where can I find more information on NetBSD? for details.

Patching the kernel

In order to patch the kernel, you need to know basically two things - the name of the symbol (eg. _retina_default_mon) and the value to patch it to. Armed with this information, it is basically just a case of running the binpatch with the name of the kernel file. For example, assuming a kernel image named netbsd,
binpatch -s _retina_default_mon -r 0x02 netbsd
would patch the kernel to boot intil a Retina screen of resolution 768 by 600 at 38kHz.

Other options

There are a few more `advanced' options you can call binpatch with; these are detailed below.

Tapedrive problems

This FAQ deals with a number of problems tapedrive owners may experience with NetBSD - and more importantly suggests a few workarounds! As far as I know, at the time of writing no tape drive has been found that cannot be made to work with NetBSD.

The first thing to point out is that for some tape drives NetBSD reports that the tape drive is not supported on boot - ignore this message it is lying!

Problem 1

You may find that if you boot NetBSD immediately after using btn in AmigaDOS to write a file to the tape, that tar reports some error when trying to read from the tape.

The reason is that NetBSD doesn't send SCSI IDs 4 and 5 a reset command, since they are assumed to be tape drives, and sending a reset can cause some drives to spend a lot of time resetting/rewindind. The solution is to power cycle the tapedrive before or after booting NetBSD, forcing it to reset.

Problem 2

If you write small files to the tape, there may appear to be nothing on the tape when you attempt to read them back - this can occur with tapes written from either NetBSD or AmigaDOS. The solution is simply to append a fairly large file to the end of the tape. For example, if I wanted to write the file vmunix to the tape, I would use the command
tar cvfp /dev/rst0 vmunix rootfs.gz
(assuming rootfs.gz is fairly large) instead of
tar cvfp /dev/rst0 vmunix

Reading Sun tape cartridges

Reading tapes created by Sun machines is another source of some confusion. The original Sun Archive tape drive is capable of reading/writing two tape formats, QIC-11 and QIC-24. To maximise your chances of being able to read the tape, use QIC-24 format; the command

tar -cvf /dev/rst8
Will create a QIC-24 formatted tape.

But the Sun has an Archive Viper drive

Although the Archive Viper hardware can read/write a variety of formats, the Sun will only let you use one -- QIC-150. All the tape drive devices (/dev/rst0, /dev/rst8, /dev/rst16 etc.) will therefore produce a QIC-150 tape.

So how do I tell the difference?

Don't bother - just use /dev/rst8 for all data cartridge systems (if it isn't a 4mm or 8mm tape, it probably is a data cartridge).

Miscellaneous questions

Some of these could probably live in the "New Systems" section, I had a hard time deciding (which probably means I shouldn't have bothered); but in general, this is stuff which didn't fit anywhere else.

Can I update header files automatically?

When new kernel sources are released, it is likely that certain kernel structures will hace changed. Keeping track of the changes by hand is a pain - an easier way is to make symbolic links into the kernel source tree.

In particular, the files under /usr/include/machine and /usr/include/sys are often changed. To replace these files with the ones from your kernel source tree, simply make symbolic links as shown below:

cd /usr/include
mv sys sys.old
mv machine machine.old
ln -s /usr/src/sys/sys sys
ln -s /usr/src/sys/arch/amiga/include machine

Is there a debugger for NetBSD?

The GNU debugger gdb is available for NetBSD (indeed, I believe it is in the standard comp* distribution package).

How do I report bugs?

If you think you have discovered a bug, and you are sure its not your mistake, the best thing to do is to mail on of the mailing lists (See section Where can I find more information on NetBSD? for details). Try to include as much information as possible - the configuration of your machine, the output you saw, the exact circumstances etc.; if possible try to isolate the bug as far as is possible (ie. don't just say `my machine crashes', try to explain what causes it to crash!).

Why can't NetBSD update the clock?

NetBSD is capable of reading the battery-backed clock, but at the moment it cannot update it; the principle reason is the added complexity introduced because different models of Amiga require different treatment. However, it shouldn't be too hard to add if someone has the time - keep an eye on the mailing lists for information.

vi complains about /etc/termcap

This is due to a bug in the termcap library; it is looking for the file in /usr/share/misc/termcap, but if it can't find it, produces an error relating to /etc/termcap.

The solution is simply to copy (or leave) the termcap file in /etc/termcap, and make a symbolic link from /usr/share/misc/termcap to it.

How do I change the console to autowrap?

Use the command echo -n "^[[?7h". Alternatively, you can change the autowrap default in the file ite.c to 1, and recompile the kernel.

How do I get a Meta-Key for Emacs?

Executing the commands stty cs8 -istrip -parenb will allow you to use any of the Amiga keys as a meta-key.

My keymap is all wrong!

There is a little program called loadkmap which allows you to change the keyboard map. The maps are edited in the form of a simple C file - a german keymap din-kbdmap.c is supplied. It should be relatively trivial to edit this to your requirements. To install the German keyboard, for example, you would type the following commands

cd /sys/arch/amiga/stand/loadkmap
gcc din-kbdmap.c -o din-kbdmap
./din-kbdmap >din
./loadkmap din
x