Path: news1.ucsd.edu!ihnp4.ucsd.edu!swrinde!newsfeed.internetmci.com!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 1 of 10) Supersedes: <386bsd-faq-1-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:02:58 -0500 Organization: Dave's House in Omaha Lines: 2151 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:130 comp.unix.bsd.freebsd.announce:182 comp.answers:15809 news.answers:63155 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part1 Frequently Asked Questions 386BSD, NetBSD, FreeBSD, and other BSD derived Operating Systems. EXTREMELY UNOFFICIAL Original FAQ by: Terry Lambert New FAQ by: Dave Burgess burgess@cynjut.neonramp.com Last Update: 26 Jul 1996 Section 0. (Basic FAQ information) 0.0 Master Index. 0.0 Master Index. 0.1 A brief history of the *BSD family. 0.1.1 Which of the 4.3 BSD files were identified as encumbered? What's all this about `binary-only files'? Will BSDI continue to ship source code? What did NetBSD and FreeBSD do about the encumbered files? 0.1.2 How close is NetBSD (or FreeBSD) to BSD 4.4? 0.1.3 Where can I get more information about the *BSD family of Operating Systems? 0.2 About this FAQ. 0.2a What are the differences between *BSD and (your favorite operating system name here)? 0.2b Which is better, (your favorite operating system name here) or *BSD? 0.2c Is 386bsd better than (your favorite operating system name here)? 0.2.1 So what ARE the differences between the *BSD family and Linux? 0.2.2 I want to start up a thread about why *BSD is or isn't as good as some other operating system. Can anyone suggest a good reason why I shouldn't? 0.2.3 Are all of the Berkeley derived systems binary compatible? If not, what are the differences? 0.3 Are there any resources on the Net (like URLs) associated with the BSD family of operating systems? 0.4 How to add your pet answer to the FAQ. 0.5 Administrivia. 0.6 Does anyone reading this have any sense of humor at all? 1.0 I just downloaded all of 386bsd version 0.1 and I can't get [some feature] to work? Do you have any suggestions? 1.1 Feature summary 1.2 *BSD software projects in progress 1.2.1 Contacting software authors 1.3 Minimum hardware configuration recommended 1.4 Where to get the source and binaries 1.4.1 Where can I get the distribution on floppy or tape? 1.4.2 Where can I get the distribution via FTP? 1.4.3 Where can I get the distribution on CD ROM? 1.5 Electronic Information Groups for *BSD 1.5.1 Usenet newsgroups 1.5.2 Newsgroup archives. 1.5.3 *BSD system mailing lists. 1.5.4 System Updates. 1.6 Documentation available 1.6.1 BSD manuals 1.6.2 BSD books 1.6.3 The Jolitz Book 1.6.4 Dr. Dobbs' journal 1.6.5 Documentation that comes with most of the distributions. 1.6.6 The O'Reilly and Associates BSD 4.4 Set. 1.6.7 Other FAQ's on the net that are relevant 1.7 FTP sites for *BSD 1.7.1 Official distribution sites 1.7.3 Reference sites 1.7.4 Unofficial archive sites that have neat stuff! 1.7.5 Where can I get a non-X cdplayer program for NetBSD? 1.7.6 X Ported Software List 1.8.7 Motif for the *BSD family. (Infomercial to follow) 2.0 Install process 2.0.1 Boot disks (versions and media formats) 2.0.1.2a The floppy booted, but now the hard disk won't boot? 2.0.1.2b I am trying to reinstall. I run install and it loops asking me if I want to use the whole disk? 2.0.1.4 What are the options on the boot prompt? 2.0.1.5 I just used the '-s' option on the boot, but I can't write anything onto the disk. What is wrong? If I use a plain 'mount' command it tells me that my root file system is read-only. 2.0.2 Fix-it boot disk 2.1 Binary distribution 2.1.1 I want to install by NFS but I am having all kinds of problems. 2.2 Configuration 2.5.1 Partitions 2.5.1.1 What is a 'disklabel' and why do I need one? 2.2.1.2 What other kinds of information do I need if I really want to tune my hard drive's performance in conjunction with a newfs? 2.2.2 Common Disk Label Problems. 2.2.2.1 Increasing the *BSD partition size. 2.2.2.2 I can access the DOS partition on my second disk from Unix but not DOS? Any suggestions? 2.2.2.3 I want to use my entire 2 Gig drive as the root partition. Why doesn't it work? 2.5.3 How do I set up the system so that I can boot from more than one operating system/file-loader without using floppies? 2.2.3 How do I get the system to boot from the second hard drive? 2.2.4 How do I disklabel my second hard drive? 2.2.5 NetBSD and FreeBSD cannot handle disk geometry translations, but it turns out that my disk geometry is translated. It has five zones, each with a different sec/track! What kind of things can I do about the disk translation my hard disk controller uses? 2.2.6 I am having trouble installing on the EIDE hard drive. What are some of the things that I need to look into? 2.2.7 My disk label is complaining about '256 heads' in the disklabel. This is obviously bogus, but it doesn't seem to be hurting anything. Is it Okay or should I fix it? 2.2.8 What are the options for the bootup prompt? 2.5.9 I am having trouble installing WRT 'syslogd: bind: Can't assign requested address' errors. What are some of the things I should look at? I also am having trouble with the network: 'starting network ... ifconfig: localhost: badvalue'. 2.2.10 I am having trouble getting net aliases to work. What could some of the problems be? 2.2.11 I'm having trouble with the networking code (specifically the PPP stuff to my ISP). How can I debug NetBSD's networking? 2.2.12 I want to hard wire my SCSI devices to a particular device number. Is that possible? 2.3 Common installation problems. 2.3.1 Swap space not identified correctly. 2.3.2 Endless reboot cycles. 2.4 The computer just sits there, or 'that isn't right'. 2.4.1 The boot disk works all right on one computer but not another. 2.4.2 Really strange errors in the various *BSD flavors. 2.4.2.1 I am using the original 386bsd 0.1 with no patches installed and I get flashing multicolored characters and a "ptdi 81061" prompt error? 2.4.2.2 Using the new code in NetBSD, I get a "panic: pdti 206067" in pmap_enter(). What should I do? 2.4.3a I get the error "isr 15 and error: isr 17" on an NE2000 card. 2.4.3b I have some card on IRQ2 and it doesn't work; why? 2.4.3c I am getting lousy performance out of my network card. What are some of the other possibilities? 2.4.4 What is the difference between IRQ2 and IRQ9? Are they really the same, or are they really different? 2.4.5 Some of my SCSI devices (like a tape drive) don't work; why? 2.4.6 I try to run 'ps' or 'w' and get ': cannot get namelist' from the TinyBSD kernel. What did I do wrong? 2.4.7 I get a 'Floating point constant out of range' when I try to compile package 'n'. What is broke? 2.4.8 I want to use the Adaptec 1542C SCSI controller. What are the problems/tricks you need to know to get it working? 2.4.9 My system boots OK off the floppy, but once I try to boot from the hard drive, the message "changing root device to sd0a" appears and the system hangs. What is the most likely thing that I have done wrong? 2.5 Other common problems that are attributed to the installation process but are caused other places. 2.5.1 I want to use more than 16 Megabytes of memory. Will any of the BSD based systems support it? 2.5.2 I tried to use a device in my computer that should be there. When I did, I got a "Device not configured error." What do I do now? 3.0 System Internals 3.1 Kernel 3.1.1 How do I build a kernel? 3.1.1.1 Why does the kernel code for NetBSD still use the old K&R style declarations when the ANSI declarations are SO much better? 3.1.1.2 How do I port NetBSD to another platform? 3.1.2 I want to do one of the following things: * add a device not in the distributed kernel (third com port, additional disk or tape, line printer driver, etc). * use a patch from the net or the patchkit to fix a kernel bug. * add another swap device. * recompile the kernel to remove extraneous devices so that it takes up less space. * configure more pseudo-terminals to allow for more xterms or network logins. 3.1.3 I don't have the source distribution -- how can I rebuild the kernel? 3.1.4 Now that I have a kernel, how do I install it? 3.1.5 After installing the patchkit and recompiling the kernel with the option "WD8013", I am no longer able to reboot the machine. A cold boot (power on) runs fine, but after a reboot no boot drive is found by the BIOS. Besides having a 16-bit WD/SMC Ethernet card installed the machines try to boot using either a Adaptec 1742 or 1542 SCSI board to boot from. 3.1.6 My system is complaining about stray interrupt 7. Is my machine going to explode or anything? 3.1.7 I keep getting "wd0c: extra interrupt". What does it mean? 3.1.8 I keep getting silo overflow messages, but the system doesn't seem to mind. Is there a problem? 3.1.9 I found a bug in the kernel. How do I report it? 3.1.10 Can someone please give a reasonably clear set of instructions as to how to get a "current" version of NetBSD running? 3.2 What exactly is this config file, anyway? What are all of these cryptic notations? 3.2.1 Okay, fine. Why shouldn't I just add every device I can find to the kernel, so I'll never have to recompile this again? 3.2.2 What should I remove from the kernel? 3.2.3 I can't get enough remote login sessions or xterm sessions. I also can only get four sessions working at a time. What can I do? 3.2.4 How do I get ddb, the kernel debugger, compiled into the kernel and running? 3.2.5 I'm getting all kinds of errors when I try to build a new version of GCC. How can I upgrade GCC to the most current version? 3.2.6 Can I patch the current running OS image? 3.2.6 Can I have more than one config file? Should I rename it to something else? Any other hints? 3.2.7 What is the meaning of the trap codes I get in panic messages? Sometimes this message appears in the form "trap type nn". 3.2.8 I have been getting a lot of "virtual memory exhausted" errors when I am compiling a program with a really big static array. I have 128Meg of memory and 8Gig of swap. How can this be happening? 3.2.9 Where can I learn more about all this? 3.2.10 Has the method for system call changed? 3.2.11 Does anyone have a system building script that takes things like building a new config and multiple config files into account? 3.2.12 How do I upgrade from my release version of NetBSD (and probably FreeBSD) to the '-current' development sources? 3.2.13 Is there a Makefile that does all that happy world-building stuff? 3.3 X11/XFree86/XS3 3.3.1 What options should I define to get the X extensions included? 3.3.2 Where can I get the FAQ for 'X'? 3.3.3 Why does X drop characters when using xdm? When I run xdm from the console, it keeps losing keystrokes and the shift keys don't always work. Why? 3.3.4 What does the error 'netscape: uname() failed; can't tell what system we're running on' from the BSDi version of 'netscape' really mean? 3.3.5 Under NetBSD and FreeBSD, xlock (or any other program that uses passwords) fails to validate user passwords. Anyone know why? 3.4 Compiler and Library routines 3.4.1 Where is libcompat.a? 3.5 I want to run 'XYZA' which is dynamically linked and from 'some other operating system'. What special things do I have to do to get it working? 3.6 You promised to talk about timezones below. Are you going to? 3.6.1 How do you change the timezone on NetBSD (FreeBSD also?)? 3.6.2 The translation between seconds-since-the-epoch and date differs by about 18 seconds between BSD and other Unixes when running ntp; why? 3.7 How can I implement CVS to track MY changes to the kernel source tree, yet still follow the -current development tree? 3.8 Optional Op-codes for NetBSD, FreeBSD, and other systems. 4.0 Introduction 4.1 Common Kernel-related problems 4.1.1 Where are the commands "rpcinfo" and "rpcgen"? 4.1.2 How can I fix NFS to work with my NE2000 board? 4.1.3 How can I get "ps" and "w" to work? 4.1.5 Where are re_comp and re_exec? 4.1.6 What about the termio, termios, and termcap stuff? 4.1.6.1 Sometimes I have trouble with my system resetting the terminal to seven bit mode. Isn't BSD eight bit clean? 4.1.7 The system hangs with the HD light on after intense disk usage. The system hangs when trying to fsck -p both of my IDE hard drives at boot-up. 4.1.8 How do you implement quotas on Net/2 derived BSD systems? 4.1.9 What are the correct permissions for the /tmp, /usr/tmp, and /var/tmp directories? 4.2 Available kernel add-ons 4.2.1 The Patch-Kit 4.2.2 Shared Libraries 4.2.3 Sound Blaster Drivers 4.2.4 Bus Mouse Drivers 4.2.7 Kernel Loadable Modules 4.3 Other program building type problems. 4.3.1 Greetings from Mars. I am building a program that requires access to the crypt library. Either I have it and it isn't getting copied into the executable, or I don't have it; why? 4.3.2 I am having trouble with long file names in my libraries. It seems like there is a 16 character limit in the library somewhere. 4.3.3 I'm getting annoyed with having this "conflicting types for `sys_errlist'" problem show up nearly every time I build a program. What do I need to do? 4.4 System Administration Questions 4.4.1 Where can I get good books about NetBSD or FreeBSD? 4.4.2 I am concerned about system security. What should I do to protect my system from net attacks? 4.4.3 How can I log failed login attempts? 4.4.4 Can I use a Concatenated Filesystem with NetBSD? 4.4.4.1 Why, when I type "ccdconfig ccd0 16 none /dev/wd0a > /dev/wd1a", do I get back "ccdconfig: ioctl (CCDIOCSET): /dev/ccd0d: Device not configured"? 4.4.5 I am really new to Unix System Administration. I need some real basic help. 4.4.5.1 What is the System Administrator's username? 4.4.5.2 I can't log in as 'su'. What does that message mean when I log in as root. 4.4.5.3 Are there any books I can 'bootstrap' myself with? 4.4.5.4 How about some code examples? 4.5 Daemon questions 4.5.1 I'd like to use amd to mount a file system (/dev/sd0f aka /usr/local) on another machine as "/usr/local". What's the magic? 4.5.2 I am having trouble with my nameserver refusing to acception 'nslookup's from my SunOS machine after I installed the resolver fix. The exact error message is "*** Can't find server name for address 194.100.46.2: Query refused". Can you help? 4.5.3 Are there any alternatives to 'NIS' available for NetBSD, etal.? 4.6 Adding new users. 4.6.1 Where can I FTP the 'adduser' program? 4.5.2 Where is the 'adduser' program? 5.0 Introduction 5.1 Available Kernel Replacements 5.1.2 pcvt 5.1.3 syscons 5.1.9 A replacement curses program/library. 5.2 Floppy Disk problems. 5.2.1 How do I get a bootable floppy? 5.2.2 How do I maximize the space on a mountable floppy disk. 5.3 Character Device Driver info 5.3.1 Printers 5.3.2 Terminals/Keyboards 5.3.3 Modems/FAX Modems 5.3.3.1 How do I add a modem to *BSD: 5.3.3.2 Adding a modem to NetBSD. 5.3.3.3 Adding a modem to FreeBSD. 5.3.3.4 Adding a Dial-in/Dial-out FAX to NetBSD or FreeBSD. 5.3.4 What is the trick for getting Kermit to work with rz and sz? 5.4 Tape Drives 5.4.1 Does the tape need to be formatted? 5.4.2 If I execute the command 'st -f /dev/st0 status', I get: Archive/Tandberg? tape drive, residual=0, blocksize=512 Density: high = 16 (0x10), medium = 15 (0xf), low = 5 (0x5) ds=0 er=0 5.4.3 When is erst0 used? 5.4.4 How is density (bpi) computed? I am using 3M DC 6250 cassettes which have a 250MB capacity on the Viper 150. But computing the bits/inch based on 250MB/tape-length (1020 ft.), I get a density of 171335 bpi, which is nowhere near the 10000 bpi associated with QIC-150 in the st(1) man page. Why the discrepancy? 5.4.5 How is an appropriate block size determined (and in what units are they specified in the st(1) command)? 5.4.6 From the 4.3BSD mtio(4) man page, it sounds like data is typically (traditionally?) stored on tape in eof-terminated sequences of 1K records. 5.4.6.1 Is st's notion of "file" the record sequence between two eof marks? 5.4.6.2 What about a "record"? 5.4.6.3 Is a "record" one "block", as determined by st's "blocksize" command? If not, what is the connection between them? 5.4.6.4 Can I change the "record" size? 5.4.6.5 When would I want a block size that is different from the default? 1KB is the size of writes used by dd or whatever. QIC specifies 512 byte records (well at least its what people use..) Whatever you write in will be broken into 512 byte sections. They must be multiples of 512 though. 5.4.7.1 How do I write several archives to a single tape? I tried without success: $ st -f /dev/rst4 rewind $ tar cf /dev/nst4 archive1 $ st -f /dev/nrst4 weof $ tar cf /dev/nst4 archive2 $ st -f /dev/nrst4 weof 5.4.7.2 Later, I would expect to be able to access, say, archive3 via the fsf directive to skip over the first two archives. What is the correct sequence? 5.4.8 Since the Viper 150 writes on QIC-150/120, I guess I don't need to worry about writing variable-length records? How about reading a tape written with variable-length records. Is this possible with the Viper? If so, what's involved? 5.4.9 The very scant documentation that came with my drive mentions a "selectable buffer disconnect size," whose default is 16K. This is evidently the "maximum number of bytes that can be sent over the SCSI bus during a single data transfer phase." What's that? How is it connected st's "blocksize" command? Do I want to use 16K blocks, or might I even want to set the disconnect size to a higher value? 5.4.10 What is "streaming"? When I tar a directory of files to tape, I notice that the tape often stops. Streaming means it doesn't stop? How would I get the viper 150 to stream using tar or cpio or dump? 5.4.11 Where are all the answers to the above and related questions written down? Neither on the net nor in the 4.3BSD manuals nor Administration text which I have could I find this stuff covered! 5.4.12 What else should I know? For example, it seems that a new tape must stretched. How is this done? 5.4.13 My tape drive doesn't work. 5.4.14 I am trying to restore a tape from a FreeBSD machine on a Sun. What kinds of problems should I expect? 5.4.15 What are the jumper settings for the Archive Viper tape drive? 5.4.16 My Viper-150 autodetects fine; however, the first attempt to read a tape fails after a boot due to an "illegal SCSI command". What could be the problem? 5.4.17 Why haven't we changed the defaults in rdump and rrestore to something that makes sense? I was trying to dump a filesystem to a remote tape and ran into an error complaining about being unable to execute /etc/rmt. 5.5 Network 5.5.1 How can I get my system to work as a network router? 5.5.2 I recently has a problem where I got a message that said "panic: kmem_malloc: mb_map too small". What is the solution to this problem? 5.6 I want to use my ZIP drive. Are there any weird things I need to know? 6.0 Working with DOS and BNR/2 related software. 6.1 Formatting a floppy 6.2 Sharing the Disk with MS-DOS 6.2.1 How can I partition my drive to support both MS-DOS and *bsd? 6.2.2 I can install using the whole disk, but I can't install when I try to share the drive between *BSD and MS-DOS. Why? 6.2.4 Is there any hope of ever running MS-DOS applications under any of the free BSD systems? 6.2.5 How do I get Linux executables to run under NetBSD? 6.3 Accessing the MS-DOS filesystem 6.4 NFS/PC-NFS support 6.4.1 Can I use 8K packets for NFS? When I try, I have all kinds of problems. Specifically, I get 'ring buffer overflows' or the performance is real bad. 6.4.2 How do I get around the NFS "Permission denied" error? 6.4.3 What does the message "BAD MNT RPC: RPC Authentication error; why = Invalid client credential" mean when I try to mount something from another machine? 6.4.4 What does the message "Bad MNT RPC: RPC: Authentication error; why = Client credential too weak" mean when I try to mount something from another machine? 6.4.5 I get a lot of 'ring buffer overflow' messages using NFS and the ed0 driver. Is there a problem? 6.4.6 I am getting really poor performance out of my network, especially when talking to older networks or when performing short file transfers. What's the problem? 6.4.7 Is there any PC software that will allow me to use my enormous PC with all of the unsupported hardware as a PC-NFS server? 6.5 How can I use mtools with the 'new' floppy naming convention? 7.0 Communications 7.1 SLIP/CSLIP 7.2 PPP 7.3 TCP/IP 7.4 UUCP 7.4.1 TIP/CU 7.4.2 What is the magic incantation that allows the modem to dial? 7.4.3 My modem on DOS COM3 or DOS COM4 works with DOS, but not with *BSD. It is set up using IRQ 4 (or 3) respectively. 7.5 How do I configure my nameserver? 7.6 Terminals 7.7 My network manager (or UUCP feed site admin) just informed me that the way I have installed sendmail through my UUCP connection and has caused a sendmail loop. Can you help me get sendmail installed correctly? 7.8 Can network attached assets be used by/from NetBSD? FreeBSD? OpenBSD? 7.8.1 Is it possible to Network boot a NetBSD machine from a network on a diskless Sparc? 7.8.2 I have been working with FreeBSD 1.5.1 with some machines configured as diskless. How can I do the same for 2.0R (i.e., Which are the magic words to put in the Kernel configuration file?) 8.0 What hardware works! 8.1 Video cards 8.2 Mice and Trackballs 8.3 Serial Cards 8.3.1 How do I configure multiport cards? Is there a possibility of using multiport serial boards? How do you configure an AST/4 in the kernel? It looks like the AST driver only supports 4-port cards, but it looks like it would be easy to add support for 8 ports ... or am I wrong? 8.3.2 Now that I have FreeBSD 1.0 installed, how do I set up the serial ports for bi-directional use? 8.3.3 What is the difference between baud and bits per second? 8.3.4 How do I get a serial console to work? 8.4 Disk Controller Problems 8.4.1 IDE controller problems 8.4.2 SCSI controller problems 8.5 SCSI Controllers 8.6 Network Cards 8.7 Printers 8.7.1 How can I print big files (especially from SAMBA, the WfWg network program)? 8.8 Tape Drives. 8.8.1 What are the jumper configurations for the Exbyte 8200 DAT tape drive? 8.9 QIC-40/80 tape drives 8.10 CD-ROMs 8.10.1 How can I mount my CD-ROM so that it appears to be writable? 9.0 What GNU software has been tested and is working with Net/2 derived BSD systems for the 386? 9.1 Has anyone ever gotten news to work? 9.1.1 I want to make sure I have every set up right for my news partition. What newfs options do I need to use to get this information stored OK without future problems? 9.2 How did you get emacs to compile? 9.2 Has anyone tried to get Postgres to work? 9.3 How about the BSD Song? 0.1 A brief history of the *BSD family. In the beginning, there was Research Unix. Bell Labs, in a moment of utter abandon said "Let us produce progeny of Unix. yea verily, that we might garner a market share with this white elephant." In order to beget as many pretenders to the Unix throne as possible, they removed most of the copyright notices and released huge gobbets of code to Universities throughout the United States. From that humble decision came the very spark of what has arguably become the most successful, completely free Unix-style operating system you can make money on. There were several version of BSD roaming around, but they all had one thing in common. You HAD to have a source code license to the original Unix source to get a working version going. The bulk of the code was written at Berkeley, much of it by long-haired computer geeks, complete with bad complexions and pocket protectors. Many Master's Degrees were built on what was to follow. Then, suddenly, someone realized the amount of source code from the original Unix distribution was pretty much down to zilch. They decided that making the distribution available to the whole world (not just the select Unix license holders) seemed like a pretty 'groovy' (to use the vernacular) idea. From that came the Net distribution. William and Lynne Jolitz, with their standard flair and panache, decided to write the pieces that needed to be written. From that decision came 386BSD Version 0.0. Generally considered to be unusable, it was nonetheless a major coup, in that one no longer needed the dreaded 'source license' to produce working operating system images. 386BSD 0.1 eventually came to be. Linux, the other entrant in the Free Unix-style OS family, had been running for about a year by then. Many people, wanting to stick with code that they already knew and which was in use in the commercial sector, decided to start using (and fixing) the 386BSD 0.1 code. As such, many contributions to the system are provided through interaction by people who communicate via many means. Many new and innovative features have been added to 386BSD since it's original release in June of '92. There was an 'unofficial' patchkit which was available from many anonymous FTP sources which made 386BSD more stable and usable. Many problems associated with the use of 386BSD Version 0.1 were solved through the application of patches from the patchkit. Now, more or less overcome by events, the original 386BSD, with its relationship to the AT&T/Berkeley out-of-court settlement, has become a rare piece of code to find. With some of the code considered 'suspect', it was removed from FTP sites world-wide. To replace the original 386BSD, three newer versions of the system are available, under new names. NetBSD is the oldest, FreeBSD followed shortly thereafter. Both systems have evolved into programs that are superior to their progenitor and both have sizable (if a little rabid) followings. The third entry in the group is a fairly recent entrant, called OpenBSD. Most of the statements made in this FAQ will apply to all three of the replacement systems, although I will try to differentiate one from another whenever the difference matters. Any place that says 386bsd either means the original 386bsd 0.1 or any of the members of the PC BSD family. There have been many attempts to polarize the *BSD development groups in the past. One of the reasons that I am still maintaining the FAQ is that it simply is a good source for historical information, as well as a reasonable source for information that is specific to the implementations of NetBSD, FreeBSD, and OpenBSD. It should be remembered that when the *BSD family started out, Bill and Lynne used a source called the "Berkeley Net Release/2" tape as their foundation. While this provided a stable starting point, it also built a possible bomb into the system. Due to a legal battle (which has now been resolved) the following files are identified as 'encumbered' in the BNR/2 source tree. These kernel files are identified as the 'binary only' files in the BSDI distribution, and either have been or must be replaced before we can have a truly free OS family. These files are the primary reason you won't find the original 386BSD Version 0.1 available for FTP anymore. 0.1.1 Which of the 4.3 BSD files were identified as encumbered? What's all this about `binary-only files'? Will BSDI continue to ship source code? What did NetBSD and FreeBSD do about the encumbered files? For Version 1.1 only, BSDI will ship the following kernel files in binary format: kern/init_main.c kern/subr_rmap.c ufs/ufs_bmap.c kern/kern_clock.c kern/sys_generic.c ufs/ufs_disksubr.c kern/kern_exit.c kern/sys_process.c ufs/ufs_inode.c kern/kern_physio.c kern/tty.c ufs/ufs_vnops.c kern/kern_sig.c kern/tty_subr.c kern/kern_synch.c kern/vfs_syscalls.c Our (Berkeley's) 4.4Lite-based release will again include the entire source tree (with the exception of a tiny number of device drivers whose interfaces are kept confidential at the request of their authors. For NetBSD and FreeBSD, these files either have been completely rewritten in a 'clean room' development effort or were replaced with code from other sources (such as CMU or GNU). The encumbered sources for the user land portion of the system have long since been replaced. 0.1.2 How close is NetBSD (or FreeBSD) to BSD 4.4? If you take a look at the README files that accompany each of these packages, you will find that each is based as closely as possible to BSD 4.4-Lite. The core development team for FreeBSD used the 4.4 Lite distribution and re-engineered the missing pieces to come up with the the current version of FreeBSD. The NetBSD developers started with the existing 386BSD files, and compared them to the unencumbered, freely releaeable files from BSD 4.4. For both groups, any files which were not available (through being encumbered) were written from scratch to provide the functionality that was needed. Either way, both systems are close to BSD 4.4. Of course, each has differences that make it different from the other, and different from regular BSD 4.4. 0.1.3 Where can I get more information about the *BSD family of Operating Systems? Here are the current members of the *BSD family. These are presented in alphabetical order, to avoid implying anything. 386BSD - An older version of BSD now targetted exclusively at the research and academic community. CD distributions only, sold by Dr. Dobb's Journal. FreeBSD - A version of BSD for Intel platforms only and targeted at a broad user base. See http://www.freebsd.org for details or ftp://ftp.freebsd.org/pub/FreeBSD for the latest release. NetBSD - A version of BSD for many different platforms, from Intel to the 68K to the DEC ALPHA. See http://www.netbsd.org for more details or ftp://ftp.netbsd.org/pub/NetBSD for the latest release. OpenBSD - A variant of NetBSD. See http://www.openbsd.org for more details or ftp://ftp.openbsd.org/pub/OpenBSD for the latest release. 0.2 About this FAQ. This FAQ consists of several parts: Section 0. Basic FAQ information Section 1. General Network Information Section 2. Common installation questions Section 3. Kernel Building and Maintenance Section 4. Kernel Additions Section 5. Kernel Replacement Parts Section 6. Interaction with MS-DOS Section 7. System Communication Section 8. NetBSD for the Mac FAQ Section 9. NetBSD for the Amiga FAQ ... Section n. NetBSD for the Timex Sinclair FAQ It has been suggested that I remove some of the older, less relevant information from this FAQ. I have given it some thought, and I might. Of course, if someone were to do it for me, it sure wouldn't break my heart. 0.2a What are the differences between *BSD and (your favorite operating system name here)? 0.2b Which is better, (your favorite operating system name here) or *BSD? 0.2c Is 386bsd better than (your favorite operating system name here)? I decided to put this in section 0, primarily because it by far the most asked and least useful question in comp.os.386bsd.*. You will often see this question veiled as a request for a brief description of the differences between 386bsd and (YFOS). This type of request, while seeming to be a reasonable one, is usually looked upon as either an attempt by some folks for the net to do their homework, or as an attempt to start yet another flame-war. What is the answer to this question, then? No. It is not. Nor is it any worse. It is DIFFERENT. There are alternative Operating Systems available, both free and commercial. 386bsd, NetBSD, FreeBSD, and Linux are examples of "free" Unix style Operating Systems. If you ask any of these questions, you are wasting a LOT of bandwidth and making a real name for yourself. Don't bother. It nearly always ends up in name calling and 'mine is bigger (or littler) than yours...' arguments. I have included an excerpt below: >>>>>>>>>>>>>>>>>>>>>>>>>> Is not! >>>>>>>>>>>>>>>>>>>>>>>>> Is so! >>>>>>>>>>>>>>>>>>>>>>>> Is not! >>>>>>>>>>>>>>>>>>>>>>> Is so! >>>>>>>>>>>>>>>>>>>>>> Is not! >>>>>>>>>>>>>>>>>>>>> Is so! >>>>>>>>>>>>>>>>>>>> Is not! >>>>>>>>>>>>>>>>>>> Is so! >>>>>>>>>>>>>>>>>> Is not! >>>>>>>>>>>>>>>>> Is so! >>>>>>>>>>>>>>>> Is not! >>>>>>>>>>>>>>> Is so! >>>>>>>>>>>>>> Is not! >>>>>>>>>>>>> Is so! >>>>>>>>>>>> Is not! >>>>>>>>>>> Is so! >>>>>>>>>> Is not! >>>>>>>>> Is so! >>>>>>>> Is not! >>>>>>> Is so! [the rest of this scintillating debate is deleted...] Where BSD and POSIX differ, 386BSD conforms by default to BSD; Linux to POSIX. Furthermore, while both run mostly GNU utilities, Linux tends toward the SysV flavor (e.g. init vs. initab) where 386BSD sticks with the BSD style. However, sources for different flavors of utilities are available for both, and both support compiler options which allow more BSD or more POSIX semantics. Clifford Stoll talks about the 'West Coast/East Coast' feeling of BSD/SysV in his book "The Cuckoo's Egg". In keeping with that, BSD feels like BSD/West Coast, Linux feels like SysV/East Coast (actually, Finland is what it says on the passport, but stay with me for a minute). If you don't believe me, just look at the primary U.S. archive sites. Linux is available from MIT, BSD is available from Berkeley. Can't get much more 'Coast' than that. :-) Actually, NetBSD and FreeBSD are feeling more and more POSIX all the time. Recent releases of both products have implemented many more POSIX compliant utilities, features, and low-level hooks into the operating system. A great deal of effort has gone into supporting and improving the POSIX standards compliance throughout all of the systems. One of the stated goals for both NetBSD and FreeBSD is Spec 1170 compliance. While no one has jumped up with the check to pay for the testing of compliance, the spec is still there and being persued with vigor. There is a document available via the World Wide Web at http://www.leo.org/pub/comp/os/bsd/cracauer/ that tries to describe the differences in FreeBSD and NetBSD, I haven't personally reviewed it, but it is worth another shot to try and get this pointless debate stopped. Linux, NetBSD, FreeBSD, and OpenBSD share two vitally important facets. All are free and all include source. They are all excellent, and all fill a niche that the others (specifically commercial language and OS vendors) would gladly leave available. Also, don't forget one of the most important things; get what your friends have. Then they can help you. Finally, remember that this FAQ and the BSD Newsgroups are intended as places for *BSD users and developers to meet and discuss topics which are germain to the further development of these systems. For more information about Linux, you can read the comp.os.linux.* newsgroups. 0.2.1 So what ARE the differences between the *BSD family and Linux? Here it is, in its 'right for today' glory. As of 1 July, 1994, these statements were more or less accurate. Against my better judgement, I am going to include this, primarily because it is a very even handed approach to describing two very different systems. As of 1 July 1996 (two years later) the systems have evolved considerably. NetBSD and FreeBSD have been joined by OpenBSD in the *BSD family. In addition, each of the BSD systems and each of the Linux distributions has had considerable chances to evolve. Several updates to the original article are included below, so that the comparison still remains valid. Thanks to <> for his updates on the Linux side of this debate. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - For those of you that find it, I hope that it answers some of your questions. The original was written by: Thomas Heiling Pharmacist & Doctorate at Pharmazeutisches Institut Uni Wuerzburg - Germany Email phar006@rzbox.uni-wuerzburg.de (HP-UX) tom@wpzd07.pzlc.uni-wuerzburg.de (Linux) or phar006@vax.rz.uni-wuerzburg.de ( VAX ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - What is missing here is an overview and a comparison of the free available Unixsystems. And this info should be in the FAQ! I will start here such a comparison. Q: For whom should this be ? A: For a (hopefully) new Unix-user, who wants to install one of the free Unixes. He should be able to read this document, look at his hardware, define his needs for a Unix-systems and then he should be able to choose a system which meets his needs. Q: Who am I and why should I be able to write such a doc ? A: Good Question! My name is Thomas Heiling, I am working at the University of Wuerzburg in Germany as a doctorate. My job is to program an Ultraviolett/Vis-spectrum comparison program. Furthermore I am the person, who maintains the Internet connections and computers of our Department. I have running Linux and NetBSD 0.9, the main Server is a 486/33 + 16 MB which runs Linux. A 486/66 is for numerical work. Then there are some clients mostly 386 with either 4 MB or 8 MB. One 386 with NetBSD, but this is just for testing. So I would say I can speak for Linux, a little bit for NetBSD and I have no idea for FreeBSD beside the Installation Guide. (I have no access to the BSD386 1.0 CD, which was announced some time ago). Hardware requirements : Linux: CPU: Anything that runs 386 protected mode programs (all models of 386s and 486s should work; 286s don't work, and never will). Architecture: ISA or EISA bus. MCA (mostly true blue PS/2's) does not work. Local busses (VLB and PCI) work. RAM: Theoretically up to 1 GB. This has not been tested. Some people (including Linus) have noted that adding ram has slowed down their machine extremely without adding more cache at the same time, so if you add memory and find your machine slower, try adding more cache. Data storage: Generic AT drives (IDE, 16 bit HD controllers with MFM or RLL) are supported, as are SCSI hard disks and CD-ROMs with a supported SCSI adaptor. Enhanced IDE controllers and devices (including ATAPI CD-ROMs) and generic XT controllers (8 bit controllers with MFM or RLL). Supported SCSI cards include 7000FASST; Adaptec 152X/2825, 1542, 1740, 274X/284X/294X; AdvanSys; Always IN2000; AM53/79C974 PCI; BusLogic; DTC3180/3280; EATA ISA/EISA (DPT PM2011/021/012/022/122/322); EATA-DMA (DPT, NEC, AT&T, SNI, AST, Olivetti, Alphatronix); EATA-PIO (old DPT PM2001, PM2012A); Future Domain 16xx; Generic NCR5380/53c400; NCR53c406a; NCR53c7,8xx; IOMEGA Parallel Port ZIP drive; PAS16; Qlogic FAS; Qlogic ISP (EXPERIMENTAL); Seagate ST-02; Future Domain TMC-8xx; Trantor T128/T128F/T228; UltraStor 14F/34F; UltraStor 24F The various IDE chipsets (CMD640, Intel 430FX [Triton], RZ1000, ALI M1439/M1445, DTC-2278, Holtek HT6560B, QDI QD6580, UMC 8672); removable IDE interfaces (PCMCIA); RAM disk (can be root filesystem); Multiple devices (Linear [append], RAID-0 [striping]). The following file systems are supported in Linux: Quota, Mandatory lock, Minix FS, Standard Linux (EXT, EXT2, XIAFS), DOS (FAT, VFAT, umsdos (Unix like fs on top of FAT)), /proc, Sun NFS, SMB, NCP (for NetWare volumes), ISO9660 cdrom, The following CD-ROM drives are supported: SCSI, IDE/ATAPI, Others (Aztech/Orchid/Okano/Wearnes/TXC/CyDROM; Goldstar R420; Matsushita/Panasonic/Creative, Longshine, TEAC; Mitsumi; Optics Storage DOLPHIN 8000AT; Philips/LMS CM206; Sanyo CDR-H94A; ISP16/MAD16/Mozart soft configurable cdrom interface card; Sony CDU31A/CDU33A; Sony CDU535) SCSI and QIC-02 tapes are also supported. (*Ed Note: Virtually all of the CD-ROMs listed in the 'others' category are either originally manufactured by Matsushita (Panasonic in the US), Sony, or Mitsumi.) Video: VGA, EGA, CGA, or Hercules (and compatibles) work in text mode. For graphics and X, there is support for (at least) normal VGA, some super-VGA cards (most of the cards based on ET3000, ET4000, Paradise, and some Trident chipsets), S3 (except for Diamond Stealth cards, because the manufacturer won't tell how to program it), 8514/A, ATI MACH8, ATI MACH32, and hercules. (Linux uses the Xfree86 X server, so that determines what cards are supported.) The following types of network interfaces are supported in Linux: EQL (serial line load balancing) SDLA (Sangoma S502/S508) PLIP (parallel port IP) PPP, SLIP (CSLIP, keepalive, linefill, six-bit SLIP) Radio network interfaces: BAYCOM ser12 and par96 kiss emulation driver for AX.25 Gracilis PackeTwin support Ottawa PI and PI/2 STRIP (Metricom starmode radio IP) WaveLAN WIC Radio IP bridge (EXPERIMENTAL) Z8530 SCC kiss emulation driver for AX.25 Ethernet (10 or 100 Mbit): 3COM (3c501, 3c503, 3c505, 3c507, 3c509/3c579, 3c590 series [592/595/597] "Vortex") AMD Lance and PCnet (AT1500 and NE2100); AMD PCInet32 (VLB and PCI) Western Digital/SMC (WD80*3, SMC Ultra, SMC 9194) Cabletron E21xx, DEPCA, DE200, DE201, DE202, DE422, EtherWORKS 3 [DE203, DE204, DE205], EtherExpress 16, EtherExpressPro, FMV-181/182/183/184, HP PCLAN+ (27247B, 27252A, 27245, other 27xxx series), HP 10/100VG PCLAN (ISA, EISA, PCI), ICL EtherTeam 16i/32, NE2000/NE1000, NI5210, NI6510, SK_G16) EISA, VLB, PCI and on board controllers (Ansel Communications, Apricot Xen-II onboard, DE425, DE434, DE435, DE450, DE500, DECchip Tulip [dc21x4x] PCI, Digi Intl. RightSwitch SE-X) Pocket and portable adaptors (AT-LAN-TEC/RealTek, D-Link DE600, D-Link DE620) Token Ring driver (IBM Tropic chipset based) ARCnet (arc0e ["Ether-Encap" packet format], arc0s [RFC1051 packet format]) ISDN (ICN 2B and 4B, PCBIT-D, Teles/NICCY1016PC/Creatix) The following TCP/IP options are supported in Linux: Forwarding/gatewaying Multicasting Firewalling Firewall packet logging Accounting Tunneling Aliasing support PC/TCP compatibility Reverse ARP Disable Path MTU Discovery [normally enabled] Drop source routed frames Allow large windows The following entwork protocols are also supported: IPX Appletalk DDP Amateur Radio AX.25 Level 2 AX.25 over Ethernet Amateur Radio NET/ROM Sound cards supported: ProAudioSpectrum 16, SoundBlaster (SB, SBPro, SB16, clones), Generic OPL2/OPL3 FM synthesizer, Gravis Ultrasound, MPU-401 (not for SB16), 6850 UART Midi, PSS (ECHO-ADI2111), 16 bit sampling option of GUS, GUS MAX, Microsoft Sound System, Ensoniq Soundscape, MediaTriX Audio TriX Pro, MAD16 and/or Mozart based cards, Crystal CS4232 based (Pnp), Turtle Beach Wave Front (Maui, Tropez) synthesizers Other cards supported by Linux: Digiboard PC/Xx, Cyclades async mux, Stallion multiport serial (EasyIO or EC8/32, EC864, ONboard, Brumby), SDL RISCom/8 card, Parallel printer, Bus mouse (ATIXL, Logitech, Microsoft), PS/2 mouse, C&T 82C710 mouse port (as on TI Travelmate), QIC-02 tape drives, Travan QIC-80, Advanced Power Management BIOS, Watchdog Timer, WDT Watchdog timer, and Enhanced Real Time Clock FreeBSD: CPU: Any i386sx or better with at least 4 Meg of RAM (8 Meg for X Windows). Disk Controllers: WD1003 (any generic MFM/RLL) WD1007 (any generic IDE/ESDI) IDE, including ATA Adaptec 152x series ISA SCSI controllers Adaptec 154x series ISA SCSI controllers Adaptec 174x series EISA SCSI controller in standard and enhanced mode. Adaptec 274x/284x/2940/3940 (Narrow/Wide/Twin) series EISA/VLB/PCI SCSI controllers Adaptec AIC-6360 based boards, which includes the AHA-152x and SoundBlaster SCSI cards. Note: You cannot boot from the SoundBlaster cards as they have no on-board BIOS, which is necessary for mapping the boot device into the system BIOS I/O vectors. They are perfectly usable for external tapes, CDROMs, etc, however. The same goes for any other AIC-6x60 based card without a boot ROM. Some systems DO have a boot ROM, which is generally indicated by some sort of message when the system is first powered up or reset. Check your system/board documentation for more details. Buslogic 545S & 545c Note: that Buslogic was formerly known as "Bustec". Buslogic 445S/445c VLB SCSI controller Buslogic 742A, 747S, 747c EISA SCSI controller. Buslogic 946c PCI SCSI controller. Buslogic 956c PCI SCSI controller. NCR 53C810 and 53C825 PCI SCSI controller. NCR5380/NCR53400 (``ProAudio Spectrum'') SCSI controller. DTC 3290 EISA SCSI controller in 1542 emulation mode. UltraStor 14F, 24F and 34F SCSI controllers. Seagate ST01/02 SCSI controllers. Future Domain 8xx/950 series SCSI controllers. WD7000 SCSI controllers. With all supported SCSI controllers, full support is provided for SCSI-I & SCSI-II peripherals, including Disks, tape drives (including DAT) and CD ROM drives. Filesystems: FFS (also called UFS by some vendors) QUOTA (allow quota checking on FFS) NFS (Sun Network File System, compatible with PC-NFS) MSDOSFS (MS-DOS Filesystems) CD9660 (ISO-9660 CD-ROM. including RockRidge extensions) PROCFS (/proc file system) MFS (memory file systems, like RAM disk, but backed by swap) SMB (using SAMBA, read-only to LM shares) CD-ROMs: Soundblaster SCSI and ProAudio Spectrum SCSI (cd) Mitsumi (all models) proprietary interface (mcd) Matsushita/Panasonic (Creative) CR-562/CR-563 proprietary interface (matcd) Sony proprietary interface (scd) ATAPI IDE interface (experimental and should be considered ALPHA quality!) (wcd) Ethernet cards: Allied-Telesis AT1700 and RE2000 cards SMC Elite 16 WD8013 ethernet interface, and most other WD8003E, WD8003EBT, WD8003W, WD8013W, WD8003S, WD8003SBT and WD8013EBT based clones. SMC Elite Ultra is also supported. DEC EtherWORKS III NICs (DE203, DE204, and DE205) DEC EtherWORKS II NICs (DE200, DE201, DE202, and DE422) DEC DC21140 based NICs (SMC???? DE???) DEC FDDI (DEFPA/DEFEA) NICs Fujitsu FMV-181 and FMV-182 Intel EtherExpress Isolan AT 4141-0 (16 bit) Isolink 4110 (8 bit) Novell NE1000, NE2000, and NE2100 ethernet interface. 3Com 3C501 cards 3Com 3C503 Etherlink II 3Com 3c505 Etherlink/+ 3Com 3C507 Etherlink 16/TP 3Com 3C509, 3C579, 3C589 (PCMCIA) Etherlink III Toshiba ethernet cards PCMCIA ethernet cards from IBM and National Semiconductor are also supported. Note: FreeBSD does not currently suppport PnP (plug-n-play) features present on some ethernet cards. If your card has PnP, it (PnP) should be disabled. Miscellaneous devices: AST 4 port serial card using shared IRQ. ARNET 8 port serial card using shared IRQ. BOCA IOAT66 6 port serial card using shared IRQ. BOCA 2016 16 port serial card using shared IRQ. Cyclades Cyclom-y Serial Board. STB 4 port card using shared IRQ. SDL Communications Riscom/8 Serial Board. Adlib, SoundBlaster, SoundBlaster Pro, ProAudioSpectrum, Gravis UltraSound and Roland MPU-401 sound cards. QIC-02 and QIC-36 tape drives (wt0) NetBSD: Architecture: ISA or EISA bus. MCA does not work (although there is work under way to provide MCA support). Local busses (VESA and PCI) are also supported. All NetBSD implementation use the following file system types: FFS # UFS QUOTA # UFS quotas LFS # log-structured file system MFS # memory file system NFSCLIENT # Network File System client NFSSERVER # Network File System server CD9660 # ISO 9660 + Rock Ridge file system MSDOSFS # MS-DOS file system FDESC # /dev/fd KERNFS # /kern NULLFS # loopback file system PORTAL # portal filesystem (still experimental) PROCFS # /proc UMAPFS # NULLFS + uid and gid remapping UNION # union file system CONCAT # Concatenated (multiple physical # devices appear as single unit) and # Striped (RAID style Striping) Many of these filesystem types can be mixed and used together (Union Filesystems over CD-ROMs to give appearance of writable CD-ROMs). All NetBSD systems also support the following networking options: GATEWAY # packet routing and forwarding INET # IP + ICMP + TCP + UDP IPFILTER_LKM # Add LKM hooks for packet filtering IPFIREWALL # Add code to system for IP Firewall NS # XNS ISO,TPIP # OSI EON # OSI tunneling over IP CCITT,LLC,HDLC # X.25 atari: A4000/A1200 IDE controller. SCSI host adapters: 33c93 based boards: A2091, A3000 and GVP series II. 53c80 based boards: 12 Gauge, IVS and Wordsync/Bytesync. 53c710 based boards: A4091, Magnum, Warp Engine and Zeus. FAS216 based boards: FastLane Z3, Blizzard. Video controllers: ECS, AGA and A2024 built in on various amigas. Retina Z2 and Retina Z3. Picasso II. GVP Spectrum. Piccalo. A2410. Cybervision 64. Ethernet controllers: A2065 Ethernet Hydra Ethernet ASDG Ethernet A4066 Ethernet Ariadne Ethernet Quicknet Ethernet Arcnet controllers: A2060 Arcnet Tape drives: Most SCSI tape drives, including Archive Viper, Cipher SCSI-2 ST150. CD-ROM drives: Most SCSI CD-ROM drives Serial cards: MultiFaceCard II and III A2232 Amiga floppy drives. Amiga parallel port. Amiga serial port. Amiga mouse. hp300: CPUs: 68020-based: 318, 319, 320, 330, and 350. 68030-based: 340, 345, 360, 370, 375, and 400(*). 68040-based: 380, 425(*), and 433(*). Disks: HP-IB/CS80: 7912, 7914, 7933, 7936, 7937, 7945, 7957, 7958, 7959, 2200, and 2203. SCSI-I(**), including magneto-optical and CD-ROM. Tape drives: Low-density HP-IB/CS80 cartridge: 7914, 7946, and 9144. High-density HP-IB/CS80 cartridge: 9145. HP-IB/CS80 1/2": 7974A, 7978A/B, 7979A, 7980A, and 7980XC. SCSI: HP DAT, Exabyte, and SCSI QIC drives such as the Archive Viper. RS232 interfaces: 98644 built-in single port (dca). 98642 4-port (dcm). 98638 8-port (dcm). Network interfaces: 98643 built-in and add-on LAN cards. Displays: 98544, 98545, and 98547 color and monochrome Topcat. 98548, 98549, and 98550 color and monochrome Catseye. 98700 and 98710 Gatorbox. 98720 and 98721 Renaissance. 98730 and 98731 DaVinci. A1096A monochrome Hyperion. Input devices: 98730 and 98731 DaVinci. A1096A monochrome Hyperion. Input devices: General interface supporting all HIL devices: keyboard, 2 and 3 button mice(***), and ID module. Miscellaneous: Battery-backed real-time clock. 98624 built-in HP-IB interface. 98625A and 98625B `fast' HP-IB interface. 98658A built-in and add-on SCSI interface. Printers and plotters on RS232 and HP-IB. SCSI autochanger. (*) 400-series machines configured for Domain/OS are not fully supported, notably, the keyboard doesn't work and the ROMs must be in `HP-UX mode'. (**) SCSI-II drives are known to work, though this may require changing a jumper on some drives. See your disk's documentation for details. (***) Serial mice connected to a `HIL to quad' converter are also known to work. i386: Floppy controllers. MFM, ESDI, IDE, and RLL hard disk controllers. SCSI host adapters: [Adaptec host adapters only on kcadp floppy] Adaptec AHA-154xA, -B, -C, and -CF Adaptec AHA-174x Adaptec AIC-6260 and AIC-6360 based boards, including the Adaptec AHA-152x and the SoundBlaster SCSI host adapter. (Note that you cannot boot from these boards if they do not have a boot ROM; only the AHA-152x and motherboards using this chip are likely to be bootable, consequently.) Adaptec AHA-294x[W] cards and some onboard PCI designs using the AIC7870 chip. This driver does *not* currently work with non-PCI AIC-7xxx boards or the Adaptec 3940. Buslogic 54x (Adaptec AHA-154x clones; driver on kcadp floppy) [Other host adapters only on kcoth floppy] BusLogic 445, 74x, 9xx (But not the new "FlashPoint" series of BusLogic SCSI adapters) Symbios Logic (NCR) 53C8xx-based PCI SCSI host adapters Ultrastor 14f, 24f, and 34f Seagate/Future Domain ISA SCSI adapter cards, including ST01/02 Future Domain TMC-885 Future Domain TMC-950 MDA, CGA, VGA, SVGA, and HGC Display Adapters. (Note that not all of the display adapters NetBSD/i386 can work with are supported by X. See the XFree86 FAQ for more information.) Serial ports: 8250/16450-based ports 16550-based ports AST-style 4-port serial boards [*] BOCA 8-port serial cards [*] Cyclades Cyclom-{4, 8, 16}Y serial boards [*] IBM PC-RT 4-port serial boards [*] Parallel ports: All standard AT-style parallel ports (with or without IRQ 7 support). Ethernet adapters: AMD LANCE and PCnet-based ISA Ethernet adapters [*], including: Novell NE1500T Novell NE2100 Kingston 21xx AMD PCnet-based PCI Ethernet adapters, including: BOCALANcard/PCI AT&T StarLAN 10, EN100, and StarLAN Fiber 3COM 3c501 3COM 3c503 3COM 3c505 [*] 3COM 3c507 3COM 3c509 and 3c579 (But not the PCI 3c59X series) Digital DC21x4x-based PCI Ethernet adapters, including: SMC EtherPower 10, 10/100 (PCI only!) Znyx ZX34X Cogent EM100 Digital DE450 Digital DE500 BICC Isolan Intel EtherExpress 16 SMC/WD 8003, 8013, and the SMC "Elite16" ISA boards SMC/WD 8216 (the SMC "Elite16 Ultra" ISA boards) Novell NE1000, NE2000 Tape drives: Most SCSI tape drives QIC-02 and QIC-36 format (Archive- and Wangtek- compatible) tape drives [*] [+] CD-ROM drives: Mitsumi CD-ROM drives [*] [+] [Note: The Mitsumi driver device probe is known to cause trouble with several devices!] Most SCSI CD-ROM drives IDE/ATAPI CD-ROM drives (not completely tested, patches available from ftp://lix.polytechnique.fr/pub/manu Mice: ( while the kernel supports mice, there is very little software written which uses the mouse. 'X' is the primary user for these supported mice.) "Logitech"-style bus mice [*] [+] "Microsoft"-style bus mice [*] [+] "PS/2"-style mice [*] [+] Serial mice (no kernel support necessary) Sound Cards: SoundBlaster [*] [+] Gravis Ulrasound and Ultrasound Max [*] [+] [The following drivers are not extensively tested] Personal Sound System [*] [+] Windows Sound System [*] [+] ProAudio Spectrum [*] [+] Drivers for hardware marked with "[*]" are NOT included on the distribution floppies. Except as noted above, all other drivers are present on both kernel-copy disks. Also, at the present time, (as of 1 Nov 1995) the distributed kernels support only one SCSI host adapter per machine. NetBSD normally allows more, though, so if you have more than one, you can use all of them by compiling a custom kernel once NetBSD is installed. Support for devices marked with "[+]" IS included in the "generic" kernels, although it is not in the kernels which are on the distribution floppies. NetBSD/i386 does NOT currently support (in version 1.1), but get many questions about: - Adaptec AIC-7770-based SCSI host adapters (including the Adaptec AHA-274x, AHA-284x families). - NCR 5380-based SCSI host adapters. - APM power management -- if your system supports it, turn it off! - PCMCIA ("PC Card") devices, including some miniature "IDE" hard disks. - QIC-40 and QIC-80 tape drives. (Those are the tape drives that connect to the floppy disk controller.) - WD-7000 SCSI host adapters. - PCI-PCI bridges and cards which include them, such as the AHA-394x SCSI host adapter and some DC21x4x-based multi-Ethernet cards. - 3Com 3c59x series PCI Ethernet and Fast Ethernet adapters. - Multiprocessor Pentium and Pentium Pro systems. (Ed. Note: They run fine, you just don't get the advantages SMP provides yet. There is an SMP working group putting the final touches on SMP support.) - Intel EtherExpress 100 Fast Ethernet adapters. - Digital DEFPA PCI FDDI adapters (the PC support barely missed the November release; it works in other ports, and will work in the next release) We are planning future support for many of these devices. (Ed Note: Version 1.2 is due out shortly, many of these devices are fully supported there.) mac68k: Supported models: Mac II, Mac IIx, Mac IIcx, Mac IIci, Mac SE/30, Mac IIsi, Mac IIvx, Mac IIvi, Performa 600 Supported devices on all of the above systems include: Internal SCSI bus and most SCSI tapes, hard drives, and CD-ROMs Internal sound--enough to beep on some machines, anyway Most basic NuBUS video cards (there have been some problems with some 24-bit color cards) Both internal serial ports ADB keyboards and mice Ethernet cards based on the National Semiconductor 8390 (Asante, Apple, and a few others) [problems reported on the Performa 600, though]. Some systems will boot and are usable from an external terminal (serial tty or SL/IP): LC III Performa 550 and possibly others What isn't supported, but often asked about: 68040-based Macs. Work is in progress on getting a Quadra 700 running. This requires a new scsi driver and a new ethernet driver. PowerPC-based Macs. Work will begin on this, sometime soon. It will be separate from this port, though. The PowerPC is a much different processor. {Ed Note: Work on the Quadra and the Power-PC have begun.] mvme68k: Motorola makes a number of m68k VME cards. This port currently only works on the m68030 based VME147 card (diskless only for now). requirements: - VME147 card - a machine to connect the console to - network connection - NFS server (to serve root and swap) pc532: [This machine should not be confused with the Intel Pentium system with the same name. This is a completely different machine which uses a 32032 CPU and PC peripherals.] 4 - 32 Megs of memory 8 serial lines done by 4 scn2681 chips The NCR DP8490 SCSI chip (scsi only) Most SCSI disks work (fixed and floppy) A few SCSI tapes work Some SCSI CD-ROM drives work The Matthias Pfaller Parallel Port. pmax: [The specifics of the PMAX are a little vague at this point. We'll add these in later.] sparc: CPUs: sun4c (e.g. the SS1, SS1+, SS2, IPC, ELC, IPX, and SLC) sun4 (e.g. the 4/100, 4/200, and 4/300. note that support for the 4/400 processor is incomplete) *NOT* on these machines (yet): sun-4/400 (lacking support for the I/O cache, and has ethernet problems) sun4m (e.g. sparc classic, 4, 5, 10, and 20) sun4d (e.g. sparc center 2000) Work on porting NetBSD/sparc to the sun4m platform is currently in progress, but was not ready in time for the 1.1 release. Video: sun4c sbus video: cgsix, cgthree, and bwtwo frame buffers sun4 video (not thoroughly tested?): P4 on-board bwtwo and VME cgtwo card Serial ports: ttya and ttyb (can be used as console if needed) Ethernet: on-board AMD Lance ethernet ("le0") Sbus AMD Lance ethernet cards On-board Intel 82586 ethernet (ie0 on 4/100's and 4/200's) VME Intel 82586 ethernet cards SCSI: on-board "esp" SCSI controller (sun4c's, and the 4/300) sbus "esp" SCSI controller Sun "SUN-3"/"si" VME SCSI controller (polled mode only, slow) Sun "SCSI Weird"/"sw" on-board controller (4/110 only, polled) VME disks: Xylogics 7053 VME/SMD disk controller ("xd") Xylogics 450/451 VME disk controller ("xy") [note: VME/IPI disks are not supported] Sun floppy disk drive on sun4c's Sun keyboard and mouse Sun4c audio Hardware the we do NOT currently support, but get many questions about: sun4m, including multiprocessor machines interrupt driven SCSI driver for sun-4/100's and sun-4/200's sun3: CPUs: 3/50, 3/60, 3/110, 3/75, 3/150, 3/160, 3/260, 3/280 Serial ports (RS232): built-in ttya, ttyb Video adapters: bwtwo, cgtwo, cgfour Network interfaces: On-board Lance Ethernet (le) On-board or VME Intel Ethernet (ie) SCSI: (Most SCSI disks, tapes, CD-ROMs, etc.) On-board "si" (SCSI-3) [Note 1] VME "si" (SCSI-3) board [Note 1] SMD Disks: (the big, heavy ones 8^) Xylogics 450/451 [Note 2] Xylogics 753/7053 [Note 2] Input devices: Sun keyboard and mouse Miscellaneous: Battery-backed real-time clock. Note 1: The "si" driver now supports DMA and disconnect/reselect but due to the immaturity of the DMA code, those features are disabled by default. To enable DMA (and get faster SCSI performance) patch the variable si_options in the file /usr/src/sys/arch/sun3/dev/ncr_si.c as indicated. Note 2: SMD disk support is almost ready, but could not be tested in time for this release. Drivers are provided for the Xylogics 450/451 and Xylogics 753/7053 VME boards only as source code. They compile but have never touched a disk. Harddisk Storage requirements : *BSD: Base System 16 MB Full binary distribution 46 MB Full source " 72 MB Kernel Source 7 MB Swap 8 MB For all of the *BSD systems, the minimum is Base + Binary + Swap, and that this minimum is 80 MB. For a complete system with binary and source you need at least 210 MB. This does NOT include X or LaTeX. Linux: This is difficult, because there are different distributions to choose from. Every distribution has a special goal. The main distributions are Redhat (commercial release), Slackware, Yggdrasil, and Debian. As a general rule, the Linux distributions take less space than a similar *BSD distribution. Some other features: virtual terminals/consoles: All of the *BSD and Linux systems have virtual consoles available. shared libraries: NetBSD, FreeBSD, and Linux have it. I recall a thread some time ago, which was something like "Linux shared Libs are no good - A pain for the developer." For the user this should be meaningless. NetBSD and FreeBSD shared library implementations are both very easy to use both from the developer and user point of view. UPDATE '96: With the change to ELF and COFF, Linux shared libraries are now as easy to use as the BSD libraries. Networking: *BSD networking is more mature than the Linux networking. Berkeley invented TCP/IP, and since all of the BSD systems are based on the original Berkeley code, this should go without saying. In the development process of Linux 1.3.x/2.0, most of the networking code was rewritten and parts of the BSD networking code were ported to Linux in an attempt to fix any remaining instabilities. The Linux 2.0 networking code seems fairly solid, but 2.0 is too recent to pass final judgement. Eric Schenk at the University of Toronto recently posted on several Usenet newsgroups and a couple of mailing-lists some comments about the innards of the Linux networking code. He seemed to indicate that even the TCP protocol implementation is far from complete. I am looking for the specifics (his note/URL), but I can't find it at the moment. Loadable Kernel Modules: LKMs have been supported in *BSD since the late 386bsd+Patchkit days. Linux has supported LKMs for some time. File System Intrusion: One feature of Linux that is currently not implemented in any of the *BSD systems is the ability to make a filesystem on top of a DOS-FAT, so you don't need to repartition your Disk. This Filesystem is of course not as fast as a native Filesystem, but for trial it should be O.K. Here are some pro's and con's for both : *BSD: + Full Source Code of all commands in a source tree, no need to look all over the Internet for the source of a command. + There is only one distribution, which is valid for some time. + Networking is more mature. + The system is standard BSD. + System will natively execute Linux, FreeBSD, SysV, and iBCS2 executables for all of the platforms supported - Releases of new versions not partiuclarly regular. - You need extra packages for XFree and for TeX. They are not hard to find, and install into a standard location in the directory tree, but they are not included in the base distribution. Most CD distributions include X and TeX implementations on the CD, and they are available from the primary FTP sites for each of the systems. Linux: + Uses fewer resources + Has more support for 'unusual' devices - Every distribution is a little bit different - Development is too fast without net access (typically no specific "version" releases.) I include here some info from other posts, which should help the new user to show the differences: burgess@cynjut.neonramp.com wrote: : NetBSD is the OS I use. It is a BSD derived Operating System : that has a very stable operating envelope. The networking code : has been stolen by commercial OS and network vendors the world : over. NetBSD has the advantage of being meant for a wide : range of hardware platforms. It is currently available for : something like 10 different CPUs, and has been laid out such : that new architectures can be added relatively painlessly. These arechitetures include several Sun Systems, many Motorolas, including the Amiga and Mac, and several other mini- and microcomputer systems. : : FreeBSD is pretty much the same (go ahead a quibble over : details, I don't care anymore). The biggest difference is that : NetBSD is a horizontal system (across platforms) and FreeBSD is : a vertical system (intended to stay on the Intel family). Both : are based on code from 386BSD, although neither really resembles : it any more. : : Linux was developed by Linus Torvalds and has the advantage of : being available in source code form first. Other than that, I : have heard that it is a good OS platform for standalone Unix : workstations. It had a lot of things that made its users rabid : before the *BSD folks did, but the purists insist that *BSD is : (choose two: cleaner, safer, taller, wider, better, quieter, : louder, greener, older, more modern). From: hedrick@geneva.rutgers.edu (Charles Hedrick) There are four major differences: 1) the 386BSD family started with BSD, and Linux started with POSIX. NetBSD/FreeBSD/386BSD have been adding POSIX and System V compatibility, and Linux has been adding Berkeley and System V compatibility. So there's a good deal of overlap. But ...BSD is still a better choice if you want to program in a Berkeley environment and Linux if you want a POSIX environment. (Ed Note: Linux started out with Minix, but only sort of. The first file system it supported was the Minix file system. The rest of the 'standard Linux' filesystems came along later. POSIX wasn't the original design document. Linus wanted to see if he could do it: apparently he could.) That's for the kernel and libc -- the utilities and other stuff users see tends to be fairly similar. In both cases the programs are what I call "typical University Unix". The main difference is that the base Unix utilities tend to be Berkeley for *BSD and GNU for Linux. GNU is fairly Berkeley-compatible, but its priority is POSIX, so it tends to look slightly closer to System V, with massive Berkeley extension. There are several sets of administrative utilities, but it's more likely that init, getty, etc., are going to be System V style for Linux and BSD for *BSD. Again, these things aren't as significant as they might be because *BSD is also concerned about POSIX compatibility and GNU is concerned about BSD compatibility. So both sets of software are approaching a similar sort of goal from opposite directions. You could probably use the systems for quite a while without noticing much difference. (I'd like to emphasize that there's no similarity in overall feel between Linux and typical brain-dead PC System V ports.) The *BSD FAQ characterizes the difference as one of East Coast vs. West Coast. There's a lot to be said for that summary. There's more difference in Unix culture between New Jersey and California than between New Jersey and Finland. 2) The nature of the development communities and distribution mechanisms are different. *BSD has three (four if you count BSDI) different developer communities that take code from each other, but appear to hate each other's guts. Even *BSD and Linux take code from each other. Thus there are several different *BSD's, each of which has an official distribution. There's just one Linux kernel, and from a practical point of view just one set of major utilities, but there's no official distribution. So several different groups put together distributions, with their own choice of kernel and utility versions. This means that it's easier to define what the One True Linux is than what the One True BSD is, but harder to get it. Once you've decided which BSD is the right one, it's easier to find an authoritative distribution of it. Development of Linux tends to be more distributed. Lots of people are working on lots of projects: new drivers for this and that, new versions of this utility and that. If you want to keep up with NetBSD, FreeBSD, or OpenBSD you can automatically download the changes for the -current from one or two places for each release. FreeBSD and NetBSD use 'sup' and OpenBSD uses 'anoncvs', a more powerful versioning and updating system. If you want to keep up with Linux, you end up taking pieces from lots of people (though they generally end up on one of two archive machines -- tsx-11.mit.edu or sunsite.unc.edu). If you don't want to do this, of course the packaged distributions do it for you. 3) The BSD networking is more mature than the Linux networking. This is one area in which I don't think Linux has any countervailing advantages, though in my opinion by release 1.0 Linux networking will be acceptable. (Ed Note: This is, in fact, the case. Linux networking has matured considerably this was originally written). 4) There are specific things in each system that are likely to be deciding factors for some people. I don't know what unique things BSD has, because I'm not part of that community but here is the list of features that I find appealing: - COFF and ELF compatiblity: When this was originally written, neither had ELF or COFF support built in. They both do now. - Windows executable emulation: This is probably more useful, and it's being done jointly by developers from both BSD and Linux cooperatively. (After two years, this is still not completed.) - DOS compatibility: The existing releases of *BSD don't have DOS compatability, but the imminent releases of FreeBSD and NetBSD both do. This emulator is the same one BSDI uses, so is exactly the same as the commercial BSD/OS version. The Linux DOS emulator has a long history, but is generally considered slow enough and creaky enough that it's not generally usable. However it certainly does work for many programs, and if one of those programs is critical to you, it may be a big deal. - Differences in support of devices are not likely to persist for long. There's a history of taking device drivers in both directions, so if there's enough interest in a device, and one side implements it, you can bet it will (generally) show up on the other side. (Ed Note: The floppy tape driver is a good example of one that didn't make it to all of the BSD systems. FreeBSD has it, but NetBSD doesn't.) - Linux uses DOS partitions (including extended partitions). - BSD creates its own partitions inside a single non-DOS partition. This is a difference, but it's unclear whether it's a critical one. - Linux and *BSD can all mount DOS filesystems and Linux can mount OS/2 file systems (OS/2 is read-only). For a lot of people, the best suggestion is to find out what your friends are doing. If there's a significant user community near you of either kind, you're probably best off to go with it. If not, flip a coin (or look at a map and see whether you're nearer Berkeley or Finland -- note that in this comparison portions of the distance that are over an ocean don't count). There is another difference: the use of the network share directories. The Linux file system standard (which is supported by convention by most Linux developers) currently says that no program should look directly into /usr/share, that symlinks should be provided from other places, such as /etc/termcap. This provides the ability to have a heterogeneous /usr/share that anyone can access, but which does not NEED to be available for the system to operate. On the other hand, there is a movement to have the /usr/share directory tree available to all programs that need it in the *BSD camps. It is more a matter of opinion than a matter of substance as to which is better; it is simply another difference, and one that is not likely to change in the near future. Bob Woods writes: "My very slight experince with trying to port some ISA ethernet and ISDN drivers from Linux to NetBSD left me with the impression that none of the code is of very high quality. I didn't get very close to much of the code still maintained only by Linus, but more than one of these drivers was absolutely atrocious. I ended up dropping my plans to port the driver, and would be writing from scratch if the project had not been cancelled." 0.2.2 I want to start up a thread about why *BSD is or isn't as good as some other operating system. Can anyone suggest a good reason why I shouldn't? Jordan Hubbard, one of the FreeBSD core team members, has offered this missive on that very subject: [ Note: You could very well simply substitute the word "NetBSD", "OpenBSD", or "Windows 95" for "Linux" in the argument that follows ] From time to time, a thread in both the comp.os.386bsd.misc and comp.os.linux.misc groups flares up regarding which operating system is "better", FreeBSD or Linux. This generally provokes controversy from users on both sides, with one group claiming that their OS is "better" for some reason and the other group claiming that the first group doesn't know what the heck it's talking about. Both arguments are a waste of time. Rather than trying to win a rather questionable debate on relative (and constantly changing) technical merits, we should be asking ourselves what both groups are REALLY about and what they represent. This is naturally going to be a matter of personal opinion, but I believe even the most seriously at-odds members would agree that both operating systems represent a unique and long-awaited opportunity: The ability to run a fully featured operating system on popular, easily affordable hardware and for which all source code is freely available. Those who have been in computing for awhile will remember when the term `operating system' referred almost exclusively to something provided solely by the hardware vendor, with very little in the way of alternative options. It was never EVER given out with source code, and true "wizard" status could only be achieved by exerting mind-numbing amounts of effort and patience in digging through forbidden bits of binary data. By comparison, the situation today seems almost too good to be true! Certainly, the feeling of achievement that came from finally ferreting out some esoteric bit of information from a 4MB printed system dump was high, but I don't think that anyone would argue that it was hardly the most optimal way of truly getting to know your operating system! :-) So now, within a very short space of time, we're almost spoiled for choice in having machines several times more powerful than the first multi-user VAX machines and available for under $2000, and we've got not one but SEVERAL perfectly reasonable free operating systems to chose from. We are in a comparative paradise, and what are some of us doing? *Complaining* about it! I suppose too much is never enough, eh? :-) So, my essential point is simply this: For the first time ever we have what previous computing generations could only dream about; powerful computers at a reasonable prices and a wonderful selection of things to run on them. Be happy, read the source code you're so privileged to now have available (*believe* me! What I wouldn't have given, even 5 years ago!) and spend your energy in making constructive use of it, not in arguing with the guys on the other side of the fence! Additionally, it should be said that none of the FreeBSD team has anything but the highest degree of respect for Linus Torvalds and his "team" of dedicated volunteers (and we occasionaly exchange gripe mail about the huge volume of messages each of us gets as a direct result of being insane enough to volunteer to do something like this :-). Our common commitment to the Intel platform also gives us more common ground (and interests) than one might think and, if anything, it's a pity that we do not endeavor to share more code and effort - ideologically, at least, I'd say we share pretty similar goals. As to which is "best", I have only one standard reply: Try them both, see for yourself, think for yourself. Both groups have given you something for free, at considerable personal effort, and the least you can do is give them the benefit of exerting enough effort to try what they're offering out before passing judgment (or worse, blindly accepting someone else's!). Whichever you run, you're getting a great deal - enjoy! Jordan Hubbard 0.2.3 Are all of the Berkeley derived systems binary compatible? If not, what are the differences? (Ed Note. This section is probably wrong, even if it was right when I looked at it last. There is a LOT of work going on, including SysV ELF support and other cool stuff.) NetBSD/386 runs old 386BSD, FreeBSD, NetBSD/386 0.8, and most BSDI executables. However, due to upgrading to the latest version of the UCB DB library, programs which use said library cannot be mixed old and new; e.g. an old `ls' cannot read the pwd.db file created with a new `pwd_mkdb', and vice versa. FreeBSD runs 386BSD, NetBSD/386 0.8, and most BSDi executables. You can replace the remainder of the paragraph above here too. NetBSD 1.1 and FreeBSD 2.1.5 are now able to run any of the following: - Linux executables (static or dynamic) - BSDI executables - 386 Common Object File Format (COFF) executables - Each other's executables In addition, there are several other CPUs that NetBSD works with, and these have compatability code for the native operating system for those CPUs built in. Macintosh and Amiga can even run each others executables under NetBSD (although not necessarily Mac or Amiga native apps). In addition, the -current x86 *BSD family core teams has been working on improving and porting the BSDI DOS emulator. This means that soon, FreeBSD, OpenBSD, and NetBSD will all be capable of running native DOS apps, 0.3 Are there any resources on the Net (like URLs) associated with the BSD family of operating systems? Yup: http://www.public.iastate.edu:~gendalia/FAQ/FAQ.list.html http://www.freebsd.org/ http://www.openbsd.org/ http://rfhs1012.fh.uni-regensburg.de/~feyrer/ http://www.cd.chalmers.se/~nh/netbsd.html http://www.flame.org/netbsd/projects ftp://ftp.uni-regensburg.de/pub/NetBSD-Amiga/.index.html ftp://ftp.cdrom.com:/pub/FreeBSD/packages/WWW.tgz ftp://ftp.netbsd.org:pub/NetBSD/mailing-lists ftp://flick.lerc.nasa.gov:~ftp/pub/NetBSD/packages/i386 ftp://ftp.iastate.edu:/pub/Netbsd/FAQ http://sirius.ics.es.osaka-u.ac.jp/~kamahara/NetBSD-X68060 IF you are going to be using IRC in the near future and want to talk to some of the movers and shakers in NetBSD, the next time you log in look for one of the following people: Handle Channel 'hubertf' #netbsd 0.4 How to add your pet answer to the FAQ. This is the trickiest part of this section of the FAQ. There are only two criteria for getting an entry made into the FAQ: 1. Your answer should answer a question that seems to come up with some regularity, or at least perplexes a group of people from time to time. 2. Your answer should be technically correct. In other words, answers like 'RTFM' and 'everybody knows that' are not really good candidates for the FAQ. These answers should spell out, in a reasonable level of detail, precisely how to fix the the question asked, or explain the basis for the answer and leave the implementation of the answer to the questioner. All answers MUST include a question. This is not as obvious as it would seem at first glance. An answer could solve many problems, especially in the realms of system halts or other catastrophes. Since I (Dave) am no Unix guru, I rely HEAVILY on the input of other people to make the FAQ a success. Many questions in the FAQ have been made largely irrelevant through the patchkits, but that doesn't means they may not reappear. That is why the old FAQ questions are still here. New FAQ questions should be added. I will try to attribute the question/answer to the author, but I personally think this is a waste of good disk space. As long as the answers get out, that should be reward enough :-) 0.5 Administrivia. Send all question/answer pairs to burgess@cynjut.neonramp.com, If you are going to post the Q/A to the net, then do that, but be sure to mark it as a FAQ entry. I will get it from the net as easily as I do my E-Mail. Your Q/A will be formatted to look more or less like the others and be added. Corrections, deletions, flames, snivels, and whines should be addressed directly to me here. Either way, I will be sure to send out a reply letting you know what I have done with your submission. One last thing. I will assume that I am infalible. :-) I will not notice any mistakes that you may find. If you find a mistake and don't tell me, it will very likely stay a mistake. After all, if I didn't notice it before, why should I notice it now? 0.6 Does anyone reading this have any sense of humor at all? I'm not sure. While reasearching the great 'Linux vs. everyone else sucks' debate, I received this in E-Mail. The author's identity has been removed to protect him from the mail-bombs. For the humor impaired, stop reading now! ---------------------------------------------------------------- Many people ask the question "Which is better? FreeBSD, NetBSD, OpenBSD, or Linux?" Up until now, not many people are willing to answer thoroughly and give reasons. I, being a brave soul, am. This mini-FAQ lists the most significant differences between Linux, NetBSD, and FreeBSD in a fair and evenhanded manner. Permission is given to redistribute this mini-FAQ freely, with attribution. If anyone wants to take the burden of posting it periodically on the appropriate newsgroups, be my guest. This is based on a message I wrote some months ago. I've tried to update it substantially to reflect the changing nature of x86 OS's. ------------- Q) Which is better? NetBSD, OpenBSD, Linux, or FreeBSD? A) NetBSD is the best of the three because of it's superb error handling capabilities (this is the "Net" referred to in the name). With NetBSD, it's almost impossible to make a mistake, either in installation, or operation, because the system will "catch" you as you "fall". NetBSD works on a wide range of processors, including the Intel 386, 486, and 586, the Sun, Sparc, SGI, MIPS, Macintosh, Motorola 6809, Krupf, ADC Kentrox, Whirlpool, Amana, Zilog Z80, Timex-Sinclair, and the Braun. Currently, the NetBSD team is devoting all of their energies towards finishing the all-important IBM RT port. Linux is the successor to an operating system called "Minix". Linux was developed by Linus Pauling, a Finnish communist. Linux tries to uphold traditional Marxist values in several ways; firstly by using GNU tools from the FSF foundation wherever possible. The Linux kernel is developed by committee, and the operating system reflects this: rather than having one "init" process which fathers all others, a group of co-resident processes with equal powers are created simultaneously. "Kill" commands are treated as formal protests. Linux networking has come a long way since it's implementation, and there is no truth whatsoever to the rumor that sudden losses of IP connectivity are in any way related to future plans to limit users to 1.5 hours of SLIP or PPP unless they send in the registration fee. FreeBSD was a radical offshoot of the Linux project; you could consider it to be of the Trotskyite school. FreeBSD supports an extremely wide range of PC hardware, as long as it was obtained at less than cost. FreeBSD is used by Amnesty International and many other human rights organizations. FreeBSD supports every peripheral available for the IBM PC except the ones you have. The FreeBSD team was actually responsible for porting "Doom" to Linux, in a successful effort to slow down constructive work by distracting the central committee with frivolous games. FreeBSD has the nicest installation of any of the x86 unices -- you install the boot disks, which then initialize the modem and call Jordan "Perky" Hubbard, who then comes to your house with the rest of the disks and completes the installation. The FreeBSD CD-ROM plays various Nick Cave and Tom Waits songs Jordan is known to be fond of. 386bsd was written by Bill Jolitz in a fit of pique. It was based entirely on Sun's widely-respected "Solaris" operating system, as revenge against Sun's Bill Joy, who rudely chose a name with the same initials as Jolitz. A new version of 386bsd will be released very soon. Unfortunately, it will only run on 386es, and thus is unsuitable for anyone with a 486 or Pentium. 486bsd should be released "sometime in 2138," according to industry insider James Monroe, Sr. DID YOU KNOW? ============= 1) The Free and Net BSD teams split up in the year 1632. The cause of the split is uncertain, but it seems to have something to do with someone named "Janice." They still get together for drinks occasionally, and remember old times. Every so often, after tying on a few too many, they end up waking up next to each other and feel ashamed over their night of pleasure. The kids still blame themselves. 2) The Linux kernel has actually not changed at all since January, '94? Linus just increments "version.c" once every 48 hours and unleashes the "change" on an unsuspecting Internet, bringing FTP servers to their knees. A book, "The Design and Implementation of the Linux Operating System," my Gary Marshall James T. Kirk McUsenet, was rejected by Addison-Wesley on the grounds that they didn't feel the public was prepared to purchase a book written on looseleaf paper with diagrams in crayon. 3) All three systems claim to be "POSIX" compliant. However, the POSIX people have denied knowing anything about it. Scuttlebutt in the industry is that POSIX will soon be outdated, and will be replaced by GNOPIX, a FSF standard which implements the TOPS-20 operating system in Scheme. -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!hunter.premier.net!news-res.gsl.net!news.gsl.net!swrinde!newsfeed.internetmci.com!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 2 of 10) Supersedes: <386bsd-faq-2-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:00 -0500 Organization: Dave's House in Omaha Lines: 1305 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-2-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:126 comp.unix.bsd.freebsd.announce:178 comp.answers:15805 news.answers:63151 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part2 Section 1. (General Network Information) General information This section of the FAQ is about the electronic support network that exists for 386bsd and its off-spring. 1.0 I just downloaded all of 386bsd version 0.1 and I can't get [some feature] to work? Do you have any suggestions? Yes. Get FreeBSD, OpenBSD, or NetBSD. The original 386BSD software was kind of buggy when it was put up for anonymous FTP in 1992. It has been modified significantly since then, and now exists in two different forms. There are people who will argue that the original 386BSD was completely unusable, but that is generally an overstatement. Over 100 patches were applied to the original system, with hundreds more waiting in the wings. It became just too much trouble to constantly have to patch the system to get it to work. This 'patched' version of 386bsd became FreeBSD. Around the same time, a second group split off from the original 386bsd tree and became NetBSD. For the primary differences, see above. Getting one of these two systems will provide you with a more complete system, with newer utilities, and many bugs already fixed. 1.1 Feature summary Among the many features of these systems: * Floppy disk based Installation * Hard drive partitioning for use with MS-DOS partitions * Compressed, multivolume CPIO dump format binary/source/other distribution sets on MS-DOS floppies. The cpio is based on the GNU cpio, and is completely free of encumbering USL software. * 387 support or emulation. * SCSI support. * Most CD-ROM support. * NFS, TCP/IP and full networking. * MS-DOS file system access. * PPP and SLIP protocol support. * System upgrades through Carnegie Mellon University's 'sup' utility. * Shared Library Support (in the newer version of both NetBSD and FreeBSD. * Both systems are based exclusively on Berkeley's BSD 4.4 Lite tape, instead of the encumbered 4.3 Net2 tape. Hence, both systems are free of encumbered USL code and are freely redistributable. * Sound driver emulation through both Sun Microsystems' style /dev/audio and the stereo /dev/sound interface. 1.2 *BSD software projects in progress The list of software projects in progress is just too volatile to go into a static document like the FAQ. Folks that are interested in software projects for NetBSD should contact netbsd-comments@sun-lamp.cs.berkeley.edu and let that mailing list know the same information. Folks interested in software projects for FreeBSD should contact the freebsd-hackers@freefall.cdrom.com mailing list and talk to them. 1.2.1 Contacting software authors Whenever you are working on a port of a software package, it is always a good idea to contact the original author and offer whatever changes you needed to make in order to port the software. That way, subsequent releases of the package may include changes that allow all users of *BSD the advantage of reusing your work over and over. Also, once you have ported a package to *BSD, you might want to contact the respective *BSD teams to let them know you've completed it and where it may be located. For FreeBSD, contact: For NetBSD, contact: If the port was a simple recompile of the source and install, a note to one of the newsgroups telling the story could be considered appropriate as well. In keeping with that, if you find a 'bug' in NetBSD, OpenBSD, or FreeBSD, or find a problem that causes you some headaches and find a solution, you should contact the author of the particular driver/module/program and let them know. 1.3 Minimum hardware configuration recommended There has been considerable debate about what the REAL minimum configuration for *BSD is. Some would claim that it is the smallest computer that an installation will succeed on. Others claim that it is the smallest usable computer (based on RAM and speed constraints) and others would claim that it should be based on using 'X'-windows. The smallest installable platform is an 80386, using an MGA card, with at least 2Meg of RAM and a 20 Megabyte hard disk. While not all SCSI cards (especially EISA) are supported, a great many are either in the base distribution or through patches. Thanks to the new shared library code in FreeBSD and NetBSD, a 20Meg installation should be easier now (in spite of the more advanced functionality) than it ever was before. A comfortable installation which includes source and binary distributions, as well as other utilities will work in about 100Meg of hard drive. 'X' requires at least a Hercules MGA; for masochists only, from what I understand. See section 8 for more details. 1.4 Where to get the source and binaries 1.4.1 Where can I get the distribution on floppy or tape? Many people will copy files onto diskettes or tapes if you coordinate it with them ahead of time. 1.4.2 Where can I get the distribution via FTP? If you are looking for the original 386bsd version 0.1, you are pretty well out of luck. See Section 0 for more information on where to look for Web sites on information on the *BSD family. 1.4.3 Where can I get the distribution on CD ROM? In a new joint venture, John Cargille, DiscNet, Inc., and InfoMagic, Inc. are pleased to announce their joint release of the BSDisc. This collaboration should be beneficial to all of our customers, since it brings to bear more experience, more support capability, and economies of scale in production. The BSDisc is scheduled to ship every six months or so. The current (November 1995) disk is a two CD set with the following: - NetBSD 1.1 - distribution sets for x86, sparc, mac68k, and amiga - expanded source tree for all architectures - FreeBSD 2.1.5 - distribution sets for x86 - expanded source and binary trees for x86 - XFree86 binaries for both FreeBSD and NetBSD - X11R6 (xc as well as contrib) - BSD-related news archive - various Answers to Frequently asked Question (FAQs) The BSDisc is available both for single-issue purchases, or on a buying plan. Single-issue price is $35.00; subscription pricing is $19.50 (or less) per issue, for a minimum length of 3 issues. (Those prices do not include S/H.) For single-issue purchases, contact InfoMagic at: +1-800-800-6613 InfoMagic, Inc. Tel: +1-602-526-9565 PO Box 30370 Fax: +1-602-526-9573 Flagstaff, AZ 86003-0370 e-mail: orders@Infomagic.com info@infomagic.com For information about subscriptions, contact DiscNet at: DiscNet, Inc. +1-608-846-9838 841 Acker Pkwy DeForest, WI 53532 email: bsdisc-info@grilled.cs.wisc.edu bsdisc-orders@grilled.cs.wisc.edu European subscriptions, email: bsdisc@altona.ppp.net I received this note from Jordan back in 1993. It is now sorely out of date, since there have been many releases of FreeBSD since then. The ordering info is still correct. While I will _always_ encourage obtaining FreeBSD through "free" channels (the Internet, friends, suspicious individuals in dark alleys), and given that none of us will make any money from CD sales, or ever have from FreeBSD in general given that WC's sponsorship is confined to the loan of centralized development hardware and network access, I still hope that some of you will find the CD distribution medium convenient enough to order a FreeBSD CD from Walnut Creek, thus indirectly supporting our future development work. If this marriage between commercial and free software interests proves to be mututally beneficial (which still remains to be seen, from Walnut Creek's point of view), it is my hope that it may serve as a model for similar future endeavors. It is an unfortunate fact that developing free software at this scale costs money, even with the developers donating their time and efforts, and financing some of it through the sale of convenient distribution media is one of the least venal ways I know of going about it. This CD contains a full FreeBSD 1.0.2 source & binary release, the sources and binaries for XFree86 2.0, and numerous sources from the FreeBSD "ports collection". Where space permitted, sources were provided in both "packed" and "unpacked" forms for easy access both as an on-line resource and as a source for compressed downloads in BBS or release-construction situations. The CD is fully ISO9660 compatable and has been mastered using RockRidge extensions for long filenames on systems that support it (like FreeBSD! :-). It is, of course, possible to install the system off the CD from scratch, given some basic willingness to read a little documentation and a few blank floppy disks. [ Ed Note. You would be surprised the number of people that do not see this paragraph...DBB] For the sake of convenience, I append the ordering information distilled from FreeBSD's /usr/src/RELNOTES.FreeBSD below. Ordering information: Walnut Creek CDROM 4041 Pike Lane, Suite D Concord CA 94520 1-800-786-9907, +1-510-674-0783, +1-510-674-0821 (fax) Or via the internet from orders@cdrom.com. A current catalog can be obtained via ftp from ftp.cdrom.com:/cdrom/catalog. They accept Visa, Mastercard, American Express, and ship COD within the United States. California residents please add 8.25% sales tax. roman@public.btr.com (Roman Yanovsky roman@btr.com) sent in this note. I have editted it down some, but left in the bulk of the stuff in case you need more information: Subject: Linux Slackware and FreeBSD CD-ROM with X-windows etc. Trans-Ameritech presents "The best Linux plus FreeBSD CDROM ever" [ Linux stuff deleted ] * For hacker's reference an uncompressed FreeBSD source tree is provided. * On the BSD side there is a full source and binary distribution of the "final" FreeBSD 1.0 * If you have questions or problems Trans-Ameritech provides free support via e-mail within 24 hours. * We ship the same day as we get the order. The new CDROM is available for $30 plus shipping/handling. If you are a current customer, it is only $20. New releases will be available every 3 month. Subscription is available. Trans-Ameritech Enterprises, Inc. 2342A Walsh Ave. Santa Clara, CA 95051 Tel. 408/727-3883 FAX: 408/727-3882 This information is offered with no warranties, guarantees, franchise offers, or recommendations. 1.5 Electronic Information Groups for *BSD 1.5.1 Usenet newsgroups General BSD questions can be posted to comp.unix.bsd. Bear in mind, however; that your questions to this group should really be about BSD in general, not a specific implementation detail of *BSD. Newsgroup for discussion of general BSD questions: comp.unix.bsd.misc Newsgroups for the discussion of the Bill and Lynne Jolitz version of 386BSD: comp.unix.bsd.386bsd.announce comp.unix.bsd.386bsd.misc Newsgroups for the discussion of the FreeBSD version of BSD 4.4 Lite: comp.unix.bsd.freebsd.announce comp.unix.bsd.freebsd.misc Newsgroups for the discussion of the NetBSD version of BSD 4.4 Lite: comp.unix.bsd.netbsd.announce comp.unix.bsd.netbsd.misc Newsgroups for the discussion of the commercial version of the BSD 4.4 Lite system: comp.unix.bsd.bsdi.announce comp.unix.bsd.bsdi.misc 1.5.2 Newsgroup archives. These sites maintain a historical record of the traffic in the Usenet Newsgroups indicated. There are others, but I haven't gotten their names yet. Host Name IP address Location Newsgroups archived -------------------- -------------- -------------- ---------------- minnie.cs.adfa.oz.au 131.236.20.70 Australia comp.unix.bsd, comp.os.386bsd.* src.doc.ic.ac.uk 146.169.2.1 London, UK comp.os.386bsd.* 1.5.3 *BSD system mailing lists. With the elimination of the old 386bsd mailing lists, the only mailing lists that are still available are the ones for FreeBSD and NetBSD. Information about the NetBSD lists and how to use majordomo (the list handler) is available by mailing to majordomo@sun-lamp.cs.berkeley.edu. There are four mailing lists for FreeBSD and they are: FreeBSD-hackers: for hackers FreeBSD-questions: misc questions FreeBSD-bugs: bug reports FreeBSD-current: discussion of -current (in development) Send to FreeBSD-hackers-request@freefall.cdrom.com to be added to the hackers list, and *-questions-request@freefall... to be added to the questions list. For information about the NetBSD mailing lists, see the NetBSD Mailing List FAQ that is posted regularly by Chris Demetriou in comp.os.386bsd.announce. 1.5.4 System Updates. There are at least two different ways of getting the updates for the current source tree for both FreeBSD and NetBSD. The first is the traditional FTP method, and the other is using a utility called 'sup'. This program keeps a log of the source modules that have been updated and sends out only those files that have been changed. Included below are some sample instructions from John Brezak on how to run sup for NetBSD. The sup procedures for FreeBSD are similar and are available via ftp from freefall.cdrom.com in the ~/ftp/pub/sup directory. This directory contains the sup program, a man page, a sample sup-file and full instructions for maintaining your sources via 'sup. Instructions for installing NetBSD sources and releases using SUP ----------------------------------------------------------------- 1.3 1993/11/3 SUP is a network installation package written by CMU used to distribute software. For more details on SUP refer to the man pages. Sup works by reading a configuration file (supfile) and using this information to determine what "collections" of files will be loaded from the collection repository. Here is an example of a supfile to load the NetBSD current release. [ Notes: lines have been broken for readability; do NOT use '\' in supfiles and the information here is an EXAMPLE. This ain't a cooking school, folks. Also, the information in these lines has changed for each of the distributions. Read the documentation that comes with your software carefully for the lastest information. ] src release=current host=sun-lamp.cs.berkeley.edu hostbase=/b/anon_ftp base=/usr prefix=/usr backup ksrc release=current host=sun-lamp.cs.berkeley.edu hostbase=/b/anon_ftp base=/usr prefix=/usr backup security release=current host=sun-lamp.cs.berkeley.edu hostbase=/b/anon_ftp base=/usr prefix=/usr backup gamessrc release=current host=sun-lamp.cs.berkeley.edu hostbase=/b/anon_ftp base=/usr prefix=/usr backup regress release=current host=sun-lamp.cs.berkeley.edu hostbase=/b/anon_ftp base=/usr prefix=/usr backup #othersrc release=current host=sun-lamp.cs.berkeley.edu hostbase=/b/anon_ftp base=/usr prefix=/usr backup This supfile will load the "current" collections for "src", "ksrc", "security", "gamessrc", and "regress" in the /usr directory on the local machine. The "othersrc" collection will not be loaded because it is commented out. The supfile line is made up of keywords that describe the collection's location on the sup server and where and how it will be loaded on the local host. release - the release of the collection to load. host - the 'host' where the SUP repository resides. NetBSD uses sun-lamp.cs.berkeley.edu . hostbase- the pathname on the host to the base of the collection. The hostbase for NetBSD is "/b/anon_ftp". base - where you want to install it locally. prefix - used to locate the "sup" directory to write sup's info about updates. Usually the same as base. This supfile can also set some options. The "old" option tells sup to check all files for changes, not just those that are newer than the last sup update. Normally sup will overwrite local files with the changed file from the repository. If the sup collection specifies that an existing file should be renamed to a backup, the "backup" option in the supfile activates this. The "delete" option tells sup to delete any files locally that are no longer in the collection - be careful with this one. The "keep" option will cause sup to NOT update files that have been changes locally. The "compress" option will use gzip to compress the files before transfer and gunzip them on the receiving end. This option can be used to cut down on the number of transmitted bytes. You may want to set 'base' and 'prefix' to something other than /usr if you want to preserve your existing src tree. The sup repository on sun-lamp.cs.berkeley.edu currently offers these collections. src, ksrc, security The sources for NetBSD othersrc The current sources for contributed parts of NetBSD. This contains the sources for sup. regress The current sources for the NetBSD regression test suite. If you only want the kernel sources for a specific port there are some sub packages that you can use instead of the "ksrc" one. If you are using the sub packages, be sure to also sup the "ksrc-common" package. ksrc-common Kernel sources common to all ports. ksrc-1, ksrc-sparc, ksrc-hp300, ksrc-amiga, ksrc-mac, ksrc-pc532, ksrc-pmax, ksrc-sun3 Kernel sources for a particular port. The security package is not to be sup'ed by sites outside of the U. S., read the "README.export-control" file for details. Each collection can have multiple releases (as specified by the "release" keyword). IMPORTANT!! Be aware that the current release is simply a snapshot of the daily state of NetBSD development and is not guaranteed to build (or even work) - use at your own risk ! Stable releases of NetBSD are available via SUP. Instructions are included with the release announcement. Before running sup, be sure that your /etc/services contains these entries. supfilesrv 871/tcp # for SUP supfiledbg 1127/tcp To try sup without really updating anything use the '-f' flag. The '-v' flag means verbose and can be used to see what sup is doing. sup -fv supfile The sup binary, sup man page and sample supfiles can be ftp'ed from sun-lamp.cs.berkeley.edu:~ftp/pub/sup . Comments should be directed to "sup@sun-lamp.cs.berkeley.edu". A mailing list exists for users of the NetBSD "current" release. To join, mail to 'majordemo@sun-lamp.cs.berkeley.edu' with a mail body of "info". The reply will describe the mailing lists for NetBSD. The you will want to subscribe to the "current-users" mailing list. We will use this list to announce any special changes made to the "current" tree. 1.6 Documentation available There are two types of documentation for *BSD. First is the set that covers the operation and theory used in BSD-Unix. 1.6.1 BSD manuals The full set of BSD documentation is available via anonymous FTP from ocf.berkeley.edu in /pub/Library/Computer/doc4.3. To print this documentation on *BSD systems, replace the ditroff references in the Makefile with 'groff -e -t -msU {SRC} >out.ps' to generate PostScript format files. Use different options to make the output conform to other print styles. The etc distribution also comes with a documentation directory /usr/share/doc which has nearly 3Meg of documentation about *BSD. In addition, on-line manuals are available in the binary distribution set. It contains specific information on the use of UNIX utilities and commands. Type "man man" for information on the online manual. 1.6.2 BSD books For learning how to work in the Unix environment, the standard text is "The Unix Programming Environment," by Kernighan and Pike. For Unix Administration, the best is "Unix System Administration Handbook," by Nemeth, Snyder and Seebass. For systems level programming (i.e., systems calls), I recommend "Advanced Unix Programming," by Marc Rochkind. Unfortunately it is out-dated and oriented towards System V. A new book "Advanced Programming in the Unix Environment," by W. Richard Stevens is very up-to-date, and an excellent reference, especially for dealing with POSIX standards issues. For network programming, "Unix Network Programming," by W. Richard Stevens is highly regarded. The 4.3BSD Unix Manuals contain loads of invaluable tutorials and historical papers in addition to hard copies of on-line documentation. The six volume set is available from Usenix for $60.00 (email: office@usenix.org) The 4.4 BSD Unix Manuals are the authoritative source for information about the 4.4 BSD release, and by inference the NetBSD and FreeBSD systems. They are available from O'Reilly and Associates (the Nutshell series people). In addition the the six volume set, there is a CD included (at a price) of the entire 4.4 release. Combine this with the NetBSD 1.0 or FreeBSD 2.0 systems, and you should have a commercial quality operating system available in no time. I recommend you look at "The AWK Programming Language," by Aho, Weinberger and Kernighan. This is a very nice prototyping language - powerful and easy to use. Another excellent reference book for *BSD is "The Design and Implementation of the 4.3BSD UNIX Operating system" by Samuel J. Leffler, Marshall Kirk McKusick, Michael J. Karels, John S. Quarterman, 1989, Addison-Wesley, ISBN 0-201-06196-1. While this book is out of date in many sections, it is purported to be an excellent source of historical information, if nothing else. Chris Demetriou recommends the sections on the treatment of file systems, caching and the networking layer. The sections in this books which do not apply to *BSD include the VM section, bootstrapping, and autoconfig. Here is a list from Hellmuth Michaelis (duplicative as it may seem to have all of these lists) for more information on *BSD: UNIX AND UNIX DEVICE DRIVERS ---------------------------- Bell Telephone Laboratories, Inc. "UNIX Programmer's Manual, Seventh Edition, Volume 2". Revised and Expanded Version. Holt, Rinehart and Winston 1983 George Pajari, "Writing Unix Device Drivers" Addison Wesley 1992 Janet I. Egan and Thomas J. Teixeira, "Writing a UNIX Device Driver" John Wiley & Sons 1989, especially the 30 page appendix handling the unique features of the BSD system. Janet I. Egan and Thomas J. Teixeira, "Writing a UNIX Device Driver" Second Edition. John Wiley &*BSD1992 Leffler, McKusick, Karels, Quarterman, "The Design and Implementation of the 4.3BSD UNIX Operating System" Addison Wesley 1988, corrected Reprint 1989 Leffler, McKusick, "The Design and Implementation of the 4.3BSD UNIX Operating System, Answer Book" Addison Wesley 1991 Maurice J. Bach, "The Design of the UNIX Operating System" Prentice-Hall 1986 Sun Microsystems Inc., "Writing Device Drivers" Part No. 800-3851-10, Revision A of 27 March 1990 Hewlett-Packard Company, "HP-UX Driver Development Guide", Part No. 98577-90013, First Edition 07/91 W. Richard Stevens, "Advanced Programming in the UNIX Environment", Addison Wesley 1992 Phillip M. Adams, Clovis L. Tondo, "Writing Unix Device Drivers in C", Prentice Hall 1993 Peter Kettle, Steve Statler, "Writing Device Drivers for SCO UNIX, A Practical Approach", Addison Wesley 1993 In addition, there are many other books which, for one reason or another, have not made it into this brief list. Rest assured that this is not intended to be an exhaustive list by any means. There is also some documentation associated with the pcvt console driver. Since this documentation is part of the normal distribution on both FreeBSD and NetBSD, and DOES document a device driver, it should be considered a good source for more insight into writing device drivers. 1.6.3 The Jolitz Book Bill and Lynne Jolitz are wrote a book about 386bsd. It includes the source code for the replacement version of 386BSD 0.1. It is available from Dr. Dobbs Journal and other sources. 1.6.4 Dr. Dobbs' journal For users who wish to understand the internals of the BNR/2 BSD family of Operating Systems originally developed and/or ported by William F. Jolitz from 1989 to the present, the most immediate and available reference is the feature series entitled "Porting UNIX to the 386: A Practical Approach", appearing in Dr. Dobbs' Journal, USA (January 1991 to July 1992) and UNIX and iX Magazines, Germany (June 1991 to present). For inquiries on the article series (including reprints), contact the magazines for information. "Porting UNIX to the 386: A Practical Approach" (feature series) by Jolitz and Jolitz 1/91: DDJ "Designing a Software Specification" 2/91: DDJ "Three Initial PC Utilities" 3/91: DDJ "The Standalone System" 4/91: DDJ "Copyright, Copyleft, and Competitive Advantage" 4/91: DDJ "Language Tools Cross-Support" 5/91: DDJ "The Initial Root Filesystem" 6/91: DDJ "Research and the Commercial Sector: Where Does BSD Fit In?" 7/91: DDJ "A Stripped-Down Kernel" 8/91: DDJ "The Basic Kernel" 9/91: DDJ "Multiprogramming and Multiprocessing, Part I" 10/91: DDJ "Multiprogramming and Multiprocessing, Part II" 11/91: DDJ "Device Autoconfiguration" 2/92: DDJ "UNIX Device Drivers, Part I" 3/92: DDJ "UNIX Device Drivers, Part II" 4/92: DDJ "UNIX Device Drivers, Part III" 5/92: DDJ "Missing Pieces, Part I" 6/92: DDJ "Missing Pieces, Part II" 7/92: DDJ "The Final Step: Running Light with 386BSD" You can contact M&T Books (DDJ) for reprints if you can't get them from your technical library: 1-800-356-2002 (inside CA) 1-800-444-4881 (better In NA Backorder number) 1-415-358-9500 (international) 6/91: UNIX Magazin "Portierung von BSD-UNIX auf den 80386. Heimlich Liebe." 7/91: UNIX Magazin "Steighilfe." 8/91: UNIX Magazin "Systemverwaltung durch Tabellen" 9/91: UNIX Magazin "Sicher bewegen auf fremdem Terrain" 10/91: UNIX Magazin "Damit die Fehlersuche nicht zum Hurdenspringen wird" 11/91: UNIX Magazin "Alles in eine Schublade" 12/91: UNIX Magazin "Feuer und Wasser" 1/92: UNIX Magazin "Rekursives Speicher-Mapping" 2/92: UNIX Magazin "Tanz auf dem Eis" 3/92: UNIX Magazin "Aus Hanschen wird Hans" 4/92: UNIX Magazin "Das Geheimnis des Multiprogramming" 5/92: UNIX Magazin "Zeitmanagement scheibenweise" 6/92: UNIX Magazin "Magie des Kernels" 7/92: UNIX Magazin "Erkenne Dich Selbst" 9/92: UNIX Magazin "Niemand is eine Insel" 10/92: UNIX Magazin "Treiberlatein" 12/92: UNIX Magazin "Einlandung erforderlich" 1/93: iX Magazin "Wir unterbrechen das Programm" 2/93: iX Magazin "Liste gut, alles gut" 3/93: iX Magazin "Blick ins Allerheiligste" 4/93: iX Magazin "Von Bl"ocken, Ringen und Zeichen" NOTE: The series in UNIX Magazin was moved to IX Magazin in 1/93. The article in the April issue was the last one in the series. In addition, other major articles which discuss 386BSD in detail: 8/92: UNIX Magazin "Interview mit Bill Jolitz. Das passiert mit 386BSD" by Jurgen Fey 8/92: DDJ "Very High-Speed Networking" by W.F. Jolitz 12/92: DDJ "Inside the ISO-9660 Filesystem Format" by Jolitz and Jolitz Reprints of the first 19 parts on the UNIX Magazin series are available from: iX Redaktion Stichwort: 386BSD-Serie Verlag Heinz Heise GmbH & Co KG Helstorfer Str. 7 D-30625 Hannover, Germany Some of the parts are without code listings due to the unclear status of the BSD releases stemming from the Net/2 release. Dr. Dobbs is reported out of back issues of the articles listed above. You best bet may be to try your local public or school library. 1.6.5 Documentation that comes with most of the distributions. In the standard set for both NetBSD and FreeBSD there is a directory called '/usr/share/doc'. Here is a 'du' listing. 128 /usr/share/doc/ps1/06.sysman 98 /usr/share/doc/ps1/07.ipctut 116 /usr/share/doc/ps1/08.ipc 16 /usr/share/doc/ps1/13.rcs 37 /usr/share/doc/ps1/14.sccs 420 /usr/share/doc/ps1 123 /usr/share/doc/smm/02.config 14 /usr/share/doc/smm/04.quotas 78 /usr/share/doc/smm/05.fsck 42 /usr/share/doc/smm/06.lpd 92 /usr/share/doc/smm/07.sendmailop 14 /usr/share/doc/smm/08.timedop 99 /usr/share/doc/smm/10.newsop 83 /usr/share/doc/smm/11.named 77 /usr/share/doc/smm/14.fastfs 128 /usr/share/doc/smm/15.net 41 /usr/share/doc/smm/16.sendmail 21 /usr/share/doc/smm/20.termdesc 17 /usr/share/doc/smm/22.timed 851 /usr/share/doc/smm 144 /usr/share/doc/usd/04.csh 97 /usr/share/doc/usd/07.Mail 66 /usr/share/doc/usd/09.newsread 68 /usr/share/doc/usd/10.etiq 67 /usr/share/doc/usd/14.edit 107 /usr/share/doc/usd/15.vi 61 /usr/share/doc/usd/16.ex 13 /usr/share/doc/usd/21.msdiffs 45 /usr/share/doc/usd/22.memacros 43 /usr/share/doc/usd/23.meref 26 /usr/share/doc/usd/33.rogue 25 /usr/share/doc/usd/34.trek 798 /usr/share/doc/usd 2077 /usr/share/doc For those of you that don't read 'du -k' listings, this means that there is 'around' 2 MEGABYTES of documentation in the 'doc' directory. In addition, there are a few man pages. 2312 /usr/share/man/cat1 397 /usr/share/man/cat2 1 /usr/share/man/cat2a 855 /usr/share/man/cat3 1 /usr/share/man/cat3f 607 /usr/share/man/cat4 368 /usr/share/man/cat5 166 /usr/share/man/cat6 169 /usr/share/man/cat7 749 /usr/share/man/cat8 Something on the order of another 4 Megabytes of manual pages. That's what, about 6 MILLION CHARACTERS of documentation. I have received mail from several sources saying that my approximation of the amount of system documentation is way too low (by a factor of at least 50%). Given the fact that even by my meager estimation there is already more information here than most people can be bothered to read, whether there is 6 Meg or 60 Meg seems like overkill. Now, does anyone REALLY want to whine about there being no documentation included with the system? 1.6.6 The O'Reilly and Associates BSD 4.4 Set. O'Reilly and Associates puts out a five book series that includes all of the documentation for BSD 4.4. In addition, they also sell a CD-ROM with all of the publically releaseable BSD-4.4 code that is available. These books are good references (perhaps not perfect, since many changes to the system have been made even since these books were produced) but they do provide a great deal of background and rationale for the system and the history for much of the system. 1.6.7 Other FAQ's on the net that are relevant There is now a FAQ set up specifically for FreeBSD. In addition to answering the many specific questions that folks have about FreeBSD, it is also a good source for information on NetBSD. In spite of all of the shouting and chest beating that you hear from time to time, the systems are still very close. There are many FAQs that can be used in conjunction with *BSD systems. These include the FAQs for all of the GNU software, the different shells that are available, the programming languages that are available, and many more. In addition, many programs have their own FAQ which should be referenced whenever that package is being added. Good examples of the latter are the FAQs for elm, C-News, and innd. Most FAQs are available by anonymous FTP from rtfm.mit.edu and via Usenet News in news.answers and/or comp.answers. This FAQ is no exception (I hope). 1.7 FTP sites for *BSD A standard tool on Internet connected hosts for finding files is 'archie'. Searching the archie archive for either "NetBSD" or "FreeBSD" yields the following list. For UUCP sites, FTP-Mail is available from gatekeeper.dec.com. For those folks that have access to telnet, but not FTP, you can use archie by using telnet and connecting to 132.206.2.3. Log in as 'archie' and use the 'prog' command to find programs of interest. The list below is included primarily for those folks that have only uucp, and will need to get their software though UUCP and other channels. 1.7.1 Official distribution sites FreeBSD's 'home' is FreeBSD.cdrom.com (the home disk of Walnut Creek). The portions of FreeBSD (versions less than 2.0) that were encumbered are distributed with the tolerance of AT&T/USL/Novell/SCO/whoever owns the source for SysV this week. All FreeBSD versions (with version number >= 2.0) are based solely on the freely redistributable BSD 4.4 sources. NetBSD's 'home' is now ftp.NetBSD.Org. All versions of NetBSD since 0.9 have replaced the kernel code from the 4.3 distribution with the source from the 4.4 distribution. The only code still in NetBSD from the 4.3 distribution is some user program code that was uncontested in the USL/UCB agreement. OpenBSD's 'home' is ftp.openbsd.org. It was based on NetBSD Version 1.0, so it is (by definition) clean. There are (at least) two things which differentiate OpenBSD from NetBSD. One big difference here is that nearly anyone can write changes to the kernel code in the -current line and make their updates available. Another is OpenBSD is hosted in Canada, and therefore has no export restrictions on any of it's code (specifically the encryption code for DES). 1.7.3 Reference sites There is a site in Germany that is acting as a reference site for FreeBSD. The name is "g386bsd.first.gmd.de", also known as "bsd386.first.gmd.de". Sorry, no anonymous ftp yet. But there is a "guest" login with the password "guest". But the most important reason why I had installed the machine on the network was for all these people who don't have enough space to compile their own kernel or their own packages. They can do it on this machine. ATS ( ats@first.gmd.de or ats@cs.tu-berlin.de ) 1.7.4 Unofficial archive sites that have neat stuff! There are many sites that have things which have either been ported to *BSD or are available to the world. Use archie to find these sites, or read the pertinent newsgroups for more information. Listed here because they don't have access to 'archie' yet... g386bsd.first.gmd.de -or- bsd386.first.gmd.de: Sources for 386bsd0.1 and the later patchkits. Source for NetBSD0.8 and the newer snapshots. Xfree is installed binary as version 1.3. Ported software are: tcsh6.03.00 emacs19-15 gcc-2.4.5 top3-1 perl4.0.36 elvis1.7 bison-1.21 rn and nn. In addition, ftp.cs.tu-berlin.de has a lot of neat software and Wolfram Schneider (wosch@cs.tu-berlin.de) has 'ported' the FAQ into LaTeX. It is available in pub/386BSD/FAQ/tex in both PostScript and DVI formats. 1.7.5 Where can I get a non-X cdplayer program for NetBSD? Take a look on: charon.amdahl.com:pub/agc where you'll find (amongst others) -rw-r--r-- 1 agc 3311 Oct 25 03:51 cdplay-netbsd.tar.gz -rw-r--r-- 1 agc 11043 Dec 7 07:16 cdplayer.c -rw-r--r-- 1 agc 45034 Oct 17 01:14 xcdplayer-2.2-netbsd.tar.gz cdplay is a port to NetBSD of a command-line interface Audio CD player. Dave Burgess took that and (I think) produced cdplayer.c. xcdplayer is the X11 interface, originally from the FreeBSD port, but cleaned up, bugs fixed and made so that FreeBSD *AND* NetBSD are supported. 1.7.6 X Ported Software List This is a list of non-core X window system application that have been ported to *BSD. The ftp server and directory name are listed above and each file or directory name is followed by a short description. Feel free to send corrections, additions or suggestions to rich@rice.edu. sunvis.rtpnc.epa.gov:/pub/386bsd/incoming: Dirt.tar.Z GUI development tool kit XBSD8514-0.1.Z 8514 X server port XS3-0.3-exp.Z S3 X server port acm.tar.Z aerial combat mission/flight simulator chess-vort-movie.tar.Z ? epoch.Z enhanced emacs for X jpeg.tar.Z jpeg viewer libXaw3d.a.Z 3D widget library mpeg-1.2.tar.Z animated raster image viewer ups-2.45.bin.tar.Z C source level debugger with slick GUI vort-movie.tar.Z ? xantfarm.tar.Z screen saver with ants? xbench.tar.Z X server performance measurement tool xpipeman.tar.Z game: connect pipes to keep a liquid within xxgdb.tar.Z GUI for GNU source level debugger ftp.netbsd.org:/pub/NetBSD/packages: It would be nice to get more packages for popular programs/collections. If you want to build a package, look at /pub/NetBSD/packages/README.{contributions,detailed} arc-5.21.tar.gz Arc version 5.21 archie-1.4.1.tar.gz Archie version 1.4.1 emacs-19.28.tar.gz Emacs 19.28 with X toolkit (1) emacs-19.28-sans-X.tar.gz Emacs 19.28 without X (1) flexfax23beta036.tar.gz FlexFax 2.3 beta release 036 for NetBSD 1.0 (1) gcc-2.6.3.tar.gz GNU C Compiler, 2.6.3 (1) gnat-2.03.tar.gz GNAT: Ada and C compiler gnumake+bash.tar.gz GNU utilities (1) gopher-2.1.2.tar.gz Gopher version 2.1.2 gs312+gv15.tar.gz GhostScript 3.12 and GhostView 1.5 (1) hylafax-3.0beta096.tar.gz HylaFAX version 3.0 beta 095 (1) mfuud-3.7.8.tar.gz mfuud 3.7.8 mh-6.8.3.tar.gz MH 6.8.3 (1) mpeg_play-2.0.tar.gz mpeg_play version 2.0 mtools-2.0pl7.tar.gz mtools version 2.0 pl 7 (1) ncftp-1.5.6.tar.gz ncftp v1.5.6 perl-5.000.tar.gz Perl5.000 binaries for NetBSD-1.0/1 tcsh6.05.tar.gz tcsh 6.05 (1) tex.tar.gz TeX 3.1415, MF 2.71, dvipsk-5.58c, xdvik-18d, plus TeX tools (1) unzip-5.12.tar.gz UnZip 5.12 (1) workman_122a.tar.gz WorkMan CD-Audio player, version 1.2.2a (1) xview32_client.tar.gz XView 3.2 clients (1) xview32_pgmr.tar.gz XView 3.2 programming kit (1) xview32_runtime.tar.gz XView 3.2 runtime (1) zmodem-3.03.tar.gz zmodem 3.03 zoo-2.01.tar.gz zoo 2.01 XFree86-3.1.1/ XFree86-3.1.1 also: octave-1.1.1 (not in pkg format, octave has its own binary dist format) m68k4k (hp300): usr.X11R5.X11_dynamic.tar.gz X11R5 remaining lib parts for shared kit (hp300) usr.X11R5.X11_static.tar.gz X11R5 remaining lib parts for static kit (hp300) usr.X11R5.bin_dynamic.tar.gz X11R5 binaries (dynamic linkage) (hp300) usr.X11R5.bin_static.tar.gz X11R5 binaries (static linkage) (hp300) usr.X11R5.fonts.tar.gz X11R5 fonts (hp300) usr.X11R5.include.tar.gz X11R5 include files (hp300) usr.X11R5.lib_dynamic.tar.gz X11R5 shared libraries (hp300) usr.X11R5.lib_static.tar.gz X11R5 static (.a) libraries (hp300) usr.X11R5.man.tar.gz X11R5 manual pages (hp300) sparc/X11R6: X11R6bin.tar.gz X11R6 binaries and shared libraries (sparc) X11R6cfg.tar.gz X11R6 customizable configuration files (sparc) X11R6font.tar.gz X11R6 required fonts (sparc) X11R6fs.tar.gz X11R6 Font Server (sparc) X11R6lib.tar.gz X11R6 data files (sparc) X11R6prog.tar.gz X11R6 programming kit--headers and static libraries (sparc) X11R6sun.tar.gz X11R6 server for Sun color displays (sparc) X11R6sunmono.tar.gz X11R6 server for Sun monochrome displays (sparc) X11R6xfnt.tar.gz XFree86 3.1.1 non essential fonts m68k8k (amiga, sun3, mac): bison-1.22.tar.gz GNU Bison 1.22 (m68k) cim-1.40.tar.gz CIM v1.40 Simula -> C translator (m68k) elm-2.4pl23.tar.gz Elm 2.4pl23 (m68k) emacs-19.28.tar.gz GNU Emacs 19.28 with toolkit (m68k) gccbin-2.6.2.tar.gz GCC 2.6.2 (m68k) gmake-3.71+bash-1.14.1.tar.gz GNU Utilities: bash 1.14.1, make 3.71 (m68k) irc-2.6.tar.gz IRC 2.6 (m68k) lha.tar.gz LHA (m68k) libg++-2.6.tar.gz libg++, version 2.6 (m68k) lynx-2.3.tar.gz Lynx 2.3 (m68k) netrek.tar.gz netrek (m68k) perl-4.036.tar.gz perl 4.036 (m68k) perl-5.000.tar.gz perl 5.000 (m68k) screen-3.6.0.tar.gz Screen 3.6.0 (m68k) tcl-7.3.tar.gz Tool Command Language (tcl) 7.3 (m68k) tcsh-6.05.tar.gz tcsh 6.05 (m68k) texinfo-3.1.tar.gz texinfo 3.1 (m68k) top-3.3.tar.gz top 3.3 (m68k) Please note: If you are compiling GPL code, we need to provide source on the NetBSD ftp server (in case the versions are updated elsewhere and old source distributions are withdrawn). boss1.physik.uni-bonn.de (131.220.161.41) Be sure to read the FTP.doc file (available in each directory), because the FTP server of boss1 can not transfer whole diretory trees in one turn (SVR4, not my choice...), but people are trying it very often. May be you should also mention that it is possible to fetch a current list via "finger elch@boss1.physik.uni-bonn.de" including the timestamp of the last change in the last line. Here is the current list (4-Feb-1996): pub/NetBSD/elchware/4.4BSD-Lite.rc-1.4-NetBSD-patches.tar.gz pub/NetBSD/elchware/BSD4.4.usr.src.old-NetBSD-patches.tar.gz pub/NetBSD/elchware/CVv1.2.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/MPEGv1.2.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/NCR-ftp.wasabi.com-950927.tar.gz pub/NetBSD/elchware/NCR.tar.gz pub/NetBSD/elchware/NESSUSv2.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/README.txt pub/NetBSD/elchware/SNNSv3.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/XC-Xedit-NetBSD-patches.tar.gz pub/NetBSD/elchware/aic7xxx_like_adaptec2940-NetBSD.tar.gz pub/NetBSD/elchware/archie-1.4.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/archivers-NetBSD-patches.tar.gz pub/NetBSD/elchware/binhex-NetBSD-patches.tar.gz pub/NetBSD/elchware/bwbasic-2.10-NetBSD-patches.tar.gz pub/NetBSD/elchware/cpm-NetBSD-patches.tar.gz pub/NetBSD/elchware/dosu-1.36.tar.gz pub/NetBSD/elchware/emacs-19.27-NetBSD-build.tar.gz pub/NetBSD/elchware/eutl-NetBSD-patches.tar.gz pub/NetBSD/elchware/f2c-19950201-NetBSD-patches.tar.gz pub/NetBSD/elchware/f2c-19950201-NetBSD.tar.gz pub/NetBSD/elchware/flexfax-v2.3beta036-NetBSD-patches.tar.gz pub/NetBSD/elchware/fspclient-0.0-h+-NetBSD-patches.tar.gz pub/NetBSD/elchware/gethost.tar.gz pub/NetBSD/elchware/ghostscript-3.01-NetBSD.tar.gz pub/NetBSD/elchware/ghostscript-3.12-NetBSD-patches.tar.gz pub/NetBSD/elchware/gnuchess-4.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/gs3.12-NetBSD-patches.tar.gz pub/NetBSD/elchware/httpd_1.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/irsim-9.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/joe-1.0.8-NetBSD-patches.tar.gz pub/NetBSD/elchware/ksh-NetBSD-patches.tar.gz pub/NetBSD/elchware/lharc102A-NetBSD-patches.tar.gz pub/NetBSD/elchware/lmbench-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/make-3.72.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/manapanna-1.1.tar.gz pub/NetBSD/elchware/md5.tar.gz pub/NetBSD/elchware/md5.tar.gz.md5 pub/NetBSD/elchware/mixer-NetBSD.tar.gz pub/NetBSD/elchware/mpu401-.1.fixed.tar.gz pub/NetBSD/elchware/msql-1.0.5-NetBSD-patches.tar.gz pub/NetBSD/elchware/mtools-2.0.7-NetBSD-patches.tar.gz pub/NetBSD/elchware/mule-2.0-NetBSD-build.tar.gz pub/NetBSD/elchware/mush-6.4-NetBSD-patches.tar.gz pub/NetBSD/elchware/ncr.tar.gz pub/NetBSD/elchware/netcall-1.1-NetBSD.tar.gz pub/NetBSD/elchware/newsfind-NetBSD-patches.tar.gz pub/NetBSD/elchware/pdksh-5.1.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/perl-4.036-NetBSD-patches.tar.gz pub/NetBSD/elchware/pine3.91-NetBSD-patches.tar.gz pub/NetBSD/elchware/pkg_src-NetBSD-patches.tar.gz pub/NetBSD/elchware/print_FreeBSD_1.1.5.1_ports-NetBSD-patches.tar.gz pub/NetBSD/elchware/readline-2.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/rzsz_FreeBSD_1.1.5.1_ports-NetBSD-patches.tar.gz pub/NetBSD/elchware/sam-4.3.tar.gz pub/NetBSD/elchware/smbserver-1.6.04-NetBSD-patches.tar.gz pub/NetBSD/elchware/sox-pl11-NetBSD-patches.tar.gz pub/NetBSD/elchware/stardate-NetBSD.tar.gz pub/NetBSD/elchware/tcsh-6.05-NetBSD.tar.gz pub/NetBSD/elchware/texinfo-3.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/top-3.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/vchat-ip-2.11e-NetBSD-patches.tar.gz pub/NetBSD/elchware/vchat-ip-2.11e.tar.gz pub/NetBSD/elchware/vmsbackup-NetBSD-patches.tar.gz pub/NetBSD/elchware/xrgb-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/zsh-NetBSD-patches.tar.gz pub/NetBSD/elchware/NetBSD_src_patches/README pub/NetBSD/elchware/NetBSD_src_patches/README.first.WARNING pub/NetBSD/elchware/NetBSD_src_patches/netbsd_extra_src.tar.gz pub/NetBSD/elchware/NetBSD_src_patches/patches.old.tar.gz pub/NetBSD/elchware/NetBSD_src_patches/patches.tar.gz pub/NetBSD/elchware/X11/AppPlusS.1.1.2-NetBSD.tar.gz pub/NetBSD/elchware/X11/ButtonFaceLib-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/ComboBox-1.22a-NetBSD.tar.gz pub/NetBSD/elchware/X11/DoubleSliderScale-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/Emacs-mule-NetBSD-app-defaults.tar.gz pub/NetBSD/elchware/X11/Emacs-mule_fonts.tar.gz pub/NetBSD/elchware/X11/EmiClock-1.0.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/FWF-3.671-master-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/Wcl-2.7-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/Xbae.4.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/aXe-6.1.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/acm-4.5-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/asedit-1.31-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/ashe-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/ashe-1.0.tar.gz pub/NetBSD/elchware/X11/auis-6.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/coolmail-1.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/e93-1.1r4X-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/fvwm-1.22f-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/gauge-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/ghostview-1.5-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/gs261pl4-NetBSD.tar.gz pub/NetBSD/elchware/X11/llnlxdir1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/llnlxftp2.0.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mcard-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mfm-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mfsm-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mpeg2play_v1.1b-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mpeg_play-2.0-NetBSD.tar.gz pub/NetBSD/elchware/X11/mpeg_wdgt2.0b-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mpeg_widget-2.0b-NetBSD.tar.gz pub/NetBSD/elchware/X11/mtree-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mxedit-2.4-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/mxrn-6.18-pl24-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/nedit-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/oneko-1.1b-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/pbmnorm.tar.gz pub/NetBSD/elchware/X11/pbmplus10dec91-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/pbmtodot.tar.gz pub/NetBSD/elchware/X11/pixmap2.6-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/pnmnlfilt-1.0.tar.gz pub/NetBSD/elchware/X11/point1.63-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/psview-1.41-NetBSD.tar.gz pub/NetBSD/elchware/X11/rars-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/smedit-2.83.1.7-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/spider-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/tcl7.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/tclMotif.1.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/tk3.6-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/transfig.2.1.8-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/wbuild-2.4-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/x3270-3.0.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xanim2682.tar.gz pub/NetBSD/elchware/X11/xboard-3.1.pl1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xclosedown-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xcoral-2.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xdiff-1.4-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xdiw-07jul94-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xdoor.tar.gz pub/NetBSD/elchware/X11/xdtm-2.5.2.tar.gz pub/NetBSD/elchware/X11/xdtm-2.5.5-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xengine.tar.gz pub/NetBSD/elchware/X11/xevil-1.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xfig.2.1.8-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xforms-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xfreecolours-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xinfo-1.01.01-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xisola-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xkobo-1.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xkobo-1.5-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xli-1.15-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xloadimage.4.1.tar.gz pub/NetBSD/elchware/X11/xlockmore-1.11-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xmapedit-v1.00-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xmbase-grok-1.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xmcd-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xmixer.tar.gz pub/NetBSD/elchware/X11/xoj-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xpick-1.21-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xplz-3.4-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xrgb-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xrn-7.03-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xscreensaver-1.25-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xsession-1.1-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xsnap-pl2-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xspacewars_v0.0.2-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xtea-1.3-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xteddy-1.0.tar.gz pub/NetBSD/elchware/X11/xv-3.10a-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xv-gauge-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xview-3.2-NetBSD-X11R6.tar.gz pub/NetBSD/elchware/X11/xview-3.2-NetBSD.tar.gz pub/NetBSD/elchware/X11/xvmines-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xvminitoppm-NetBSD.tar.gz pub/NetBSD/elchware/X11/xwit-1.0-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/xxgdb-1.11-NetBSD-patches.tar.gz pub/NetBSD/elchware/X11/zorro-1.1p4-NetBSD-patches.tar.gz pub/NetBSD/elchware/install/install_patches.tar.gz 1.8.7 Motif for the *BSD family. (Infomercial to follow) While I don't normally include commercials in the FAQ, I will this time. Motif is an interesting product that will help the development of the free Unices. It can also serve as a benchmark for other commercial organizations to consider supporting us by producing versions of their products that will work on these systems. Sequoia International, Inc. (305-783-4915/305-783-4935 (FAX)) sells a complete Motif 1.2.3 Runtime and Development package for FreeBSD, NetBSD, BSD/386, OpenBSD, Linux, and Coherent. It is available for $149.95 and includes the following: * The Motif Window Manager (mwm) * Shared Library (libXm) [operating system dependent] * Static Libraries (libXm, libMrm, libUil) * Header and Include Files * Complete On-Line Manual Pages * Source code to OSF/Motif Demo programs * Complete OSF/Motif Users Guide Send mail to info@seq.com or contact them at the address below: Sequoia International, Inc. 600 West Hillsboro Blvd, Suite 300 Deerfield Beach, FL 33441 Phone: (305)783-4915 / FAX: (305)783-4935 / Email: info@seq.com -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!cancer.vividnet.com!hunter.premier.net!news-res.gsl.net!news.gsl.net!swrinde!newsfeed.internetmci.com!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 3 of 10) Supersedes: <386bsd-faq-3-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:01 -0500 Organization: Dave's House in Omaha Lines: 2074 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-3-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:125 comp.unix.bsd.freebsd.announce:177 comp.answers:15804 news.answers:63150 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part3 Section 2. (Common installation questions) 2.0 Install process Once the files are on floppies, thoughts usually turn to questions about how to install the boot image on a floppy. The rawrite program (for DOS) is used to write the bootable images (dist.fs and fixit.fs) onto floppies. The same image can used for 3 1/2 and 5 1/4 high density diskettes. NetBSD uses the .fs file extension for its floppy images. FreeBSD uses the .flp extension. Once the bootable images are written onto the floppies, insert the dist.fs disk into the A: drive and reboot. If the system does not boot, see section 2.5 below for more information. If the disk boots, type install and proceed to use the INSTALL.NOTES to get more information. Problems with the install are either related to hardware (i.e. Do you want to install on your T.V.?) or software. Of the hardware issues, the most common FAQs are usually straight out of the installation notes. Of the software issues, there are only two that really concern us. The first is bad files. On some systems, files that are loaded from floppy appear to 'go bad' when they arrive on the hard disk. Try some of these solutions: - You forgot binary. Don't get insulted. Those of us that FTP for a living forget sometimes. If so, the distribution will come out with all different sizes and install will complain about every disk. - One or two of the files are no good. Try getting them again. As a precaution, rename the bad files on your hard drive to names like foo.1 and bob.23. Copy the files again from floppy. If they are still bad, rename the file, and the one immediately before the first bad file (bin01.23 if bin01.24 is bad) and copy them again. If they are still bad, download those files again from the distribution site (including the one before and after the bad one) and try again. The reason for renaming the files is that sometimes, especially with drive that do not auto-magically record bad sectors, you could copy a distribution file onto a bad spot on the disk. If this happens, you want to isolate the bad spot. The easiest way to do that is just leave the bad file on it. For those of you that have received your system on a CD-ROM, you will need to find at least three things. One is this file. Since you are reading it, I assume that you got it already. :-) If you can't read this file (you got it from the newsgroup, for example) there is one thing that you need to know so you don't look like a complete idiot on the net. There is no such thing as a Unix CD-ROM. They are all in something called the ISO CD-ROM format. You can read them as the D: drive in DOS, or mount them on your Sun or SVR4 system or whatever. Second, you will need to find the directory with the bootable disk images in it. They will have self explanatory names like: kerncopy.fs base0-9.fs fred.fs genericaha.fs boot-me-first.fs this-is-the-file-with-the-fs-extension.fs You get the idea, right? Look for the MS-DOS program "RAWRITE.EXE". It should be right near the file system (.fs) files. Another clue for the truly lost will be that the file system files will all be 1.2 Meg big. These files will fit onto either a 1.2Meg 5.25 inch diskette, or a 1.44Meg 2.5 inch diskette. Use rawrite to write the fs files to diskettes and boot from the diskettes. The FreeBSD system uses a system 'pretty much' the same as this, except that the filesystem files are 1.2 Meg files and they all have a '.flp' extension. Other than that, the instructions apply. You did back your system up, right? 2.0.1 Boot disks (versions and media formats) When installing NetBSD, the set_tmp_dir and extract programs are part of the .profile that is booted when you are installing. This .profile is overwritten as part of the install process, and extract then disappears. If you need extract again, you can mount the install disk and source .profile. This will recreate these two routines. There is also an install procedure that FreeBSD uses that does the same job. It is defined as part of the .profile on one of the installation floppies. You can either copy it from there, or use the procedure for 'real disk partitioning'. 2.0.1.2a The floppy booted, but now the hard disk won't boot? 2.0.1.2b I am trying to reinstall. I run install and it loops asking me if I want to use the whole disk? The most likely culprit is your hard disk controller. If you have an IDE or EIDE controller, it is probably doing some type of disk translation for you. If this is the case (assume it is) then you will need to find out the real disk controller geometry, and rewrite your disk label. See section 2.6.2, but before doing that get the program pfdisk.exe. This program will tell you what the controller geometry is (right before it reboots your computer). Make the disklabel agree with this program and your system should boot. You may have to reinstall, but at least your disklabel will be right. Note that this is a nearly required step for all NetBSD and FreeBSD installs. You need to know what the disk geometry is before the BIOS messes with it. If you start having these kinds of installation problems, I can virtually assure you that it is because your controller geometry and your disklabel geometry are different. NOTE: If the hard disk controller does NOT have an option for turning off the geometry, you may well be completely out of luck. There are very few controllers that fall into this category. The ones that do full time translation will often boot up in translated mode. pfdisk will help you determine the correct geometry for your drive by telling you what the geometry looks like when 386bsd boots up. But on the other hand, maybe not... See section 2.5.5 below for a detailed set of instructions about getting NetBSD (and by implication 386BSD and FreeBSD) to work with a system that uses full time translation. 2.0.1.4 What are the options on the boot prompt? The most amazing thing about the boot process in *BSD is the boot up alternatives that are available. There is little that a person can NOT do from the boot prompt. The boot diskette or disk can be selected (fd(1,a) for fd1a (my B: drive is DOS)) can be the source of my kernel. In addition, the name of the kernel can be chosen (this allows you to boot with a test kernel or reboot an older kernel if the new one gets hosed). Finally, there are three choices for options that may or may not work, depending on the age and proclivities of your boot blocks. These options are documented in 2.5.9 below. 2.0.1.5 I just used the '-s' option on the boot, but I can't write anything onto the disk. What is wrong? If I use a plain 'mount' command it tells me that my root file system is read-only. In single-user (system booted with -s or an error in one of the processes started by /etc/rc) the root filesystem mounts as read-only by default. This was intended so that some range of problems would not be made worse by writes to the disk. The 'dos' partitions mount as read-only in that there are reservations as to how well some of the FreeBSD tools work with the pcfs. The same kind of reservations exist with NetBSD and the '-t msdosfs' option. These options (-r for read-only, -w for read-write) can be set in /etc/fstab. The status of both can be changed with 'mount -wu /{mount.dir}' (where {mount-dir} is the name of the directory that the offending partition is mounted) to read-write. Particularly for the dos filesystem, the man page for mount should be read in detail and the 'noexec' option examined. Note that mounting the file systems using the '-a' option will mount all of the file systems that are normally mounted with their usual read-write bits set normally. Using this option makes your root partition writable, and also mounts the rest of the partitions in your /etc/fstab that are normally mounted during boot-up. 2.0.2 Fix-it boot disk The fix-it disk contains a series of programs that are particularly handy for 'fixing' your disk in case you can't get logged in. It includes the disklabel program and other utilities for system maintenance. For NetBSD and FreeBSD, you will probably have to build your own Fixit disk. You can mount the original file system floppy and beat it to death if you want. Put programs on it that you will need to build a new system. As I think of them, I will put them in. 2.1 Binary distribution 2.1.1 I want to install by NFS but I am having all kinds of problems. There is an unusual problem when installing over NFS. This solution may have been corrected in the documentation that comes with FreeBSD and NetBSD, but if not, here it is. The most common problem seems to be that FreeBSD (and by inference NetBSD and all the other 4.4 based systems) do not send out NFS requests over privileged ports. Sun's NFS implementation (and others, once again by inference) expect precisely the opposite. These systems will quietly fail if you try to NFS to them. The usual error message (which may ONLY appear in /var/adm/messages) is "nfs_server: weak authentication, source IP address=xx.xx.xx.xx" SunOS is particularly insidious at this point. The mount succeeds, but then everything else after that fails. This means that your FreeBSD or NetBSD system will return ann EACCESS error whenever you try to grab a file from the NFS filesystem. The solution (tested in FreeBSD) is to include the 'resvport' flag like this: # mount -o resvport server:/fs /mnt_point or to use the -P flag (which does the same thing). See the mount and mount_nfs man pages for the details. In fact, the -P flag provides a solution to the FreeBSD NFS installation problem. When prompted for server/filesystem, type in the flag before the server/filesystem pair: -P server:/fs If you are using an 8-bit network card, and want to avoid the ring buffer overflow problems that seem to come standard with this class of cards, you can also include the "-r4096 -w4096" flags between the -P and the server. 2.2 Configuration By far, the most common configuration questions are partitioning, followed closely by all of the other software in the system. Sendmail and named are also problems occasionally, but the documentation that comes with them usually gets you through. If you run into a problem, post a question to comp.os.386bsd.questions. A less frequently asked question is "Where can I get info on how to configure a kernel?" The answer to this question has been provided by Richard Murphey (Email address rich@Rice.edu). -------------------------------------------------------------------- Ready-to-print PostScript files for each section of the net2 system maintainer's manual are on nova.cc.purdue.edu in pub/386bsd/submissions/bsd.manuals. smm.02.config.ps.Z describes kernel configuration for the VAX, however some of it is relevant to 386BSD. There is no freely available rewrite for 386BSD that I know of. -------------------------------------------------------------------- Most of these manuals are now included in the standard release of NetBSD and FreeBSD in the /usr/share/doc directories. 2.5.1 Partitions This section describes many of the questions that people ask about hard disk partitioning. The first is a brief explanation of the BSD system disk partitions. 2.5.1.1 What is a 'disklabel' and why do I need one? The BSD partition table supplements the DOS partition table. The entries in this table are meaningful to BSD. There are eight partitions in the BSD partition table, and they are normally lettered from a: to h:. This supplemental partition table is often refered to as the 'disklabel'. There have been many good articles in both the mailing lists and the newsgroups about disk labeling and partitioning. I have included a few of them here. NOTE: This information has not really changed since 386BSD 0.1. Some of the specifics may be out of date (the use of the d: partition, for example) but the steps and information are still pertinent. Phil Nelson (phil@cs.wwu.edu) writes: I have installed several disks that have > 1024 cylinders and have used both DOS and NetBSD. What has worked for me EVERY TIME is the following: a) Tell the BIOS that you have 1023 cylinders and the correct geometry for heads and sectors. (This will limit your DOS part of the disk to be LESS than the first 1023 cylinders.) You need to have ALL of your partition A (/dev/wd?a) in the first 1023 cylinders so that the boot program can read the kernel from the root partition using the BIOS routines. (ed note: You can specify the full number of cylinders in some BIOSes and it won't make any difference. The DOS part of the disk will always be less than 1023 cylinders.) b) With fdisk, partition your 1023 cylinders as you want them. c) Use the real geometry in NetBSD. Once the NetBSD kernel is booted, it does not have the 1024 cylinder limit: that is only for the BIOS. NetBSD only looks at the BSD disklabel, not the DOS disk label. The two disk labels (DOS and BSD) may not agree on the BSD partition size! This isn't a problem, since each system's idea of the disks geometry is based on different information. d) Use NetBSD! Chris Jones writes: I was getting different reports of disk geometry from different programs, so I opened up the computer and read the plastic label on programs, so I opened up the computer and read the plastic label on programs, so I opened up the computer and read the plastic label on the drive. I then instructed the BIOS (which, when using auto-detect disagreed) what the disk geometry was. Then, I used pfdisk to create partitions. The first thing I did with it was to tell it what the geometry really was. It said something about a symbolic mapping and dealt with it. Then I was able to specify all partitions in real units instead of virtual ones. NetBSD boots fine, and if memory serves, it is the only program that has recognized the real disk geometry from the beginning. This tutorial is provided by by "" and provides an excellent overview of the hard disk partitioning procedure from start to finish. "Disk Partitioning for the Compleat Idiot" There are times, in our trials with our computers, that it becomes necessary to mess about with the disklabel. For those not knowledgeable of BSD or Unix Systems administration, this somewhat simple task can be somewhat daunting. This document is the result of my own short experience. This does not cover physical installation of the disk. For those who are having trouble with that, I direct you to any of the fine manuals dealing with hard drives and your hardware. It also does not deal with the vagaries of the DOS partition manager. It assumes you have done that as well, if need be... After the drive is physically installed and is recognized in the BSD startup, and it mentions both your drives, in the order you expect them... Or perhaps just the one, if you had special problems with installation. Now all you have to do is "disklabel" the drive... Well, what is *THAT*??? The disklabel is used by the kernel and other utilities to tell how you want or have the drive set up *logically*. In a beautiful world, we might have a very free hand at this set-up and expect it to work. Unfortunately, the authors of the software dealing with the hard drives either decided or were forced by circumstance to make certain things about the disklabel inviolate. When you let the installation disk set the disklabel for you first drive it comes out like this: The a: partition is the primary partition. The b: partition is the swap partition. The c: partition is the amount of the disk used by 386bsd (swap and data) The d: partition is the entire disk (on the PC version only). Of these, the only one that could be different is a:... (Note for those of us who have spent far too much time using DOS: the labels a: b: c: d: e: f: g: h: DO NOT refer to DOS drives, but to partitions in your 386bsd partition... confusing, eh? For the sake of consistency I will never make a reference to DOS drives except by saying something like "DOS drive C:". ) It's possible to divide up the disk a bit differently, but three things MUST be: c: must refer to every cylinder you wish 386bsd to use, either for your data or the swap space. d: Must refer to the whole disk, from cylinder 0 to the last one... b: Must always refer to a swap partition. Note that on any other than the first disk it does not have to, but if you enable swapping on that drive, and you are using b: for something else, that something else will be killed. The reason for this is simple: It's hard coded in. "WHY?" you ask? (I did...) Probably time constraints, maybe tradition. But if you look at the code in "isofs" and "ufs" in your sys.386bsd directory, you will see numerous comments asking some of the same questions, which leads me to believe this may change in the future, making our lives both more complicated and easier at the same time... Getting past the esoteric explanations, here is a method for figuring out and "labeling" your disk. We'll start with the disklabel from my second disk, in the form most understandable by humans... #'s signify the start of a comment. # /dev/rwd1d: type: ESDI disk: maxtor7245 label: flags: bytes/sector: 512 sectors/track: 31 tracks/cylinder: 16 sectors/cylinder: 496 cylinders: 967 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 5 partitions: # size offset fstype [fsize bsize cpg] a: 198400 0 4.2BSD 512 4096 16 # (Cyl. 0 - 399) b: 31744 447392 swap # (Cyl. 902 - 965) c: 479136 0 unused 0 0 # (Cyl. 0 - 965) d: 479136 0 unused 0 0 # (Cyl. 0 - 965) e: 248992 198400 4.2BSD 512 4096 16 # (Cyl. 400 - 901) Some math: Looking at the comments at the end and the size and offset columns, size is a function of (last - first + 1) * sectors per cylinder: a: 399 - 0 + 1 = 400 * 496 = 198400 b: 965 - 902 + 1 = 64 * 496 = 31744 c: & d: (Since I have no DOS partition, whatsoever) 965 - 0 + 1 = 966 * 496 = 479136 e: 901 - 400 + 1= 502 * 496 = 248992 248992 + 198400 + 31744 = 479136 (all the parts should equal the whole) Some things I discovered (for all you in novice land like me...) 1. As you can see this disk has 967 cylinders, but I only refer to 966 of them, 0 - 965... This is because it's good practice to leave the "Landing Zone" cylinder out of it... This is usually the last cylinder, and it's where the read/write heads hang out when your disk is off... Note from TSgt Dave: Most modern drive heads come to rest on a polished surface inside the highest cylinder. I could be mistaken, of course, and the Hard Drive Bible (or other appropriate reference manual) will tell the tale for each drive. 2. a: can be a regular partition, b: should be swap, c: everything 386bsd will get to use, including swap. d: is the entire disk from 0 - (cylinder_per_disk - 2) [leaving out the Landing Zone] On the boot drive (The drive that actually contains the kernel), a: is the boot partition. On all other drives, it is a regular partition. Reagardless of whether you are using DOS or not, the entire a: partition must reside completely within the first 1024 sectors. This is a limitation of the PC architecture. You can then use e - h for your other partitions. I am not sure whether you could specify b: as other than a swap partition and not run into trouble, but you could surely make it a zero sized one starting and stopping on the Landing Zone... Note from TSgt Dave: This is a good idea. Another way to accomplish this is to simply not specify it in the map. 3. Stupid human trick: When doing the math don't forget that 400 - 900 refers to 50*1* cylinders. I did, for a while. No great problem I suspect, but why waste a cylinder... 4. newfs'ing really is that simple if you have the label right: "newfs /dev/rwd?x config_template" where the question mark is the physical disk, the x is a partition letter, and the config_template is the configuration from /etc/disktab for your disk drive. * NOTE: This is a thumbnail sketch; read the man page to verify all of the options and be sure about how to proceed... 5. then fsck the partition: fsck /dev/rwd?x Don't forget that fsck should be run on the RAW device. 6. As long as it checks out, you can then mount it and do disk things with it... 7. Add it to the fstab... (follow the man page). Don't forget that your new swap partition won't work if your kernel isn't configured for it, but it won't cause you any problem to have it there. One last note from TSgt Dave: And I have yet to figure out a way to determine if it is or isn't using the swap partition anyway. There is a program called 'swapinfo' and it is part of the NetBSD source tree. On my system, it tells me that I never use the swap area. :) Comnonly used definitions: bsize: Block Size: This is the smallest allocatable area on a disk file system, sort of. A file uses the maximum amount of blocks until it can not completely fill up a block. fsize: Fragment Size: This is the size of the 'leftover' data that didn't fit into a full block. For example, assuming a using an 8K Block Size/1K Fragment Size, a 34.5K file, would use up 4-8K Blocks (4 * 8K = 32K) and 3 1K fragments (3 * 1K = 3K). There is 512 bytes of wasted space, since 32K + 3K = 35K, which is 512 bytes larger than 34.5K. If you want to reduce the amount of wasted space, you can reduce your fragment size, but you also reduce the amount of data you read at one time, so your disk performance decreases also. A good setup is 8K/1K for performance, but if you are really concerned about wasted space you can consider using a 4K/512byte filesystem. For further information, find an article that explains the Berkeley FFS in more detail. cpg: Cylinders Per Group, it determines the cylinder group size, which in turn determines the number and location of the alternate superblocks. Cgd posted a description of how to manually install 386bsd and create 'real' BSD partitions. It is excerpted below: -------------------------------------------------------------------- HOW TO GET 386bsd 0.1 INSTALLED WITH "REAL" PARTITIONING: (remember, if things don't work, they might be in places that aren't normally looked in... things should work as below, but you might have to use explicit paths occasionally... the 'better' stuff -- mount, umount, cp, etc... is in /usr/distbin on the fixit floppy... even mknod is there, if the devices you need aren't on the fixit floppy...) (1) boot the fixit floppy (2) disklabel the disk as appropriate (3) newfs the partitions (4) mount the new root partition under /mnt (5) mkdir /mnt/usr (6) mount the new /usr partition under /mnt/usr (7) cpio the entire contents of the fixit floppy to the hard drive cd / ls .profile * [0-ln-z]*/* */*/* | cpio -pdalmu /mnt (NOTE: [0-ln-z]*/* is to avoid matching mnt/mnt) (8) copy /usr/distbin/mount and /usr/distbin/umount to /mnt (so that they'll be in the new root partition, so you can mount the new /usr partition...) (9) shutdown and the eject the floppy. (10) reboot off the hard drive, then fsck -p If there are any errors, after the fsck is done, hit ctl-alt-delete, and repeat this step. (11) fsck -p (12) mount -u / (13) mount /usr (14) insert 0.1 boot/install floppy (dist.fs) into floppy drive and "mount /dev/fd0a /mnt" (15) cd /mnt and then usr/bin/zcat etc/baselist.Z | usr/bin/cpio -pdalmu / (16) cd / and then /mnt/usr/bin/zcat /mnt/etc/baseutils.cpio.Z | /mnt/usr/bin/cpio -idalmu (17) umount /mnt then eject the floppy (18) umount /usr (19) shutdown (20) reboot off the hard drive, and get all of the various files (the bindist files, srcdist files, etc...). I put them into /usr/tmp, because there wasn't enough space in /tmp (because it was on a small root partition...). (21) cd / ; cat | uncompress | cpio -idalmu (22) rm (23) put your hostname into "/etc/myname" and put your ip addr/hostname into /etc/hosts. (24) make an fstab for yourself. specifically, you want something like: / ufs rw 1 1 /usr ufs rw 1 2 congratulations! you now have a working system! you can repeat step 21 for the srcdist and etcdist files, as well, if you wish... 2.2.1.2 What other kinds of information do I need if I really want to tune my hard drive's performance in conjunction with a newfs? Having taken Kim's suggestion and changed my newfs values, I think I've now made some empirical observations that suggest that the defaults for newfs should definitely be changed. With all the disks I tested with, -n 1 (which isn't even *documented!*) provided greatly improved performance, as opposed to all other values of -n. I think that with sector-addressed drives with complex physical geometries, rotational position optimization is a technique which is no longer valid. If _anyone_ has _any_ disk larger than 300MB or so (or even a small disk) manufactured within the last few years for which larger values of -n produce better performance than -n 1, I'm very curious to hear about it. I'd be particularly interested in any disk for which the default value produces optimal results. Increasing maxcontig seemed to always improve write scores, but values of maxcontig above 16 seemed to have a noticeable _negative_ impact on read performance. -a 512, for example, on the disk in my machine at home, yielded a peak write rate (4MB file, 8K record size) of 4.7MB/s, much better than the 4.3MB/s value for -a 64, but read performance was reduced from 2.6MB/s to 2.1MB/s. I do not understand why this is the case, and I'd love suggestions. I believe that with rotational position optimization turned off (-n 1), the value of the -r option is of no consequence. I believe that the fact that with the default value for -n, the -r option seemed to have little or no impact on performance serves to demonstrate that rotational optimization does not work correctly on modern drives. The default value of the -d option also produces much worse results than -d 0. I'm probably inexact up above; I believe that -n 1 -d 0 is what turns off rotational position optimization entirely. I'm all for it. :-) I suggest that the defaults for newfs be changed to: -n 1 -d 0 -a 16 -r 5400 The -r value just in case someone decides to try playing with rotational position optimization for some incomprehensible reason. Though actually, anyone with a disk where said optimization is a win might want -r 3600 after all. If someone can explain why values of -a above 16 seem to negatively impact read performance, I'm all for making -a very very large, like 512 or 1024 -- in this case the filesystem code will automatically limit maxcontig to the maximum transfer size for a given controller/disk, right? What are some typical such sizes? Why does -a 512 hurt read performance so much, and how can it be fixed? From comments by Larry McVoy, a good implementation of UFS with clustering will yield disk speed on writes, and about 25% less on reads. Right now, on my hardware at least, we seem to _surpass_ slightly the speed of raw writes to the disk device on writes, but on reads we lose big as the maxcontig value goes up, and we seem to lose worst on large file/record sizes, where the raw device delivers about 5MB/s in my case, but with -a 512 I get only about 2.5MB/s under UFS. If you can't guess, I'm incredibly curious as to why the value of -a affects reads as much as it does, or at all, for that matter. Still, we don't do so badly -- with -a 16, we pretty much hit Larry's "good" value on reads of 75% efficiency, and we still just barely surpass the raw device write figures. (I am very, very, very curious as to how this is possible at all. Anyone?) 2.2.2 Common Disk Label Problems. 2.2.2.1 Increasing the *BSD partition size. There is no easy way to increase this swap partition without relabeling the drive. Unfortunately, relabeling usually involves reinstalling. That involves re-doing just about everything you have just finished doing. The good news is that if all you have done is the base installation, you don't have a lot of time and energy invested in the system. Take the time, and make sure that your swap space is at least as big as your memory; many people recommend even larger. There is no real limit to the size that this space can take. If you have two disk drives, you can have space space on both. Simply follow the instructions above, and you will be all set. If your swap space is smaller than your real memory, system core dumps will be disabled. 2.2.2.2 I can access the DOS partition on my second disk from Unix but not DOS? Any suggestions? One kinky problem that almost got me was when I tried to disklabel my second drive in order to use the DOS partition on it, and use the rest as swap for BSD (FreeBSD-1.0 Eps, SCSI drive on an AHA1542B, to be exact). The DOS partition was visible from UNIX, but *not* from DOS. What I tried to do: Using PFDISK (from DOS), make one big DOS partition at the start and use the rest for a BSD partition (type 165). Something that came out like 1 6 0 69 DOSbi # .. 2 165 70 98 unkno for a 99 cyl drive. Using BSD disklabel generate disk description/label as documented in the FAQ. Make only 'c' (total BSD DOS part), 'd' (complete disk) and 'b' (intended swap) BSD partitions. Problem: When writing the label, disklabel would ask about overwriting DOS partition table. Whether I said y or n, the DOS partition table was screwed up, as seen from DOS (BSD saw the DOS file system very nicely indeed). Cause, solution: BSD disklabel wants to write the label to the start of the 'a' partition; I had *not* defined an 'a' partition (since I was only using the disk for swap). This tells disklabel that the 'a' partition is the start of the disk, which means there is no DOS partition. Disklabel then writes the label at the start of the drive, which is why it talks about overwriting (aha!); this is *bad* for the DOS partition table. One solution is to have a non-empty (e.g. one cylinder) 'a' partition at the start of the BSD part of the disk, and resize the 'b' swap partition accordingly. Now everything works just fine. Note that this solution can be used whenever you want the DOS partition table to be safe and the DOS partition to be mountable. One other fly in this ointment. The disklabel program has historically asked "Overwrite disk with DOS-partition [n]: " then the normal inclination is to believe the prompt and press return for 'no'. The default answer may or may not be 'no'. There are several versions of disklabel where the default answer is actually 'yes' even though the prompt implies that you can press return and get 'no'. In this case, it might be best to assume that the default answer doesn't exist until you have had a chance to actually look at the disklabel code. 2.2.2.3 I want to use my entire 2 Gig drive as the root partition. Why doesn't it work? The easiest answer is the architecture of the machine has gotten you. Because of the limitations of the BIOS, everything the boot process needs must reside in the first 1023 cylinders on the disk. Most really big drives have more 'real' tracks than this, so DOS tries to translate the drive so it doesn't. The *BSD systems don't; they rely on the disk geometry being correct, or at least the same as the controller thinks it is. Once the system is up and running, the BIOS is disabled. This means that the system no longer has that 1023 track limitation. What does this mean to you? Make sure that the root partition of your boot drive does not extend beyond track 1023. If you have a large DOS partition that covers nearly all of that, you may need to make a VERY small root partition to make absolutely certain the root does not extend past 1023. 2.5.3 How do I set up the system so that I can boot from more than one operating system/file-loader without using floppies? There are many people that wish to be able to boot DOS or 386bsd at will. There are several programs that allow this. The program "os-bs" is one such program, "BOOTEASY" is another, and there are three or four others. There are problems in some configurations using the os/2 boot manager for this, so beware. In addition to being able to boot from either of two partitions, some people want to operate more than one disk drive (and perhaps boot from either as well). Christoph Robitschko provided one description of this. Since there are virtually limitless possibilities for configurations for BSD systems, it will be impossible to answer all of the possible questions about these features. Many people operate with multiple disk drives on one or more controllers. Yu-Han Ting provides this tutorial on partitioning and booting multiple systems with a single hard disk. After spending one day fighting with the nasty partition table, finally I had NetBSD, DOS 5 (Sorry, I don't use DOS 6), and OS/2 2.1 March beta co-existing on my hard drive. Here is the answer: Since that my original hard disk setup was corrupted by NetBSD's installation program, I decided to rebuild it. I would like my partition table looks like this: Partition 0: OS/2 2.1 beta (Primary, HPFS, C:) Partition 1: MS-DOS 5.0 (Primary, C:) Partition 2: MS-DOS 5.0 (Extended, D: & E:) Partition 3: NetBSD You will need the following tools before you can setup a similar environment: 1) Mr. Wolfram's OS-BS. (It's an excellent boot selector, much better than OS/2's boot manager, IMHO) 2) PFDISK.EXE. (It's available from wuarchive.wustl.edu:mirrors/ linux/dos_utils/pfdisktc.zip.) 3) A binary editor. I use Norton Utilities' DiskEdit. 4) 386BSD's 'tinyBSD' distribution disk. After you have the necessary tools handy: 1) Use OS/2 'fdisk' to create partition 0. Make it install-able and install the system as usual. 2) Use OS/2 'fdisk' to create partition 1. Assign drive C: to the partition. Then reboot from DOS. 3) Use DOS 'fdisk' to create the extended partition. Assign logical drive D and E to the partition. 4) Reboot from DOS again. Format drive C: (for DOS), D:, and E:. 5) Use 'tinyBSD', NOT 'NetBSD', to boot the machine. Create a genuine 386BSD partition. Once the 386BSD partition has been made, boot DOS from floppy and execute PFDISK.EXE. For example, issue the following commands once you get into DOS: C>pfdisk 0 pfdisk> L ("pfdisk>" is the command prompt and "L" is the actual command.) The second line, i.e., command 'L', will tell you the starting address and the length of each partition you have. Record the information for step 6. 6) Reboot NetBSD from floppy. Install NetBSD over the original 386BSD partition. Fill out the information you get from step 5 to the installation program. 'halt' the system after you have installed 'install2.fs'. (Ed.Note: This step is the same for 386bsd or NetBSD) 7) Boot OS/2 from floppy. Use fdisk to assign drive C: to the OS/2 partition. In my case, partition 0. Note that fdisk will change the ID of partition 1 from '0x06' to '0x16'. '0x06' stands for 16-bit DOS FAT; while '0x16' stands for non-DOS partition. In the next step, we have to change '0x16' back to '0x06' manually. You can get the ID information by issuing "I" under PFDISK. It will tell you what the IDs represent. 8) Boot DOS from floppy. Use the binary editor to change the partition type as stated in step 7. 9) Install OS-BS under DOS. Remember to enable "Modify startup ID before booting". 10) Now you can boot any partition w/o floppy diskettes during startup. :) The above procedures may not be optimized. But it works for me. I won't spend anytime to deal with tedious work again :) You might feel strange why we need 'tinyBSD'. Simply trust me. By using 'tinyBSD' to create a partition for NetBSD, it will make your life a lot easier. Hope this helps. Ed. Note: The reason is because several versions of NetBSD and FreeBSD will not label a disk that doesn't have a disklabel. Catch-22. PS: %%%%% REMEMBER TO BACKUP YOUR SYSTEM BEFORE YOU CONDUCT THE EXPERIMENT !!! %%%%% Here is Christoph's explanation of how to set up a dual hard drive system so that the 386BSD/NetBSD system is stored entirely on the second hard drive. I have done this with two IDE drives. IDE+SCSI should be a bit simpler. There's a boot selector called BOOTEASY that can load from the second drive (you can get it from ftp.tu-graz.ac.at:pub/386BSD/0.1/unofficial/booteasy). What I have done to boot 386bsd from the second (IDE) drive: - installed booteasy on the first drive - (you can install booteasy on the second drive, too, if you have multiple partitions there) - modified Julian's boot blocks to use the second drive per default (Ed. Note: See below for the illumination of this step) - rebuilt the kernel to have root and swap on wd1 (probably not necessary for you, since your second disk is sd0, which is already in the config file). It worked perfectly for me. This should also work with equal facility for 386bsd users. 2.2.3 How do I get the system to boot from the second hard drive? Julian Elischer (julian@jules.dialix.oz.au) adds: To make the bootcode default to drive 1 look in /sys/{arch/}i386/bootboot.c for the following (or similar. The code may have changed a little and may be in a different directory: loadstart: /***************************************************************\ * As a default set it to the first partition of the first * * floppy or hard drive * \***************************************************************/ part = unit = 0; maj = (drive&0x80 ? 0 : 2); /* a good first bet */ name = names[currname++]; and change it to: loadstart: /***************************************************************\ * As a default set it to the first partition of the SECOND * * floppy or hard drive * \***************************************************************/ ! part = 0; ! unit = 1; maj = (drive&0x80 ? 0 : 2); /* a good first bet */ name = names[currname++]; And in yet another interation, Luke Mewburn (lm@yallara.cs.rmit.oz.au) decided to hack that a bit further in his NetBSD 0.9 (as_shipped i.e., non-current) to set the drive to the unit which the boot blocks loaded off. So, instead of: part = unit = 0; do: part = 0; unit = (drive & 0x7F); (where the FAQ suggests `part = 0; unit = 1;' ) This way, whatever drive the boot blocks are loaded from, it has that as default. In my case, I get wd(0,a) when I have my netbsd drive as C:, and wd(1,a) when I have it as D:. (I've been swapping drives left right and centre the last day getting dos to boot on one drive and netbsd on another). 2.2.4 How do I disklabel my second hard drive? The obvious answer is to use 'disklabel -w -r /dev/rwd1d'. Unfortunately, this does not always put a real disklabel on the drive. The symptom is that the drive labels and can be used until the system is reset, at which point the system tries to read the label from the disk. It was never actually written to the disk, so the operation fails. There are also reports that the /usr/mdec files are corrupted in some of the distributions. If you have tried everything else, you can either load the files from one of the many archive sites that keep the /usr/mdec files around, or you can recompile them yourself. Mark Weaver (mhw@cs.brown.edu) provides us with an illuminating answer to this perplexing problem. I had the same problem and there is a simple solution. I'm not sure why this works, but it does. Instead of specifying the entire device path name (i.e. /dev/rsd0c), only specify the two letters of the device type and the unit number (i.e. "sd0"). Disklabel figures out the rest, and it works. For instance, the following line works for me: disklabel -w -r sd0 assuming of course that the boot block files are in /usr/mdec/ and the is in the /etc/disktab. This is also a symptom of some of the versions of FreeBSD and NetBSD where the disklabel code was 'fixed' to only write a disklabel on a drive with a disklabel. Oops. Also, some folks want to mix SCSI and IDE drive together in the same system. A report about someone with an Austin Tower (486DX/50), AMI BIOS, Caviar 2250 IDE, Adaptec 1542CF, and Toshiba SCSI disk (1.2GB) posted this set of instructions: The BIOS is configured to boot from the IDE drive as type 47 (user defined). The IDE drive currently has NetBSD 1.0 BETA on it. The 1542CF switches are 1-4 off (open), 5-8 on. The meaning is as follows: 1(off)=Termination software controlled. 2,3,4(off)=I/O Port x330. 5(on)=disable floppy. I use the Austin floppy controller. 6,7,8(on)=disable Adaptec BIOS. Note that this means the Adaptec 1542CF on-board setup program is also disabled. If I need to change my SCSI termination, I first have to enable the Adapted BIOS (sw 6,7,8), enter 1542CF setup and change termination, then change switches again. I could not configure the system to boot from the SCSI drive having the IDE as a secondary drive. (Ed Note: There is more news on this front all of the time. Since I personally don't have much interest in doing this (I boot from my IDE drives and mount my SCSI drives) I don't see the problem. ) 2.2.5 NetBSD and FreeBSD cannot handle disk geometry translations, but it turns out that my disk geometry is translated. It has five zones, each with a different sec/track! What kind of things can I do about the disk translation my hard disk controller uses? It turns out that what *BSD cannot handle is not translation, but translation that changes during the boot-up process. For example, the configuration above will work just fine IF the translation that the controller uses when it powers up is the same one that it uses when it boots. On many PC clones, the BIOS loads a different geometry after it boots to make the geometry agree with one that is loaded in CMOS. This is the fatal flaw for *BSD. Fortunately, once the problem has been identified, it is relatively easy to handle. Simply make sure that the BIOS is configured to set the controller to the translated geometry that the card powers up with. There are several ways to get around these problems with disk geometry translation. If you are using a SCSI controller, you can specify the geometry such that each 'cylinder' is 1 Meg (64 sectors by 32 tracks for example). Most SCSI controllers will blithely ignore what YOU tell it the geometry is and press on using this type of 1 Meg cylinder had to get the job done. NOTE: If you are going to try this, try to ensure that each 'pseudo cylinder' is a reasonable size (like 1Meg or 512K). An interesting method for dealing with disk geometry comes from Alan Barrett (barrett@lucy.ee.und.ac.za): This sort of problem happens when you try to install NetBSD in a partition of a disk whose controller does geometry translation. I have not had time to find the bug that causes the problem. One option is to disable the geometry translation: Use ide_conf to find the true geometry, use the CMOS setup program to tell your BIOS about the true geometry, and reformat everything. I successfully did that on one of my systems. If you are not able to, or do not wish to, disable the geometry translation then the following work-around might work for you. This requires that the disk have unused space on {cylinder 0, head 0}, from sector 2 to sector 16. Almost all DOS disks that I have ever seen satisfy this condition, because they usually start the DOS partition in {cylinder 0, head 0, sector 1}, leaving most of {cylinder 0, head 0} unused apart from the partition sector in {cylinder 0, head 0, sector 1}. However, many partitioning programs like to hide this fact from you, and pretend that the DOS partition starts at the front of the disk; don't believe them until you have checked with a raw disk editor. 0. Make sure you have adequate backups. 1. Use a partition sector editor (fdisk, pfdisk, os-bs, booteasy, Norton utilities, whatever) to mark the partition that you want for NetBSD as bootable with type 0xA5 (decimal 165). 2. Halt the system. Boot the NetBSD kernel copy floppy. When it asks you to insert the floppy for the root file system, switch to the Install-1 floppy and press enter. 3. Answer all the installation prompts, using numbers based on the translated geometry. When it asks if you really want to label the disk, be brave and say yes. 4. Halt the system. Boot to DOS. Run a disk editor program, such as Norton utilities. 5.1. Verify that the partition sector in {cyl 0, head 0, sec 1} is undamaged. Verify that the disklabel program run as part of the NetBSD install has written the NetBSD primary boot block to {cylinder xx, head 0, sector 1}, written the disk label to {cyl xx, head 0, sec 2}, and written the secondary boot program to {cyl xx, head 0, sectors 3 to 16}. ("xx" represents the translated cylinder number you chose for the start of the NetBSD partition. You did choose to start on a cylinder boundary, I hope.) 5.2. Verify that the space in {cyl 0, head 0, sectors 2 to 16} is still available. Copy the fifteen sectors containing the NetBSD disk label and secondary boot block from {cyl xx, head 0, sectors 2 to 16} to {cyl 0, head 0, sectors 2 to 16}. 5.3. Edit the partition table in {cyl 0, head 0, sec 1}. Change the system ID of the NetBSD partition from 0xA5 (decimal 165) to something else (I use 0xA4, decimal 164), but keep it flagged as bootable. This will let you boot to the NetBSD primary boot block. 5.4. Edit one of the previously unused partition table entries (I hope you have one), to contain the following information: {sys id = 0xA5, boot flag = 0, start cylinder/head/sector = 0/0/1, end cylinder/head/sector = anything, initial offset = 0, total size = anything}. This will tell the NetBSD primary boot block, or a NetBSD system booted from a floppy, that it should look for the NetBSD disk label in {cyl 0, head 0, sec 2}. 6. Halt the system. Boot the NetBSD kernel copy floppy. When it asks you to insert the floppy for the root file system, just press enter without changing disks. 7. Copy the kernel, and proceed with the rest of the installation as per the instructions provided with NetBSD. It should now work because of the trickery with the partition table etc. 2.2.6 I am having trouble installing on the EIDE hard drive. What are some of the things that I need to look into? Bradley W Mazurek (bwm260@skorpio3.usask.ca) writes: First, I had to change the IDE translation mode in my BIOS. Rather than using LBA, I used Standard CHS. When I went in to reparition the disk for DOS, DOS reported that the drive was only 523Mb (1023cyl, 64h, 63sec/tr), rather than the true geometry (2100cyl, 64h, 63sec/tr) but I didn't worry about it. Next I created my DOS partition. I partitioned the disk so that cylinders 1-999 were DOS. That left cylinders 1000-1023 for NetBSD. Lots of room! :) Anyway, on a hunch, a friend and I were hoping NetBSD didn't look at the ending cylinder entry (1023) of the partition table. Next I calculated the length of the partition from 1000-2100, put this into the partition table using the disk editor. The numbers weren't consistent in the parition table, but DOS ignored the Non-DOS partition, NetBSD was happy...and we've (DOS, NetBSD and my remaining hair) all lived happily ever after.... [Ed.Note. The partition table needs to correctly identify the NetBSD portion of the disk, regardless of whether or not DOS can handle it. See the section on hard drive partitioning for more information...] My suggestion is to try to find an IDE translation mode in your BIOS for which the number of heads and number of sectors per track is consistent with the true geometry of your hard drive. Then perhaps this trick will work. 1. there is _different_ behaviour, if one executes disklabel wd0 or disklabel /dev/wd0c or disklabel /dev/wd0d It didn't get quite clear to me, what these differences are exactly. 2. Any disklabel write will change not only the data on disk, but also some data-structures in core. For example, if one tries to write a complete different disklabel to a complete different place, say /dev/wd0h, there will be strangeness afterwards. That means, writing a disklabel and then reading it back, does not have to mean that the write did succeed. There is an option -r to disklabel which is said to access the disk directly, but, as I noticed, the core-data is updated thereby, too. The following paper explained to me what should happen in sequence on boot: /usr/src/sys/arch/i386/boot/README.386BSD. It says (in short): [..] 1/ the BIOS loads the first block of the disk (called the Master Boot Record or MBR) and if it has the correct magic numbers, jumps into it: 2/ The MBR code, looks at the Partition table that is embedded within it, to determine which is the partition to boot from. If you are using the os-bs bootblocks (highly recommended) then it will give you a menu to choose from. 3/ The MBR will load the first record of the selected partition and if it has (the same) magic numbers, jumps into it. In 386bsd this is the first stage boot, (or boot1) it is represented in /usr/mdec by wdboot, asboot and sdboot. If the disk has been set up without DOS partitioning then this block will be at block zero, and will have been loaded directly by the BIOS. 4/ Boot1 will look at block0 (which might be itself if there are no DOS partitions) and will find the 386bsd partition, and using the information regarding the start position of that partition, will load the next 13 sectors or so, to around 60000 (640k - 256k). and will jump into it at the appropriate entry point. Since boot1 and boot2 were compiled together as one file and then split later, boot1 knows the exact position within boot2 of the entry point. Boot 1 also contains a compiled in DOS partition table (in case it is at block 0), which contains a 386bsd partition starting at 0. This ensures that the same code can work whether or not boot1 is at block 0. [..] 2.2.7 My disk label is complaining about '256 heads' in the disklabel. This is obviously bogus, but it doesn't seem to be hurting anything. Is it Okay or should I fix it? Steve Gilbert (gilbert@cs.utk.edu) provided us with this answer: First, If you do a "fdisk wd1" (It may be wd1d, I don't remember what it wanted), it will list out the partition table for you. This is something totally different from BSD's idea of a partition, mind you. The last partition (#3) should be BSD. All of those figures are correct except for the "ending head" field which is set to 255 (thus, 256 heads). 1. BACK UP EVERYTHING! 2. fdisk -u wd1 ...this will prompt you for the stuff you want to change. Remember, everything is correct execpt for the ending head. Accept all the default values it gives you at first. You'll have to tell it that you want to explicitly define the beginning and ending values. 3. My 420 MB Conner drive has 16 heads, so I just enter 15 as the ending head number. 4. When you are back out of fdisk, you can do another fdisk wd1 to make sure the values are correct. Don't worry if you mess up, you can always change it again. Anything you didn't back up is probably gone by now anyway :-) 5. Reboot and watch NO error message pop up! ..remember that all you want to do is fdisk the drive. You do NOT want to run disklabel again or newfs the partitions again. This will write the incorrect 256 crap back. I did this three times before I finally got smart and did it right. 2.2.8 What are the options for the bootup prompt? The options are supposed to be as follows: -s............... boot into single user mode -a............... ask the user what device to use as root just before mounting it (Not presently supported) -d............... once you have the kernel loaded and VM and such up and going, drop into the kernel debugger. (great for debugging probe code) A related question concerns the options on the 'reboot' program. These flags are as follows: -a Ask for a file name to reboot from -s Reboot into single user mode -b Don't reboot, just halt -r Use compiled in Root device -c Invoke the user configuration routines -d Transfer control to the kernel debugger, if available -v Print out all potentially important information As with so many other things in the systems, each of these may (or may not) work for FreeBSD or NetBSD. Your Mileage May Vary. One other note about 'reboot'. There are some motherboard which do not reboot reliably. Instead of rebooting, they simply hang. While this isn't a definitive answer, some folks have noticed that have the BIOS relocate option set seems to help them, especially with Micronics motherboards. If you are having problems with your system not resetting after a reboot, try changing the setting on the BIOS relocation option. 2.5.9 I am having trouble installing WRT 'syslogd: bind: Can't assign requested address' errors. What are some of the things I should look at? I also am having trouble with the network: 'starting network ... ifconfig: localhost: badvalue'. This is caused by incorrect settings in /etc/netstart and/or /etc/hosts. In /etc/hosts, you must have a line that says: 127.0.0.1 localhost localhost.my.domain Errors that will result if you don't do this: ifconfig will not be able to figure out what IP address goes with the name 'localhost' and you'll get 'localhost: bad value.' In /etc/netstart, you must do: ifconfig lo0 localhost route add {hostname} localhost Errors that will result if you don't do this: the loopback device will not be properly configured and/or you will have no route to it. The result is that programs expecting to have networking enabled (including syslog and friends) will get horribly confused. *AND*, if you're not going to be directly connected to a network, you should change /etc/host.conf to say: hosts bind It's set up the other way around by default. I don't like it that way myself. Errors that can result if you don't do this: if you don't have a nameserver available to you, the resolver will have trouble translating hostnames into IP addresses. Bogosity levels will be off the scale. (Note also that if you do have access to a nameserver, you need to set up /etc/resolv.conf to point to it.) By changing the order, you'll be telling the resolver to check the host files for matches *first*, then roll over to the nameserver (if any) if no match is found. Make sure that: - There are no typos in any of the three files mentioned above. - There are no bogus non-ASCII characters in the files mentioned above. - All three files have their read permission bits set. Lastly, be very careful with /etc/hosts.equiv. If you add a hostname to it, say 'otherhost.domain,' then root on otherhost.domain will be able to rsh/rlogin to your machine without a password. Once you have everything set correctly, you should be able to type 'telnet localhost' and establish a connection to yourself. If you get an error such as 'localhost: unknown host' or 'network unreachable' then you still have work to do. 2.2.10 I am having trouble getting net aliases to work. What could some of the problems be? There are many things which will cause network aliases to not work right. Here are a few: - Use "netmask 0xffffff00" (or whatever is appropriate) for the first IP address, and "netmask 0xffffffff" for all aliases that happen to be in the same (sub)net as the primary one. The reason this is right (no matter how odd it may seem) is you have multiple interfaces refering to the same network. You *have* to chose one of the various interface addresses as the "gateway" for outgoing packets into this network, you cannot have them going out through a dozen of addresses simultaneously. The netmask 0xffffffff prevents the kernel from considering this IP address as a valid gateway (since it's not pointing to any network at all). The correct syntax in /etc/rc.local for declaring a net address alias (assuming you are updating the eth0 interface) is: ifconfig eth0 xx.xx.xx.xx netmask 255.255.255.255 alias route add -host xx.xx.xx.xx localhost arp -s eth0 yy.yy.yy.yy.yy.yy proxy Where the xx.xx.xx.xx are the host address for the alias and the yy.yy.yy.yy.yy.yy is the interface MAC address (if appropriate). 2.2.11 I'm having trouble with the networking code (specifically the PPP stuff to my ISP). How can I debug NetBSD's networking? Bring the PPP connection up again. Retry whatever-it-is that's failing. PPP includes a link-level checksum. Watch the packet counts in the netstat -I ppp? output over time. Check carefully to see whether the PPP driver is recording input errors (frames whose CRC failed.) Frames with bad checksums are counted in Ierr field. A non-zero count indicates _something_, possibly overruns, is in fact garbling your PPP traffic. If the packets are being discarded due to errors at the PPP level, they'll never even get as far as IP. Also, use netstat (or an SNMP daemon and monitor, if you prefer) to watch the rate of change of bad packets at the IP and TCP level. I run "netstat -p ip" "netstat -p tcp". One has to manually compute the rate of change; netstat's -i option means something different to, say, vmstat's. (Adding periodic sampling and rate-of-change to netstat would be a Cool Project.) At the IP level, the relevant statistcs are 0 bad header checksums 0 with size smaller than minimum 0 with data size < data length 0 with header length < data size 0 with data length < header length 0 with bad options 0 with incorrect version number [...] 0 output packets dropped due to no bufs, etc. At the TCP level, look for, e.g., 0 discarded for bad checksums 0 discarded for bad header offset fields 0 discarded because packet too short Any of these being non-zero would support the hypothesis of a bug in the PPP implementation. Unlikely, but one never knows. It could be that a TCP ack got munged or dropped by your PPP link; or possibly somewhere else in the Internet. That's not abnormal on busy links. What OS is your FTP peer running? Is it a pre-2.0.0 Linux or an older version of a commercial Unix? If so, have you tried turning off rfc1323 on your NetBSD machine?? 2.2.12 I want to hard wire my SCSI devices to a particular device number. Is that possible? You can do the numbering any way you please. Say I had two controllers. You could number them as: sd10 at scsibus0 target 0 lun ? sd11 at scsibus0 target 1 lun ? [..] sd20 at scsibus1 target 0 lun ? sd21 at scsibus1 target 1 lun ? [..] Of course, you will need to add devices to the /dev/ directory for each of them, pointing to their correct major and minor numbers. You can also hardwire the 'scsibus' numbers, by doing something like the following (assuming "whatever" is the SCSI host adapter driver's name 8-): whatever0 at whateverbus? [whateverbus config info] scsibus0 at whatever0 then sd0 at scsibus0 target 0 lun 0 etc. That syntax won't work on ports which use 'old config,' but I believe an appropriate description of how to do it on them has already been posted. The most common configuration for locked down drive numbers is actually: sd0 at scsibus0 target 0 lun 0 sd1 at scsibus0 target 1 lun 0 sd* at scsibus? target ? lun ? # SCSI disk drives You can do the same thing with your tapes, CDs, and other SCSI devices as well. st0 at scsibus0 target 6 lun 0 st* at scsibus? target ? lun ? # SCSI tape drives cd0 at scsibus? target 5 lun 0 cd* at scsibus? target ? lun ? # SCSI CD-ROM drives etc. 2.3 Common installation problems. There are many common installation problems. This section covers the most basic and common of these problems. In addition to this section, you should also read through the other sections of the FAQ, since many of the less common questions are answered in other places in the doc. 2.3.1 Swap space not identified correctly. There are several levels of problems associated with swap space. The first is that the swap space on a second disk will not get used if it is not in your /etc/fstab file. Your /etc/fstab should have the swap space identified. The following is a representative fstab: /dev/wd0a / ufs rw 1 1 /dev/wd1b swap swap sw 0 0 Another common question is that the install program installs the swap partition in the 'b' partition, but does not mark it correctly as a swap partition. The swapping software will use the swap partition regardless of what it is called, but it should still be identified in the disklabel as the swap partition. Use 'disklabel' to change the partition type from 'unused' to 'swap'. 2.3.2 Endless reboot cycles. Endless reboot cycles are the single most vexing aspect of 386bsd. Part of the problem is that the 0.1 distribution boot routines were never checked against many types of computers and have bugs. Most of the bugs are fixed in the patchkit, but that doesn't do the average novice user any good. In general, this will show up as a "bad disk label" error, and can result in in not booting from the hard drive "most of the time". You may be able to partially (or even completely) work around this problem by making your machine run at a lower clock rate. This problem is the result of the kernel reading the wrong register waiting for the drive controller to come ready. On some controllers, this isn't a problem; on others, it's fatal. This problem is solved for almost all controllers in the patchkit and both FreeBSD and NetBSD. The correct solution is to use a patched "dist.fs" or "fixit.fs" boot disk. Since these are no longer available, using an unpatched 386BSD 0.1 is a not a possibility any longer if you have this problem. You will have to upgrade to either FreeBSD or NetBSD. Another incarnation of this symptom is that the disk geometry on your disk label (as installed by install) is different than the geometry that your hard drive controller thinks it is using. This will most often manifest itself on controllers that insist on operating in some type of translation mode. Normally the fix is to find out what the controller geometry is and make the disk label agree. There are programs available to help with this problem. Julian's new boot blocks may also solve this problem. They are available where fine precompiled kernels may be found. Also, they are included in the patchkit as of version 0.2.2. 2.4 The computer just sits there, or 'that isn't right'. This class of problems is sometimes caused by an incorrect FTP of the boot disk. Make sure that the files were grabbed in 'binary' mode and that the size reported back is 1244000 bytes. Use the Unix program 'dd' or the DOS program RAWRITE to put these files onto the diskette. In addition, this is the 'miscellaneous' section of the FAQ. These problems are included here because they are usually preceded by 'I just finished installing...' Another incarnation of this problem is that, sometimes, the major or minor device numbers for a particular device may not get made correctly in the install (or upgrade) procedure. If you have a problem where you can install and everything seems to go well until you try to boot onto the hard drive, try running the MAKEDEV script that resides in /dev. More the file to see what kind of options you should include (if the sd0a drive needs to be fixed, for example, the command './MAKEDEV sd0' should get your devices back on the road. If that doesn't work, try one of the many things below. It could be any (or all) of them.... 2.4.1 The boot disk works all right on one computer but not another. This could be a problem with many different pieces, some of which are: - Misconfigured hardware. The iomem, IRQ, and other board settings must match the ones listed in the INSTALL.NOTES. Unfortunately, the INSTALL.NOTES are on the disk that will not boot. You can grab them via FTP from many archive sites. This installation file may have many names. Look for something kind of obvious (like 'install.notes' or 'readme' or 'configuration guide') and you should find it. Finally, there have been many reports (particularly with the BusLogic SCSI cards (specifically reported was the BT445C VLB host adapter) where the system seems to boot up, but starts getting 'stray interrupt c' messages. This is usually caused by people having there SCSI card set up on some IRQ other than the one that the kernel expects. The factory default for this card seems to be IRQ 12, but the kernel wants the card at IRQ 11. Setting the card (using the configuration program supplied) changes the setting so that it matches the kernel and the card then works. - Unsupported hardware. There are several SCSI controllers on the market that are not fully supported by 386bsd. The Ultrastore 24F (when not running in ISA emulation mode) is a good example of this. There are also some network cards that are not directly supported in 386bsd. If you get into a real bind, you can post a question to comp.os.386bsd.questions, and one of the many experienced 386bsd gurus that reads that group will probably try to help you. - One or more of the devices in the /dev directory on the intended root partition was either not created correctly or was not created at all. Run the program MAKEDEV in the /dev/ directory to ensure that all of the correct devices are built. 2.4.2 Really strange errors in the various *BSD flavors. 2.4.2.1 I am using the original 386bsd 0.1 with no patches installed and I get flashing multicolored characters and a "ptdi 81061" prompt error? Since 386BSD 0.1 is no longer available, you will have to upgrade to either FreeBSD or NetBSD, which both deal with this problem directly. If you are already USING FreeBSD or NetBSD, you may have a problem that some other folks have identified. If you run into occasional ptdi errors with the new software, you may need to increase NKPDE in /sys/arch/i386/include/pmap.h from 12 to 32 (for NetBSD). Presumably, FreeBSD has a similar setting that can be increased to prevent this problem. 2.4.2.2 Using the new code in NetBSD, I get a "panic: pdti 206067" in pmap_enter(). What should I do? Increase NKPDE in /sys/i386/include/pmap.h. Be sure to keep the changes around as a patch file, since this is one of the files that will get overwritten during a source code update. 2.4.3a I get the error "isr 15 and error: isr 17" on an NE2000 card. 2.4.3b I have some card on IRQ2 and it doesn't work; why? 2.4.3c I am getting lousy performance out of my network card. What are some of the other possibilities? The description of this problem is that one of the cards in your system (most likely the VGA card) is either generating interrupts or is causing the IRQ 2 to be actively disabled. Older VGA card uses IRQ 2 during vertical retrace to prevent sparklies. One solution would be to plan on not using your Ethernet card (or any other card you want on IRQ 2) until you have rebuilt the kernel so that it expects it at an interrupt other than IRQ 2 or 9, re-jumper or reconfigure the card to match the IRQ you have selected, and enable it. From time to time, this problem will manifest itself as a general tendency of the network card to transfer either very sporadically or very slowly. It is precisely the same problem. James Van Artsdalen (james@bigtex.cactus.org) has offered at least one solution: If this is the problem, you can use Scotch tape to cover the IRQ 2 signal on the VGA's ISA connector. There has been some discussion as to whether scotch tape is really appropriate inside a card slot. My answer would be "yes". This is because the alternate solution of cutting the trace on the video board seems, to my mind, to reduce the value of the board. It is possible that, in the future, with a bi-bipartite driver, you would want to catch the retrace interrupt to get rid of "sparklies" or to implement a driver for a very high resolution monitor for X. If this happens, given a choice between alcohol and solder, I vote for alcohol. Either way, you will probably find that your VGA card uses IRQ 2 strictly for compatibility with older cards. With the advent of dual-ported memory for video cards, virtually all of these types of problems have disappeared. 2.4.4 What is the difference between IRQ2 and IRQ9? Are they really the same, or are they really different? On the XT, there was one interrupt controller, an Intel 8259, which handled 8 interrupts numbered IRQ0 through IRQ7. IRQs 2 through 7 were accessible via bus lines IRQ2 through IRQ7. The AT had two interrupt controllers. Due to the design of the 8259, one has to be the master and the rest (up to 8) must be slaves. Each slave controller output its interrupt request to and input on the master controller. In the case of the AT, the master controller handles IRQ0 through IRQ7. The slave handles IRQ8 through IRQ15. The interrupt request from the slave to the master goes through IRQ2, which is termed the cascase input. This means. of course, that the bus line for IRQ2 could no longer be used for external interrupts. Instead, the bus line that WAS IRQ2 in the XT became IRQ9 on the AT. This whole issue is confused further by the fact that some vendors refer to this external interrupt as IRQ2, while others refer to it as IRQ9. In either case, if you are talking about an external interrupt, it means the same thing. BTW, IRQ8 is used for the Real Time Clock, and does not have an external interrupt. Here is a map, in case anyone still needs it: Internal External Function IRQ0 n/a Refresh/Timer IRQ1 n/a Keyboard IRQ2 n/a Cascade Input to Master IRQ3 IRQ3 Free (Com port) IRQ4 IRQ4 Free (Com port) IRQ5 IRQ5 Free IRQ6 IRQ6 Floppy Controller IRQ7 IRQ7 Free (Printer/Sound Card*) IRQ8 n/a Real Time Clock IRQ9 IRQ2 Free (Network card) IRQ10 IRQ10 Free etc. * NOTE: The IRQ7 entry is spooky. If you use the interruptless printer driver (either from 386bsd, NetBSD, or FreeBSD) then you can still have an interrupting device (like a sound card) on interrupt 7. Basically, you can as many devices on each IRQ as you want, but only one of them can be 'actively' interrupting. There are very few drivers for *BSD that support an interruptless mode that it almost doesn't pay to even include this. 2.4.5 Some of my SCSI devices (like a tape drive) don't work; why? That is because the original 386bsd 0.1 SCSI drivers didn't recognize any devices past the first two (ID 0 and ID 1). Also, there was a bug in the distribution floppy regarding the devices at ID 6. The 'dev' files in 386bsd 0.1 for that id need to be remade. Use MAKEDEV to do that. The disks and tapes will be recognized and configured when they are first accessed. A new and improved SCSI driver has been written by Julian Elischer and is available from many sources. It includes support for many new types of SCSI controllers and many devices that are thereby attached. This driver is included in the patchkit. In addition, many of these types of devices are supported in FreeBSD and NetBSD. If one of the devices you are interested in using is not supported in 386BSD, you might try one of these newer systems. Even with the newer systems, you run the risk of having a problem with a SCSI device from time to time. There are some cards (like the new Adaptec 27* series) that software drivers are either not in the works or the documentation is simply unavailable. Another culprit here is that some machines are very touchy about the quality and length of cables, as well as SCSI IDs. There was one report of a older hard drive that took a little longer to spin up than the rest of the drives in the chain. Whenever this drive was put early in the ID string (like 1 or 2) it would be 'not found' but if it was placed near the end (like after the tape drive) it would have spun up and been found. Who says computers are logical? 2.4.6 I try to run 'ps' or 'w' and get ': cannot get namelist' from the TinyBSD kernel. What did I do wrong? Nothing. There is a class of programs that interact directly with the current kernel. These programs include 'ps', 'w', 'uptime', and others. The kernel on the TinyBSD disk is not capable of supporting these programs because the symbol table that these programs use has been stripped out of the kernel to save space. The easiest way to fix this is to get a different kernel (build it yourself). Of course, you can have a fully functional system with these programs, but they are nice to have. 2.4.7 I get a 'Floating point constant out of range' when I try to compile package 'n'. What is broke? This problem was encountered during many package compilations, including compiling gcc-2.3.3 under NetBSD-0.8. NetBSD-0.9, and presumably FreeBSD, contain a repaired printf() function, which corrects this problem. The easiest solution for this (and MANY other) problems is to upgrade. In addition, these systems also include gcc-2.3.3 (or newer) as the default compiler. There is also a circular dependency for protoize.o/unprotoize.o in the Makefile. Add the lines touch protoize.o touch unprotoize.o after the line: touch stamp-proto After this "make bootstrap" will run to completion. gas apparently has bugs too. It should produce +Infinity. I think it is OK internally but it may be trusting the library too much. gcc can easily be changed to avoid printf for output, but input is harder. One of the problems is that various pieces of code rely on the value of DBL_MAX. A kludge to fix it is to change the line below: #define DBL_MAX 1.7976931348623157E+308 One value that works is #define DBL_MAX 1.7976931348623147E+308 ^ was 5 This is a kludge, but it does mostly work. The problem is entirely in printf() (really in cvt()), NOT in atof(). I have inspected the output of atof() bit by bit, and it is well within IEEE specification. The digits `157' are the `best' approximation. The code for printf() generates a representation which is not even in the range of doubles. Below are the details: atof("1.7976931348623157e+308") returns 0x7fefffffffffffff which is the maximum double value and is correct. However, printf() of the previous yields `1.7976931348623168e+308', which isn't even within the floating point range. It is clearly printf() that is broken, and a quick inspection of the code is enough to determine that it uses a pessimal algorithm. atof() has been tested with many other values, and it has never been off by more than is allowed by IEEE 754 (though it is not optimal). 2.4.8 I want to use the Adaptec 1542C SCSI controller. What are the problems/tricks you need to know to get it working? The first thing to check when trying to use the 1542C is the setting of 'Enable Disconnection' under the 'SCSI Device Configuration' menu. It should be set to YES for all devices, as the manual warns you. Matthias Urlichs (urlichs@smurf.ira.uka.de) has provided this description of the types of things that can cause problems for the controller and devices attached to it. The problem is that the Adaptec 1542C has (a) rather powerful line drivers, and (b) is sensitive to transient signals which can be induced by them via either a bad cable or a bad external terminator. A bad cable is almost any cable which doesn't meet SCSI-2 specs. A bad external terminator is one which doesn't adequately buffer its resistor network. So... - Remove the internal terminator from the last drive in your chain. Replace with an active SCSI-2 external terminator. Side improvement: active terminators consume a bit less power. - Check cables. Specifically, some cables carry less than the nominal 50 signal wires. Manufacturers sometimes think they can get away with this because almost all odd-numbered pins are GROUND anyway. So, if pins 1 and 3 or 3 and 5 are connected, you're likely to have a marginal cable. - Make sure that the terminator power is supplied by all devices and that the power pin is actually connected on your cable. The problem here is that some idiot device manufacturers save on 2-cent diodes, which means that the thing will pull terminator power to ground if it's not plugged in. (Two of these on one bus are even worse.) - Consider creating your own cabling. Take a 50-wire flat ribbon and press the appropriate connectors onto it in precisely the right places. (Move your devices as to minimize cable length.) Be aware that if a device has two external connectors, you must take the SCSI bus in at one connector and out at the other -- don't leave the other connector dangling; this isn't within the SCSI specs because the cable usually is too long. - Better but more expensive: use 2-twisted cable. (I.e., wires 1&2 are twisted around each other, wire 3&4, ...) This will improve reliability because the wires are twisted at different rates. These cables have short non-twisted segments every 50 cm (1.5') so that you can press on your connectors instead of heating up that soldering iron. - While you're rebuilding your system anyway...: If you have more than one drive per power supply, check if these drives have adequate condensors to buffer their power. I have two 80-MB Seagates which refused to work more than a few hours without glitches -- then I soldered two 10-uF Tantals onto their power connector and they've been flawless ever since. The terminator power is pin 26. Be aware that SCSI counts pins as they appear on a ribbon cable, not as they're sometimes numbered on the connectors. Pin 25 is supposed to be disconnected. 2.4.9 My system boots OK off the floppy, but once I try to boot from the hard drive, the message "changing root device to sd0a" appears and the system hangs. What is the most likely thing that I have done wrong? A common cause for this is when all of the right devices aren't created on the root partition. Since you say you can boot off of a floppy, do so and check to make sure everything in /dev exists. You might consider running "MAKEDEV all" to be sure everything is created. (Ed.Note: I find that whenever I create a new kernel, it isn't a 'bad' idea to run a precautionary MAKEDEV to make sure that the devices are created correctly. Since I only build a new kernal about once a month, it isn't a very costly insurance policy.) Also, there are known problems with IRQ configurations and the PCI bus. The system hanging right after the changing root device message usually indicates a misconfigured IRQ for the controller. The initial probes by most (all?) drivers are done in polled mode, only when mounting the disk for real does the kernel begin to do interrupt driven I/O and DMA. Is this system a PCI system? Is the SCSI controller a PCI board? If so, make sure the IRQ configured in the PCI bios matches the IRQ configured for the card. Also, with PCI, forgetting to enable the slot for "master" in the BIOS setup or motherboard jumpers or putting a bus mastering card in a slave only slot will give simlar symptoms. The system may not have problems under DOS because some SCSI BIOS or device drivers don't actually use the DMA or bus mastering features of the card... {sigh}, they run in PIO mode under DOS. 2.5 Other common problems that are attributed to the installation process but are caused other places. 2.5.1 I want to use more than 16 Megabytes of memory. Will any of the BSD based systems support it? As people started using VESA and EISA busses, however, attempts were made to push the envelope even further. Memory limits have expanded seemingly without limit. Since the EISA bus (for example) has 32 address lines, it is capable of supporting more memory than the ISA bus with its 24 address lines. While the 386 and 486 are capable of addresses up to 4 Gigabytes (considerably more than the ISA bus allows) the ISA bus is still the primary limitation. When using NetBSD and FreeBSD, there is no SOFTWARE limitation on more than 16Meg of memory. There are still hardware limitations. The limit is caused by DMA controllers which copy memory images around the system. Many cards which people use in VESA and EISA machines either emulate ISA cards (in order to work with *BSD) or are really ISA cards. There are reports of people having trouble with more than 64Meg of memory, but anyone rich enough to have that kind of memory should be paying for his OS. :-) Recently some folks have been reporting that they are getting warnings like these: hostname /netbsd: sd0: not queued hostname /netbsd: aha0: DMA beyond end of ISA hostname /netbsd: sd0: not queuedaha0: DMA beyond end of ISA This error is caused when the buffer for I/O is beyond the address range that the ISA bus can reach. With 16M you should be okay, however, some motherboards do reclaim all or part of the "lost" 384K (from the I/O "hole" from A0000-FFFFF) and put it just beyond the end of the rest of the memory, so you actually get 16M plus a little bit. One fix is bounce buffers. FreeBSD has implemented this, and NetBSD will as soon as they come up with a method that is compatible with all of the machines that NetBSD supports. Another fix is to either turn off the reclaiming of the extra memory (most motherboards that do this allow you to disable it), hack machdep.c to force the physical memory used to 16M, or use a 32 bit bus (EISA, VLB, or PCI) controller. Jordan K Hubbard (jkh@thrush.lotus.com) has provided this explanation of the distinction: Just so long as you're using a DMA-using disk controller in EISA mode, rather than ISA mode, you can use more than 16 Meg of memory. For those who may find such a distinction confusing, let me explain: You can use an ISA controller (such as an Adaptec 1542) in an EISA machine, but as it will still think it's in an ISA box and refuse to use the extra address lines, this is no different than having an ISA machine as far as >16MB is concerned. You can use an EISA controller in "ISA mode", meaning it uses the older protocols for compatability reasons (examples being Adaptec 1742 in "standard" mode, DTC 3290 in "Adaptec" mode, etc.) and again, does not use the extra address lines. The only way to get full EISA, 32MB-of-memory-and-everything, mode is to use an EISA controller in full EISA mode (for Adaptec 1742, this is "enhanced" mode, for DTC 3290 it's "DTC" mode, the Ultrastor 24F in EISA (rather than IDE emulation) mode, etc.). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - In addition, several other types of ISA controllers which do NOT use DMA will not cause problems. IDE, ESDI, and RLL controllers are examples of this type of card. The discussion above also applies to VESA and VLB cards. So, the bottom line is that you are limited to the amount of memory that your DMA equipped devices can access. Once again, the weakest link is the strength of your machine. 2.5.2 I tried to use a device in my computer that should be there. When I did, I got a "Device not configured error." What do I do now? Garrett A. Wollman (wollman@emba.uvm.edu) provides us with this brief discussion in answer to a specific question. It wears well as a generic answer as well. When any program tells you ``Device not configured'', it's trying to tell you something very important about what you tried to do: namely, that the device you tried to access is not configured into the running operating system. This is the error message corresponding to ENXIO. There are three major causes for this error: 1) The kind of device you requested was not configured into the system. This is R.W.'s problem; the generic kernels are not distributed with the Berkeley Packet Filter enabled by default. To correct this, you must add the appropriate device or pseudo-device to your kernel configuration file and recompile. (In this particular case, `pseudo-device bpfilter number-of-network-interfaces'.) 2) The kind of device you requested was configured into the system, but either the device you requested would use more than the maximum you configured into the system, or if a physical device, was not found during autoconfiguration. To solve this, either change your configuration file, or change the I/O settings on the device to match what the file says. 3) The major or minor device number specified by the device's entry(ies) in /dev is incorrect. To solve this, re-MAKEDEV the device (read the MAKEDEV script for more details). Hopefully whatever change caused the kernel's internal device tables to get changed also updated your MAKEDEV script; otherwise, you will have to grovel through the kernel to see what is going on. 4) A special case: Although the 'c' drive on most BSD disks is the entire disk, in many NetBSD and FreeBSD systems, the entire drive is the 'd' disk. This special case is wired into many programs, and is recognized by the kernel. From time to time, folks will try and access the 'c' partition on their harddrive, only to be rebuffed with a 'device not configured' error. Mostly, the 'c' partition is unavailable simply because the partition type is 'unused' even though it is allocated and has space set aside for it. -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!Germany.EU.net!main.Germany.EU.net!EU.net!newsfeed.internetmci.com!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 4 of 10) Supersedes: <386bsd-faq-4-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:03 -0500 Organization: Dave's House in Omaha Lines: 1898 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-4-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:129 comp.unix.bsd.freebsd.announce:181 comp.answers:15808 news.answers:63154 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part4 Section 3. (Kernel Building and Maintenance) 3.0 System Internals One of the interesting aspects of *BSD is the fact that it comes with the complete source. This allows you to make changes to the system, recompile, and test out your new ideas. This section of the FAQ describes many of the different aspects of this endeavor and common problems and pitfalls that are encountered. Kevin Lahey provided the substantial portion of this section. You can contact him via E-Mail at (kml@rokkaku.atl.ga.us) or contact Dave Burgess (burgess@cynjut.neonramp.com). 3.1 Kernel 3.1.1 How do I build a kernel? The kernel can be compiled in a variety of ways to support different devices and configurations. Compilation is controlled by a config file that specifies the characteristics of the kernel. A set of different config files is located in /sys/i386/conf or /sys/arch/i386/conf. The configuration file names are in upper case. To build a particular kernel (in this example, we use the GENERICISA configuration file in NetBSD or FreeBSD): % cd /sys/i386/conf % config GENERICISA % cd /sys/compile/GENERICISA % make depend % make In NetBSD, since there are multiple architectures supported, there is an architecture line in the middle of the path to these files. See the build.kernel script in section 3.8 for more information. Remember, when structures in the kernel change, there are some programs (ps, top, etc.) that will cease to work correctly. You will need to recompile these programs as well as the new kernel. You need to do the following to make sure that your programs get updated as well as the kernel: cd /usr/src/include make install cd /usr/src/lib/libkvm make clean && make && make install cd /usr/src/bin/ps make clean && make && make install cd /usr/src/... 3.1.1.1 Why does the kernel code for NetBSD still use the old K&R style declarations when the ANSI declarations are SO much better? 3.1.1.2 How do I port NetBSD to another platform? We still use the old style K&R definitions easier, because bringing up a new port on a foreign machine with a brain-damaged compiler can be impossible, or at least very difficult, if you don't do it this way. Remember, NetBSD is multi-platform, and tries to make it as easy as possible to port. Which means building pieces of the system with someone else's compiler. 3.1.2 I want to do one of the following things: * add a device not in the distributed kernel (third com port, additional disk or tape, line printer driver, etc). * use a patch from the net or the patchkit to fix a kernel bug. * add another swap device. * recompile the kernel to remove extraneous devices so that it takes up less space. * configure more pseudo-terminals to allow for more xterms or network logins. You're going to have to recompile the kernel after you modify the config file. See section 3.2 below for more information about the config file in general. 3.1.3 I don't have the source distribution -- how can I rebuild the kernel? There are reference sites available, as well as the 'good net-neighbor' policy, whereby you could make arrangements with a net neighbor to use a large local machine as a Network File System (NFS), or allow you to compile a new kernel on their machine and transfer it to yours. 3.1.4 Now that I have a kernel, how do I install it? Your kernel is called /kernel or /netbsd. Copy the new kernel from /sys/compile/GENERICISA/(whatever) to /, assuming that it is in that directory. This is relatively straightforward; there are a couple of things to remember, though. First, if you really screw up the new kernel, you want to have something to fall back on, so be sure to save /kernel to /kernel.old before copying in a new kernel. Second, if you just copy the new kernel over the currently running kernel, funny things can happen. Be sure to move aside the currently running kernel before copying over the new one. There are folks that have reported that overwriting their current kernel has never caused them any real problems. On the other hand, if the old kernel was working and the new one doesn't, and you have made changes that require that old kernel, it should be available to the system, and saving it to /kernel.alt or /kernel.old are reasonable things to do. If you are really paranoid, you can mount a new fixit floppy and replace its kernel with the one you just built, and then boot from the fixit floppy to make sure everything will work. This is a pretty good idea if you are making radical changes or if you are unsure about your changes. 3.1.5 After installing the patchkit and recompiling the kernel with the option "WD8013", I am no longer able to reboot the machine. A cold boot (power on) runs fine, but after a reboot no boot drive is found by the BIOS. Besides having a 16-bit WD/SMC Ethernet card installed the machines try to boot using either a Adaptec 1742 or 1542 SCSI board to boot from. This answer was provided by Hellmuth Michaelis (hm@hcshh.hcs.de) and by Rodney Grimes (rgrimes@acacia). Remove "option WD8013" from the config files and recompile and reinstall the kernel. The reason that option WD8013 often causes this reboot problem is this: There is a requirement that all memory within a 128k bank in the 0xA0000 to 0xFFFFF region be either 16-bit or 8-bit. On a cold boot, the WD8013 boards are reset to 8-bit mode, the POST (Power On Self Test) passes without error. NetBSD comes up, the if_we.c driver places the WD8013 in 16-bit mode. Now on a soft boot when the BIOS runs some quick POST tests it finds a problem in the 0xA000 to 0xF000 region. You probably get a "beep-beep" when this happens. It means you have a memory size conflict. The machine has been mis-configured. This is a little known fact about 16-bit vs 8-bit option cards. It has caused more than one person to go crazy tracking down what they swear is a bug in the program. It is not, it is a flaw in the design of the ISA bus. The signal MEMCS16- must be returned the same for every 128k block of memory: A0000-BFFFF Must all be either 8-bit or 16-bit. B0000-CFFFF Must all be either 8-bit or 16-bit. D0000-FFFFF Must all be either 8-bit or 16-bit. In your particular configuration (WD8013 @ cc000) I suspect that you have another board in the B0000-CFFFFF region that is 8-bit, i.e. your Adaptec has an 8-bit BIOS on it! Try moving the board to the 0xD0000 region and see if it works there, you may still have a problem as many modern system BIOSes are now 8-bit. If your system BIOS is 8-bit, try shadowing the system BIOS region at 0xF0000 to 0xFFFFF, this effectively turns it into a 16-bit BIOS. Do not attempt to shadow the WD8013, it will cause you many headaches. In fact, it sometimes helps to turn on BIOS shadowing. Some BIOSes allow to copy ROM contents to unused RAM pages for selected 16KB-regions. While it is generally a good idea to turn BIOS shadowing off, I have also observed that sometimes it helps to turn shadowing of true ROM regions on. 3.1.6 My system is complaining about stray interrupt 7. Is my machine going to explode or anything? No. They are caused by lots of things. They are, as far as anyone that should be expected to know about this stuff, harmless. There are ramifications on them being there, but for MOST users they do not pose a real threat to your operations. For those of you that are doing REALLY interrupt intensive stuff, you may want to grab a technical reference and figure out why the 8259 is not getting reset correctly. In spite of the number of times this has come up (and people have even referenced this section) there are still at least two questions on the net about this. A memorable one was a guy who was just vehement that the stray int 7 was what was keeping his system from booting. In fact, he went so far as to say that this document was practically worthless because I didn't tell him how to fix it. Of course, once he configured his hard drive controller so that it was on the right interrupt, his booting problem went away. I have said it before and I will say it again. For MOST users they do not pose a real threat to your operations. I have heard of three people (out of at least 2000) that have actually have problems so bad that they couldn't proceed. They bought new computers, and the problem went away. These stray interrupts are caused by something in the PC. I have yet to see a convincing explanation of precisely what, but they are definitely caused by something. There are four ways to deal with this problem. 1) Ignore them. They are spurious and do not effect the operation of your computer. 2) Implement the lpt driver. This way, the driver traps (the lpt driver expects IRQ 7) and then quietly discards them. That is why when folks implement the lpt driver the 'problem' goes away. The computer is taught how to ignore them. 3) Do what the original 386bsd code did. Comment out the diagnostic and associated code that tries to deal with them so you don't see the error message. 4) Buy a new computer that doesn't cause this problem. It is a known hardware problem with the 8259 being reset incorrectly in hardware. Kalevi Suominen (jks@geom.helsinki.fi) offers this technical explanation of the 'stray interrupt 7' phenomenom. In the section of the Intel Peripheral Handbook dealing with the 8259A there is a description of the 6-step interrupt sequence for an 80x86 system (and 7-step for an MCS-80/85), and then the following paragraph: "If no interrupt request is present at step 4 of either sequence (i.e., the request was too short in duration) the 8259A will issue an interrupt level 7. Both the vectoring bytes and the CAS lines will look like an interrupt level 7 was requested." This explains how some transient disturbances or improperly functioning adapter cards could trigger a stray interrupt 7 in a system operating in the *level* interrupt mode (such as a PS/2 with MCA): An interrupt request will disappear as soon as the interrupt line goes inactive. That such interrupts may also occur in a system operating in the *edge* triggered mode (such as an ordinary PC/AT with ISA) is a little harder to see. Yet it is possible - even without malfunctioning hardware - because masking an interrupt request will hide its presence from the 8259A as well: 1. The interrupt flag (IF) of the 80x86 is reset either directly (e.g., by a "cli" instruction) or because an interrupt handler is entered. In the latter case the corresponding in-service (IS) bit of the 8259A is set (effectively blocking interrupts of lower priority). 2. The 8259A receives an unmasked interrupt request (IRQn), and, in case an interrupt is being served and has higher priority than IRQn, the IS bit of the 8259A is reset by an end of interrupt (EOI) command. (These steps may occur in either order.) If IRQn has higher priority (e.g. IRQ0), no EOI is necessary. 3. The 8259A activates the interrupt (INT) line to the 80x86 (which will ignore it - for the moment). 4. The interrupt mask (IM) bit of the 8259A for IRQn is set. (A little late, though. The sequence has already started.) 5. The interrupt flag (IF) of the 80x86 is set (either directly, or as a consequence of e.g. an "iret" instruction). 6. The 80x86 will now acknowledge the INT request by activating the INTA line of the 8259A. 7. The 8259A will not see the masked IRQn and will continue by issuing a spurious interrupt of level 7 instead. The original interrupt request (IRQn) will not be lost, however. It is preserved by the associated edge sense latch of the 8259A, and will be acted on after the IM bit has been reset again. The net result is that a single interrupt request will be delivered *twice* to the 80x86: first as a stray interrupt 7 and later as the proper interrupt. In particular, it is perfectly safe to ignore the stray interrupt (other than sending an EOI). It is just the ghost of an aborted interrupt sequence: the system was not prepared for it yet. 3.1.7 I keep getting "wd0c: extra interrupt". What does it mean? It means that the drive was already processing a command (active) when it recieved an interrupt from the system telling it to see if it had anything to do. This is mostly harmless but could indicate that the drive/controller is having problems if the message appears often. 3.1.8 I keep getting silo overflow messages, but the system doesn't seem to mind. Is there a problem? Not exactly. This simply means that the First in first out buffer is getting too full. I markedly reduced the incidence of silo overflows on my system by editing dev/isa/com.c to change the FIFO threshold from 8 to 4 characters. This way, the buffer gets more attention and reduces the chance of overflowing the buffer. 3.1.9 I found a bug in the kernel. How do I report it? Both NetBSD and FreeBSD include a facility called 'bugfiler'. While the instructions are included in both system, there is still some apparent confusion about when to use (and when to NOT use) bugfiler. Jordan K. Hubbard (jkh@whisker.lotus.ie) provides us with this short article for FreeBSD. To send bug reports, you want to use the sendbug(1) command. The entire package for sending and filing these bugs is known as "the bugfiler", which is where the confusion stepped in, but sendbug is definately the command you want to use. Second, it doesn't take a "net connection" to use sendbug, since all it does is package up your "bug report form" and mail it to us; no direct internet connectivity is required, just mail. So if you can send internet mail you can use sendbug, or you can also send mail to the `FreeBSD-bugs@freefall.cdrom.com' address (do NOT send it to FreeBSD.cdrom.com since it will BOUNCE, this is not the place to send bugs to, just to ftp stuff from!). NetBSD has a similar facility, but has a different program and host for bug reports. The program for NetBSD is called send-pr and is slightly different in several respects. It is part of the GNATS system, which the NetBSD core developers started using in February of 1994. It is recommended that NetBSD users see the man page on send-pr before filing bug reports. For getting information from GNATS, see the file doc/BUGS. There is a email interface to the NetBSD PR database. To query the database send mail to "query-pr@gnats.netbsd.org". The mail server will send a bug database listing back to the user. There are several flags that are useful to send to the mail server. The flags are entered in the "Subject" line: --summary Display an one-line entry for each bug --full Display the full entry for each bug --help Display a help string containing the rest of the flags. PR The Problem Report number of a particular bug For example, to send a query about all the bugs: $ Mail -s "--summary" query-pr@gnats.netbsd.org < /dev/null If you want to know more about a particular bug, let's say bug 40: $ Mail -s "--full 40" query-pr@gnats.netbsd.org < /dev/null John Conklin is trying to get a page set up at the NetBSD WWW site (www.netbsd.org) that will allow people to interactively query the bug database. It should be operational soon. 3.1.10 Can someone please give a reasonably clear set of instructions as to how to get a "current" version of NetBSD running? First, you will need to get the new files into your source directory. You can either use the most recently released set of sources (for an upgrade) or you can start following -current. Either way, you can use the instructions to build the world (at the end of this section of the FAQ). And Theo Deraadt provides this guidance when you get an error like "init_main.o: Undefined symbol _pdevinit referenced from text segment." You need to (1) install new config (2) make clean (3) re-config your kernel then this goes away 3.2 What exactly is this config file, anyway? What are all of these cryptic notations? The config file is the list of all of the optional (and settings for the mandatory) parts of the kernel. If the system is made up of static object files which don't change, then all you should ever need to do is modify the config file, reconfigure the kernel objects, and relink. Since both NetBSD and FreeBSD are distributed with source, these files are recompiled and a kernel is constructed. Some of these have been deprecated, and may not be in use for a particular version of the system (i.e. ISO9660 and CD9660 are the same, CD9660 being the newer version). This is a list of the compile options and a very brief explanation of what they are used for: ACCOUNTING # process accounting ADOSFS # AmigaDOS file system CCITT # CCITT X.25 CCITT,LLC,HDLC # CCITT protocol suite CD9660 # ISO 9660 (CDROM) filesystem w/ RockRidge COMDEF_SPEED=x # default baud on the scn chips COMPAT_09 # compatibility with NetBSD 0.9 COMPAT_10 # compatability with NetBSD 1.0 COMPAT_43 # 4.3 BSD compatible system calls COMPAT_44 # compatibility with 4.4BSD binaries COMPAT_HPUX # HP-UX Binary compatibility (see note) COMPAT_IBCS2 # Intel Binary Compatibility (see note) COMPAT_LINUX # Linux Binary Compatibility (see note) COMPAT_FREEBSD # FreeBSD Binary Compatibility (see note) COMPAT_NOLABEL # default partitioning for unlabeled disks COMPAT_NOMID # allow nonvalid machine id executables # (specifically NetBSD, 386BSD, and BSDI) COMPAT_OHPUX # Needed at least through HP-UX 7.05 (see note) COMPAT_SUNOS # Support to run Sun (m68k) executables COMPAT_SVR4 # System V R4 compatibility (see note) COMPAT_ULTRIX # compatibility with ULTRIX binaries (see note) (NOTE: Several of these options include the ability to run both statically and dynamically linked binaries. Obviously, you can't run M680*0 binaries on am i386, but the OS level support is there. See Section 3.n for more information on dynamically linked executables and the emulation modes.) CONFIG_NEW # Use config.new stuff DDB # Kernel debugger DEBUG # extra kernel debugging support DEC_2000_300 # Jensen: 2000/300 DEC_2100_A50 # Avanti: AlphaStation 400 4/233 DEC_3000_300 # Pelican family: 3000/300* DEC_3000_500 # 3000/[4-9]00 DEVPAGER # device pager (mapped devices) DEV_RTC # /dev/rtc access to hardware clock DIAGNOSTIC # Add additional error checking code DIRECTED_BROADCAST # Broadcast across subnets DST=x # daylight savings rules (for param.c) DUMMY_NOPS # Sometimes results in a faster machines EON # ISO CLNL over IP ETHER # Ethernet, probably needed FASTLINKS # fast symbolic links in FFS FDESC # user file descriptor filesystem FFS # Berkeley fast file system FIFO # FIFO operations on vnodes FPCOPROC # Support for MC68881/MC68882 FPSP # MC68040 floating point support GATEWAY # IP packet forwarding GDB # support for normal gdb GENERIC # Mini-root boot support GRF_A2024 # Support for the A2024 GRF_AGA # AGA Chip Set GRF_CL5426 # Cirrus board support (not yet) GRF_ECS # Enhanced Chip Set GRF_NTSC # NTSC GRF_PAL # PAL I386_CPU # CPU classes; at least one is REQUIRED I486_CPU # cpu type INET # IP prototol stack support INSECURE # Xfree86 requirement ISO # ISO Networking support ISOFS # ISO-9660 w/ RockRidge KERNFS # kernel data-structure filesystem KFONT_8X11 # 8x11 font KFONT_8x8 # Use 8x8 font instead of 8x11 KGDB # support for kernel gdb KGDBDEV=x # device for kernel gdb KGDBRATE=x # kernel gdb port rate (default 9600) KTRACE # Add kernel tracing system call LFS # Log-based filesystem (still experimental) LKM # loadable kernel modules LOFS # Loop-back filesystem M68020 # support for 020/851 M68030 # support for 030 M68040 # support for 040 MACHINE_NONCONTIG # temporary kluge to allow for # non-contguous memory (on PC) MAPPEDCOPY # use page mapping for large copyin/copyout MATH_EMULATE # DX maths emulation MC68030 # Includes the 020+851 MFS # Memory based filesystem MROUTING # Multicast routing support MSDOSFS # MS-DOS filesystem MULTICAST # Multicast support NFS # Sun NFS-compatible filesystem NFSCLIENT # Network File System client NFSSERVER # Network File System server NFS_BOOT_RWSIZE=1024 # Size of NFS boot NKMEMCLUSTERS=x # Size of kernel malloc area NS # Xerox XNS NSIP # XNS over IP NULLFS # Loopback filesystem PANICBUTTON # Two fast s on console dump kernel PANICWAIT # Require keystroke to dump/reboot PCVT_NETBSD # Pseudo Console VT220 support PCVT_NOFASTSCROLL # Disable fast scrolling on pcvt's PORTAL # Portal filesystem PROCFS # /proc filesystem QUOTA # file system quotas RAMD_ADR=x # Adr of the boot strap ram disk RAMD_SIZE=x # Size of the boot strap ram disk RCONSOLE # fast rasterop console RETINACONSOLE # enable code to allow retina to be console RETINA_SPEED_HACK # enable fast scroll code, may not work SBPRO # Sound Blaster Pro support SCSI # Support for SCSI disks SCSIDEBUG # Add SCSI debugging statements SHMMAXPGS=x # 1024 pages is the default SWAPPAGER # Pager for swap device SYSCALL_DEBUG # debug all syscalls. SYSVMSG # System V messages SYSVSEM # System V like semaphores SYSVSHM # System V shared memory TCP_COMPAT_42 # compatibility with 4.2BSD TCP/IP TIMEZONE=x # minutes west of GMT (for param.c) TPIP # ARGO TP networking support UCONSOLE # Anyone can do TIOCCONS UMAPFS # uid/gid remapping filesystem UNION # Union filesystem USER_LDT # user-settable LDT; used by WINE VNODEPAGER # Pager for vnodes XSERVER # Xserver support 3.2.1 Okay, fine. Why shouldn't I just add every device I can find to the kernel, so I'll never have to recompile this again? Because it takes up space. The kernel is wired into memory, so every byte it uses comes out of the pool of memory for everything else. It can't page out sections that aren't in use. If your kernel is larger than 640K, then it can't be loaded. You'll need to use Julian Elischer's bootblocks to put it in high memory, which seem to be fairly complex. Installing them (once they are compiled) is as easy as using disklabel. Newer versions of the *BSD kith provide the capability to build a kernel that is larger than 640K. Complete instructions are provided in the appropriate systems. 3.2.2 What should I remove from the kernel? What do you need? If you only have an SCSI controller, you don't need the wd0 device; if you have another kind of disk controller, you don't need sd0. Unless you actually HAVE more than one Ethernet controller, you should comment out all but one of them. If you don't have an ethernet controller, you don't need any of the controllers or NFS compiled in. Without a CD-ROM, ISOFS is kind of pointless. Just look at what you have and think about what you really need. 3.2.3 I can't get enough remote login sessions or xterm sessions. I also can only get four sessions working at a time. What can I do? Increase the count of pseudo-terminals -- pseudo-device pty 12 # or whatever Every pseudo terminal should have a /dev/pty* entry. If you have 12 pseudo terminals, you should also have at least 12 pty devices in the /dev directory. The MAKEDEV script in /dev will create as many pseudo- terminals as you tell it to. 3.2.4 How do I get ddb, the kernel debugger, compiled into the kernel and running? If you are using older versions of the 386BSD family, you will need to add a line in your config file that looks like this: device-pseudo ddb If you are using a more recent version (the division is pretty unclear about when the switch was made) and do not have any device-pseudo entries, you will need to add the line: options DDB to your config file. Build the kernel, then run dbsym on it: % dbsym ./kernel Install it and go for it. Ctl-Alt-Esc drops you into the debugger. Note: DDB as shipped originally is a memory hog, and it is very difficult to get a kernel small enough with enough fun things in it to debug in 640K On the NetBSD-sparc system, the L1-A is used by the the DDB routines to drop you into the debugger. 3.2.5 I'm getting all kinds of errors when I try to build a new version of GCC. How can I upgrade GCC to the most current version? Yes, this will happen on most architectures on the first compile of src/gnu/usr.bin/gcc/libgcc. As was stated in the mailing list before, when you get to this error: 1) run a 'make' in the gcc directory. It will error out (most likely) on libgcc. 1) Do a 'make install' at this point to install at least gcc, cpp, and cc1. 2) go back and compile in src/gnu/usr.bin/gcc/ WITHOUT doing a "make clean" 3) install everything in src/gnu/usr.bin/gcc 3.2.6 Can I patch the current running OS image? In general, I think, the answer is no. The prevailing philosophy seems to be that one should use sysctl for such things, but that requires that one has already compiled in the ability to change the specific variable in question. (I discovered this when I wanted to patch tickadj at runtime; I added it to kernfs, and when I offered the patches (which are quite small) I was told sysctl was the `correct' way. What's incorrect about /kern was never quite explained; the closest anyone came was to invoke internationalization concerns. Of course, using /kern also requires having compiled in support for tweaking the variable you want to change.) Besides, unless you've patched securelevel, I don't think there is any good way to twiddle variables in the running kernel. /dev/{,k}mem are, I believe, read-only once init sets securelevel to 1. Der Mouse (mouse@collatz.mcrcim.mcgill.edu) If you need to know more about the sysctl command, try "sysctl -a | more" to get a list of the parameters that can be modified while the system is running. 3.2.6 Can I have more than one config file? Should I rename it to something else? Any other hints? You can create as many (or as few) config files as you desire. The system, once the patchkit is applied, will have between 10 and 15, each of which implements certain functions or features. In addition, the normal place for the patchkit to make changes to the config files is in the GENERICISA file. Since this file should remain unchanged and available, it is always a good idea to copy this file to a meaningful name and modify that file. In other words, change every reference in 3.1.1 from GENERICISA to HAL (or whatever you call your system). One final note. Every /sys/compile directory takes up 800K or so; you might want to watch to see how big these all get. 3.2.7 What is the meaning of the trap codes I get in panic messages? Sometimes this message appears in the form "trap type nn". That message means that the system received an unexpected (and unwanted) trap that probably indicates some form of kernel bug. These traps, are usually received from the kernel, in which case the trap.h definitions should be used. The number (which appears in place of "nn" above) is *NOT* the i386 or i386 trap type, it is a BSD-defined trap type number. The definitions of the various trap types can be found in /usr/include/machine/trap.h. two of the more common ones are: 9 T_PROTFLT protection fault (The kernel tried executing code which was not noted as "executable". This happens if the kernel jumps to a bogus location.) 12 T_PAGEFLT page fault (The kernel tried to access a bogus area of memory. This can happen if an invalid pointer is dereferenced.) This is a list of i386 trap codes (just to confuse the issue). Trap 0 Divide Error The DIV or IDIV instruction is executed with a zero denominator or the quotient is too large for the destination operand. Trap 1 Debug Exceptions Used in conjunction with DR6 and DR7. The following flags need to be tested to determine what caused the trap: BS=1 Single-step trap B0=1 AND (GE0=1 or LE0=1) Breakpoint, DR0, LEN0, R/W0 B1=1 AND (GE1=1 or LE1=1) Breakpoint, DR1, LEN1, R/W1 B2=1 AND (GE2=1 or LE2=1) Breakpoint, DR2, LEN2, R/W2 B3=1 AND (GE3=1 or LE3=1) Breakpoint, DR3, LEN3, R/W3 BD=1 Debug registers not available, in use by ICE-386 BT=1 Task Switch Trap 2 NMI Interrupt On PC/AT systems, the NMI input to the CPU is usually connected to the main memory parity circuit. By the time the error signal is generated, the data may have already been used in an instruction, so it isn't possible to reliably recover. And some not-so-common causes (from various sources): - PS50+ : I/O channel check, system watch-dog timer time-out interrupt, DMA timer time-out interrupt - parity errors on any 8-bit or 16-bit board pulling the IOCHCK* line low - first generation of auto-switching EGA cards used NMI to trap port access for CGA emulation (e.g., ATI's EGA Wonder) - Zeos Notebook low battery (perhaps other battery-based computers) Trap 3 Breakpoint The result of executing an INT 3 instruction. MS-DOS and Windows and some other non-386 systems use this for debugging. Code specific to the i386 and later processors should use the debugging features tied to Trap 1. Trap 4 INT0 Detected Overflow Occurs if an INT0 instruction is executed and the overflow flag (OF) is currently set. Trap 5 BOUND Range Exceeded Occurs if the BOUND instruction is executed and the array index points beyond the area of memory containing the array being tested. Trap 6 Invalid Opcode The value read at CS:IP is not a valid opcode. Trap 7 Coprocessor Not Available This occurs if the processor fetches an instruction that is for the coprocessor and no coprocessor is present. Trap 8 Double Exception (Fault) An exception occurred while trying to execute the handler for a prior exception. Example, an application causes a General Protection Fault (13) and the area of memory where the GPF handler should be is flagged not-present (paged-out?). The double-fault handler is invoked in these conditions. If a fault occurs u while trying to run the double-fault handler, a triple-fault occurs and the CPU resets. The rules for deciding if a double-fault should occur or if the two faults can be handled serially are discussed in more detail in the Intel song book. Trap 9 Coprocessor Segment Overrun A page or segment violation occurred while transferring the middle part of a coprocessor operand to the NPX. Trap 10 Invalid Task State Segment During a task switch, the new TSS was invalid. Here is a table of conditions that Invalidate the TSS: TSS id + EXT The limit in the TSS descriptor is < 103 LTD id + EXT Invalid LDT selector or LDT not present SS id + EXT Stack segment selector is outside table limit SS id + EXT Stack segment is not a writable segment SS id + EXT Stack segment DPL does not match new CPL SS id + EXT Stack segment selector RPL <> CPL CS id + EXT Code segment is outside table limit CS id + EXT Code segment selector does not refer to code segment CS id + EXT DPL of non-conforming code segment <> new CPL CS id + EXT CPL of conforming code segment greater than the new CPL DS/ES/FS/GS id + EXT DS, ES, FS or GS segment selector is outside table limits DS/ES/FS/FS id + EXT DS, ES, FS, or GS is not readable segment Trap 11 Segment Not Present Occurs when the "present" bit of a descriptor is zero. This can occur while loading any of these segment registers CS, DS, ES, FS, or GS. Loading SS causes a Stack fault. Also occurs when attempting to use a gate descriptor that is marked "not present", and if attempting to load the LDT with an LLDT instruction. Note that loading the LDT during a task switch causes an "invalid TSS" trap. Trap 12 Stack Fault A limit violation relating to an address referenced off the SS register. Includes POP, PUSH, ENTER, and LEAVE opcodes, as well as references such as MOV AX,[BP+8] (which has an implied SS:). Also causes by loading SS with a descriptor that is marked "not present". Trap 13 General Protection Fault (GPF) America's Favorite: in the MS-Windows world, it is known as the UAE error. The instruction tried to access data out of the bounds designated by the descriptors. The access that failed can be a read, write or instruction fetch. There are 15 classifications of GPFs: 1. Exceeding segment limit when using CS, DE, ES, FS or GS. 2. Exceeding segment limit when referencing a descriptor table. 3. Transferring control to a segment that is not executable. 4. Writing into a read-only data segment or into a code segment. 5. Reading from an execute-only segment. 6. Loading the SS register with a read-only descriptor (unless the selector comes from the TSS during a task switch, in which case a TSS exception occurs.) 7. Loading SS, DS, ES, FS or GS with the descriptor of a system segment. 8. Loading, DS, ES, FS or GS with the descriptor of an executable segment that is not also readable. 9. Loading SS with the descriptor of an executable segment. 10. Accessing memory via, DS, ES, FS or GS when the segment register contains a null selector. 11. Switching to a busy task. 12. Violating privilege rules. 13. Loading CR0 with a PG=1 and PE=0. 14. Interrupt or exception via trap or interrupt gate from V86 mode to privilege level other than zero. 15. Exceeding the instruction limit of 15 bytes (this can only occur if redundant prefixes are placed before an instruction). To determine which condition caused the trap, you need the instruction, the contents of all associated registers, particularly the segment registers involved, then the various LDT, GDT and page control tables. Lots of common coding errors cause the GPFs. Even a stack imbalance will usually show up as a GPF. Even the following code segment will cause a GPF: MOV AX,7 MOV ES,AX or MOV AX,5 PUSH AX POP DS You can't use a segment register for "temporary storage" of any old value the way you could on the 8086. The values loaded into the segment registers are checked in protected mode. Trap 14 Page Fault The page directory or page table entry needed for the address translation has a zero in the present bit, or the current procedure does not have sufficient privilege to access the indicated page. Trap 15 (reserved) Trap 16 Coprocessor Error The coprocessor asserted the ERROR# input pin on the 386 (internal on the 486) Trap 17 Alignment Check (486 and later) If enabled, this trap will occur if a data fetch does not occur on a word boundary. I don't know of any software that activates this feature yet. I have seen SCO UNIX get this error on early Cyrix processors, even though SCO had not enabled the feature. Trap 18-32 (reserved) [answered by Frank Durda IV and jim mullens jcm@ornl.gov -or- mullens@jamsun.ic.ornl.gov] ------------------------------------------------------------------ 3.2.8 I have been getting a lot of "virtual memory exhausted" errors when I am compiling a program with a really big static array. I have 128Meg of memory and 8Gig of swap. How can this be happening? If you are using Csh, you can simply unlimit your processes in your system level /etc/csh.cshrc file or your personal .cshrc file. You can also modify your kernel so that the amount of memory available is less limiting. J"org Wunsch (j@tcd-dresden.de) provides us with this brief description: From a recent posting i just made, regarding the problem how much virtual memory one could get. | On the other hand, i've also changed the definitions you | mentioned. But i didn't like to modify the header files, and | actually, modifying the values is as easy as: | | options "DFLDSIZ='(16 * 1024 * 1024)'" | options "MAXDSIZ='(64 * 1024 * 1024)'" | | Include the above lines into your kernel's config file, reconfig | and rebuild it. | This is just a hint for those people poking around with compiling large source files. Especially, due to some gcc problems with large static arrays, compiling X applications with huge bitmaps would cause virtual memory trouble. Increasing the limits (o'course, as long as the h/w resources suffice) could help there. The default definitions for the above parameters are found in /usr/include/machine/vmparam.h. 3.2.9 Where can I learn more about all this? We've skipped over a lot of details here; the straight dope comes from "Building Berkeley UNIX Kernels with Config", by Samuel J. Leffler and Michael J. Karels. 3.2.10 Has the method for system call changed? Q. Is there something special with the order I need to update binaries and libraries in? If I drop in the new libc, everything gives me a bus error. Both shared and static do this. A. On the port-i386 list, Charles Hannum discussed changing the system call mechanism (doing it via an INT instead of a call gate). Looking at src/lib/libc/arch/i386/sys/syscall.S, it looks like this change is in. Your binaries are (if you are using an old kernel) probably crashing at each system call now. So.. first compiling a new kernel with COMPAT_10 in it should make your newly linked binaries work, I guess (have not recompiled since the update myself yet). Also don't forget that you need to use config.new now. So, the answer is Yes, the mechanism for system calls has changed, but the old method (using a call gate) is still available by specifying COMPAT_10 in your configuration file. 3.2.11 Does anyone have a system building script that takes things like building a new config and multiple config files into account? This is the program that I use to rebuild my kernel. See the note in the file about my 'test' program. You may elect to build a new config every time, or not, depending on your requirements. #! /bin/sh # # Script to rebuild the kernel. # if [ `whoami` != 'root' ] ; then echo 'You must be root to successfully proceed from this point' exit 1 fi # # Set up the environment # if [ X$MACHINE_ARCH = "X" ] ; then MACHINE_ARCH=i386 fi if [ -f /netbsd ] ; then ARCHDIR='/arch' fi # # Rebuild Config # # I am using a modified test(1) that allows for file date comparisons. # You can either get my patches (if they aren't already included), # modify test() yourself, or get the GNU ShellUtils test(1) program. # if [ /usr/src/usr.sbin/config -ot /usr/sbin/config ] ; then echo "Config Up To Date" else cd /usr/src/usr.sbin/config make clean make depend make make install fi cd /sys make make install # # Modify the local Configuration File # echo `tput clr` cd /sys$ARCHDIR/i386/conf if [ "X$CONFIG_NAME" = "X" ]; then CONFIG_NAME=GENERIC fi if [ "X$1" = "X" ]; then echo "Configuration Files available:" ls [A-Z]* echo " " echo -n "Enter the name of the config file to use: " read CONFIG_NAME echo else CONFIG_NAME=$1 fi if [ ! -f $CONFIG_NAME ]; then cp GENERIC $CONFIG_NAME fi echo "Modifying $CONFIG_NAME config file" echo -n "Press return to continue (q to quit) " read ans ans=`echo $ans | cut -c1 | tr 'QqYy' 'qqqq'` if [ "X$ans" = "Xq" ] ; then exit 0 fi vi $CONFIG_NAME #config.new $CONFIG_NAME config $CONFIG_NAME COMPILE_DIR=/sys$ARCHDIR/i386/compile/$CONFIG_NAME cd $COMPILE_DIR make depend make if [ $? -ge 1 ] ; then echo "Errors encountered" else if [ -f netbsd ] ; then PROGNAME=netbsd else if [ -f freebsd ] ; then PROGNAME=freebsd else PROGNAME=kernel fi fi echo `tput clr` echo "" echo " Manual Installation is recommended. The following files should be" echo "copied/linked/moved to the root directory. The following steps are" echo "suggested:" echo "" echo " mv /$PROGNAME /$PROGNAME.old" echo " mv $COMPILE_DIR/$PROGNAME /$PROGNAME" echo " reboot" echo "" echo "Remember that the new kernel changes will not take place until you " echo "re-boot the system." fi 3.2.12 How do I upgrade from my release version of NetBSD (and probably FreeBSD) to the '-current' development sources? These 'upgrading instructions' are from Alistair G. Crooks (agc@uts.amdahl.com) Alistair G. Crooks) and were correct as of the 26th of June 1995: # Remember to make yourself a new config (not config.old) kernel # config file. # # Make sure you have COMPAT_10 as part of your kernel config # options. # This assumes that the -current source is in /usr/src (cd /usr/src/usr.sbin/config make && make install && make cleandir) # if you don't do this, config of your kernel config file will # fail with errors in files.i386 (cd /usr/src/gnu/usr.bin/gas ; make && make install && make cleandir) # if you don't do this, you won't be able to build locore.s, with # errors about cpuid instruction not found (cd /sys/arch/i386/conf ; config MYKERNEL) (cd /sys/arch/i386/compile/MYKERNEL ; make depend && make) # copy new kernel to /, and boot off it (cd /usr/src/share/mk ; make install) # if you don't do this, you'll get errors building gcc, when it # doesn't know how to make the manual pages (don't know how to # make gcc.0) (cd /usr/src/gnu/usr.bin/gcc2 ; make && make install && make cleandir) # Bernd Wiserner says that the ld.so that will be built next will # work only with libc.so.12.0, not with libc.so.12.3 # His instructions to make a working ld.so follow: # Do NOT run ldconfig while doing the folowing 5 lines ... (cd /usr/src/include ; make && make install) cp -p /usr/libexec/ld.so /usr/libexec/ld.so.good (cd /usr/src/gnu/usr.bin/ld ; make && make install && make cleandir) cp -p /usr/libexec/ld.so.good /usr/libexec/ld.so (cd /usr/src/lib ; make && make install && make cleandir) # Then build ld.so again ... (cd /usr/src/gnu/usr.bin/ld ; make && make install && make cleandir) # Thanks, Bernd... # it was at this stage that I got REALLY fed up with the # sh: warning: running as root with dot in PATH (cd /usr/src/bin/sh ; make && make install && make cleandir) # and now back to the beginning and make the world (cd /usr/src/bin ; make && make install && make cleandir) (cd /usr/src/sbin ; make && make install && make cleandir) mkdir /usr/share/doc/usd/13.viref # otherwise "make install" in /usr/src/usr.bin will fail because # the destination directory doesn't exist - from Tom Thai # if you're using the obj directory hierarchy, use the # initscan.c from the obj directory, otherwise use the initscan.c # that was created here. cd /usr/src/usr.bin/lex if test -d /usr/src/usr.bin/lex/obj ; then cp initscan.c obj/scan.c else cp initscan.c scan.c fi # if you don't, then lex won't be built (cd /usr/src/usr.bin ; make && make install && make cleandir) (cd /usr/src/usr.sbin ; make && make install && make cleandir) (cd /usr/src/libexec ; make && make install && make cleandir) (cd /usr/src/gnu ; make && make install && make cleandir) (cd /usr/src/share ; make && make install && make cleandir) mkdir /usr/share/doc/usd/30.rogue /usr/share/doc/usd/31.trek # otherwise "make install" in /usr/src/games will fail # actually, last time I tried this, the dirs were already there - agc (cd /usr/src/games ; make && make install && make cleandir) 3.2.13 Is there a Makefile that does all that happy world-building stuff? # makefile for building -current, based on build sequence from # Alistair G. Crooks (agc@uts.amdahl.com) # # use this one to see what would be done. #MAKE=echo make MAKE=make all: .all.done # dirs to be done _before_ we can boot a new kernel INIT_DIRS=usr.sbin/config.new gnu/usr.bin/gas .init.done: @set -x; for t in $(INIT_DIRS); do \ f=`basename $$t`; test -f .$$f.done || {\ (cd $$t; $(MAKE) && $(MAKE) install) && \ touch .$$f.done || exit 1; }; \ done touch $@ .kernel.done: .init.done @echo "You should"; echo "cd sys/arch/${MACHINE}/conf" @CONF=`uname -n | cut -d. -f1 | tr 'a-z' 'A-Z'`; \ echo cp GENERIC $$CONF; echo vi $$CONF; echo config.new $$CONF;\ echo cd ../compile/$$CONF; echo "make depend && make" @echo install the new kernel and reboot, then come here and @echo touch $@ # dirs to be done _after_ booting a new kernel PREP_DIRS=share/mk gnu/usr.bin/gcc2 include gnu/usr.bin/ld lib .prep.done: .kernel.done @set -x; for t in $(PREP_DIRS); do \ f=`basename $$t`; test -f .$$f.done || {\ (cd $$t; $(MAKE) && $(MAKE) install) && \ touch .$$f.done || exit 1; }; \ done touch $@ # dirs that should be re-built now that we have new libs CLEAN_DIRS=$(INIT_DIRS) gnu/usr.bin/gcc2 gnu/usr.bin/ld .cleandirs.done: .prep.done @set -x; for t in $(CLEAN_DIRS); do \ (cd $$t; $(MAKE) cleandir); \ done touch $@ # the rest... ALL_DIRS=bin sbin usr.bin usr.sbin libexec gnu share games .all.done: .cleandirs.done @set -x; for t in $(ALL_DIRS); do \ f=`basename $$t`; test -f .$$f.done || {\ (cd $$t; $(MAKE) && $(MAKE) install) && \ touch .$$f.done || exit 1; }; \ done touch $@ 3.3 X11/XFree86/XS3 3.3.1 What options should I define to get the X extensions included? Once you have applied the patch kit, the only thing left to do is to modify the config file to include the following line: options XSERVER, UCONSOLE recompile the kernel and the kernel should support X. 3.3.2 Where can I get the FAQ for 'X'? Steve Kotsopoulos' general 'X on Intel-based Unix' FAQ available by anonymous ftp from export.lcs.mit.edu in /contrib/faq/Intel-Unix-X-faq. 3.3.3 Why does X drop characters when using xdm? When I run xdm from the console, it keeps losing keystrokes and the shift keys don't always work. Why? You need to run xdm with the -nodaemon flag. The reason is xdm normally detaches from the keyboard. This allows other processes (like getty) to return to reading from the keyboard. A race condition results, where some keystrokes are sent to xdm and others are sent to other processes. Using the -nodaemon flag causes xdm to stay attached to the keyboard so no other process can use it. This answer comes from Michael C. Newell (root@wanderer.nsi.nasa.gov) This bit of trivia is also covered in detail in the X FAQ and the README that accompanies XFree86. 3.3.4 What does the error 'netscape: uname() failed; can't tell what system we're running on' from the BSDi version of 'netscape' really mean? Netscape is a BSDI1.1 / 4.3BSD-net2 level binary. BSDI uses a slightly different uname than NetBSD or FreeBSD. There is a patch that has been successfully made to FreeBSD which gives them the same functionality as the BSDi uname() is generating. In case you were wondering, this is where the information is used - this is a dump of the inital HTTP request packet that Netscape sent when fetching http://home.netscape.com/ GET / HTTP/1.0 User-Agent: Mozilla/1.1N (X11; I; FreeBSD 2.0-BUILT-1995060 i386) Accept: */* Accept: image/gif Accept: image/x-xbitmap Accept: image/jpeg Without this patch, it includes this instead: User-Agent: Mozilla/1.1N (X11; I; BSD/386 uname failed) (If Netscape are logging this, I'd rather them know which were FreeBSD users instead of mistakenly counting them as BSD/386 users.) 3.3.5 Under NetBSD and FreeBSD, xlock (or any other program that uses passwords) fails to validate user passwords. Anyone know why? OK, first off, make sure you're using the latest version of xlock. If you've pulled it out of the /ports/ distribution then you've got version 1.14. This is woefully ancient, so get the latest, which at the time of writing is 2.7 (just do an archie search for 'xlockmore-2.7' to find it). Get this, compile it up and *make sure it's setuid root*. So, after you've copied it into /usr/X11R6/bin or wherever, do the following: # chown root.wheel ./xlock # chmod 4755 ./xlock After that, it should work fine. The problem is that without being setuid root xlock cannot read the real system passwords. If you look in /etc/passwd you'll see that the passwords are all '*'d out, because FreeBSD and NetBSD use shadow passwords. That's what worked for me. A couple of other suggestions were raised last time this problem cropped up: o If you're using a pre-compiled xlock then it might have been linked against the USA encryption libraries. If you're outside the States then the encryption libraries are different, and a US xlock will not be able to read the passwords. The fix is to get the sources and recompile. o If you've compiled it from source, made it setuid root, and it still doesn't work, someone suggested changing the size of the constant PASSLENGTH in xlock.c from '20' to '40'. I haven't had to do this, and in v2.7 it's '64' anyway, so it shouldn't be a problem. 3.4 Compiler and Library routines There are several questions that could probably be included here. See also Section 4 for some of the more common 'missing modules' that also happen to be library routines. 3.4.1 Where is libcompat.a? The library libcompat.a is (working from memory here) completely deprecated in 386bsd and all of its descendents. The only exceptions might be the re_comp and re_exec routines, which are discussed in detail in section 4. In addition, things will be added to libcompat.a as they are deprecated in the newer versions of NetBSD and FreeBSD. The getreuid() and setreuid() stuff may be heading that way (if they aren't there already. The easiest way around not having a libcompat.a is to simply link it to a small library, since virtually every other function that is expected in libcompat.a is already include libc.a. 3.5 I want to run 'XYZA' which is dynamically linked and from 'some other operating system'. What special things do I have to do to get it working? Assuming you are trying to simulate a SVR4 system, you want to create the '/emul/svr4' directory. You will also want to ensure the "COMPAT_SVR4" option is in your kernel config file. With this accomplished, you will need to copy several files into the emulation directoy. A live example might be best at this point. Most of this information is include in the 'compat_linux(8)' manpage. First, set up the '/emul/linux' directory. Within this directory (and virtually all of the emulation directories) you will need the following: etc/ (the emulated /etc directory) lib/ (the emulated /lib directory) usr/ (the emulated /usr directory) From there, the simplest way to populate these directories is to use a program like 'cpio' or 'tar' to build an archive. Having a linux machine available will greatly simplify this. Copy (basically everything from the Linux (or whatever) /etc and /lib directories. Any executables that you need from the Linux system should then be copied into an appropriate place in the usr/ directory. For example, when creating the Linux Doom system on NetBSD, you need to have the following files (which should all come from the Linux Doom distribution). usr/X11R6/lib libX11.so.6.0 usr/bin: as86 ld86 usr/games/doom README.linuxx doom1.wad linuxxdoom sndserver.old With Doom specifically, you may need to set 'DOOMWAD' (or whatever it is) to usr/games/doom for it to work correctly. In addition to the 'X' version, the native version should also work (with recent versions of NetBSD (1.1+) 3.6 You promised to talk about timezones below. Are you going to? >I've seen lots of stuff about timezone's being a bit dodgy, >especially with most European timezones changing over to DST on >the 27th March. I must say that that was NOT the case for me - >pumpy (the author's system) is running off the >/usr/share/zoneinfo/GB-Eire timezone file, (symbolically) linked >to /etc/localtime, the CMOS clock is running off GMT, and the >kernel is compiled with "timezone 0". I use /usr/share/zoneinfo/MET as /etc/localtime and have the kernel configured as timezone -1 dst 4 (My wife is running DOS on this machine for doom sometimes ;-) I set this strange dst value after diging in some old ultrix(?) man pages. There were several dst-changing-method listed and 4 was the code for the central europe one. This gave me an idea... I use an Ultrix box every day, so why not... Now, I don't know how closely this applies to NetBSD since Ultrix is based on a much older version of BSD, and this isn't for the kernel config, but for an envar of timezone values, but it's at least somewhat enlightening on possible meanings for these things. Could someone in the know shed light on how accurately this models the timezone stuff in the kernel config? When I did "man timezone" this is what I got (portion of this quoted from the DEC MIPS Ultrix 4.3a timezone(3) manpage, slightly hacked by me (Michael L. VanLoon (michaelv@iastate.edu)) STD offset [DST [offset][,start[/time],end[/time]]] the components of the string have the following meaning: STD and DST Three or more characters that are the designation for the standard (STD) or summer (DST) time zone. Only STD is required; if DST is missing, then summer time does not apply in this locale. Upper- and lowercase letters are explicitly allowed. Any characters except a leading colon (:), digits, comma (,), minus (-), plus (+), and ASCII NUL are allowed. offset Indicates the value to be added to the local time to arrive at Coordinated Universal Time. The offset has the form: hh[:mm[:ss]] The minutes (mm) and seconds (ss) are optional. The hour (hh) is required and may be a single digit. The offset following STD is required. If no offset follows DST, summer time is assumed to be one hour ahead of standard time. One or more digits may be used; the value is always interpreted as a decimal number. The hour must be between 0 and 24, and the minutes (and seconds) - if present - between zero and 59. If preceded by a "-", the time zone is east of the Prime Meridian; otherwise it is west (which may be indicated by an optional preceding "+"). start and end Indicates when to change to and back from summer time. Start describes the date when the change from standard to summer time occurs and end describes the date when the change back happens. The format of start and end must be one of the following: Jn The Julian day n (1 < n < 365). Leap days are not counted. That is, in all years, including leap years, February 28 is day 59 and March 1 is day 60. It is impossible to explicitly refer to the occasional February 29. n The zero-based Julian day (0 < n < 365). Leap days are counted, and it is possible to refer to February 29. Mm.n.d The nth d day of month m (1 < n < 5, 0 < d < 6, 1 < m < 12). When n is 5 it refers to the last d day of month m. Day 0 is Sunday. time The time field describes the time when, in current time, the change to or from summer time occurs. Time has the same format as offset except that no leading sign (a minus (-) or a plus (+) sign) is allowed. The default, if time is not given, is 02:00:00. As an example of the previous format, if the TZ environment variable had the value EST5EDT4,M4.1.0,M10.5.0 it would describe the rule, which went into effect in 1987, for the Eastern time zone in the USA. Specifically, EST would be the designation for standard time, which is 5 hours behind GMT. EDT would be the designation for DST, which is 4 hours behind GMT. DST starts on the first Sunday in April and ends on the last Sunday in October. In both cases, since the time was not specified, the change to and from DST would occur at the default time of 2:00 AM. The timezone call remains for compatibility reasons only; it is impossible to reliably map timezone's arguments (zone, a `minutes west of GMT' value and DST, a `daylight saving time in effect' flag) to a time zone abbreviation. 3.6.1 How do you change the timezone on NetBSD (FreeBSD also?)? Relink /etc/localtime. This will correct the difference from GMT (or its trendy equivelant) to your local timezone. In addition, the kernel needs to be modified to take the clock time in your CMOS into account. Since most folks that run DOS prefer to have their clocks set to local time, the timezone hack was introduced to allow the kernel to adjust the CMOS clock time to GMT. Once GMT has been computed, the /etc/localtime file can be referenced to determine the corrected local time. All generic kernels are built using the offset from California (why is anyone's guess:-) so just about everyone's clock will be off by their timezone offset from Berkeley. Also, it may pay to actually copy the correct timezone file rather than link it. That way, you clock will be correct even in single users mode (when the /usr partition is not even mounted. The disadvantage of this is that anytime the timezone file gets updated, you will need to make certain that the file is copied into the /etc directory. 3.6.2 The translation between seconds-since-the-epoch and date differs by about 18 seconds between BSD and other Unixes when running ntp; why? See ntp FAQ. Apparently, the time correction takes leap seconds into account twice. The timezone files in our system take the leap seconds into account in the kernel, and nntp takes the same 18 leap seconds into account when syncing the time. Because of that, the time will appear to be off by eighteen seconds. (Henning Schulzrinne) 3.7 How can I implement CVS to track MY changes to the kernel source tree, yet still follow the -current development tree? I'll append the scripts I use, but be warned, they may bite you if you are careless... The main reason I use cvs import is to handle updates from the ``vendor''. The best way I've found is to import _exactly_ what was shipped. This means unconfigured, and I put config.h, etc, in .cvsignore. If I have to modify configure.in then obviously I commit them :-) #!/bin/sh # This is a shell archive. # remove everything above the "#!/bin/sh" line # and feed to /bin/sh # Use -c option to overwrite existing files # # Contents: # README.import # import.sh # prune.sh # # packed by: on Sat Jun 17 20:00:34 EST 1995 # PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f README.import -a x$1 != x-c ; then echo shar: Will not over-write existing file \"README.import\" else echo shar: Extracting \"README.import\" \(2902 characters\) sed 's/^X//' >README.import << '!EOF' XThe following may be of use to others wanting to use CVS to merge XNetBSD sources with local changes but are not confident that they have Xinterpreted the documentation accurately. X XMuch thanks to Chris Demetriou (cgd) for taking the time to spell out Xthe steps he used when merging NetBSD sources without which I might Xnot have taken the plunge myself :-) The following is based on Chris' Xtips, though of course any errors are mine. X XOk. My NetBSD sources are kept in usr.src, if NetBSD is all Xyou use CVS for you might want to simply call it src. X XI unpack tar files and/or sup into a directory /d2/current. X XTo import the entire tree I: X Xcd /d2/current/src X Xcvs import "-I! " -m "from netbsd-current as of 950508" usr.src NetBSD \ XNetBSD-950508 > /tmp/cvs.out 2>&1 X XWhere: Xusr.src is the repository where the imported data goes (so set it X according to your own needs), XNetBSD is a vendor tag. XNetBSD-950508 is a release tag (there can be multiple release tags given). X XI use "-I! " as otherise some files that you need (like Xbin/csh/USD.doc/csh.a) will be ignored.. The space after the ! is Xneeded. X XIt takes quite a while. It is a good idea to save the output to a file. X XAt the end you may well get a message like: X X cvs checkout -jNetBSD:yesterday -jNetBSD usr.src X XThis means there were some conflicts between your local sources and Xthe import. So I do what it says - but not in my working tree. X Xcd /d2/tmp Xcvs checkout -jNetBSD:yesterday -jNetBSD usr.src > /tmp/merge.out 2>&1 X XYou can then go find all the files with conflicts. XEither grep '^C' /tmp/merge.out or find usr.src -name '.#*' -print XGo edit them to resolce the conflicts. This is usually obvious. X XWhen happy. X Xcd /d2/tmp/usr.src Xcvs commit -m"merged local changes with NetBSD-950508" Xcd .. Xrm -rf usr.src X XOk. Now if you are brave you can: X Xcd /usr.src (or whereever your working sources are) Xcvs update X XFinally, you should occasionally make sure you remove old files. X XI use a script to do this. It does a diff between files on the NetBSD Xbranch looking for the latest release tag (eg. NetBSD-950508). XIf cvs diff remports that a file does not have that tag, it is because Xit was not present in the import (ie removed). X XThe command sequence is: X Xcvs diff -s -r NetBSD -r NetBSD-950508 > /tmp/prune.out 2>&1 X X# check that all went well... Xcat /tmp/prune.out | awk '/Diffing/ { dir=$NF } X/NetBSD-/ { file=$NF; print dir "/" file }' > /tmp/pruned X Xcat /tmp/pruned | xargs cvs tag -d NetBSD Xcat /tmp/pruned | xargs rm -f Xcat /tmp/pruned | xargs cvs delete X XNote that this is a slow process on a 486DX33! So don't plan on Xmerging everything very often. Folk who mainly hack the kernel can do Xsrc/sys more frequently. The sequence is analogous eg. X Xcd /d2/current/src/sys X Xcvs import "-I! " -m "from netbsd-current as of 950508" usr.src/sys NetBSD \ XNetBSD-950508 > /tmp/cvs.out 2>&1 X Xetc. X XHope this helps. X X--sjg !EOF if test 2902 -ne `wc -c < README.import`; then echo shar: \"README.import\" unpacked with wrong size! fi fi if test -f import.sh -a x$1 != x-c ; then echo shar: Will not over-write existing file \"import.sh\" else echo shar: Extracting \"import.sh\" \(290 characters\) sed 's/^X//' >import.sh << '!EOF' X: Xtoday=`date '+%y%m%d'` X Xrep=${1:-usr.src} X X# -I! doesn't work, it needs a space after the ! Xcvs import "-I! " -m "from netbsd-current as of $today" $rep NetBSD NetBSD-$today X X# cd somewhere X# cvs checkout -jNetBSD:yesterday -jNetBSD usr.src > /tmp/cvs.out 2>&1 X# merge changes and commit !EOF if test 290 -ne `wc -c < import.sh`; then echo shar: \"import.sh\" unpacked with wrong size! fi chmod +x import.sh fi if test -f prune.sh -a x$1 != x-c ; then echo shar: Will not over-write existing file \"prune.sh\" else echo shar: Extracting \"prune.sh\" \(491 characters\) sed 's/^X//' >prune.sh << '!EOF' X: Xthen=${1:-`date '+%y%m%d'`} XTF=/tmp/prune.$$ XTF2=/tmp/prune2.$$ X#S=-s XS= X Xcase `echo -n .` in -n*) N=; C="\c";; *) N=-n; C=;; esac X Xask () { echo $N "${2:-$1?} "$C; read $1; } X Xcvs diff $S -r NetBSD -r NetBSD-$then > $TF 2>&1 || cat $TF >&2 X Xcat $TF | awk '/Diffing/ { dir=$NF } /NetBSD-/ { file=$NF; print dir "/" file }' > $TF2 X Xcat $TF2 Xask proceed Xcase "$proceed" in X[yY]*) Xcat $TF2 | xargs cvs tag -d NetBSD Xcat $TF2 | xargs rm -f Xcat $TF2 | xargs cvs delete X;; Xesac Xrm -f $TF $TF2 !EOF if test 491 -ne `wc -c < prune.sh`; then echo shar: \"prune.sh\" unpacked with wrong size! fi chmod +x prune.sh fi exit 0 3.8 Optional Op-codes for NetBSD, FreeBSD, and other systems. MNEMONIC INSTRUCTION ---------------------------------- AAC Alter All Commands AAR Alter At Random AB Add Backwards AFVC Add Finagle's Variable Constant AIB Attack Innocent Bystander AWTT Assemble With Tinker Toys BAC Branch to Alpha Centauri BAF Blow All Fuses BAFL Branch And Flush BBIL Branch on Blown Indicator Light BBT Branch on Binary Tree BBW Branch Both Ways BCF Branch and Catch Fire BCIL Branch Creating Infinite Loop BDC Break Down and Cry BDT Burn Data Tree BEW Branch Either Way BF Belch Fire BH Branch and Hang BOB Branch On Bug BOD Beat On the Disk BOI Bite Operator Immediately BPDI Be Polite, Don't Interrupt BPO Branch on Power Off BRSS Branch on Sunspot BST Backspace and Stretch Tape BW Branch on Whim CDC Close Disk Cover CDIOOAZ Calm Down, It's Only Ones and Zeros CEMU Close Eyes and Monkey with User space CH Create Havoc CLBR Clobber Register CM Circulate Memory CML Compute Meaning of Life COLB Crash for Operators Lunch Break CPPR Crumple Printer Paper and Rip CRASH Continue Running After Stop or Halt CRB Crash and Burn CRN Convert to Roman Numerals CS Crash System CSL Curse and Swear Loudly CU Convert to Unary CVG Convert to Garbage CWOM Complement Write-Only Memory CZZC Convert Zone to Zip Code DBZ Divide By Zero DC Divide and Conquer DMNS Do what I Mean, Not what I Say DMPK Destroy Memory Protect Key DPMI Declare Programmer Mentally Incompetent DPR Destroy Program DTC Destroy This Command DTE Decrement Telephone Extension DTVFL Destroy Third Variable From Left DW Destroy World ECO Electrocute Computer Operator EFD Emulate Frisbee Using Disk Pack EIAO Execute In Any Order EIOC Execute Invalid Opcode ENF Emit Noxious Fumes EO Execute Operator EROS Erase Read-Only Storage FLI Flash Lights Impressively FSM Fold, Spindle and Mutilate GCAR Get Correct Answer Regardless GDP Grin Defiantly at Programmer GFM Go Forth and Multiply IAE Ignore All Exceptions IBP Insert Bug and Proceed ISC Insert Sarcastic Comments JTZ Jump to Twilight Zone LCC Load and Clear Core MAZ Multiply Answer by Zero MLR Move and Lose Record MWAG Make Wild-Assed Guess MWT Malfunction Without Telling OML Obey Murphy's Laws PD Play Dead PDSK Punch Disk PEHC Punch Extra Holes on Cards POCL Punch Out Console Lights POPI Punch Operator Immediately RA Randomize Answer RASC Read And Shred Card RCB Read Command Backwards RD Reverse Directions RDA Refuse to Disclose Answer RDB Run Disk Backwards RIRG Read Inter-Record Gap RLI Rotate Left Indefinitely ROC Randomize Opcodes RPB Read, Print and Blush RPM Read Programmer's Mind RSD On Read Error Self-Destruct RWCR Rewind Card Reader SAI Skip All Instructions SAS Sit and Spin SCCA Short Circuit on Correct Answer SFH Set Flags to Half mast SLMTU=x SLIP MTU size SLP Sharpen Light Pen SPS Set Panel Switches SPSW Scramble Program Status Word SQPC Sit Quietly and Play with your Crayons SRDR Shift Right Double Ridiculous STA Store Anywhere TARC Take Arithmetic Review Course TPF Turn Power Off TPN Turn Power On UCB Uncouple CPU and Branch ULDA Unload Accumulator UP Understand Program WBT Water Binary Tree WHFO Wait Until Hell Freezes Over WI Write Illegibly WSWW Work in Strange and Wondrous Ways XSP Execute Systems Programmer ZAR Zero Any Register If you have gotten this far, you deserved some humor. -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!cancer.vividnet.com!hunter.premier.net!news-res.gsl.net!news.gsl.net!swrinde!newsfeed.internetmci.com!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 5 of 10) Supersedes: <386bsd-faq-5-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:04 -0500 Organization: Dave's House in Omaha Lines: 1110 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-5-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:123 comp.unix.bsd.freebsd.announce:175 comp.answers:15802 news.answers:63148 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part5 Section 4. (System Additions) Thanks go to Marc Wandschneider (storm@cs.mcgill.ca) for putting this section of the FAQ together.. 4.0 Introduction If you have written some addition to the kernel or some other part of the system, or know of one that feel should be mentioned, send mail to Dave Burgess (burgess@cynjut.neonramp.com) with all the relevant information, and it will be added for the next release. 4.1 Common Kernel-related problems 4.1.1 Where are the commands "rpcinfo" and "rpcgen"? Chris Flatters (cflatter@nrao.edu) informs us in the following posting excerpt where we can find them: -------------------------------------------------------------------- The sources for the Sun OS 4.0 RPC are on titan.rice.edu (I don't have the inet number handy) in directory sun-sources. You will have to pick up all the shell archives and unpack them to get at rpcgen. -------------------------------------------------------------------- These sources are also included in NetBSD and FreeBSD as part of the normal installation. 4.1.2 How can I fix NFS to work with my NE2000 board? Ken Raeburn (raeburn@cambridge.cygnus.com) has both identified the problem and provided us with a work around: -------------------------------------------------------------------- I reported previously that I was seeing problems reading files over NFS using the ne2000 driver; timeouts would eventually be reported, no data would be read. Listing files and directories (small ones anyways) were not a problem. After playing with etherfind and kernel printfs, I've come to this conclusion: Fragmented 8K UDP packets from the NFS server are not reaching the UDP layer in the kernel. The Sun is sending them (according to another Sun spying on the network), but the UDP input routine is never called. I don't know if the bug here is on the *BSD or Sun side, and won't have time to look into it in the next couple of days. In the meantime, mounting NFS file systems with "rsize=1024" does get rid of this problem. -------------------------------------------------------------------- Hopefully, the real solution (a UDP fix) will be forthcoming so that the slow TCP problem is fixed as well. See also: Section 2.6.3.3c "I am getting lousy performance out of my network card. What are some of the other possibilities?" Recent work in FreeBSD and NetBSD may have deprecated this problem. There is a new network card driver called the ed0 driver. This replaces the original NE1000/NE2000 drivers, as well as replacing the we0 driver. By combining the two, a more flexible driver has been developed and most of these types of problems have been fixed. Once again, upgrading to FreeBSD or NetBSD seems to be the answer. 4.1.3 How can I get "ps" and "w" to work? In order for users to be able to use certain flags with ps and the w/uptime commands, the kernel must have permissions 755. Also, when the internal structure of the kernel changes (as with the changes to NetBSD and FreeBSD that change fundamental parts of the kernel) a new ps, w, and uptime must usually be recompiled. If you are having trouble with your ps and have recently upgraded/rebuilt your kernel, you will probably have to rebuild ps etal. 4.1.5 Where are re_comp and re_exec? These two functions are currently not in libc.a. However, there are two related functions that seem to work exactly the same in all cases we've heard of---These are regcomp() and regexec(). Thus, a pretty ugly fix for the problem would be to always compile as follows: $(CC) -Dre_comp=regcomp -Dre_exec=regexec .... There is a slightly nicer fix available for this, listed in 4.2 4.1.6 What about the termio, termios, and termcap stuff? 4.1.6.1 Sometimes I have trouble with my system resetting the terminal to seven bit mode. Isn't BSD eight bit clean? The answer is "sort of". The problem seems to come from the fact that the interface is not guaranteed to be eight bit clean. The interface is better, and should be eight bit clean in all cases. If you find an application that uses the interface, you should either contact the author and try and get them to use the termios interface or port the code yourself. 4.1.7 The system hangs with the HD light on after intense disk usage. The system hangs when trying to fsck -p both of my IDE hard drives at boot-up. Brett Lymn (blymn@mulga.awadi.com.AU) Provides us with a description of the problem and the steps that he had to take to fix it: It seems that, on some disk subsystems, the controller and the hard disk get out of synchronization when they are being used intensively. The result of this is that the disk completes a command but the controller still believes the disk not to have completed the command, so the controller status register indicates the disk is busy when it is not really. The standard wd drivers are too trusting of the hardware and expect it to do the right thing all the time. There are a few while loops in the wd drivers that loop on a status change from the disk controller, however; if the problem I have described takes place then the wd driver will be stuck looping waiting for the disk to not be busy - which never happens, so you lock the machine because this is a kernel level wait. To fix this problem I put a timeout into the while loops so that after a specified time the wd driver will give up waiting for the drive to become ready, reset the controller and retry the command. In my experience the retry always succeeds. Ed.Note: The retry doesn't ALWAYS work, but it IS better than just waiting for the drive to wake back up (which it never does). It has been recently noted that, from time to time, a SCSI disk subsystem will behave exactly the same way. It is usually because of bad/out-of-tolerance cables. It is not a common problem, but it is one that you, the reader, may need to take into account when you are trouble-shooting your drives. Dan Yergeau (yergeau@gloworm.Stanford.EDU) provides us with more insight into this problem. The README accompanying the original sources used as a base for the NetBSD driver indicates that > There's also another problem still bothering me: There's some sort of timing/reentrancy error still lurking in here, that was there in the original 0.1 wd driver as well. The symptom is that, on *some* controllers, doing the initial wdopen() (which will then call the readdisklabel() function) for two or more disks at the same time (so that wdopen() gets called again while it's already being executed), the controller gets hung. I'm still looking for this, meanwhile I specify in my config file that I have swap on all disks. This causes the kernel to wdopen() the drives nicely in order -- and once it's been done for each disk, the problem will, of course, not occur. Without the "swap on ... and ... and ..." stuff, my wd1, wd2 and wd3 would be opened simultaneously by "fsck -p" forks, which would nicely hang up everything... I note a "sleep(10)" in fsck, but it obviously doesn't do that. So, changing the appropriate config line to config "kernel" root on wd0 swap on wd0 and wd1 ^^^^^^^ may get around the problem. I don't run NetBSD, but I do use a variation of the barsoom/NetBSD driver. This works for me. Please let the NetBSD people know if it works for you. #include [Ed. again] Other methods for fixing this problem include doing a dd if=/dev/wd1d of=/dev/null count=1 before the initial 'fsck -p'. This method is considered brute force. It works by making sure that the drive is properly initialized before the disklabel is read in the fsck. Another method involves using the '-l1' (little L) flag to make sure that the fsck doesn't try to open both unopened hard drives at the same time. This method is a little better (from a purely brute viewpoint) but does cause your startup to run longer, since the purpose of this option is to have each of your fsck passes run one after another. 4.1.8 How do you implement quotas on Net/2 derived BSD systems? From: tinguely@plains.NoDak.edu (Mark Tinguely) maybe you did not complete the setup, here is a step-by-step instructions to get them to work: 1) make a kernel with "options QUOTA" installed 2) edit /etc/fstab and include the kinds of quotas you want, below I used "userquota", you could also add "groupquota". /dev/wd0h /usr ufs rw,userquota 1 2 3) for each filesystem that is in /etc/fstab that uses quota, create the file "quota.user" (and "quota.group if appropriate). Above I have user quotas in the /usr filesystem, so I would: # touch /usr/quota.user 4) scan filesystem for files ownership (and/or group ownership). # quotacheck -a 5) now you can add individual quota limits, if you want to add the same quotas to the many people, then make a template and replicate the template. If they change for each user, then edit seperately. # edquota tinguely (an editor is kicked up and says something like: Quotas for user tinguely: /usr: blocks in use: 11876, limits (soft = 0, hard = 0) inodes in use: 891, limits (soft = 0, hard = 0) a limit of 0 means "unlimited". Change these to the appropriate number of blocks. A soft limit generates a warning, and can be exceed for period of time (7 days?), after which time a soft limit is treated like a hard limit. A hard limit denies new writes. to replicate a template (for this example let us assume "tinguely" is the template): # edquota -p tinguely user1 user2 user3 ... userN 6) turn quotas on (usually done in the /etc/rc file, but turn it on manually so you do not have to reboot right now: # quotaon that should take care of setting up quotas. You can look at the status of use of files with repquota, the -a option lists all filesystems with quotas. 4.1.9 What are the correct permissions for the /tmp, /usr/tmp, and /var/tmp directories? All of these directories should be owned by bin, group bin, mode 1777. This turns on the sticky bit, so that the only people who can remove a file from these directories are the owner and root. 4.2 Available kernel add-ons 4.2.1 The Patch-Kit Perhaps the most famous of all additions to the kernel, the Patch-Kit, coordinated by Rodney Grimes (rgrimes@agora.rain.com) contained numerous bug fixes, Julian's SCSI drivers, as well as fixes for other parts of the system. Of course, there is no such thing as a patch kit for NetBSD or FreeBSD. The update method for these systems is different, and covered in the section about the System Update Protocol (sup) updates. 4.2.2 Shared Libraries For NetBSD and FreeBSD users, two seperate and different shared library systems have been developed. This feature is included in the '-current' tree of both systems, and will be included in the next major release of eiter or both. The shared libs have, in general, been very well behaved. The closest thing to a FAQ that has been introduced is the following: I installed FreeBSD-1.1-BETA a few weeks ago but can't get dynamically linked programs to run for some reason. Every time I try to run a dynamically linked program, I get a message that says "No ld.so"... The answer is: # chmod 755 /usr/* /usr/share/misc 4.2.3 Sound Blaster Drivers For a fact, the following sound cards are supported in FreeBSD: 1 Yamaha FM Synth 2 Soundblaster/Soundblaster Pro DSP 3 PAS PCM and Midi 4 Gravis UltraSound 5 MPU-401 In the release notes I have, there is some doubt as to the operational status of the MPU-401 sound card driver. If you have one of these cards and want to try the driver out, you should contact Jordan Hubbard (jkh@freefall.cdrom.com) when you are finished installing it and let him know how it is working. The docs for the FreeBSD driver are in /usr/src/sys/i386/doc/sound.doc. In NetBSD, all you should need to do is add the following lines to your config file: sb0 at isa? port 0x220 irq 5 drq 1 # SoundBlaster options sound or pseudo-device audio When the new kernel re-boots, you should see a line something like this in your boot-up messages (use dmesg after reboot to make sure): sb0 at isa0 port 0x220-0x237 irq 5 drq 1: dsp v4.13 Once you have created the device, you should be all set. To create the devices, 'cd' to the /dev directory and run the './MAKEDEV sound' and './MAKEDEV audio' commands. These will make the appropriate device entries. 4.2.4 Bus Mouse Drivers This is taken from the INDEX in the Freebsd.cdrom.com mice directory: "We currently have four bus mouse drivers for *bsd available by anonymous ftp on XFree-86.cdrom.com in pub/XFree86/mice: ms-busmouse.tar.z Sandi Donno's port of Erik Forsberg's Microsoft bus mouse driver to *bsd. logitech-busmouse-0.2.shar.z Fred Cawthorne's second version of a logitech Bus Mouse driver. busmouse.tar.z: Eugene Stark's port of Rick Macklem's driver to the Microsoft bus mouse. Rick's driver supports the Logitech and ATI Inport Bus mice with *bsd. It's also available by e-mail to stark@cs.sunysb.edu and by anon. ftp on cs.sunysb.edu in pub/*BSD/busmouse.tar.Z. psm.tar.z: Johan Solhed ported the Linux PS/2 mouse driver to *BSD. It includes a PS/2 to Microsoft protocol converter in the driver so XFree86 understands the mouse events. In addition we have busmouse.v3.z which is Erik Forsberg's original post of his device driver for BSDI/386 and Microsoft (and compatible) bus mice using the Microsoft InPort chip as well as a device driver for Logitech bus mice. " Most of these busmouse drivers are now included in the current releases of NetBSD and FreeBSD. There is some question about how well they work (especially the psm driver), but they are all there. Additional information about configuring the psm device is included below to help make the psm driver work reliably. Add the following entries to your config file: options ALLOW_CONFLICT_IOADDR device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr Duplicate the options and device lines into your own kernel configuration file, making sure to obey the proviso given about following your pc0/sc0 devices, recompile it, install it, and you should be off. The the LINT configuration file for more information. 4.2.7 Kernel Loadable Modules Several strides have been made in the past to reduce the amount of 'cruft' that gets into the default kernel. One way is to make the kernel so hard to use that practically no one but a person with precisely the 'right' hardware would be able to use the system Another way is to implement something called 'LKM's or "Loadable Kernel Modules". These are run-time extensions to the system that allow the distribution kernel to not include things that people might want, but not nxbeed until they get the system up and running. While the security concerns of LKMs are valid, their implementation is such a win that the research to implement them is well worth it. As an experiment, Micheal Graff has worked a few hours on making some small portions of the kernel into loadable modules. So far, he has built the kernfs, procfs, and msdosfs. He plans on adding others, including some devices, as time permits. Others might be interested in seeing what I have so far. It was really _very_ simple to make these, so this is nothing spectacular. Just something to keep from having to recompile just to add msdosfs support to a machine. ;) To try this: 1) get ftp://ftp.flame.org/pub/netbsd/lkm.tar.gz 2) untar it somewhere. It will create a subdirectory called lkm and all extracted files will go in it. (I use /usr/src, but that may be a bad place) 3) follow the directions in lkm/README Please mail suggestions, and (especially) fixes and more modules to Michael Graff . Once it is clean enough, I'll send it in as a send-pr and see what happens. :) One question which still needs to be resolved is where should these *.o LKM's be installed? The directory '/usr/lkm' would be a good idea, with the output (modload's -o option) in /var/run/lkm or something like that. 4.3 Other program building type problems. 4.3.1 Greetings from Mars. I am building a program that requires access to the crypt library. Either I have it and it isn't getting copied into the executable, or I don't have it; why? This is actually two separate questions, but they are close enough to the same that I can answer them here. The first problem that anyone building a 'crypt' aware program needs to remember is that the crypt library is a separate library and requires a '-lcrypt' to be added at the end of the link line. The other half of the problem is the 'US Non Export' policy for DES encryption. There are several good sources (about one per country) for non-US crypt libraries. IF you are outside the US and need one, look around on some of the NetBSD/FreeBSD/OpenBSD FTP sites in the 'local area'. By the way. I don't have any good URLs for Mars, so you might be out of luck. 4.3.2 I am having trouble with long file names in my libraries. It seems like there is a 16 character limit in the library somewhere. There is a 16 character limit, sort of. The most likely symptom for this is that the header for the file _after_ the long file name will be mangled. It turns out that there is a "T" option that may not be documented very well that provides the correct functionality for long filename support in ar. 4.3.3 I'm getting annoyed with having this "conflicting types for `sys_errlist'" problem show up nearly every time I build a program. What do I need to do? Remove the sys_errlist reference in the source you're compiling. You can either delete it (there are advantages to just deleting it) or you can wrap a "#ifdef __NetBSD__/#endif" pair around it. There are religious issues regarding the use of sys_errlist that involve either system security (most declaration allow the error list to be written to) or system internals (there's already a well-defined library call that performs the sys_errlist lookup). An anonymous example is included below: Most stupid packages such as GCC expects extern (char*)sys_errlist[] whereas 4.4Lite based systems have more secure extern const (char*) const sys_errlist[] declaration. Just kick that "cccp.c" in the butt and modify the suspicious line. Hard to believe GCC still doesn't do that. You're going to have to do lots of this modification as you encounter more of such programs. 4.4 System Administration Questions 4.4.1 Where can I get good books about NetBSD or FreeBSD? There is a set of books produced by O'Reilly and associates that describe in some detail the 4.4 BSD system. The six volume set includes a book on system administration which directly pertains to the operation and management of NetBSD and FreeBSD. Also see the Section 1 for a good list of the books that folks use for the system. 4.4.2 I am concerned about system security. What should I do to protect my system from net attacks? With the release of the System Administrators Tool for Analyzing Networks (SATAN), network security has suddenly become a serious issue. There are a few things you can do. -- Get, read, and understand the CERT advisories -- Get SATAN and run it against your own system or network. Fix whatever it finds as holes -- Get courtney, a program that was written to recognize a SATAN attack pattern and notify you whenever someone tries to probe your system -- Log all failed login attempts (see below) 4.4.3 How can I log failed login attempts? Failed logins are logged (without the attempted login name) at LOG_NOTICE priority. Failed logins are logged _with_ the attempted login name at LOG_NOTICE priority, and with the LOG_AUTHPRIV facility. If you set up some lines in syslog.conf like: # The authpriv log file should be restricted access; # these messages shouldn't go to terminals or publically-readable files. authpriv.* /var/log/secure Make absolutely sure, though, that it's really what you want: logging actual supplied logins is often a great way to offer cleartext passwords to an adversary... Which is why you have authpriv.* /var/log/secure ..,authpriv.none,... /var/log/messages So none of the authpriv messages (those that actually display the failed login) goto /var/log/messages, but they do go to /var/log/secure (which you have with 600 perms.) Bear in mind that this still does not prevent someone that has hacked into your system with root privs from reading them. See 4.4.2 for more information. 4.4.4 Can I use a Concatenated Filesystem with NetBSD? The "ccd" device (in -current) provides the capability to span a file system across multiple hard drive partitions. Jason Thorpe has been working on it; if you try it and have problems, here are the debug instructions: 4.4.4.1 Why, when I type "ccdconfig ccd0 16 none /dev/wd0a > /dev/wd1a", do I get back "ccdconfig: ioctl (CCDIOCSET): /dev/ccd0d: Device not configured"? Considering that the error comes froom the ioctl (rather than the open) I'm tempted to say it comes from either the vn_open() or subsequent VOP_*() operations on the components. If you compile your kernel with `options CCDDEBUG' and set the ccddebug variable (near the top of ccd.c or with the ddb) to 0x03, you should be able to see where it fails. If you could send me that information, that would be most helpful. Might be the same problem I had; it turns out that the partitions that you build your concatenated disk device from must not be marked "unused" in their native disks' labels. This "device not configured" is the way ccdconfig informs you of this condition... :-) Actually, I guess this indicates a need for a special "ccd component" type entry for disklabel? Or should the partition simply be marked as a "raw" partition, sharing this type with database log partitions etc? 'Der Mouse' (mouse@collatz.mcrcim.mcgill.edu) adds: Personally, I think ccd has no business looking at those partition types. But I definitely think a special ccd-component partition type is _not_ the way to go; if nothing else, it makes life hard for people running ports using non-NetBSD disk partitions. For example, under NetBSD/sparc on a disk with a SunOS label, there are no partition types in the label, so it would be impossible to use a ccd that insisted on a special partition type on such a disk. 4.4.5 I am really new to Unix System Administration. I need some real basic help. 4.4.5.1 What is the System Administrator's username? 4.4.5.2 I can't log in as 'su'. What does that message mean when I log in as root. Both of these indicate a newness to Unix System Administration that many of the core team members don't even remember. The sysadmin userid is "root", although you typically don't want to log in directly as root. A better solution is to log in as root once, create a user-id and password for yourself. Once you are done with that, you need to modify the /etc/groups file. This identifies the users that are allowed to be part of particular groups. Add your UID to the "wheel" group and log off. With a real UID and password and your UID idfentified as a "wheel" member. you will be able to use the 'su' command to log in as yourself and then "switch users" to root. That, by the way, is also what that cryptic message "Don't log in as 'root', use 'su' instead." means. 4.4.5.3 Are there any books I can 'bootstrap' myself with? Yes. Here are a couple: (1) Nemeth, Snyder, and Seebass, "Unix System Administration i Handbook" (2) Horspool, "The Berkeley Unix Environment" 4.4.5.4 How about some code examples? ftp://ftp.sterling.com:/usenet/alt.sources/ ftp://ftp.sterling.com:/usenet/comp.sources/misc ftp://ftp.sterling.com:/usenet/comp.sources.unix ftp://wuarchive.wustl.edu:/usenet/alt.sources/articles/ /usenet/comp.sources.misc/ /usenet/comp.sources.unix/ ftp://src.doc.ic.ac.uk:/usenet/alt.sources/articles/ /usenet/comp.sources.misc/ /usenet/comp.sources.unix/ 4.5 Daemon questions 4.5.1 I'd like to use amd to mount a file system (/dev/sd0f aka /usr/local) on another machine as "/usr/local". What's the magic? There are several ways to achieve 'amd nirvana'. Each of these elements below is an important consideration for getting amd to work correctly. The "-" means use these as defaults, so you need an entry without a "-". Also, I think one "-..." overrides the previous one completely. As a start, you can use the following in your amd.project file: usr/local opts:=rw;type:=nfs;rhost:=hostname;rfs:=/usr/local Then run "amd /usr/local /your/map/name -type:=direct". One word of warning, however. In NetBSD 1.0, I couldn't get direct mount points to work for some reason. I don't know if this has been fixed or not. If you are using a NetBSD 1.0 (or earlier) system, make /usr/local a real symbolic link into an automount filesystem. Another instance of the amd.project file might look like this: /defaults type:=nfs;opts:=rw,soft,intr,grpid local \ host==hostname;type:=link;fs=/usr/local ||\ host!=hostname;rhost:=hostname;rfs:=/usr/local You amd.master file might look like this: /project amd.project Here's another example which auto-mounts /usr/src from another machine: grizu% ls -lad /usr/src lrwxr-xr-x 1 root wheel 29 Dec 30 15:33 \ (split by ed.) /usr/src -> /tmp_mnt/mounts/src10/usr/src grizu% cat /etc/amd/master /net /etc/amd/net /tmp_mnt/mounts /etc/amd/src grizu% cat /etc/amd/net /defaults type:=host;fs:=${autodir}/${rhost};rhost:=${key} * opts:=ro,soft,intr grizu% cat /etc/amd/src /defaults type:=host;fs:=${autodir}/${rhost}; src10 opts:=rw,soft,intr;rhost:=rfhu1001 grizu% grep ^amd /etc/netstart amd=YES amd_dir=/tmp_mnt # AMD's mount directory amd_master=/etc/amd/master # AMD 'master' map grizu% ls -la /tmp_mnt total 9 drwxr-xr-x 5 root wheel 512 Jan 3 12:09 . drwxr-xr-x 26 root wheel 1024 Jan 3 12:09 .. dr-xr-xr-x 3 root wheel 512 Nov 20 19:29 ftp.uni-regensburg.de dr-xr-xr-x 2 root wheel 512 Jan 4 10:43 mounts dr-xr-xr-x 4 root wheel 512 Dec 11 08:18 rfhu1001 grizu% ls -la /tmp_mnt/mounts total 3 dr-xr-xr-x 2 root wheel 512 Jan 4 10:43 . drwxr-xr-x 5 root wheel 512 Jan 3 12:09 .. I guess that's all. rfhu1001 is the NFS server, grizu the client. 4.5.2 I am having trouble with my nameserver refusing to acception 'nslookup's from my SunOS machine after I installed the resolver fix. The exact error message is "*** Can't find server name for address 194.100.46.2: Query refused". Can you help? From the README file in the BIND distribution: Versions of NSLOOKUP up through BIND 4.8.3's used IQUERY to ask the local server for information about the server's own name. I assume that this was done in a "what the heck, nothing uses these, how can we contrive a need?" sort of spirit. I removed this code as of BIND 4.9's NSLOOKUP and had it use the standard gethostbyaddr() mechanisms (which depend on normal queries of PTR data). Disabling INVQ and putting "options fake-iquery" in the boot file will cause IQUERY to be answered bogusly but in a way that old nslookup programs won't trip on. INVQ is disabled by default in conf/options.h. So, your options are: - Add "options fake-iquery" to named.boot and restart the server - Replace your old, broken nslookup with the one in the 4.9.3 BIND distribution. -- Enable INVQ in conf/options.h, then rebuild and re-install named. This latter option isn't guaranteed to work. If you point an old version of nslookup at a server, and the server either is not authoritative for a zone containing the A RR matching the address you are sending the query to, or if this A RR is not in it's cache, then nslookup will still fail even if the server has the INVQ option turned on. 4.5.3 Are there any alternatives to 'NIS' available for NetBSD, etal.? Yes, there is 'hesiod' which provides (according to Ted Lemon i)another way of distributing databases like /etc/passwd, /etc/services, /etc/groups, and so on. It uses DNS, which is (IMHO) slightly more robust and less easily subverted than NIS, and doesn't claim to provide authentication (authentication is Kerberos's job), so as part of a complete system, I think it's a much better solution. It certainly has a smaller installed base than NIS, though. There is also Kerberos IV, which provides similar functionality. NetBSD (1.0 or -current) now has a new set of changes to the kerberosIV tree in ftp://ftp.unit.no/pub/NetBSD/ports/kerberosIV.diffs-0.1-0.2 The author of the patches has also renamed the other Kerberos files in the same directory to adhere to this private version number scheme, to allow for changes that will come later. 4.6 Adding new users. 4.6.1 Where can I FTP the 'adduser' program? There is one you can FTP (see the URL below). You will need to be able to use 'vipw' to make it work, but that shouldn't be a big problem for most people. ftp://ftp.quick.com.au/pub/unix/adduser.sh The man page is there too.. ftp://ftp.quick.com.au/pub/unix/adduser.8 4.5.2 Where is the 'adduser' program? Here. #!/bin/sh # This is a shell archive. # remove everything above the "#!/bin/sh" line # and feed to /bin/sh # Use -c option to overwrite existing files # # Contents: # adduser.sh # # packed by: on Sun Aug 21 10:25:30 EST 1994 # PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f adduser.sh -a x$1 != x-c ; then echo shar: Will not over-write existing file \"adduser.sh\" else echo shar: Extracting \"adduser.sh\" \(6443 characters\) sed 's/^X//' >adduser.sh << '!EOF' X: X# X# NAME: X# adduser.sh - portable add user script X# X# SYNOPSIS: X# X# adduser.sh [-G "Group"] [-H "Homes"] [-S "Shell"] [-u "uid"] \\ X# [-p "encrypted"] [-P "cleartext"] [-l] X# X# DESCRIPTION: X# Simply adds users and their home directory. It prompts for a X# "username" and "fullname" which become part of the passwd file X# entry for the new user. It adds "username" to "Group" X# (creating it if necessary) and uses "uid" or the 'gid' of X# "Group" as a starting point for its search for an unused X# 'uid'. By default it will prompt for a passwd after adding X# each user, but '-p' can be used to set a pre-encrypted password X# or '-P' can be used to give a clear text password which the X# script will encrypt and then use for each new "username". X# X# Most of the variables used are obvious. "Homes" is the parent X# directory of new users home directories. X# X# The '-l' option causes the script to show the default values X# for the variables that it uses. Most if not all can be set on X# a per machine basis by creating a file '.adduserrc' in the X# super users home directory or in the directory where X# 'adduser.sh' is found. If "Homes"/.adduserrc exists it will X# be processed after any others, so can be used to set defaults X# on a per project basis. X# X# NOTES: X# The script handles shadow password files on Solaris 2.3, other X# machines may break. It has been tested on NetBSD, SunOS, X# Solaris and HP-UX. X# X# AUTHOR: X# Simon J. Gerraty X# X X# RCSid: X# $Id: adduser.sh,v 1.2 1994/05/08 22:54:04 sjg Exp sjg $ X# X# @(#) Copyright (c) 1993 Simon J. Gerraty X# X# This file is provided in the hope that it will X# be of use. There is absolutely NO WARRANTY. X# Permission to copy, redistribute or otherwise X# use this file is hereby granted provided that X# the above copyright notice and this notice are X# left intact. X# X# Please send copies of changes and bug-fixes to: X# sjg@zen.void.oz.au X# X XMyname=`basename $0 .sh` XMydir=`dirname $0` Xcase $Mydir in X.) Mydir=`pwd`;; Xesac X XETC=/etc X# for testing only X#ETC=/tmp X#VIPW="ed $ETC/passwd" X X# thinks that the rc file may override. Xhost=`hostname 2>/dev/null` XHomes=/home/${host:-`uname -n`} XShell=/bin/csh X[ -x /bin/ksh ] && Shell=/bin/ksh XGroup=users XPasswd='**' X X# look for an rc file Xfor d in $HOME $Mydir Xdo X [ -s $d/.${Myname}rc ] && { . $d/.${Myname}rc; break; } Xdone X XEXF=/tmp/e$$ XTF=/tmp/u$$ XTF2=/tmp/uu$$ X Xcase `echo -n .` in X-n*) N=;C="\c";; X*) N=-n;C=;; Xesac X XOS=`uname -s` X Xadd_path () { [ -d $1 ] && eval ${2:-PATH}="\$${2:-PATH}:$1"; } X Xget_id() X{ X file=$1 X name=$2 X min=${3:-1000} X max=`expr $min + ${4:-999}` X > $EXF X X id=`grep "^$name:" $file | cut -d: -f3` X case "$id" in X "") X # missing, must add it X i=$min X while [ $i -lt $max ] X do X n=`cut -d: -f1,3 $file | grep ":$i\$"` X case "$n" in X "") X # an empty slot - use it X id=$i X break;; X esac X i=`expr $i + 1` X done X ;; X *) X echo $id > $EXF;; X esac X echo $id X} X Xmkdirs() X{ X case $1 in X /*) pp=/;; X *) pp=;; X esac X for p in `echo $1 | tr / " "` X do X case "$pp" in X "") pp=$p;; X /) pp=/$p;; X *) pp=$pp/$p;; X esac X [ -d $pp ] || mkdir $pp || exit 1 X done X} X X Xadd_group() X{ X echo "adding $1:*:$2: to $ETC/group" X echo "$1:*:$2:" >> $ETC/group X} X Xupd_group() X{ X [ "$mygroup" ] || mygroup=`grep "^$1:" /etc/group | cut -d: -f4` X case ",$mygroup," in X ",,") # empty X add=$2;; X *,$2,*) # already there X add=;; X *) # missing X add=,$2;; X esac X [ "$add" ] && sed "/^$1:/s/\$/$add/" $ETC/group > $ETC/group.$$ && X mv $ETC/group.$$ $ETC/group X} X Xupd_passwd() X{ X EDITOR=ed X VISUAL=ed X export EDITOR VISUAL X X didit= X X echo "adding $1:$2:$3:$4:$5:$6:$7 to $ETC/passwd" X case "$OS" in X SunOS) X if test -f /etc/shadow; then X # we are assuming its Solaris X echo "$1:x:$3:$4:$5:$6:$7" > $TF X echo "$1:$2:6445::::::" > $TF2 X didit=yes X fi X ;; X *BSD) # NetBSD at least X echo "$1:$2:$3:$4::0:0:$5:$6:$7" > $TF X didit=yes X ;; X esac X # most OS's just want this. X test "$didit" || echo "$1:$2:$3:$4:$5:$6:$7" > $TF X X line=`grep -n '^+:' $ETC/passwd | cut -d: -f1` X ( sleep 1; echo ${line}-1r $TF; echo w; echo q; X if test -f /etc/shadow && test "$OS" = SunOS X then X # this is a crok... X sleep 5 X echo e X sleep 5 X echo '$r' $TF2 X echo w X echo q X fi X ) | ${VIPW:-vipw} X} X Xadd_user() X{ X group=$1; shift X X eval set -- `echo "'$*'" | sed "s/:/' '/g"` X X gid=`get_id $ETC/group $group $4 256` X if [ "$gid" ]; then X [ -s $EXF ] || add_group $group $gid X uid=`get_id $ETC/passwd $1 $3 1024` X if [ "$uid" ]; then X [ -s $EXF ] || upd_passwd "$1" "$2" "$uid" "$gid" "$5" "$6" "$7"; upd_group $group $1 X [ -d $6 ] || { mkdirs $6 && chown $1 $6 && chgrp $group $6 && chmod 2775 $6; } X else X echo "can't add user $1" >&2; exit 1 X fi X else X echo "can't add group $group" >&2; exit 1 X fi X} X Xrm_user() X{ X ( echo /^$1:/d; echo w; echo q ) | ${VIPW:-vipw} X} X X# needs perl Xencrypt() { X for d in /usr/libexec /usr/lib X do X [ -x $d/makekey ] && { makekey=$d/makekey; break; } X done X perl -e "print pack('a8a2', '$1', '${2:-$$}')" | ${makekey:-makekey} X} X X# ok, time to get to work... Xset -- `getopt H:S:G:u:p:P:l $*` X Xadd_path /sbin Xadd_path /usr/sbin Xadd_path /usr/ucb Xadd_path /usr/etc X Xfor i in $* Xdo X case "$i" in X --) shift; break;; X -H) Homes=$2; shift 2; X # pick up group defaults... X test -s $Homes/.${Myname}rc && . $Homes/.${Myname}rc X ;; X -S) Shell=$2; shift 2;; X -G) Group=$2; shift 2;; X -u) uid=$2; shift 2;; X -p) Passwd="$2"; shift 2;; X -P) Passwd=`encrypt $2`; shift 2;; X -l) list=yes;; X esac Xdone X Xgid=`get_id $ETC/group $Group 100 1000` X[ "$uid" ] || uid=$gid X Xcase "$Passwd" in X""|none) Passwd=;; Xnologin) Passwd='*';; Xesac X Xif [ "$list" = yes ]; then X echo "Defaults:" X for v in Group Homes Shell X do X eval echo "\ $v=\$$v" X done X [ "x$Passwd" = "x*" ] && echo " Passwd=prompt" || echo " Passwd=$Passwd" X [ "$uid" ] && echo " Initial uid=$uid" X echo Xfi Xecho Enter username and fullname - spaces in fullname are ok, no quotes needed. Xecho An empty line terminates input. Xecho X Xecho $N "username fullname: $C" Xwhile read uname fname Xdo X [ "$uname" ] || exit 0 X add_user $Group "$uname:$Passwd:$uid:$gid:$fname:$Homes/$uname:$Shell" X [ "x$Passwd" = "x**" ] && passwd $uname X echo $N "username fullname: $C" Xdone !EOF if test 6443 -ne `wc -c < adduser.sh`; then echo shar: \"adduser.sh\" unpacked with wrong size! fi chmod +x adduser.sh fi exit 0 -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!swrinde!newsfeed.internetmci.com!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 6 of 10) Supersedes: <386bsd-faq-6-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:05 -0500 Organization: Dave's House in Omaha Lines: 737 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-6-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:131 comp.unix.bsd.freebsd.announce:183 comp.answers:15810 news.answers:63156 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part6 Section 5. (Kernel Replacements) 5.0 Introduction This section is supposed to document the unusual or optional kernel add-ons that are available from various places. As they are included in the mainstream of the various Berkeley Net Release systems, they will slowly come out of here. If you know of any replacement parts for the kernel, please send Dave Burgess (burgess@cynjut.neonramp.com) a message detailing the package (possibly include a README), where it can be found, and what version of the OS (ie. NetBSD or FreeBSD) it was designed to run under. 5.1 Available Kernel Replacements 5.1.2 pcvt A superset of pccons, this driver supports virtual consoles, and some form of database oriented keyboard mappings. It was also designed to emulate a vt220 terminal as best as possible. (This section originally identified Joerg Wuensch as the author. Hellmuth Michealis is the author of pcvt. Joerg was the author of the original post. This update is from Hellmuth himself. Apologies from the FAQ staff...) The last release of pcvt is version 3.00 and was done on March 1st 1994 to the newsgroup comp.sources.misc, Volume 41, Issue 140-152 (part 1-13). Future releases and upgrades will be done as patches or new releases to that newsgroup. pcvt was recently put into the kernel sourcetree of NetBSD-current (pre 1.0) into /sys/arch/i386/isa/pcvt. pcvt is also available in the FreeBSD contributed tree at location /usr/ports/util/pcvt. The pcvt package consists of: - the driver itself - complete documentation for installation and operation - termcap/terminfo, pcvt.el, rc.local, /etc/ttys, xmodmap examples - cursor, utility to set the cursor size and shape - fed, a curses-based EGA/VGA character set editor - fontedit, utility to edit the VT220 downloadable character set - ispcvt, utility to display the drivers compile time configuration - kcon, utility to setup national keyboard layouts and remap keys - keycap, keyboard mapping database library similar to termcap - loadfont, utility to load up to 4/8 fonts into an EGA/VGA board - mcon, utility to control/configure a keyboard based mouse emulator - scon, utility to runtime configure the video part of pcvt - userkeys, utility to set the VT220 user programmable function keys - vttest, VT100 compatibility torture test program - demo, color- characterset- and attribute demos and more .... See the README-file for the latest release (3.00) of pcvt for lots more information and a complete list of the contributors to this project. 5.1.3 syscons Another superset of pccons that was designed to emulate SCO as well as possible. Many of the ioctls from SysV have been implemented. XFree86 2.0 no longer requires special patches to be run with kernels using this console driver. 5.1.9 A replacement curses program/library. It is generally accepted that the NetBSD curses can be easily replaced by the ncurses package. It is more complete and offers much better support for shared libraries and other advanced features. The current (early 1995 version) is 1.8.5 and is available from ftp://netcom.com:/pub/zmbenhal/ncurses/1.8.5.tgz. 5.2 Floppy Disk problems. 5.2.1 How do I get a bootable floppy? Several ways, ranging from brain-dead-but-works to simplest. Classification into categories is left to the reader (is there really a difference between 'brain-dead' and 'simple'?:') 1) rawrite (or dd) dist.fs (or fixit.fs) to a disk, mount it, cd to the mount point, and execute: rm -rf . you now have a bootable floppy!;^} 2) Take your existing dist.fs or fixit.fs boot disk and diskcopy it on a DOS machine. Mount and rm as in 1) above. Again, you have a bootable floppy!;^} 3) Run disklabel on the floppy, e.g.: disklabel -w -r fd0a floppy5 where 'floppy5' is a 'name' for an entry in the /etc/disktab file. You'll get a couple of ioctl errors because writing a label to a floppy isn't supported (yet?), but the boot blocks have indeed been written. 4) Write the boot blocks to the floppy: cat /usr/mdec/fdboot /usr/mdec/bootfd | dd of=/dev/rfd0a or, more simply: cat /usr/mdec/fdboot /usr/mdec/bootfd > /dev/rfd0a Methods 3) and 4) require you to run newfs on the floppy, e.g.: newfs /dev/rfd0a floppy5 If you have a floppy that was originally bootable, but the boot blocks were somehow damaged, you can use method 3) or 4) to restore boot-ability (do _NOT_ run newfs). You _could_, through the convolutions of copying a floppy whose boot blocks are damaged to a temporary location and then re-copying to a bootable floppy, use method 1) or 2) (if you really want to!;^}) 5) If the disk is already newfs'ed and is otherwise ready to use, disklabel will write the boot blocks on the disk. Read the man page for disklabel. 5.2.2 How do I maximize the space on a mountable floppy disk. As you all know, when you are working with a floppy, it is usually more important that the floppy have a lot of room, rather than a lot of other 'stuff'. Here is the magic incantation that will maximize the amount of free space on the disk. newfs -Tfloppy[35] -i[4096 | 8192] -c 80 /dev/fd[0|1]a This leaves the disk with fewer inodes and only one cylinder group. 5.3 Character Device Driver info These devices are also often referred to as character devices. 5.3.1 Printers NetBSD and FreeBSD both include both an interrupt and non-interrupt driven parallel driver in their stock manifestations. It is possible to connect a serial printer to either. This brief tutorial is provided by Daryl Berryhill (djberry2@b25info.b25.ingr.com) The way I got my printer to work. 1) connect a 25 pin to 9 pin null modem cable to printer and computer. 2) set printer to 9600 baud, 7 data bits, even parity. 3) configure /dev/com1 (DOS COM2) port the same way as the printer 4) add a line to /etc/printcap that says: lp|local line printer:\ :lp=/dev/com2:wq:sd=/var/spool/lpd:lf=/var/log/lpd-errs:\ :br#9600 5) type "lpr " 6) type "lpd" and it should start printing. An obvious point, but make sure that you do NOT start a getty on on the com port. Check the /etc/ttys file and make sure that the com port you select is not active. There have been many reports in the past of people not being able to get their parallel port printer working. One of the problems seems to be cables. Another problem may be with the hardware. A seemingly stupid suggestion is to replace your printer card with the cheapest parallel port card you can find. I am using a $10 single parallel, two serial port card that I got from Altex. Works great. In addition, there are people that want to set up multiple printer queues using the BSD queueing mechanism. Here is a brief tutorial: Lpf is mainly intended for processing text and nroffed output...it isn't anything clean...it will do certain games that will mess up PCL output. If you're producing straight PCL or Postscipt (assuming your LJ takes it), then you want to print directly to the printer w/o any processing. What you really want is a "physical" queue that does no processing, and several logical queues that map back to the physical queue and do processing...or one "smart" queue that does file content recognition and then maps to the raw queue. I do something like this for my DeskJet. There is one raw queue and several logical queues (some postscript that do different resoultions and color depth, some text that do various formatting, etc). When I get the time I'll be trying to set up a "smarter" queue using aps and maybe some bits from flexfax. To map logical to physical queues either use a filter that pipes back into lpr -P itself, or just point it at the "raw" queue using something like: textlp|Text Printing:\ :lp=/dev/null:\ :if=/usr/libexec/lpr/lpf:\ :rm=localhost:\ :rp=lj.raw: And other entries as needed, you get the idea...to use an output filter instead of the rm/rp approach (more efficent), you can get away with something like: :of=/usr/local/bin/printraw: where /usr/local/bin/printraw looks like this: #!/bin/sh cat | lpr -h -Plj.raw 5.3.2 Terminals/Keyboards Terminals are relatively simple to add. It involves making sure the /etc/ttys file identifies the com port (com0, com00, or tty00 depending on your configuration) as an active port and a getty is running. The man page for ttys and getty help explain this. Many people report that there are sometimes problems running some programs on a remote terminal. There are some known bugs in the terminal handler where the parity and bits per character are concerned. They are being worked on. 5.3.3 Modems/FAX Modems 5.3.3.1 How do I add a modem to *BSD: The first part that confused me was assuming that /dev/com1 is the same as DOS com1, they're not. /dev/com0 is connected to COM1 and (I think) /dev/com1 is connected to COM2. The switch settings for my modem were the same as what I had under DOS, CTS CD RTS et al were set to follow the actual line (i.e. my modem can force them high, which I turn off) Ok that's not too bad. Now you need to edit the /etc/remote file to include a reference to the com port. I have only used NetBSD-0.8, so I'm not sure what the default files are like that come with the other rev's of *BSD. I added the last line (with com0). -------------------------------------------------------- # @(#)remote 5.2 (Berkeley) 6/30/90 # ..stuff deleted... # UNIX system definitions unix1200|1200 Baud dial-out to another UNIX system:\ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial1200: unix300|300 Baud dial-out to another UNIX system:\ :el=^U^C^R^O^D^S^Q:ie=%$:oe=^D:tc=dial300: ..stuff deleted... dial2400|2400 Baud Hayes attributes:\ :dv=/dev/tty19:br#2400:cu=/dev/tty19:at=hayes:du: dial1200|1200 Baud Hayes attributes:\ :dv=/dev/tty19:br#1200:cu=/dev/tty19:at=hayes:du: # Hardwired line com1c|com1:dv=/dev/com1:br#9600: com1b:dv=/dev/com1:br#2400: com0:com0:dv=/dev/com0:br#9600:at=hayes: ------------------------------------------------ Ok, now if you are running as root you can use type 'tip com0' and you should then be talking to your modem. I use kermit to transfer files, and it wants to create a lock file in (not sure about the exact path) /var/spool/uucp/lock or something along those lines. I made the directory world writeable so I could run kermit with my own uid, rather than root. Also, you may need to add an entry in /etc/remote for com0. Thanks also to thombsr@liciren.li.co.uk for information on how to do this. New problems have surfaced with the latest releases of NetBSD. It seems that the paradigm that the com port used to use was 'less than complte' and much of the code has been replaced. This provides for some interesting new problems. The first is that the Carrier Detect line is no longer ignored, as it was before. This means that programs like kermit and tip/cu either have to be told explicitly to ignore the CD line (in kermit, for example, you would use the 'set carrier off' in your .kermrc) or you need to use the 'stty -f /dev/com? clocal' command before you open the port. If you have trouble getting the settings to 'stick' it is because the ports are now initialized to known settings on the last close of the port. A workaround for this is to use the command: sleep 1000 < /dev/com? tip ... { or } kermit ... This will keep the port open for about 12 minutes while you do whatever it is you need to do. Once the port is open and your connection established, the port will not reset until the final close. Another symptom of this malady is described below. When I 'set line' in kermit, it hangs until I hit my escape character (^\). It *does* set the line (and the rest of my session is normal), but it's annoying because I can't put 'set line' in my .kermrc. The answer is available in the kermit documentation as well as here (now). The following commands are MY .kermrc file: set carrier off set line /dev/com2 set speed 38400 set modem hayes set dial speed on set dial timeout 60 The 'set carrier off' tells kermit to ignore the Carrier Detect line from the modem, and to proceed as if the command were there. This will (as far as I have ever been able to find out) fix the specific problem with not being able to set the line. 5.3.3.2 Adding a modem to NetBSD. 5.3.3.3 Adding a modem to FreeBSD. 5.3.3.4 Adding a Dial-in/Dial-out FAX to NetBSD or FreeBSD. First, here is the known working configuration for these instructions: - HylaFAX 3.0 beta 100. - Zoom VFX V.32bis Faxmodem; - Rockwell datapump. 1: Start faxq from rc.local, no options on the command line. Add a line to your /etc/rc.local which starts up the faxq program. Do not include any options on the command line. 2: Stary faxgetty from init, i.e. a line in /etc/ttys. I use the non modem control device; however, it's nonstandard hardware and I've modified the driver to always return sighup on lost carrier to solve some sticky problems with non modem control devices never getting SIGHUP's. Basically, I just did as the directions said to do. I ran 'faxaddmodem' script to configure the type of modem. I did have to simplify some lines in the script (the ones executed in a subshell) since I think my version of bash doesn't handle subshells correctly. RTFM and you should be OK unless your modem is braindead and stupid, not too unlikely tho given the current state of Fax modems... B^(. 5.3.4 What is the trick for getting Kermit to work with rz and sz? Add these lines to your .kermrc file. They should do the trick. define sz !sz \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9 < \v(line) > \v(line) define rz !rz \%1 \%2 \%3 \%4 \%5 \%6 \%7 \%8 \%9 < \v(line) > \v(line) 5.4 Tape Drives This section should help out for those of you that have either never used tape drives before, or only have experience with them as non-Unix devices. 5.4.1 Does the tape need to be formatted? It depends, but I think usually not. And when it is necessary, I don't know how it would be done. One thing is for certain, though, first.... NEVER use the block devices.. erase them and forget you ever saw them. All operations on tape should be to the character device (rst0). 5.4.2 If I execute the command 'st -f /dev/st0 status', I get: Archive/Tandberg? tape drive, residual=0, blocksize=512 Density: high = 16 (0x10), medium = 15 (0xf), low = 5 (0x5) ds=0 er=0 so to write to tape at high-density (QIC-150), presumably I want to use a device with minor number +4 (in st.c, density is computed as minor >> 2 & 0x03, where low density == 3 and high == 1): You have the idea.. density is controlled by bits 2 and 3 00 = default 01 = hi density 10 = medium density 11 = low density, Unless the driver knows about you kind of drive the density values may need to be set by hand before they make any sense. 5.4.3 When is erst0 used? e stands for 'eject' and is bit 1 of the minor.. e.g. eject on close.. many devices can't actually do this. There is actually a method to this whole thing: r = raw (rst0) e = eject (erst0) n = No rewind (nrst0 or maybe nerst0) 5.4.4 How is density (bpi) computed? I am using 3M DC 6250 cassettes which have a 250MB capacity on the Viper 150. But computing the bits/inch based on 250MB/tape-length (1020 ft.), I get a density of 171335 bpi, which is nowhere near the 10000 bpi associated with QIC-150 in the st(1) man page. Why the discrepancy? These cartridge tapes are written in narrow tracks which alternately begin at opposite ends of the tape. Track 0 starts at the beginning of the tape, and Track 1 starts at the other end, etc. So, how many times does the tape go backwards and forwards? If there are 17 tracks, your density is 170000 bpi if it is 10000 bpi per track. The more tracks, the lower the bpi/track. 5.4.5 How is an appropriate block size determined (and in what units are they specified in the st(1) command)? QIC 150 and below should stick to 512 byte blocks a write of 1024 bytes from the program will be written as 2 512 byte blocks with no speed penalty. dd will think it's writing a 1024 byte block but on tape it's 2 x 512. Stick to 512 on QIC 150 or less if you ever hope to swap data with anyone else. 5.4.6 From the 4.3BSD mtio(4) man page, it sounds like data is typically (traditionally?) stored on tape in eof-terminated sequences of 1K records. 5.4.6.1 Is st's notion of "file" the record sequence between two eof marks? 5.4.6.2 What about a "record"? 5.4.6.3 Is a "record" one "block", as determined by st's "blocksize" command? If not, what is the connection between them? 5.4.6.4 Can I change the "record" size? 5.4.6.5 When would I want a block size that is different from the default? 1KB is the size of writes used by dd or whatever. QIC specifies 512 byte records (well at least its what people use..) Whatever you write in will be broken into 512 byte sections. They must be multiples of 512 though. If you have written to a tape, a close will automatically append a filemark (eof mark). You may read the 512 byte blocks back as 512 byte records or as 1024 byte records (in which case you'll get 2 at once). The bigger the unit, the more efficient. 5.4.7.1 How do I write several archives to a single tape? I tried without success: $ st -f /dev/rst4 rewind $ tar cf /dev/nst4 archive1 $ st -f /dev/nrst4 weof $ tar cf /dev/nst4 archive2 $ st -f /dev/nrst4 weof First: throw away the block devices. 'n' stands for 'No-Rewind-on-close' and will leave the tape positioned ready for another file e.g. tar -cf /dev/nrst0 archive1 tar -cf /dev/nrst0 archive2 5.4.7.2 Later, I would expect to be able to access, say, archive3 via the fsf directive to skip over the first two archives. What is the correct sequence? st -f /dev/nrst0 rewind st -f /dev/nrst0 fsf 2 tar -xf /dev/rst0 {files} 5.4.8 Since the Viper 150 writes on QIC-150/120, I guess I don't need to worry about writing variable-length records? How about reading a tape written with variable-length records. Is this possible with the Viper? If so, what's involved? Who would have written it? :-) Presently you can't. You`re right. Don't worry about it. The new 'st' changes will change this somewhat, though. 5.4.9 The very scant documentation that came with my drive mentions a "selectable buffer disconnect size," whose default is 16K. This is evidently the "maximum number of bytes that can be sent over the SCSI bus during a single data transfer phase." What's that? How is it connected st's "blocksize" command? Do I want to use 16K blocks, or might I even want to set the disconnect size to a higher value? This suggests that 32 512 blocks will be written at a time. This jives with the tape format for some of the lower density cartridges (QIC-40 and 80, for example). The tape is written in blocks of 32 512-byte blocks, with the last three being used for Error Correction Codes. Use dd or tar with 16 k blocks and 32 x 512 byte blocks will be written. Also see 5.4.15 (below) for more information if you are using an Archive Viper tape drive. 5.4.10 What is "streaming"? When I tar a directory of files to tape, I notice that the tape often stops. Streaming means it doesn't stop? How would I get the viper 150 to stream using tar or cpio or dump? Use a bigger write size... (more efficient) Try 16k blocks. 5.4.11 Where are all the answers to the above and related questions written down? Neither on the net nor in the 4.3BSD manuals nor Administration text which I have could I find this stuff covered! They are in the FAQ :-)... 5.4.12 What else should I know? For example, it seems that a new tape must stretched. How is this done? Use a blowtorch and a pair of pliers; or you can use the non-destructive method and run the tape through a complete fast forward/rewind cycle to get it tight on the spindles. 5.4.13 My tape drive doesn't work. OK. There are lots of reasons why it may not. The most obvious is that there are no devices associated with the device in the kernel. You can check this through the use of the 'dmesg' command. Look for tape drives. If your tape drive is connected to your floppy controller, it may or may not be supported. Several manufacturers of QIC-40/QIC-80 minicartridge drives are supported natively in FreeBSD and experimentatlly in NetBSD. Some aren't (mine for example, is not). If your tape drive is a SCSI based drive, your guess is as good as mine. I don't have one. 5.4.14 I am trying to restore a tape from a FreeBSD machine on a Sun. What kinds of problems should I expect? The default blocksize should not be a problem, since they are both 20K. You may need to use "dd if=/dev/rst0 conv=swab | " instead of extracting directly from tape, just in case the byte order causes a problem. This is especially true if you don't use the 'a' and 'c' options in cpio, for example. 5.4.15 What are the jumper settings for the Archive Viper tape drive? Vipers can't do autodetection. You have to create different devices for different densitys. Minor number 8 = 120Mb, 4 = 150Mb and 12 = QIC-24 (60Mb). At least this is the only way it works for me, and since it do I haven't bothered to find out why minor 0 doesn't. If you have a 2525 (525Mb) it uses ST_Q_SENSE_HELP quirq but it might not work. The cfg0-2 switches is for setting the disconnect size, eg the maximum size transfered before disconnect to allow other scsi devices to acces the bus. Jumper in sets bit to 1. 0 = 2kb 1 = 4kb 2 = 6kb 3 = 8kb 4 = 12kb 5 = 16kb 6 = 24kb 7 = 32kb I'm using my viper at id 4 and disconnect size 16k. Works perfectly. 5.4.16 My Viper-150 autodetects fine; however, the first attempt to read a tape fails after a boot due to an "illegal SCSI command". What could be the problem? I assume that the driver is trying to use some SCSI-2 command to set the default density -- but after that, the drive is perfectly happy to do the tedious density check and off it goes. I've read all three densities on the drive. Once the drive is set up and the driver realizes there is no density command, it just brute forces the drive density and off it goes. 5.4.17 Why haven't we changed the defaults in rdump and rrestore to something that makes sense? I was trying to dump a filesystem to a remote tape and ran into an error complaining about being unable to execute /etc/rmt. Of course, if you get this error, this program doesn't exist. This information comes from ../src/sbin/dump/pathnames.h. The reason we still use /etc/rmt and /dev/rmt8 is because the rdump and rrestore protocol call for those names. This problem usually won't show up unless the original installation of the system was done before NetBSD 0.9 *AND* the etc.tar.gz distribution was never done. This distribution fixes this problem by creating the symbolic link from where rmt lives to /etc/rmt. The Makefile for rmt should also create this link (I'd check before assuming it does.) 5.5 Network Network devices for NetBSD and FreeBSD include many types of Ethernet cards, as well as Serial Line IP and Point to Point Protocol. 5.5.1 How can I get my system to work as a network router? The first hurdle to overcome is that the default kernels do not have the GATEWAY option compiled in. Without this, it is very nearly impossible to use the kernel as a router. Once you have the GATEWAY option compiled in, all sorts of things magically start to work. If you haven't got the GATEWAY option enabled, you can also use 'sysctl -w net.inet.ip.forwarding=1' if you are using FreeBSD or NetBSD versions that support that. Remember, once you build the new kernel, you will need to install it in the root directory and reboot. Once you have the forwarding option set, you will need to make certain that you have not included the '-q' option to routed. This should be in the routed_flags keyword in /etc/netstart. If you are using multiple internal LANs, you may also want to invest in gated instead. For those folks that are not using routed, you will need to make certain that you have a static route to your network provider established. To test your network capability, try running the following command: traceroute -s YOUR_ETHERNET_ADDRESS 129.186.150.150 Check to see where your packets are hanging up. It might be that someone upstream from you has something broken instead of simply assuming it is your fault. 5.5.2 I recently has a problem where I got a message that said "panic: kmem_malloc: mb_map too small". What is the solution to this problem? The second hurdle is that sometimes you run out of cluster allocation space in the kernel. This is probably network-related and usually shows up when something is being done using the network (like NFS). The way to get around this would be to change the value of NMBCLUSTERS in your config file. NMBCLUSTERS is set at 256 by default, and increased to 512 when the GATEWAY option is active. To be very safe, you could add options NMBCLUSTERS=1024 to your config file, and recompile. This is reported to work with systems that crashed as soon as a large number of people (75+) were connected to it. 5.6 I want to use my ZIP drive. Are there any weird things I need to know? One of the things that "just work" are ZIP drives. The -current code for both FreeBSD and NetBSD handle ZIP drives very cleanly. One of the unusual things about ZIP drives is that most people don't know (and the man page is deliberately vague about) is once a person has permission to write to the ZIP drive, they can mount it onto a directory in their space. This is new with the adoption of BSD 4.4, so it isn't really suprising that it is new. -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!Germany.EU.net!main.Germany.EU.net!EU.net!news.sprintlink.net!news-stk-200.sprintlink.net!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 7 of 10) Supersedes: <386bsd-faq-7-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:06 -0500 Organization: Dave's House in Omaha Lines: 672 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-7-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:127 comp.unix.bsd.freebsd.announce:179 comp.answers:15806 news.answers:63152 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part7 Section 6. (Interaction with MS-DOS) 6.0 Working with DOS and BNR/2 related software. This section is designed to cover some of the more common problems that DOS will have when interacting with BNR/2. There are other sections of the FAQ that deal with indirectly with this . Try looking in sections 0, 1, and 2 to see if something in there (particularly when talking about DOS and *BSD coexisting on a single drive). 6.1 Formatting a floppy There is a rumor that floppy formatting either is possible or was possible at one time. If you see any software or FTP sites with anything about this, please contact burgess@cynjut.neonramp.com and I will make sure it gets updated in here. There was a set of patches that were developed to allow floppy formatting. They are not currently included in any of the *BSD systems. I have actually applied the patches for floppy formatting here on an older version of NetBSD, and they seem to work just fine. The fdformat program could use some work, but seems to work OK. 6.2 Sharing the Disk with MS-DOS There are a myriad of questions about how to share a disk between *BSD and MS-DOS. They all boils down to one of the following questions: 1) How can I partition my drive for both MS-DOS and *BSD? 2) I can install using the whole disk, but I can't install when I try to share the drive between *BSD and MS-DOS. Why? 3) I can use either MS-DOS or *BSD on my hard drive, but shutdown -todos doesn't seem to work. 6.2.1 How can I partition my drive to support both MS-DOS and *bsd? NOTE: Before attempting to install *bsd on a computer with an active DOS partition, ALWAYS back up your hard drive. No one on the net, no matter how talented, can help you recover a hosed MS-DOS file system. If you lose all of your data, it is YOUR fault. During the install phase, you need to have un-allocated space left on your disk drive. This allows the install program to correctly install the *bsd partition in the partition table and DOS to peacefully co-exist with *bsd. If you do not have any space available on your hard drive, you will not be able to install both. Re-fdisk your hard drive and make sure you have left un-allocated space in the partition table. This WILL wipe out your DOS partition - Permanently. Even though the partition table procedure above may have worked, there are still no guarantees that your system will boot after the install. This problem most often manifests itself as one of the endless reboot problems. You would normally be able to boot DOS from the hard disk, but not *bsd (once that partition is marked as active). Once the partition table has been correctly defined with both DOS and *bsd, there can still be problem. One of the most common is that the disk drive works in some sort of translation mode. This is particularly common with drives that physically have more than 1024 cylinders. DOS cannot access a drive with more than 1024 cylinders. Translation mode will have to be turned off, usually by redefining your hard drive in SETUP as one of the user definable types. This change will normally trash your hard drive, or at least render your DOS partition unreadable. The solution to this problem is to install *bsd at the end of the hard drive. While DOS cannot use cylinders above 1024, *bsd has no such limitations, once it has booted. During the boot-up phase, some of the newer boot blocks will refer to the BIOS for some services. Specifically, the disk is checked for a bad sector map on the last track. Since the BIOS cannot deal with cylinders higher than 1024, your bad sector map will be incorrectly identified as 1023 if the number of cylinders is larger than that. This problem is being worked on, and I hope to change this section with better news later. NOTE: The only people that this problem will effect are those MFM and ESDI users that have drives with more than 1023 tracks. While drives of this type are not the overwhelming majority, neither are they an anomoly. People are working on it. As an example, if your hard disk physically has 8 heads, 16 sectors per track, and 2000 cylinders (128M); you MUST use some sort of disk translation in order to use the entire drive. An obvious geometry for this drive (for DOS) would be 16 heads, 16 sectors, and 1000 cylinders. Unfortunately, *bsd operates using the disk drives native geometry as reported during the probe phase of boot up. This will probably be 8/16/2000, and will NOT agree with your translated disk geometry. This causes an endless reboot cycle. If you change the geometry so that the drive agrees with the disklabel, your DOS partition is toast. The best way to operate in this case would be to (for example) split the disk in half. That leaves 64M for DOS, using a geometry of 8 heads, 16 sectors per track, and the first 1000 cylinders for DOS. The second 1000 cylinders could then safely be used for *bsd. The DOS partition table may even be capable of showing this partition as it actually exists. ACCESSING MS-DOS PARTITIONS FROM NetBSD-i386 First off, it's important to understand BSD disklabels. The disklabel is a description of the Unix parition layout and other disk parameters stored on-disk, usually somewhere in the first couple of sectors. There is a maximum of 8 partitions, labelled "a" thru "h". Typically partition "a" is assigned to the root partition, partition "b" is configured as a swap area, and partition "c" is defined as the whole disk. You can change these, but it's a good idea to stick with this scheme, as many programs assume that's the way things are going to be. If you're whole disk is dedicated to Unix, then that's all you need to know. But if you're sharing your disk with DOS, then there are a few magical things happening. DOS has it's own partitioning scheme. The way NetBSD co-exists with this is to fit all of the Unix partitions into one DOS partition. So partitions a-h all fit inside one DOS partition, which has a partition type of 165 (each MS-DOS partition has a "partition type" associated with it. The BSD partition type is 165). In this setup, partition "c" refers to the entire BSD partition. But in this scheme, partition "d" refers to the ENTIRE disk, MS-DOS partitions and all. So, if you want to access your MS-DOS partition from NetBSD, first you'll have to create a partition that points to the MS-DOS partition. You'll want to run the command: disklabel -e -r /dev/r??0d (fill in with your disk type). You'll get popped into an editor with all the disklabel stuff in it. Go down to the bottom. You should see something like: 6 partitions: # size offset fstype [fsize bsize cpg] a: 30720 409600 4.2BSD 1024 8192 16 # (Cyl... b: 129024 440320 swap # (Cyl... c: 1617920 409600 unused 0 0 # (Cyl... d: 2029568 0 unused 0 0 # (Cyl... e: 61440 569344 4.2BSD 1024 8192 16 # (Cyl... f: 1396736 630784 4.2BSD 1024 8192 16 # (Cyl... (or whatever it appropriate for your disk). Note that partition "a" starts on cylinder 200. That's where my BSD partition starts on my disk. Also note that partition "c" starts at 200 as well and goes to the end of the disk. You'll also note that partition "d" goes from sector 0 all the way to the end of the disk. Add a new line that looks something like: g: 409568 32 MS-DOS # (Cyl. 0*- 199*) (The comment on the end isn't necessary. Only the partition letter, size, offset, and parition type are needed. You can put unused in instead of MS-DOS if you want). *NOTE* Be sure to change the line that says "6 partitions" to the new number of paritions that you have!!! Otherwise you'll get an obscure error. In my case I'd change that line to be "7 partitions". If you aren't sure what your MS-DOS partition size and offsets are, you can use the NetBSD fdisk to find them out. Don't forget that there's a maximum of 8 partitions. Once you do that and you have MSDOSFS configured into your kernel, you can just do something like "mount -t msdos /dev/sd0g /msdos". Or you can put a line like this in your fstab: /dev/sd0g /msdos msdos rw 0 0 If you want to access a DOS-only HD from NetBSD, here are some instructions posted by Charles Hannum a while back. I haven't tried them myself, but they seem like they would work. Assuming you don't have something (like OS-BS) which uses the extra sectors in the boot track, you can do the following: 1) Use the NetBSD `fdisk' or DOS `pfdisk' to create a NetBSD partition in the MBR which spans the entire disk. 2) Save a copy of the MBR: dd if=/dev/rsd0d of=my-mbr bs=1b count=1 3) Use `disklabel' to create a NetBSD label with the DOS partition and whatnot. Answer `y' when it asks you if you want to `overwrite [a] disk with [a] DOS partition table'. 4) Put back the saved copy of the MBR: dd if=my-mbr of=/dev/rsd0d bs=1b count=1 This works for me. Your milage may vary. Luke Mewburn has provided the following tutorial on using the pfdisk program and making your *bsd/NetBSD partitions peacefully coexist with DOS. While this is kind of a 'cookbook' approach, please keep in mind that this is probably easily transferrable to all BNR derived Unices. Getting NetBSD 0.8 to coexist with DOS. Written 930510 by Luke Mewburn NetBSD can be made to happily co-exist with DOS if its install program knows how to modify the partition table. This assumes that you have access to a program which enables you to edit the partition table of your hard drive (such as Norton Utilities, or pfdisk). When you partition your hard drive, you will probably have a large partition in which you wish to place NetBSD. This has to have the partition ID of 165d (or 0xA5). To change this, you can use the 'Partition Edit' section of Norton's, or you can use pfdisk. This document will go into more detail on how to use pfdisk, as it's freely available. I'll use my personal drive specifications in the following example. It is a 1001 cylinder, 15 trk/cyl, 17 sec/trk, 125MB drive. I low-level formatted it, and used fdisk on a MS-DOS 5.0 boot disk to create a primary partition '1' of 32MB, and an extended partition '2' of 93MB. I formatted the drive with format c: /s to give myself a bootstrap for DOS (much faster than floppies :), but this isn't that necessary. Now, the next stage... Running pfdisk 0 (to access my first (and only :) HD) came up with something like: For help, enter: '?' pfdisk> At the prompt, enter 'l' to list partitions, giving (in my case), something like: # Partition table on device: 0 geometry 1000 15 17 (cyls heads sectors) # ID First(cyl) Last(cyl) Name # start, length (sectors) 1 4 0 256 DOS16 # 17, 65518 2 0 257 999 unkno # 65535, 189465 3 0 0 0 empty # 0, 0 4 0 0 0 empty # 0, 0 active: 0 (none) (Note that there is 1 cylinder less - the last one is, I think, for the IDE controller to use when auto-mapping dud sectors out.) Now, we want to change the type of #2 (the prospective NetBSD partition) to 165. You can obtain a list of known IDs by selecting 'I'. Depending on the version of pfdisk you have, 165 may or may not be known. This doesn't matter too much either way. To get the NetBSD install program to use the 2nd partition, I would enter: pfdisk> 2 165 257 999 Another 'l' to list partitions would show that the entry for partition 2 will either look like one of the following (depending on whether pfdisk knows about the 386bsd partition type or not): 2 165 257 999 unkno # 65535, 189465 or 2 165 257 999 386BS # 65535, 189465 You could set the active partition with 'a 2' if you want NetBSD to always boot, but I personally recommend that you obtain a copy of OS-BS 1.35 or BOOTEASY to save you the hassle of running fdisk or pfdisk every time you wish to swap system types. To complete everything off, do 'w' to write out the info (once you're sure it's correct! :), and 'q' to quit the program. Well, I hope that is useful to someone. Comments can be directed to the author (Email: ). 6.2.2 I can install using the whole disk, but I can't install when I try to share the drive between *BSD and MS-DOS. Why? This is an extension of the question above. The most common reason for this is, once again, disk translation problems. If the disklabel does not agree with the disk geometry, the install will fail. Other incarnations of this problem are that you can install DOS, then *BSD, and DOS will be hosed, or vice versa. There are more than a couple of people who will blithely suggest that this is a good thing, and you should install *BSD exclusively, job not withstanding. 6.2.4 Is there any hope of ever running MS-DOS applications under any of the free BSD systems? There is currently a project in development to port the Windows program environment to Linux and the *BSD systems. Here is an excerpt from the original message announcing the project: As many of you already know, we are in the process of creating a Windows emulator. This emulator is similar to Sun's Wabi product, but is being developed completely independent of them. Many of you are anxious to hear the latest status of the project. I have created a mailing list for those of you. To join the list, simply send mail to: wine-project-info@amscons.com If your mailing address is not easy to deduce from the mail headers, then place the following line in the body of the message that you send. Reply-To: youraddress@yourmachine where youraddress@yourmachine should be replaced by your actual mailing address. 6.2.5 How do I get Linux executables to run under NetBSD? First, you need to make certain your kernel has LINUX_COMPAT as one of the options for your kernel. Second, you will need the libraries for Linux. You can find the Linux supporting binaries for NetBSD i386 at ftp://ftp.enigma.net/pub/netbsd_i386. There are instructions there to tell you how to get the libraries working correctly. 6.3 Accessing the MS-DOS filesystem One of the most common MS-DOS related questions (with the possible exception of 6.2 above) is how to access the DOS disk partitions from *BSD. One way is to modify mtools so that it recognizes your DOS partition. This solution is provided by Jim Paradis (paradis@sousa.ltn.dec.com): -------------------------------------------------------------------- To build a /usr/othersrc/public/mtools.2.0.5/devices.c file that lets you access the DOS partition, you need to know the byte offset of the DOS partition from the start of the hard disk. You would then add an entry to the devices[] array as follows: {'C', "/dev/wd0d", L, 16, 0, (int (*) ()) 0, 0, 0, 0}, So, f'rinstance, if your DOS partition starts at the beginning of the disk, you'd have: {'C', "/dev/wd0d", 0L, 16, 0, (int (*) ()) 0, 0, 0, 0}, On the other hand, if your DOS partition starts 32MB into the disk, you'd say something like: {'C', "/dev/wd0d", (32768L * 1024L), 16, 0, (int (*) ()) 0, 0, 0, 0}, -------------------------------------------------------------------- How to mount your DOS partition from FreeBSD 1. First, be root. The following won't work as an ordinary user. 2. Second, use 'fdisk' to see where your DOS partition starts. It will be labeled as type DOS. On my system, 'fdisk /dev/sd0d' produces the following: ... (extraneous output, not of interest) ... The data for partition 0 is: sysid 6,(Primary 'big' DOS (> 32MB)) start 32, size 306400 (149 Meg), flag 0 beg: cyl 0/ sector 1/ head 1; end: cyl 149/ sector 32/ head 39 This shows me that my DOS partition starts at sector 32, and is 306400 (512 byte) sectors long. NOTE: If you're trying to mount a DOS `EXTENDED' partition, then you need to add the number of sectors per track to this start address you got from fdisk in subsequent calculations, I.E. in the above example (assuming it was an EXTENDED partition rather than the Primary), you'd use `start 64, size 306400'. [Ed.Note. This example assumes a SCSI disk. For disks with a number of sectors per track which is different than 32, you will probably see the 32s above replaced with your number of sectors per track. IDE, MFM, and ESDI drives are all examples where the number of sectors per track is likely to NOT be 32.] 3. Next, using this information, you craft a new disk entry in your /etc/disktab file that assigns one of your unused "UNIX" partitions to this DOS region. Again, using my system as a default, you see I've created: disk0|DEC 5501:\ :ty=winchester:dt=SCSI:se#512:nt#8:ns#256:nc#1001:rm#3600:\ :pa#956416:oa#307200:ba#8192:fa#1024:ta=4.2BSD:\ :pb#131072:ob#1263616:tb=swap:\ :pc#1087488:oc#307200:tc=UNUSED:\ :pe#306400:oe#32:te=MSDOS: As you can see, partition 'e' now points to the DOS partition as pointed out by fdisk. [Ed.Note again. Remember what I said about the 32 above...] Also, there may be a problem with some versions of disklabel not recognizing the MSDOS (or MS-DOS, depending) in the te: entry above. You may need to run a "disklabel -e" to get the partition type to 'stick'. 4. Now we have to actually stick the label on the disk, which is done with disklabel. Using my example, this would be: disklabel -r -w sd0 disk0 SCSI /usr/mdec/sdboot /usr/mdec/bootsd 5. Reboot your system to see the new disk label. 6. Mount the DOS partition. I do: mount -t pcfs /dev/sd0e /dos_c Where /dos_c is just a convenient directory to mount it. 7. You're set! With the exception that the '-t' option is msdos in NetBSD, these instructions seem to work with the same facility for NetBSD. I also received a note a couple of weeks ago (that I promptly deleted because I new that I would remember what it said) that DOS extended partitions are readable if you skip the first 'n' blocks in your computations (where 'n' is your number of sectors per track). This way, you skip over the 'new' part of the DOS file system. That means that insted of the oe:32 above, you would need an oe:48 instead. Also remember that the compressed file system in DOS 6 will probably be completely greek to your NetBSD/FreeBSD system. I seriuosly doubt that you will be able to read the compressed DOS file system anytime in the forseeable future. 6.4 NFS/PC-NFS support The problems normally associated with PC-NFS are also associated with NFS in general. 6.4.1 Can I use 8K packets for NFS? When I try, I have all kinds of problems. Specifically, I get 'ring buffer overflows' or the performance is real bad. In addition to the NE2000 card, this problem can also manifest itself on other ISA networks cards that have a limited amount of memory. Ken Raeburn (raeburn@cambridge.cygnus.com) has identified a common problem with the NE2000 card and provided us with a work around: -------------------------------------------------------------------- I reported previously that I was seeing problems reading files over NFS using the ne2000 driver; timeouts would eventually be reported, no data would be read. Listing files and directories (small ones anyway) were not a problem. In the meantime, mounting NFS file systems with "rsize=1024" does get rid of this problem. Ken -------------------------------------------------------------------- As a matter of policy, specifying "rsize=1024,wsize=1024" works very well also, and makes the transfers seem to run faster. This is probably because there are fewer collisions. The disadvantage of this method comes from the kernel 'sync'ing after all NFS writes. This can slow NFS accesses considerably. As with most generalizations, this one too can do nearly as much harm as good. Charles Hannum reports that he has no trouble using the default 8K packet size. If you have trouble, reduce your default packet size until the problem goes away. With the newer drivers (especially the ed driver) most of these problems are solved automagically. If you are still using the original 386bsd 0.1 release, you REALLY need to upgrade. See section 6.4.5 on 'ring buffer overflows' and the 3C503 for more discussion on this problem. 6.4.2 How do I get around the NFS "Permission denied" error? The problem is not the configuration of the server (unless there is no real requirement to run it in "secure" mode, and you happen to be running it that way anyway). The problem is the fact that, even though mount request are sent on a privileged port, NFS connections are not. 6.4.3 What does the message "BAD MNT RPC: RPC Authentication error; why = Invalid client credential" mean when I try to mount something from another machine? Hellmuth Michaelis (hm@hcshh.hcs.de) offers the solution to this relatively common problem: You have to make sure that the user "root" is not present in more than 8 entries in the "/etc/group" - file on the *BSD machine. Simply remove some entries and the NFS mounts will succeed. 6.4.4 What does the message "Bad MNT RPC: RPC: Authentication error; why = Client credential too weak" mean when I try to mount something from another machine? This problem is a standard NFS problem; it simply means that your user number is not one of the ones that can mount this NFS. Normally, you will get this message when you are trying to mount a filesystem from a machine that allows 'root' to mount an NFS, but limits other users. Another documented problem with "client credentials being too weak" is the dicotomy of SunOS and 4.4 based systems. SunOS, and other commercial systems, do not allow NFS commands to come in on anything but a reserved port. There are several places that need to be addressed if weak credentials are a problem. The first is the mount command. The mount itself may work, but all references to files in the NFS will fail. This is usually the most common symptom of this problem. The solution for this is to either include the '-o resvport' keyword pair on the mount command, or the -P option. In addition to the resvport command on the mount, it may become important to include an NFS volume in your fstab. If this is the case, you will need to ensure that the resvport keyword is added on the mount line in the fstab. Finally, if you are using the automounter, you will need to make absolutely certain that you have included the resvport option in your automount maps as the default. 6.4.5 I get a lot of 'ring buffer overflow' messages using NFS and the ed0 driver. Is there a problem? David Greenman (davidg@implode.rain.com), the original author of the ed0 driver, provides us with some insight into the inner workings of the ed0 driver. It always surpises me that people don't just ask the original author these questions. :-) Anyway, the reason these are happening is that the access to the 8bit boards shared memory simply isn't fast enough to deal with full wire speeds...but the driver tries hard...so even though packets get dropped, your performance only drops to about what the ethernet board is capable of (should be in the 400-600k range with an 8bit card). NFS is especially bad because the UDP window is quite large (40k last time I looked), so the overflow condition can happen easily. I've explained this for the most part in the release notes for the driver, but these didn't make it into either the FreeBSD or NetBSD releases (we couldn't find an appropriate place to put them). >From the release notes: receive ------- The 8390 implements a shared memory ring-buffer to store incoming packets. The 8bit boards (3c503, and 8003) usually have only 8k bytes of shared memory. This is only enough room for about 4 full size (1500 byte) packets. This can sometimes be a problem, especially on the original WD8003E and 3c503. This is because these boards' shared memory access speed is also quite slow compared to newer boards - typically only about 1MB/second. The additional overhead of this slow memory access, and the fact that there is only room for 4 full-sized packets means that the ring-buffer will occassionally overflow. When this happens, the board must be reset to avoid a lockup problem in early revision 8390's. Resetting the board will cause all of the data in the ring-buffer to be lost - requiring it to be re-transmitted/received...slowing things even further. Because of these problems, maximum throughput on boards of this type is only about 400-600k per second. The 16bit boards (8013 series), however, have 16k of memory as well as much faster memory access speed. Typical memory access speed on these boards is about 4MB/second. These boards generally have no problems keeping up with full ethernet speed. The only problem I've seen with these boards is related to the (slow) performance of the system's malloc code when additional mbufs must be added to the pool. This can sometimes increase the total time to remove a packet enough for a ring-buffer overflow to occur. With NFS, the problem is really bad, though. The 3c503 does not have enough memory on the card to support the default 8k packets that NFS and other protocols use as their default. The solution for folks that are having a problem with ring buffer overflows in NFS is for them to either use the -r and -w flags to limit the packet size or use the define "NFS_BOOT_RWSIZE=8192". If NFS doesn't work with this defined, the code will automatically step down to the next smaller increment. If you KNOW that you will always be running a 3c503, you can set this define to 4096 instead, just to make sure. This should eliminate the bulk of the ring buffer overflows in NFS. 6.4.6 I am getting really poor performance out of my network, especially when talking to older networks or when performing short file transfers. What's the problem? Try turning off rfc1323 support: sysctl w net.inet.tcp.rfc1323=0 only in newer builds. In older versions you have to edit a kernel config file. RFC1323 is not yet supported by all networks, and can cause TCP performance degradation when tried. This, for example, is a known problem on older Sun and VAX hosted networks, and on many networks which are using Linux as an intermediate host. 6.4.7 Is there any PC software that will allow me to use my enormous PC with all of the unsupported hardware as a PC-NFS server? Yes. It is called SOSS, and is available from MANY FTP sources. You will need the aforementioned Clarkson Packet Drivers for it to work, but that shouldn't cause too many problems for most people. 6.5 How can I use mtools with the 'new' floppy naming convention? With the adoption of BSD 4.4, there is a new way of accessing the floppy disk drive types. The method uses the minor device number to specify different media sizes and densities. These densities are established by a table from the file /usr/src/sys/arch/i386/isa/fd.c (in NetBSD, your mileage may vary). The table in FreeBSD's fd.c is likely to be slightly different. The order of the entries defines the order of the minor numbers, so the table below has the following characteristics: /dev/fd0a 0 /* default disk type */ /dev/fd0b 1 /* 1.44MB diskette */ /dev/fd0c 2 /* 1.2 MB AT-diskettes */ /dev/fd0d 3 /* 360kB in 1.2MB drive */ /dev/fd0e 4 /* 360kB PC diskettes */ /dev/fd0f 5 /* 3.5" 720kB diskette */ /dev/fd0g 6 /* 720kB in 1.2MB drive */ /dev/fd0h 7 /* 360kB in 720kB drive */ struct fd_type fd_types[] = { { 18,2,0xff,0xcf,0x1b,0x6c,80,2880,1,FDC_500KBPS,2,"1.44MB" }, { 15,2,0xff,0xdf,0x1b,0x54,80,2400,1,FDC_500KBPS,2,"1.2MB" }, { 9,2,0xff,0xdf,0x23,0x50,40, 720,2,FDC_300KBPS,2,"360KB/AT"}, { 9,2,0xff,0xdf,0x2a,0x50,40, 720,1,FDC_250KBPS,2,"360KB/PC"}, { 9,2,0xff,0xdf,0x2a,0x50,80,1440,1,FDC_250KBPS,2,"720KB" }, { 9,2,0xff,0xdf,0x23,0x50,80,1440,1,FDC_300KBPS,2,"720KB/x" }, { 9,2,0xff,0xdf,0x2a,0x50,40, 720,2,FDC_250KBPS,2,"360KB/x" }, }; In order to add a new device (such as a 2.44 Meg floppy) new tables entries are theoretically all that would be needed. As new entries are created, the minor device numbers would increase and the associated device names would be added. -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!Germany.EU.net!main.Germany.EU.net!EU.net!news.sprintlink.net!news-stk-200.sprintlink.net!news.sprintlink.net!news-pen-14.sprintlink.net!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 8 of 10) Supersedes: <386bsd-faq-8-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:06 -0500 Organization: Dave's House in Omaha Lines: 858 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-8-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:128 comp.unix.bsd.freebsd.announce:180 comp.answers:15807 news.answers:63153 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part8 Section 7. (System Communication and Network Information) 7.0 Communications 386bsd and its kith support a wide range of communications methods. 7.1 SLIP/CSLIP Serial Line I/P is supported in all versions of PC BSDs. Brian provides us with a rather good explanation of some of the hurdles that must be overcome for a working slip interface. The idea is (overview) that you make a serial line connection to the host, set the line discipline, and tell your router to use this interface as your gateway. You also should set the gateway up as a nameserver. You will need the information in 7.4.1 below to make sense to you before you proceed much further. I suggest you read that now. Sounds easy ? - well it is if you've done it before. The _usual_ way of doing this is as follows: Both server and client must know eachothers inet addresses. Set these up in /etc/hosts with lines saying 11.22.33.44 host.my.domain.name host 11.22.33.55 client.my.domain.name client where 11.22.33.?? is your inet number, and the following name is the full machine name (and is followed by any number of aliases). SERVER: Create a login - usually Sclientname - and run `sliplogin` as its shell. I've looked at the docs for sliplogin, and it seems fairly straightforward. [Ed.Note - I have; it is.] A fairly common problem on the server is an error that is caused by the lack of a 'sliplogin' entry in the /etc/shells file. Be sure to add sliplogin to your shells file. CLIENT: Set up /etc/resolv.conf to say the following (for the nameserver) domain client.my.domain.name nameserver 11.22.33.55 ** traditional method ** - Log on to the server. This is usually done via kermit or some such program. - Exit the program (or background it if your line wants to drop once the device is closed). - Run `slattach /dev/comport` for whatever "comport" is. On most BSD derived systems, this may be either com0, or cua01, or whatever the correct name is for your site. If you run into an error that says 'not configured' in it, your kernel either does not recognize your port (dmesg will verify that) or your kernel does not have the slip interface built in. See below for the latter. The former could be caused by any one of a dozen problems, including conflicting or incorrectly identified IRQs or port addresses. - Run `ifconfig sl0 net clientname servername netmask 0xffffff00` - Run `route add default servername`. "servername" is your server and "clientname" is your client. It should now be possible to `ping host` ** my method ** Configure /etc/remote Configure /etc/host.dial Run `slip host`. /etc/remote contains an extended `tip` entry. /etc/host.dial contains a login script (and is named in /etc/remote). Oh yes, don't forget to have a line in your kernel config saying pseudo-device sl 2 Without this line, you may get a 'device not configured' or 'TIO...' error because the slip driver is not built into the kernel. Someone else mailed me their instructions for using a SLIP service. Here they are, in all their glory. Hi, I thought I'd drop you this email outlining how I have SLIP set up to dial and communicate, as I remember this being an area in the FAQ which needed some expansion/clarification. What I outline works for me dialing up under NetBSD 0.9. Though I don't know the specific nuances of FreeBSD (eg. the boot-up configuration of the interfaces - /etc/hostname.sl for NetBSD) this'll be easy for someone to add to, hopefully before you release it (I know there's nothing I hate more than having to convert one setup's info into another nearly, but not quite, the same setup :-) In the last quoted script file (slip-off) the unlock line should read: /usr/local/etc/unlock LCK..$DEVICE 1) Configuring the SLIP interface. Ensure that the sl device is present in your kernel (default with the generic kernels). In NetBSD 0.9 they get assigned in turn with each 'slattach'. Put your own hostname and ip number, and that of your dial up gateway, into your /etc/hosts. This is mine:- 127.0.0.1 localhost 158.152.1.65 gate gate.demon.co.uk 158.152.26.67 blodwen blodwen.demon.co.uk Ensure that your /etc/resolv.conf is set up appropriately, to point to the nameserver of your dial-up provider/link. This is what I use:- domain demon.co.uk nameserver 158.152.1.65 nameserver 158.152.1.193 (you can have up to three nameservers, they -must- be listed by number. If you wish to look in several domains, you can use 'search demon.co.uk,foo.other.domain' etc. up to the limit (a finite length specified in resolver(5).) Also, for more flexibility, there is a nameserver switch package that allows you to change the resolver profiles on the fly; see below. Your sl interface needs to be configured using ifconfig(1) as a link from your own hostname to that of your dial-up host. Manually this can be done by:- /sbin/ifconfig sl0 on NetBSD this can be done at boot-time, by having the following in /etc/hostname.sl0:- inet blodwen.demon.co.uk 255.255.255.0 dest gate.demon.co.uk (You can substitute sl0 for sl if this will after another slattach e.g. for a local machine on a fixed cable) The netmask value (255.255.255.0 in this case) is pretty irrelevent to SLIP because you cannot have a subnet broadcast (so I am informed). I use the chat(1) program (currently available in the FreeBSD-current/ports/ directory) to dial up and enter passwords, etc. My modem is setup for hardware handshaking (a necessity really, for performance), and I use the following sh scripts to do the work. Calling 'demon' dials up and connects. Calling 'demon-down' when on-line shuts it all off. Those who use PPP should be able to work out the changes from the original ppp-on and off scripts. [I call it 'demon' for simplicity] #!/bin/sh # # attach slip and route (calls slip-on script) if /usr/local/etc/slip-on then # this adds the default route to 'gate' which is # my dial-up host route add default gate # put anything here to be run when you are connected # slurp news /usr/local/etc/slurp news.demon.co.uk & # send outgoing news /usr/local/news/bin/nntpsend # kick outgoing email sendmail -q0m else # slip-on failed fi [ here's my /usr/local/etc/slip-on ] Note that you may need to adjust the chat command to deal with the prompts you have to answer or that your modem produces, and the final message (my provider sends HELLO to signify that they are ready. The -v to chat makes it send syslog .info messages, which I then send to my /dev/console. You can remove this if you wish. The following is a modified version of the ppp-on script that comes with chat, altered to set the serial line correctly for the modem. I dial-up at 38400bps on a modem on tty03, you might want to change that too (and make sure that the stty line is all kept on one line). # # slip-on # # Set up a SLIP link # LOCKDIR=/var/spool/lock DEVICE=tty03 PHONE= USER= PASSWORD= if [ -f $LOCKDIR/LCK..$DEVICE ] then echo "SLIP device is locked" exit 1 fi /usr/local/etc/fix-cua $DEVICE sleep 16000 < /dev/$DEVICE & /bin/stty -f /dev/$DEVICE gfmt1:cflag=4b00:iflag=c00:lflag=3:oflag=6:discard=f:dsusp=19:eof=4: eol=ff:eol2=ff:erase=0:intr=3:kill=0:lnext=16:quit=1c:reprint=12: start=11:status=ff:stop=13:susp=1a:werase=17:ispeed=38400:ospeed=38400 ( if chat -v -l LCK..$DEVICE ABORT "NO DIALTONE" \ ABORT "NO CARRIER" ABORT BUSY "" ATZ OK ATDT$PHONE "CONNECT 38400" "" "ogin:" "$USER" \ "word:" "\\q$PASSWORD" "HELLO" then /sbin/slattach -h -c -s 38400 $DEVICE exit 0 else echo "SLIP call failed" 1>&2 # remove the sleep holding serial line open /bin/kill -KILL `/bin/ps -ax | /usr/bin/egrep " sleep 16000" \ | /usr/bin/egrep -v "egrep" | /usr/bin/sed 's/^\([ 0-9]*\) .*/\1'/` exit 1 fi ) < /dev/$DEVICE > /dev/$DEVICE When it comes to switching off the line, I use the following. Don't forget to adjust the sl0 as appropriate [ I call it demon-down for simplicity] #!/bin/sh # stop script # /usr/local/etc/slip-off /sbin/ifconfig sl0 down [ and /usr/local/etc/slip-off ] and adjust the DEVICE line as well. #!/bin/sh DEVICE=tty03 kill -KILL `ps -ax | egrep "slattach.*${DEVICE}" | egrep -v "egrep" \ | sed 's/^\([ 0- 9]*\) .*/\1'/` kill -KILL `ps -ax | egrep " sleep 16000" | egrep -v "egrep" \ | sed 's/^\([ 0-9]* \) .*/\1'/` # switch line back to normal (closes line) /bin/stty -f /dev/$DEVICE -clocal # unlock the device /usr/local/etc/unlock LCK..$DEVICE exit 0 And that should do it. Happy SLIPping! 7.2 PPP Implementations of Point to Point Protocol are also available. PPP has been available since the 0.9 release of NetBSD and is in the current releases of FreeBSD, OpenBSD, and NetBSD. It should also be noted that there is a newsgroup that covers the PPP protocol exclusively. It is comp.protocols.ppp. Here is some information for people desiring to set up PPP in there systems: A simple way to do this is to use the "chat" and a chat file. I use the following command to initiate a connection : root# pppd tty01 19200 connect 'chat -v -f chat.my-isp' And in the chat.my-isp file: ABORT BUSY ABORT ERROR ABORT 'NO DIALTONE' ABORT 'NO CARRIER' '' ATZ OK ATDT1234567 CONNECT \d TIMEOUT 5 ogin:\s--ogin:\s mylogin ssword: mypasswd prompt:\s /usr/lib/ppp/ppp This dials, connects and negotiates the addresses from just one line entered. To kill the connection: root # kill `cat /var/run/ppp0.pid` which has the added advantage of hanging up the phone if the modem is set up appropriately. The biggest problem that I ever had with this was working out the chat script and that was debugged by adding the following line in /etc/syslog.conf: # Hand chat debug messages to root local2.debug root The PPP.FAQ was helpful, but I ignored quite a bit of it and depended more on the online manuals. For setting up the PPP dasmon, here is some more information: For NetBSD, it turned out that I needed to rebuild the kernel with the following line in my config file, pseudo-device ppp 1 This line adds a device driver to the kernel that does the ppp protocol. Once I had that built in, everything worked the first time. This is the kind of sequence I go through to start ppp: 1. Connect with kermit to my ppp account and login. The account tells me when it starts ppp. 2. "Suspend" kermit (i. e. put it in the background). This gets me back to the shell prompt. (You can get kermit back using the "fg" command) 3. Start "pppd". When the shell prompt returns, I then have Internet access! That's it. This procedure will get you access to machines by using their IP address numbers. You still have to configure a name server in "resolv.conf" in order to get DNS functionality. My resolv.conf looks like this: domain umd.edu # Maryland's domain name nameserver 128.8.5.2 # These are the IP addresses of three nameserver 128.8.126.2 # hosts that can act as name servers nameserver 128.8.126.3 The name servers should be as "close" as possible. Whatever machine manages the modem pool your on would be the best but any machine on your local loop will give you good performance. If your Internet Service Provider uses dynamic addressing, You don't even have to worry about this. It's the point of PPP. It's actually a good thing from a security point of view. Your IP address changes w.r.t. to the rest of the net periodically. By the way, don't forget passwords on all your accounts!! When your on PPP, the rest of the net can see you too, you look like a full Internet host. It is improtant to look into the following to see if any of them apply to you, if you still have questions: Here is a sample PPP config. 1) Make /etc/ppp directory, then populate as follows: 2) Include the following in '/etc/ppp/options': crtscts modem /* This option opens the port with O_NONBLOCK if there is a connect options specified, andresets CLOCAL when the connection is closed */ 19200 defaultroute netmask 255.255.255.0 ipcp-accept-local ipcp-accept-remote noipdefault connect "/usr/sbin/chat -v -f /etc/ppp/sample.chat" 3) Make sure the modem line (in the '/etc/ttys' file) doesn't have the 'local' or 'softcar' options included. With 'local;, CLOCAL will be set for that line and SIGHUP may or may not be sent, apparently based on the age of the software. The "modem" option in the 'options' file (above) should clear that, but it may or may not ever work. If you have "softcar" in /etc/ttys, then the SIGHUP (in fact, almost all of the signals) will never work because the modem lines are effectively ignored, thereby leaving the modem in whatever mode it is in. 4) Include the following in '/etc/ppp/sample.chat': ABORT BUSY ABORT 'NO CARRIER' '' atdt5551212 rname: {sample} sword: crackme annex: {whatever} PPP. This setup uses LCP and IPCP (parts of PPP) to negotiate the dynamic IP addresses. This setup assumes an ISP which uses an annex terminal server. It prompts for "Annex username:" and "Annex password:". You then get to the command line prompt: "annex:", at which point "PPP" starts the PPP session. You will have to edit this to suit. If your ISP uses a system where you are automatically connected to PPP when you log in, your '/etc/ppp/sample.chat' file might look like this: ABORT BUSY ABORT 'NO CARRIER' '' atdt5551212 rname: {sample} sword: crackme To implement a 'permanent PPP' dial-up connection, the following has been used (by me specifically!) This works in NetBSD 1.1 or higher, OpenBSD, and perhaps recent versions of FreeBSD: The following line in /etc/ttys works wonders for making a permanent link: tty01 "/usr/sbin/pppd" unknown on rtcsts The file '/etc/ppp/options' looks like: /dev/tty01 115200 connect "/usr/sbin/chat '' 'atdt1' 'ogin:' 'x' 'sword:' 'x'" crtscts defaultroute lock netmask 255.255.255.0 n.n.n.n:n.n.n.n -ip modem mtu 1500 -detach You will, of course, have to make some changes if you have multiple ppp connections. The key here is the '-detach' to make the pppd remain connected to the controlling terminal (the modem). The basic idea is if the link drops (i.e. loses carrier), a hangup signal will be sent to pppd, causing it to exit, and init will restart it. You can also try 'demand dialed PPP' by getting the iij-ppp package from the following: ftp://ftp.iij.ad.jp/pub/network/iij-ppp0.94beta2.tar.gz) It supports BSDI's BSD/386 1.1, FreeBSD-2.0, and NetBSD-1.0, but it should be really easy to make it work with NetBSD-1.1 (it comes with a patched NetBSD-1.0 tun driver... to get it working with 1.1 or -current you will need to make the same patches to NetBSD-1.1's tun driver). You can also try 'dp' at: ftp://phoenix.acn.purdue.edu/dp/dp-4.0.tar.gz 7.3 TCP/IP TCP/IP is an integral part of BSD 4.4 Lite. There are at least five different network card drivers. TCP/IP is fully supported and is available to all users of all derived BSD systems. In fact, many people believe that this area is one of the primary advantages that BSD has over Linux. After all, TCP/IP was invented in BSD. 7.4 UUCP There is an excellent document included in the UUCP directory that describes in detail, what needs to be done to get a working UUCP for derived BSD systems. Look in the /usr/src/gnu/libexec/uucp directory for more information. You can also look in the /usr/share/doc/smm/09.uucpimpl and /usr/share/doc/smm/21.uucpnet if yours are populated. 7.4.1 TIP/CU First thing you need to do is... vi /etc/remote Then remove the two lines at the bottom of the file that mention com1, and com2. Now add the following lines: tty00:dv=/dev/tty00:br#9600: tty01:dv=/dev/tty01:br#9600: That tells tip/cu where to find your com ports. Next you need to be logged in as root and do a: chown uucp.dialer /dev/tty00 chown uucp.dialer /dev/tty01 touch /var/log/aculog chown uucp.dialer /var/log/aculog Make sure that, if you are running newsyslog, you change the owner.group entry in the newsyslog.conf file so that the file ownership is maintained correctly. Then you should be all set, remember "DOS Com1" = tty00, and "DOS Com2" = tty01. So, if your modem is at 0x2F8/IRQ=3 and you access it as the COM2: port from DOS, you would do.. tip tty01 To exit, type ~. Many people have other problems with cu. The lock open: procedure is one of them. If you receive the error: lock open: no such file or directory all ports busy You need to create a directory: /var/spool/lock, owned by uucp. If this file already exists and is owned correctly, make sure that the lock file in the directory is deleted. If you receive the error "cu: write: Input/output error" You may be able to fix this by creating an /etc/uucp/ports file (see Taylor UUCP docs). In addition, those of you using cu version 1.04 may need to add the following to their susyem: create an /etc/uucp/ports file that looked like this: port mymodem type modem device /dev/tty01 speed 19200 Now cu knows that the line is connected to a modem it does the right thing regarding setting CLOCAL on the line. You don't even have to have either of local or softcar set in /etc/ttys. Since cu's behaviour seems to be correct, I'm happy now. All I need to really make my day though is to have John or Martin to tell me that cu 1.04 still works for them even though they don't have an /etc/uucp/ports (or equivelent HDB or V2 uucp config) file ... :-) 7.4.2 What is the magic incantation that allows the modem to dial? Try 'stty -f /dev/tty0? clocal'. Change the '?' for whatever character is appropriate for your tty port. Remember, DOS COM1 = /dev/tty00 and DOS COM2 = /dev/tty01... Some other things that might cause some problems are the entries in the /etc/remotes file. Try 'com?:dv=/dev/tty0?:br#19200:pa=none' and see if that helps. Remember to replace the '?' with '[01234]' as appropriate. NetBSD-current has implemented the 'ttyflags' program. This will set your com ports according to the options specified in the /dev/ttys files. This is an even better solution than the 'stty ... clocal' fix from above! FreeBSD sets this up a little bit differently by having seperate dial in and dial out devices available. The /dev/cua?? devices all have clocal set by default to allow the system to dial out without having a carrier present. If you are using FreeBSD and don't have any cua devices in the /dev/ directory, you need to run the ./MAKEDEV script. See the man page for more infomation. 7.4.3 My modem on DOS COM3 or DOS COM4 works with DOS, but not with *BSD. It is set up using IRQ 4 (or 3) respectively. One of the MAJOR differences between DOS and *BSD is that *BSD actually USES the IRQ lines (*gasp*)... That means that every device on the ISA bus has to have it's own IRQ. Since COM1 and COM2 (/dev/tty00 and /dev/tty01) are already defined using IRQs 4 and 3 respectively, that means that COM3 and COM4 (/dev/tty02 and /dev/tty03) need to be put onto different IRQs. The default GENERICAHA kernel defines the third com port (COM3 or /dev/tty02) to be on IRQ5. You need to reconfigure your com port (for external modems) or modem (for internal modems) to use IRQ5. The GENERICBBT kernel defines the COM4 port to be on IRQ9 (or 2). If you have to put your devices on other ports, you will need to recompile the kernel. 7.5 How do I configure my nameserver? There are several systems that implement /etc/nsswitch.conf instead of the /etc/resolver.conf database. Each has advantages and disadvantages, and both have been implemented for NetBSD. If you want to use nsswitch, you can get it at 'ftp://?/?'. 7.6 Terminals Since the target machine for most BSD machines is a 386 with no more than a couple of serial ports, most people do not bother with serial terminals. For most problems, a quick perusal of the man pages for the ttys file and getty are enough to get them started. Other than that, most terminal problems are limited to peculiarities of particular terminals. One common problem that appears to crop up from time to time is which wires need to be connected at each end of the cable. Most cables do not, in fact, pass through all lines. If your terminal uses XON/XOFF (DC1/DC3) protocol, a cable of the appropriate twist, either straight through or null modem, can have as few as three lines connecting the two devices. Assuming DB-25 connections at each end, the lines need to go from 2 to 3, 3 to 2, and 7 to 7. These lines are Rx, Tx, and gnd. Other lines that may or may not be required include 4 and 5; and 6, 8, and 20. Normally, these lines would be connected within the 'hood' of the cable (4 to 5 and 6 and 8 to 20) to simulate the functionality of the full blown cable. While full support for CTS/RTS is not available (yet), other support for the remainder of these lines is available or is being worked on in all BSD derived systems. Without this handshaking (particularly pins 6, 8, and 20) your ports may appear to be dead. This is because most of the tty driver for *BSD systems require a Data Carrier Detect to be active before the port will work. For those folks that have hardware flow control working, you need to look in the man page for 'stty' and look around for the -clocal and -ctrcrts options. Once the cable is set up, you will need to make sure that your system is ready. The first thing you will need to do is make all of the devices in the /dev/ directory. A program, called MAKEDEV, is available in the /dev directory. Running this program with the argument 'tty' will make all of the physical tty devices. With that done, arranging for a 'getty' on the port is the next order of business. You will need to edit the '/etc/ttys' file and make one of the tty devices available. If you have connected your terminal to DOS COM1, you will be enabling /dev/tty00. Similarly, if you are connected to COM2:, you will be enabling /dev/tty01 (see the pattern?). There are other names for those ports as well, but when you are talking about terminals, be sure to use the '/dev/tty*' names. If not, you will be completely ignored and treated as an outcast because you obviously have not done any of your homework. One of the other common problems with the SIO driver is that people will often disable all handshaking, and then complain that they cannot get a reliable connection above 9600 baud. Handshaking is the solution to most of these problems. 7.7 My network manager (or UUCP feed site admin) just informed me that the way I have installed sendmail through my UUCP connection and has caused a sendmail loop. Can you help me get sendmail installed correctly? (1) Go into sendmail's source directory tree cd /usr/src/usr.sbin/sendmail/cf/cf (2) Make the missing obj directory first, you need it later... mkdir obj (3) Create a sendmail master configuration file (.mc file). Name it yourname.mc vi yourname.mc (4) Contents of the yourname.mc file: #--------------------------------------------------------------- divert(-1) # # This is the prototype for a site with only a uucp connection # to the world, where smarthost and uucp relay are the same ... # Replace "yourname" with your machines nodename without domain # Replace "smarthost" with your uucp neighbours nodename without # domain i.e. here is myname "knobel" and my smarthost is "gomel", # to which I'm connected with uucp via dialup modem. divert(-1) VERSIONID(`yourname.mc 1.0') include(`../m4/cf.m4') OSTYPE(bsd4.4) FEATURE(nodns)dnl MAILER(local)dnl MAILER(smtp)dnl MAILER(uucp)dnl define(`UUCP_MAX_SIZE', 2000000)dnl define(`SMART_HOST', `uucp-dom:smarthost')dnl define(`UUCP_RELAY', `uucp-dom:smarthost')dnl #-------------------------------------------------------------- In the siteconfig directory (.../sendmail/cf/siteconfig) create a file uucp.yourname Put a list of machines into this file to which you have active uucp/mail connection. Generally only the name of your smarthost ... Unknown addresses are routed to your smarthost .... siteconfig/uucp.yourname: #---------------------------------------------------------------------- SITE(nodename_of_your_smarthost) #---------------------------------------------------------------------- (5) create the new sendmail configuration file, which will be stored under obj/yourname.cf, by typing make yourname.cf (6) After that copy obj/yourname.cf to /etc/sendmail.cf (7) It's up to you to browse through the systems global aliases file ((etc/aliases), where important mail aliases are stored. After editing this file you should invoke the command newaliases to update the corresponding database file newaliases (8) Then create/edit the file "/etc/sendmail.cw". This file contains alias names of your system (a list of additional names under that your system might receive e-mail): yourname yourname.uucp yourname.domain (9) Then create a file /etc/mailertable: Here you have to say what else (uucp adresses, too) has to be sent to your smarthost ... .uucp uucp-uudom:name_of_your_uucp_smarthost (10) Create the hash table the following way: makemap hash /etc/mailertable.db < /etc/mailertable Remember, if you make any changes you have to rebuild the alaises database by typing: newaliases (11) BTW: You do not need to create a frozen config file, since sendmail on FreeBSD 1.X and NetBSD aren't compiled with that option turned on. (12) ``Hot files'' with more information (see sendmail src tree): FAQ KNOWNBUGS RELEASE_NOTES cf/README 7.8 Can network attached assets be used by/from NetBSD? FreeBSD? OpenBSD? Yes, they can, assuming the machine at the other end of the connections is reasonably cooperative. The specifics are up to the remote machine, but a couple of things that you can start looking for that will help are provided below: - Ask the system administrator of the machine in question if it is OK for you to use whatever it is you need. This is more a matter of manners than a technical issue. - For NFS mounted disk drives, make sure that you are not prevented from using the assets by the /etc/exports (or equivalent) file. This goes for CD-ROMs as well as regular mounted disks. - There are a completely different set of concerns for tapes and printers. Each system implements these in slightly different ways. Check with your system manager or documentation for more information. - Diskless booting is possible for all three systems, for a little more detail, see below. Note that not all network clients are created equal. There may be semantic differences between what you EXPECT to happen and what actually happens. Your best bet at that point is to get with the local system manager and talk to him or her about what you should be expecting on the system and what is actually happening. An excellent example is the semantics of file group accounts when a new file is created on an NFS machine. The semantics of the create will be based on the OS on the SERVER, so it will be whatever SysV or Sun thinks is correct, not what we expect from the BSD side. There is a package available which can also be used by *BSD which will allow your machine to be visible to LanManager or Windows NT clients. The package is called 'SAMBA' and includes information about how to configure the package to work with NetBSD, OpenBSD, and FreeBSD. Works good for me. 7.8.1 Is it possible to Network boot a NetBSD machine from a network on a diskless Sparc? Yes, it's even more than possible, it actually works! Since OpenBSD tracks NetBSD closely, it is also possible to do this with OpenBSD. Anders Magnusson (ragge@ludd.luth.se) has run it on diskless SLCs, and the only problem they had was when the machine got heavily loaded it ran out of mbufs (also sometimes a problem for regular systems). It is reportedly faster than SunOS4 as long there was lots of free memory in the machine. The fix for the 'running out of mbufs' problem is covered in section .... For the most part, setting up a diskless client is fairly straightforward. The FreeBSD diskless FAQ gives step by step instructions for setting up bootp and the other programs that need to be configured. 7.8.2 I have been working with FreeBSD 1.5.1 with some machines configured as diskless. How can I do the same for 2.0R (i.e., Which are the magic words to put in the Kernel configuration file?) In FreeBSD, there is a file called Diskless.FAQ in the usr/share/FAQ directory. It describes the procedures for diskless booting of an i386 on FreeBSD. Please note that netboot.[cr]om programs from FreeBSD 1.1.5.1 do not work with 2.0 and vice versa. Note that this is just a pointer to the Diskless FAQ. You can get the file from ftp.freebsd.org. -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!hunter.premier.net!news.cais.net!news.mathworks.com!news.kei.com!news.texas.net!news.sprintlink.net!news-fw-6.sprintlink.net!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 9 of 10) Supersedes: <386bsd-faq-9-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:07 -0500 Organization: Dave's House in Omaha Lines: 880 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-9-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:124 comp.unix.bsd.freebsd.announce:176 comp.answers:15803 news.answers:63149 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part9 Section 8. ("Supported" Hardware List) 8.0 What hardware works! The problem with this section of the FAQ is that software is the only reason that every PC card on the planet does not work. EISA cards are not directly supported; when and if EISA is directly supported, they will give a significant performance advantage to EISA bus machines. As it happens, user who desire more than 16Meg of memory must use either VESA or EISA systems. Even with an EISA system, many users will not be able to use the address space above 16Meg unless their system uses only EISA cards for those devices that need access to DMA. The limitations are covered in another section of the FAQ. Many EISA cards operate in an ISA emulation mode. Notably, the Ultrastore 24F SCSI controller operates in an IDE emulation mode that allows the card to be used in the current system without modification. Most EISA cards that operate in ISA mode will work with 386BSD, NetBSD, or FreeBSD. Like EISA, MCA is unsupported currently; unlike EISA, it can't work until it is supported, as it doesn't fall back to ISA operation. If you want to work on this problem, I'm sure that many people will appreciate it; you will probably need an ISA or EISA machine to do the work, however. On top of all of that, NetBSD (being the 'horizontal' entry in the *BSD family) supports about 13 CPUs. 8.1 Video cards 8.2 Mice and Trackballs Mice are not supported, per se, in the Operating System. They do make the GUI for 'X' a great deal less challenging. The following mice are supported in 'X' and are therefore supported by the free BSD systems: Microsoft mouse Mouse Systems mouse Logitech serial mouse PS/2 bus mouse requires a special driver that is included in the current source trees. PS/2 compatible trackballs are also supported, but there have been problems with the trackball causing the keyboard to lock up. See the psm driver information for help on getting this driver to work correctly with your system. 8.3 Serial Cards As a general rule, you should avoid a serial card that either does not use a 16550 UART, or does not have a chip that you can swap out to install one. The 16550 will prevent many silo overflows that can occur with high speed modems. Other than that, virtually all serial cards are supported. 8.3.1 How do I configure multiport cards? Is there a possibility of using multiport serial boards? How do you configure an AST/4 in the kernel? It looks like the AST driver only supports 4-port cards, but it looks like it would be easy to add support for 8 ports ... or am I wrong? From: "Martin Husemann" All AST 8 port Cards I have seen simply were two AST-4-port on one board. You would configure them like this: master ast0 at isa? port 0x1a0 tty irq 5 vector astintr master ast1 at isa? port 0x2a0 tty irq 7 vector astintr With that said, the discussion about these cards continues with how to make older versions of *BSD react correctly to your AST 4 or 8 port cards. The AST/4 and its clone multiport cards can run on 386BSD using patchkit 0.2.4 and later, NetBSD, and FreeBSD. The only problems seem to be that the code in older versions of sioprobe() and sioattach() in sio.c needs to be hacked to get it to properly detect the ports and then recognize the type of UARTs installed (16550As). The code segment that is causing the problem is included below: The test in the sio.c driver (in the sioattach() routine) that is causing it to *think* it is a 8250 is: scr = inb(iobase + com_scr); outb(iobase + com_scr, 0xa5); scr1 = inb(iobase + com_scr); outb(iobase + com_scr, 0x5a); scr2 = inb(iobase + com_scr); outb(iobase + com_scr, scr); if (scr1 != 0xa5 || scr2 != 0x5a) <--- this is it! printf(" <8250>"); This test seems to be depending upon the absence of the com_scr register in the 8250 (iobase+7). Unfortunately, the AST 4-port card uses this last register of the last UART for interrupt status (for the 4 UARTs), hence the last port of the 4 fails the test. The easiest fix is to simply delete this test in your copy of sio.c (If you *know* that you have no 8250s). The Bocaboard (BB1008) fails the same way on *all* 8 of its ports (the +7 address register is replicated for each port according to the documentation). There are also some problems with another test in the if statement: if ( inb(iobase + com_cfcr) != CFCR_8BITS || inb(iobase + com_ier) != IER_ETXRDY || inb(iobase + com_mcr) != MCR_IENABLE || !isa_irq_pending(dev) <--- this one fails! || (inb(iobase + com_iir) & IIR_IMASK) != IIR_TXRDY || isa_irq_pending(dev) || (inb(iobase + com_iir) & IIR_IMASK) != IIR_NOPEND) result = 0; in the sioprobe() routine for a couple of the ports on the 4-port card. Again, the fix is simply to remove that particular test and everything seems to be okay. These are admittedly pretty ugly hacks, but when you're in a pinch to the system back up... What you need in the config file is: sio0 -> COM1 sio1 -> COM2 (both should be recognized and work just fine) sio2 @ 0x1a0 irq 9 flags 0x0501 sio3 @ 0x1a8 irq 9 flags 0x0501 sio4 @ 0x1b0 irq 9 flags 0x0501 sio5 @ 0x1b8 irq 9 flags 0x0501 Other folks have reported that their configuration looks very similar to this, though they are using irq 5 for the 4-port card. (above paraphrased from Bob Willcox, et al) Another configuration for this is when two AST Four Port cards are actually used in a system. The configuration for that looks like this: #device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr #device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr device sio1 at isa? port 0x2a0 tty flags 0x0481 device sio2 at isa? port 0x2a8 tty flags 0x0481 device sio3 at isa? port 0x2b0 tty flags 0x0481 device sio4 at isa? port 0x2b8 tty irq 5 flags 0x0481 vector siointr device sio5 at isa? port 0x1a0 tty flags 0x0881 device sio6 at isa? port 0x1a8 tty flags 0x0881 device sio7 at isa? port 0x1b0 tty flags 0x0881 device sio8 at isa? port 0x1b8 tty irq 4 flags 0x0881 vector siointr This is one of the areas where FreeBSD and NetBSD have diverged. The actual semantics of the multiport boards have changed since this section was originally written (the flags are either no longer needed or are different in current NetBSD implementations, for example). 8.3.2 Now that I have FreeBSD 1.0 installed, how do I set up the serial ports for bi-directional use? Thanks to Lyn Kennedy (lrk@k5qwb.lonestar.org) for the advice about the cua devices and their minor numbers. He worked out much of this without docs. In order to get the comm ports working, I decided to run the sio driver (heard it is faster and more capable than com). In order to get it set up, this is what I did. 1. I have four com ports assigned to the addresses and interrupt lines that are standard for DOS COM1, COM2, COM3, and COM4. I have the following lines in the file used to specify the config for the kernel build: device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr device sio2 at isa? port "IO_COM3" tty irq 5 vector siointr device sio3 at isa? port "IO_COM4" tty irq 9 vector siointr I also enabled the use of com ports for either call in or call out by selecting the bi-directional option. The following line in the config file causes the proper code to be compiled in the driver. options "COM_BIDIR" #Bidirectional support in sys/isa/sio.c 2. After building the kernel, I made sure the devices were represented in /dev. MAKEDEV should be used to create the tty0[0-3] special devices. It will result in entries such as the following: 0 crw------- 1 root wheel 28, 0 Nov 8 06:28 tty00 0 crw------- 1 root wheel 28, 1 Nov 8 10:09 tty01 0 crw------- 1 root wheel 28, 2 Nov 7 01:13 tty02 0 crw------- 1 root wheel 28, 3 Nov 8 03:02 tty03 Then mknod and chown should be used to create the following four entries: 0 crw-rw-r-- 1 uucp dialer 28, 128 Nov 8 03:45 cua00 0 crw-rw-r-- 1 uucp dialer 28, 129 Nov 7 18:34 cua01 0 crw-rw-r-- 1 uucp dialer 28, 130 Nov 7 17:29 cua02 0 crw-rw-r-- 1 uucp dialer 28, 131 Nov 8 03:15 cua03 The tty0[0-3] entries are used to receive calls on (with the bidirectional code, this is signalled because the most significant bit in the minor number is 0). The cua0[0-3] entries represent the same ports as the corresponding tty ports, but with the most significant bit of the minor number turned on. This indicates to the driver that this port is a call out port. The reason for the ownership being set to uucp:dialer is because I have all programs that use dialers (uucico, kermit, tip, etc.) set to operate as set-uid with uucp as owner. Also all of these programs are set up as being in group dialer with group dialer membership being required to execute them. 3. One further step needs to be done to allow proper use of the ports. In rc.local, the last few lines include the following: comcontrol /dev/tty00 bidir comcontrol /dev/tty01 bidir comcontrol /dev/tty02 bidir comcontrol /dev/tty03 bidir 4. Now I set up getty to use the incoming ports with the following entries in /etc/ttys: tty00 "/usr/libexec/getty std.19200" unknown on secure tty01 "/usr/libexec/getty std.4800" unknown on secure tty02 "/usr/libexec/getty std.4800" unknown on secure tty03 "/usr/libexec/getty std.19200" unknown on secure 5. I set up the port file for uucp, the remote file for tip, and the .kermrc file for kermit to refer to the cua0[0-3] devices for call out targets. 6. Note that I have modems on cua/tty 00 and 03. My modems are set up to adjust the baud rate of the call (in or out) by negotiating with the other modem in the call. However the modems always retain the same speed (19,200 Kb) for the rs-232 port. In order to make the modems use the proper speed, I have to send them an AT sequence at the desired speed. They will then retain that setting for incoming calls. So, to do this, I include the following at the end of my rc.local script: /usr/local/bin/initcua00 /usr/local/bin/initcua03 and in /usr/local/bin, I have the two scripts like (this is the one for initcua00): #!/usr/local/bin/kermit set modem hayes set line /dev/cua00 set speed 19200 dial XXXXXXX <----------- it's own number to get busy quit 8.3.3 What is the difference between baud and bits per second? It's important to remember that we're transmitting symbols. Does this apply to digital transmissions ? Yes. A digital message is simply an ordered sequence of symbols from a discreet source. This source has an alphabet 'M' of 2 or more symbols, and produces the symbols at some rate 'r'. If we allocate a finite amount time alloted to a symbol, and call that time 'D', we can for once and ever define what baud is. Having 'D', our "signalling rate" is: r = 1/D (1) measured in _symbols_per_second_ or baud. For binary transmissions, we have a bit duration Tb, and our "bit rate" is: rb = 1/Tb (2) measured in _bits_per_second_, (bps, or b/s). Now we note that in the special binary (M=2) case, each bit is a symbol and thus D=Tb, and by (1) and (2) we have: r (baud) = rb (bps) (3) or in English, for *binary* transmissions, we have "the signalling rate, measured in baud, is the same as the bit rate, which is measured in bps." For all other transmissions, the signalling rate (baud) is not equal to the bit rate (bps). Regards, -Ade "never wants to see this again" Barkah 8.3.4 How do I get a serial console to work? This answer provided by Simon Ritter (sritter@novell.co.uk) I've seen a couple of posts requesting this info, so here it is. Maybe this should be added to the FAQ's. Edit the file /etc/conf/pack.d/sysmsg/space.c. At the bottom of this you will find the following lines: extern int kdputchar(), kdgetchar(); extern int asyputchar(), asygetchar(); extern int asyputchar2(), asygetchar2(); struct conssw conssw = { kdputchar, 0, kdgetchar }; Change all occurences of kdputchar and kdgetchar to asycputchar and asycgetchar. Rebuild your kernel and reboot, connecting a terminal to the first serial port. Behold, all messages on the serial port. (Ed Note... I don't even know if this exists in NetBSD or FreeBSD, but what the heck, it's an answer :-)... Either way, the method for this is pretty much the same, and will require some mucking about on the kernel.) 8.4 Disk Controller Problems There is no real list of supported wd-driver controllers. The listx would be far longer than I am willing to type. Suffice it to say that virtually every know IDE/ESDI/MFM/RLL hard drive controller available works. There are occasional reports that the driver for this particular type of disk drive is "broken", but it is hard to substantiate this. There are a few known "gotchas" with this particular controller type, but they are fixed as soon as they are found. 8.4.1 IDE controller problems The code in the original 386BSD had some serious problems dealing with the wd controller. In addition, changes to the controller code which have made improvements in other areas of the driver have made the wd driver (in 386BSD with the patchkit) even less trustworthy. The wd driver in NetBSD 0.9 is better but still has to deal with occasional hard drive bus hangs. The wd driver in the -current code is much more reliable. The FreeBSD code is also greatly improved, and likewise does not suffer from these bus hangs. 8.4.2 SCSI controller problems Every once on a great while, someone will post a problem with a SCSI controller. Almost all of these are attributed to either a) bad cables (or out of spec cables), b) bad termination, or c) incorrect irq/drq setup. Here is an excerpt of a message that provides some insight into one man's problems with the Adaptec controller, and one with the BusLogic 445. From: witr@rwwa.com (Robert Withrow) Problem: When the bus hangs, all devices have their access lights off, the AHA his its light on. If anyone cares: Being in a hurry, I made several changes and the problem went away. Normally, I would change one thing at a time, but, like I said, I was in a hurry. Below, I list the changes I made: 1) I replaced the AHA with an older one I keep as a spare. 2) I *inserted* the the ``synchronous negotiation'' jumper in the aha. 3) I removed the terminator power jumper from two of the hard drives. 4) I removed and reinserted all of connectors into all of the drives. If I had to guess, I bet #2 was the thing that fixed the problem. Perhaps this should be a FAQ answer? (Assuming this is a requirement)... The system has compiled X11 three times as well as done all sorts of other things including all of the drives (cdrom, disk, and tape) for three days now without a single hang. Robert Withrow, Tel: +1 617 598 4480, Fax: +1 617 598 4430 R.W. Withrow Associates, 319 Lynnway, Lynn MA 01901 USA Net: witr@rwwa.COM wjw@ebh.eb.ele.tue.nl (Willem Jan Withagen) writes: => => The BT kernel requires the controller to be configured => => for IRQ 12. That is a strange default. The default for => => the BT445S is 11, the same as for the 1542. You probably => => just need to reconfigure the controller. => => So I redid the switches and the BT kernel recognises it on => int 12. Either with or without EISA DMA (switch 2-10) => => it no longer generates the strayintr 7. => But it still doesn't boot after the message => 'changing root device to fd0d' => => So what's going on here. Is there anyway to find out more? => Or should I go to one of the FreeBSD lists and discuss it there? I was browsing thru the hardware manual of the BT 445S and there it was on the next page :-( I was just misguided by the nice switches on the card edge. To set the interrupts not only the dip-switches need to be changed. More important is the actual and physical connection of intr 12 to the ISA bus connector. After taking the board out, and really connecting intr 12, the system booted the BT kernel without a glitch. I'm now compiling a new kernel with all our options set as we'd like them to be. The current config: 16 Mb BT 445S with intr 12 and switch 2-10 in default state, giving dma on channel 5. Things I'm going to test: toggling the 2-10 switch adding 16 MB more. 8.5 SCSI Controllers The list of "supported" hard drive controllers is very short. Basically, it is any hard drive controller that emulates a standard IDE/ESDI/MFM controller and a few SCSI controllers. The short list is included below: These boot with the kcaha floppy: Adaptec 1522 ISA SCSI Experimental AIC-6260 based ISA SCSI AIC-6360 based ISA SCSI Adaptec 1540[ABC] ISA SCSI No Floppy Adaptec 1542[ABC] ISA SCSI Adaptec 174x EISA SCSI Adaptec 294x ???? SCSI Not supported Ultrastore 14F ISA SCSI Ultrastore 24F EISA SCSI Ultrastore 34F VLB SCSI Buslogic BT542 ISA SCSI Buslogic BT545 ISA SCSI (Old ones only) Buslogic BT946C PCI SCSI NCR 53C810 based PCI SCSI These boot with the kcbt floppy: Buslogic BT742A EISA SCSI Buslogic BT747A EISA SCSI (modified 742 driver) Buslogic BT445S VLB SCSI Note that the Ultrastore 24F is supported with an experimental driver or in IDE emulation mode only. Any controller that purports to be a clone of one of the cards listed above will usually work as well. The Adaptex 294x cards are a particular problem. They are based on the AIC7770 chipset, for which there is an experimental driver. In addition, several people have reported very limited success getting the Linux driver top work. This is a continuing project that is being undertaken without the support of Adaptec. The '{something} based' cards above are special in that many controllers use these controller chips as the basis for their implementation. The AIC-6260 is the chip set in the Adaptec 1522 series controllers, and the AIC-6360 is the chipset used in the Soundblaster SCSI controller. There are several PCI controllers that are using the NCR chipset. In addition, there is a special note for Buslogic card users. The card should be configured to use ioaddr 0x330 and IRQ 12. There are two places the IRQ needs to be set. The first is a bank of dip switches, and te next is a jumper. See your hard drive controller documentation for the exact settings. Once you've got the controller on the right settings. As it says in the README.INSTALL file, after all: BT742 SCSI Cntlr. 0x330 12 [kcopy-bt-floppy] So I can only conclude that you've probably not configured the card for EISA DMA! From the /usr/src/KNOWNBUGS file: /sys/1/isa/bt742a.c The Bt445S and Bt747 controllers can cause problems when ISA DMA is selected as an option. With the EISA controller the remedy is easy - simply turn it off using your EISA configuration utility. With the Bt445S, which is a VLB card, you must switch the undocumented "SW10" on "SB2" to the off position. Also note that certain revisions of the Buslogic board (Revision C or earlier, firmware revision <3.37) will cause DATA CORRUPTION with systems containing more than 16MB of memory. If you find this to be the case, temporarily remove your extra memory and contact Buslogic for an upgrade! The BT946C PCI card works flawlessly. The only thing that needs to be done to it is to ensure that the the two jumpers that control how and if to autoconfig are removed. This allows the system to autoconfigure everything in the card. The best thing to do is simply set the card to use the "Autoconfig to default" option. 8.6 Network Cards Common misconception number 1: Why does BSD still support such a small selection of network cards? Depends on what you mean by `small'. Here is the 'short list'. 3c501 isa if_el (kimmel@cs.umass.edu) 3c503 isa if_el (mycroft) 3C507 isa if_el (mycroft) 3c509 isa if_ep bnc/aui/utp. (tdr) 3c579 eisa if_ep (tdr) WD 8390-based cards isa if_ed (mycroft) SMC 8390-based cards isa if_ed (mycroft) NE1000, NE2000 isa if_ed (mycroft) NE2100/BICC Isolan/DEPCA isa if_le (mycroft) AT&T StarLAN (82586-based cards) (mycroft) These are all in NetBSD, and FreeBSD (by inference) Common question number 2: I have a 3Com 3c509 - is it supported? The 3C509 works well under NetBSD-current, and has been clocked at full ethernet speed. To use the UTP connection, you will need to specify the link0 and link1 options in the ifconfig command. -link0 disable AUI/UTP. enable BNC. link0 disable BNC. enable AUI. link1 if the card has a UTP connector, and link0 is set too, then you get the UTP port. 8.7 Printers In the original 386bsd system, there were problem with the interrupt driven parallel printer driver. These problems were solved by the use of a work around called the interruptless printer driver (worked on the theory that once it knew how your printer reacted to printing it could configure itself to your printer). This code has also been deprecated through the use of a new printer driver in the {Free,Net}BSD systems that use the same source code for either 'interrupt' or 'polled' operation. The closest thing to a 'common' question about printers involves questions about CR+LF emulation on some laser printers and some questions about some of the filters that 'lpd' talks about, but do not seem to be avaiable normally. The first is easy. Set up your printer so that it uses the 'LF' code as its CR+LF (End of line) character. If you use your machine for operations in more than one OS (like some of us that HAVE to use DOS :-( ) then you can include a control sequence in the 'ff' control in your /etc/printcap file. Here is an example printcap to show you how simple it is: lp|ljgpc_deskjet|HP DeskJet Plus:\ :lp=/dev/lpt0:mx#0:\ :sd=/var/spool/ljgpc_deskjet:\ :lf=/var/log/lpd-errs:\ :ff=\033E\033&k2G:fo:sh:tr=\033E: For the HP LaserJet III (running PostScript) or the Deskjet 540 printers, the sequence is a little more involved: First, it looks like you will need to install ghostscript. I have a Desk Jet 540 that I use with the printcap entry and filter included below. You could hack the filter slightly to produce output for your Laser Jet III (try changing "-sDEVICE=djet500" to "-sDEVICE=ljet3"). You'll need perl and gs installed on your system. You also need to ensure that gs has the ljet3 driver installed. You can find out by running "gs -h" and looking to see if the driver is listed. --- printcap entry --- lp|HP Deskjet 540:\ :lo=/var/spool/lpd/lp-lock:\ :lp=/dev/lpt0:\ :lf=/var/log/lpd-errs:\ :of=/var/spool/ps-filter:\ :sd=/var/spool/lpd:\ :sh: --- /var/spool/ps-filter --- #!/usr/bin/perl # Filter which detects postscript files and appends cr to lines of text. # $Id: ps-filter,v 1.3 1995/02/14 01:05:59 brian Exp $ $cat="/bin/cat"; $gs="/usr/local/bin/gs"; $_ = ; if (/^%!/) { # Pipe the file as-is to the ghostscript interpreter. # Postscript files have their pages reversed because my # DeskJet 540 stacks them in reverse order if I don't. $old_dir=`pwd`; $tmp_dir = "/tmp/lp-gs.$$"; mkdir($tmp_dir,0700); chdir $tmp_dir; open(PIPE, "|$gs -q -sDEVICE=djet500 -sOutputFile=%03d.lj -") || die "$0: can't run ghostscript: $!"; print PIPE $_; while () { print PIPE $_; } close PIPE; @pages=reverse(sort(<*.lj>)); system $cat, @pages; unlink @pages; chdir $old_dir; rmdir $tmp_dir; } elsif (&isprint() && !/\r\n$/) { # Send the text to the printer with trailing lf converted to crlf. s/([^\r])?\n$/\1\r\n/; print; while () { s/([^\r])?\n$/\1\r\n/; print; } } else { print; while () { print; } } sub isprint { ($c) = split(//,$_); return ($c =~ /[\s\n]/) || (ord($c) >= 32 && ord($c) < 127); } If you are having trouble with the JetDirect card, this entry should work adequately for you, although printing and querying may not be completely solid: laser: \ :rm=laser.kew.utl: \ :rp=lp: \ :sd=/usr/spool/lpd/laser: \ :lf=/var/log/lpd-errs: \ :sh: \ :rs: \ :ff=: \ :fo 8.7.1 How can I print big files (especially from SAMBA, the WfWg network program)? First step: Add ":mx#0:" to the printer's entry in /etc/printcap. Once you have "mx#0" in your /etc/printcap entry, make sure you have enough disk space in the "/var" filesystem to handle the job. Also beware that "lpr -s" can fail obscurely if the file you are printing (and the path to it) are not accessible by the user daemon. 8.8 Tape Drives. 8.8.1 What are the jumper configurations for the Exbyte 8200 DAT tape drive? Jumpers/switches are on the MX board. I think that the top of the case and the board must be removed to access jumpers/switches. Per a November 1989 8200 Spec there are at least two different MX boards. Level 1, part no 724021-xxx has jumpers. Level 2, part no 724022-xxx has switches. Level 1 Jumper Configuration: J1 L-M Bypass Memory Test - 8 Second Startup M-R Run Memory Test - 65 Second Startup J2 L-M Parity Checking Enabled M-R Parity Checking Disabled J3 L-M Even Byte Disconnect M-R Odd or Even Byte Disconnect J4 L-M No Busy Enable M-R Report Busy Status J5 L-M P6 Cartridge Type - Domestic M-R P1 Cartridge Type - International J6 L-M Reserved for future use J7 L-M Normal Operations M-R No Disconnect in Data Phase J8 L-M Fixed Block Mode on Power Up M-R Variable Block Mode on Power Up Level 2 Switch Configuration: SW1 Off Run Memory Test - 65 Second Startup On Bypass Memory Test - 8 Second Startup SW2 Off Parity Checking Disabled On Parity Checking Enabled SW3 Off Odd or Even Byte Disconnect On Even Byte Disconnect SW4 Off Report Busy Status On No Busy Enable SW5 Off Fixed Block Mode on Power Up On Variable Block Mode on Power Up SW6 Off Normal Operations On No Disconnect in Data Phase SW7 Off Reserved for Future Use On SW8 Off P6 Cartridge Type - Domestic On P1 Cartridge Type - International 8.9 QIC-40/80 tape drives Steve Gerakines has released a series of patches for FreeBSD that allow the use of the QIC-40/80 tape drives through the floppy controller. Get them from ftp.gte.com:/pub/ft/dist0.3/dist0.3.tgz or a similar mirror site, if there are any. Archie will be able to tell you for certain. I have been playing with Steve's patches for FreeBSD to get them hooked into NetBSD for the past year. The best I have ever been able to get is a kernel that doesn't recognize any of my floppy drives. 8.10 CD-ROMs The Sony Multispin drives work well for Charles Hannum using NetBSD and an SCSI controller. The Sony CDU 561 works well, as do the Toshiba 401 and 4101. The 4101 is a double speed SCSI-2 device and allows 'grabbing' of music tracks. Many folks have announced that they had problems with Mitsumi CD-ROM drives. It seems that there are nearly as many releases of the firmware as there were drives sold. Many of the firmware versions were incompatible with each other. A generic Mitsumi driver will be a hard act to accomplish, if it is possible at all. There are native (non-EIDE) Mitsumi CD-ROM drivers for NetBSD and FreeBSD. They are available in the latest release version of each. If your CD-ROM is not recognized by the kernel, and uses a Mitsumi controller, you will need to make changes to the mcd.c source file to change the behaviour of the first getreply() function. Instead of exitting immediately, the check for whether the getreply was successful should be commented out and assumed to be correct. While this is a brute force method (it may find a CD-ROM that isn't even there) it will help many Mitsumi controllers probe correctly. The brute force method is included below: The answer is to replace the probe code which was broken with an old version. The old version will detect mcd0 even if it isn't there :-) Doesn't matter! Warren Toomey (wkt@cs.adfa.oz.au) int mcd_probe(struct isa_device *dev) { int port = dev->id_iobase; int unit = dev->id_unit; int st; mcd_data[unit].flags = MCDPROBING; #ifdef NOTDEF mcd_data[unit].config = irqs[dev->id_irq] ; #else mcd_data[unit].config = 0; #endif outb(port+mcd_reset, MCD_CMDRESET); mcd_delay(300000); st = mcd_getstat(unit,1); mcd_data[unit].flags = 0; return (st<0) ? 0 : 4; } Note that this should not be a problem with either NetBSD 1.0 or FreeBSD 2.0, since both are using an even newer Mitsumi Driver for their interface. The EIDE ATAPI CD-ROM drive is now supported in the -current version of FreeBSD, and is supported experimentally in NetBSD. FreeBSD also supports the Masushita (Panasonic) CD-ROM drives. The only other commonly available CD-ROM drive that is not supported is the SONY CD-ROM. 8.10.1 How can I mount my CD-ROM so that it appears to be writable? There are two ways. If the version of *BSD you have supports the union file system, you can use the following: mount -t union -o -b /cdrom/ports /usr/ports cd /usr/ports make all install If your version of *BSD doesn't support union file systems, you could use something like this: mount /dev/cd0a /cdrom mkdir /usr/ports cd /usr/ports lndir /cdrom/ports . cd /usr/ports/mail/elm make all install -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...." ---------------------------------------------------------------------- Path: news1.ucsd.edu!ihnp4.ucsd.edu!agate!info.ucla.edu!newsfeed.internetmci.com!news.sprintlink.net!news-stk-200.sprintlink.net!news.sprintlink.net!news-pen-14.sprintlink.net!news.sprintlink.net!new-news.sprintlink.net!neonramp.com!cynjut.neonramp.com!cynjut.neonramp.com!not-for-mail From: burgess@cynjut.neonramp.com (Dave Burgess) Newsgroups: comp.unix.bsd.netbsd.announce,comp.unix.bsd.freebsd.announce,comp.answers,news.answers Subject: [comp.unix.bsd] NetBSD, FreeBSD, and 386BSD (0.1) FAQ (Part 10 of 10) Supersedes: <386bsd-faq-10-837237603@cynjut.neonramp.com> Followup-To: comp.unix.bsd.netbsd.misc Date: 27 Jul 1996 15:03:08 -0500 Organization: Dave's House in Omaha Lines: 245 Approved: news-answers-request@MIT.Edu,cgd@sun-lamp.cs.berkeley.edu Expires: 08/14/96 15:02:57 CDT Message-ID: <386bsd-faq-10-838497777@cynjut.neonramp.com> References: <386bsd-faq-1-838497777@cynjut.neonramp.com> Reply-To: burgess@cynjut.neonramp.com (386bsd FAQ Maintainer) NNTP-Posting-Host: cynjut.neonramp.com Keywords: FAQ 386bsd NetBSD FreeBSD !Linux X-Posting-Frequency: Posted on/about the 13th and the 27th of every month. Xref: news1.ucsd.edu comp.unix.bsd.netbsd.announce:122 comp.unix.bsd.freebsd.announce:174 comp.answers:15801 news.answers:63147 Posted-By: auto-faq 3.1.1.2 Archive-name: 386bsd-faq/part10 Section 9 ("Supported" Software List). 9.0 What GNU software has been tested and is working with Net/2 derived BSD systems for the 386? Just about all of it. 9.1 Has anyone ever gotten news to work? The program 'news' running on 386bsd. Here is a quick summary of the major places to stumble: 1) get bash, gmake, gcc 2.X, cnews, trn (or your favorite reader). 2) Make uucp work. (Read the info files that come with the original distribution for the whole scoop on configuration files.) Ed Note: This step is not needed if you are implementing SLIP, PPP, or are directly connected to a network. 3) Edit all the scripts which come with cnews and replace every occurence of /bin/sh with /usr/local/bin/bash (or wherever you put it). 4) Build cnews using bash, gmake and gcc 2.x 5) Install cnews in the directories you want it. Some hand-hacking of the intall scripts is required (Too long ago to remember the details). 6) Change the permissions on all the scripts from execute only to read-execute for group and other. (On 386bsd, if you can't read a script, you can't execute it). 7) Set up uucp to accept news 8) Post an article and steal it out of the uucp queue before it gets sent. Feed it to your rnews (as user uucp) instead and make sure that it does not bomb out with permission denied or some such. 9) Have fun! Implementing innd is even easier. The configure script that comes with the system has been modified to work more correctly with Net/2 derived BSD systems. The first is that the LINTLIBSTYLE option in config.data needs to be set to NONE, since NetBSD and FreeBSD don't come with lint. With that changed, the system should work right out of the box. If you are running with memory mapped files, you will also need to make the following patch: --- icd.c.orig Tue Feb 7 13:36:50 1995 +++ icd.c Tue Feb 7 14:56:27 1995 @@ -366,7 +366,9 @@ ICDwriteactive() { #if defined(ACT_MMAP) - /* No-op. */ + if (msync(ICDactpointer, 0)) { + syslog(L_ERROR, "msync error on active file: %m"); + } #else 9.1.1 I want to make sure I have every set up right for my news partition. What newfs options do I need to use to get this information stored OK without future problems? There has been a lot of discussion of the years about the defaul options for newfs. If you have "modern" disks and you created your filesystems with 1.0, or with a pre-9412 -current, then you may want to back them up and then re-create them. u Filesystems created with the current defaults should be much faster. The newfs(8) defaults are equivalent to `-a 8 -d 0 -n 1'. To make you news server software work better, you should increase the number of inodes available, you should include either '-i 512' or '-i 1024' depending on the normal size of the files in the filesystem. News partitions are often the repository for many files which are very small, averaging less than 512 bytes per file. By quadrupling the number of inodes (using -i 512 instead of the default 2048) you make it more likely that you will run out of disk SPACE before you run out of disk INODES. 9.2 How did you get emacs to compile? The problem is in the dump-emacs function. It writes the image header and then the text section of the image overwrites the header. This leaves you with a bad image. If you try to load it into gdb, it will tell you that it is not an executable. What to do? Look back at your configuration command: >% configure i386-intel-386bsd --with-x=no The 386bsd qualifier means that the compiles will include the file src/s/386bsd.h. If you go into this file and add the lines: #define A_TEXT_OFFSET(x) (sizeof (struct exec)) #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) This tells the subroutines in src/unexec.c about the 32 byte image header, so that they will set up the header appropriately and not step on it while writing the emacs executable. The second problem is that emacs tries use its own crt0.o file. Kill that line in the Makefile and you should be able to compile for either static or shared library operations. 9.2 Has anyone tried to get Postgres to work? Jim Bachesta and his crew have gotten Postgres 4.2 working in the i386 version of NetBSD 1.0. The netbsd source tree is available from: ftp://charon.amdahl.com:pub/agc/postgres-4.2-src-netbsd-v2.tar.gz The regular postgres distribution is available from: ftp://s2k-ftp.cs.berkeley.edu:pub/postgres Get the standard distribution and then overlay the NetBSD source distribution over it for a complete system. There is also work in progress to get Postgres95 working. Check the following URL for more information: ftp://s2k-ftp.cs.berkeley.edu/pub/postgres95/postgres95-1.0.tar.gz It works fine on NetBSD/i386 1.1. I've heard that it works fine on the sparc port, too, so there don't seem to be any byte-order funnies in there (although take a look in the www/bugs/p*.html for 14 patches that should be applied to the 1.0 sources - at least one of them deals with order-dependencies when the backend is on a different byte-ordered machine to the client program). Someone mentioned that you need dynamic loading, and so you may be out of luck if you're on one of the more esoteric ports. I'm not sure about this, and would say that pg95 should run fine, albeit with reduced functionality, without dynamic loading - it just means that you can't define C functions for the backend to load at will. However, I haven't tried this. (From memory, the previous v4r2 port didn't have support for dynamic loading, and most of the regression tests ran fine.) 9.3 How about the BSD Song? In a dark dim machine room Cool A/C in my hair Warm smell of silicon Rising up through the air Up ahead in the distance I saw a Solarian(tm) light My kernel grew heavy, and my disk grew slim I had to halt(8) for the night The backup spun in the tape drive I heard a terminal bell And I was thinking to myself This could be BSD or USL Then they started a lawsuit And they showed me the way There were salesmen down the corridor I thought I heard them say Welcome to Berkeley California Such a lovely place Such a lovely place (backgrounded) Such a lovely trace(1) Plenty of jobs at Berkeley California Any time of year Any time of year (backgrounded) You can find one here You can find one here Their code was definately twisted But they've got the stock market trends They've got a lot of pretty, pretty lawyers That they call friends How they dance in the courtroom See BSDI sweat Some sue to remember Some sue to forget So I called up Kernighan Please bring me ctime(3) He said We haven't had that tm_year since 1969 And still those functions are calling from far away Wake up Jobs in the middle of the night Just to hear them say Welcome to Berkeley California Such a lovely Place Such a lovely Place (backgrounded) Such a lovely trace(1) They're livin' it up suing Berkeley California What a nice surprise What a nice surprise (backgrounded) Bring your alibies Windows NT a dreaming Pink OS on ice And they said We are all just prisoners here Of a marketing device And in the judges's chambers They gathered for the feast They diff(1)'d the source code listings But they can't kill -9 the beast Last thing I remember I was restore(8)'ing | more(1) I had to find the soft link back to the path I was before sleep(3) said the pagedaemon We are programmed to recv(2) You can swap out any time you like But you can never leave(1) [ substitute whirring of disk and tape drives for guitar solo ] Written by David Barr and Ken Hornstein and a little help from Greg Nagy and thanks to the lyrics archive at cs.uwp.edu -- Dave Burgess (The man of a thousand E-Mail addresses) *bsd FAQ Maintainer / SysAdmin for the NetBSD system in my spare bedroom "Just because something is stupid doesn't mean there isn't someone that doesn't want to do it...."