Hello
I am well experienced in FreeBSD and Unix but recently did my first NetBSD install. It went like a dream - except for one obscure problem. I found the idea of the "afterboot" manpage very usefull. Everything was explained just fine and worked first time when I followed the instructions - except setting my DomainName server. The instructions state "put an entry in /etc/resolv.conf", ( eg nameserver 192.168.1.99 ). I did this but it didn't work. I racked my brains and wasted several hours reading and trying everything I could find on the web. This took 3 times longer than the install itself. Finally I discovered the problem. Whatever looks at "resolv.conf" will NOT tolerate white space at the start of the line. It doesn't take SPACES or TABS at the start of the line. The "afterboot" instructions however show the example entries as being seemingly in the middle of the line. This error ( of mine) was first noted when I read /var/log/messages after my first boot. It causes the time sync daemon to go wrong - obviously in retrospect it couldn't get a name lookup to contact the clock server but at the time that wasn't clear. Only when I attempted to ping a host outside my network did it become obvious that there was no name lookup working.

The "afterboot" manpage needs (when someone has time) to be augmented with a warning of this gotcha. This seems like a trivial thing and I rather enjoyed the hunt for this problem, but it did stand out as a blot on an otherwise excellent installation procedure.

One other thing surprised me. The install offered to partion the disk automatically, but to my surprise didn't allocate a swap partition, which leads to warnings on boot about "No swap space allocated". I wasn't too annoyed because I had just previously been ranting about PCBSD install, which doesn't let you put your swap on a second disk. The "afterboot" man page should warn you that if you have got this situation you should either partition a swap on your second disk, or create a swap file (or 2) and put an entry in /etc/fstab . It should explain about "swapctl" .

I have three questions about swap.
How much slower is a swap file than a swap partition ?
Does NetBSD stripe swap across multiple swap areas ?
Other Unix often says "always try to have two or more swap areas", whereas NetBSD seems to be suggesting you use the "priority" field which would cause normally the use of only one area even though you may have multiple swap areas.
What is the best advice on this?

Hello
I am well experienced in FreeBSD and Unix but recently did my first NetBSD install. It went like a dream - except for one obscure problem. I found the idea of the "afterboot" manpage very usefull. Everything was explained just fine and worked first time when I followed the instructions - except setting my DomainName server. The instructions state "put an entry in /etc/resolv.conf", ( eg nameserver 192.168.1.99 ). I did this but it didn't work. I racked my brains and wasted several hours reading and trying everything I could find on the web. This took 3 times longer than the install itself. Finally I discovered the problem. Whatever looks at "resolv.conf" will NOT tolerate white space at the start of the line. It doesn't take SPACES or TABS at the start of the line. The "afterboot" instructions however show the example entries as being seemingly in the middle of the line.

If you check the man page again you would see the format of the page: a block of text describing the entry, and then bellow the commands, or entries that are to be put in. Those commands and entries are a bit moved to the right side, for clearer reading I guess. It applies to whole man page, it's not just the resolv.conf section.

Quote:

Originally Posted by mgreen

One other thing surprised me. The install offered to partion the disk automatically, but to my surprise didn't allocate a swap partition, which leads to warnings on boot about "No swap space allocated". I wasn't too annoyed because I had just previously been ranting about PCBSD install, which doesn't let you put your swap on a second disk. The "afterboot" man page should warn you that if you have got this situation you should either partition a swap on your second disk, or create a swap file (or 2) and put an entry in /etc/fstab . It should explain about "swapctl" .

I have three questions about swap.
How much slower is a swap file than a swap partition ?

Again from the above link:

Quote:

The quickest and simplest option is to create a file in an existing filesystem, and use it as additional swap space. While accessing this will be slightly slower than dedicated swap partitions (due to fragmentation and filesystem overhead), it is ideal for solving a temporary swap shortage.

Quote:

Originally Posted by mgreen

Does NetBSD stripe swap across multiple swap areas ?

Yes, see bellow.

Quote:

Originally Posted by mgreen

Other Unix often says "always try to have two or more swap areas", whereas NetBSD seems to be suggesting you use the "priority" field which would cause normally the use of only one area even though you may have multiple swap areas.
What is the best advice on this?

Not sure if I understand it correctly, but you could have several swap partitions with different priorities. A quote from a swapctl(8) man page:

Code:

SWAP PRIORITY
The NetBSD swap system allows different swap devices and files to be
assigned different priorities, to allow the faster resources to be used
first. Swap devices at the same priority are used in a round-robin fash-
ion until there is no more space available at this priority, when the
next priority level will be used. The default priority is 0, the high-
est. This value can be any valid integer, with higher values receiving
less priority.

All best

__________________
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD

Thank you for v helpfull reply. I well accept that i should have done more rtfm. I think the thing that threw me on DNS was the fact that the resolv.conf file was initially entirely empty, whereas other config files have examples.
Anyway thanks for the advice.