Frequently Asked Questions 386BSD, NetBSD, FreeBSD, OpenBSD and other BSD derived Operating Systems. EXTREMELY UNOFFICIAL Original FAQ by: Terry Lambert New New FAQ by: Dave Burgess burgess@cynjut.neonramp.com Last Update: 23 Jan 1997 Section -1. (Where else to look) In the distribution of each of the *BSD systems, there is a LOT of documentation. If you are completely unfamiliar with Unix, there is a reading list recommended in Section 1 of the FAQ. There are also various documents in the /usr/share/doc directory on the installed system. Many of these give detailed information about the design, history, and use of many of the pieces of the *BSD system you are interested. Once you are familiar with Unix-like systems, you can probably graduate to the 'man' program. The 'man' program is a series of manual pages which describe various parts of the system (kernel stuff, file formats, commands, 'C' standard functions, etc.) in enough detail to generally get you where you want to be. The command 'man man' will give you a lot of details. The other command which might help is called 'apropos' (pronounced ap'-rO-pO). This command searches the title lines of every manual page looking for a match in the word you include as an argument. If you have the system running, try the command 'apropos ttys' to get a feel for all the stuff that's out there. 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 Minimum hardware configuration recommended 1.4 Where to get the source and binaries 1.4.1 Where can I get the distribution on CD ROM? 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.6 The O'Reilly and Associates BSD 4.4 Set. 1.6.7 Other FAQ's on the net that are relevant 1.7.1 Official distribution sites 2.0 Install process 2.0.1 Boot disks (versions and media formats) 2.0.1.1 I have the base system installed, and now I want to install the rest of the system. Where did the 'extract' program go? 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.1 Binary distribution 2.1.1 I want to install by NFS but I am having all kinds of problems connecting to the Sun server where the files are. 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 boot up prompt? 2.2.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 When I start up my system, it hangs for three or four minutes during the 'netstart' program. Our network nameserver is working OK, and I use it all the time; my resolv.conf file says to use the network nameserver. Why would netstart have such problems using it? 2.2.11 I am having trouble getting net aliases to work. What could some of the problems be? 2.2.12 I'm having trouble with the networking code (specifically the PPP stuff to my ISP). How can I debug NetBSD's networking? 2.2.13 I want to hard wire my SCSI devices to a particular device number. Is that possible? 2.3 Common installation problems. 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.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.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? 2.6 Customizing the system to meet my needs. 2.6.1 How do I get the system to not display the machine name, but display our company name? 2.6.2 I have a program that, under normal circumstances, starts once a second. This regularly causes inetd to terminate the program with a 'server failing (looping), service terminated' error. How do I fix this? 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.4 Now that I have a kernel, how do I install it? 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.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.7 Can I have more than one config file? Should I rename it to something else? Any other hints? 3.2.9 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.10 Where can I learn more about all this? 3.2.11 Has the method for system call changed in NetBSD? 3.2.12 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.2.14 Can NetBSD do cross compilation? 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.5 Under NetBSD and FreeBSD, xlock (or any other program that uses passwords) fails to validate user passwords. Anyone know why? 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.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.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.7 Loadable Kernel Modules 4.3 Other program building type problems. 4.3.1 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 user name? 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 accept '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, et al.? 4.6 Adding new users. 4.6.1 Where can I FTP the 'adduser' program? 5.0 Introduction 5.1.4 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.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.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 auto-detects 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 Stuff 5.5.1 How can I get my system to work as a network router? 5.5.2 I recently had a problem where I got a message that said "panic: kmem_malloc: mb_map too small". What is the solution to this problem? 5.5.3 Does anyone have an example of a working gated.conf file? I can't figure these instructions out at all. 5.5.4 How do I set up Multicasting on my system? 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.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.3 What is the difference between baud and bits per second? 8.4 Disk 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 Exabyte 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.3 Has anyone tried to get Postgres to work? 9.4 Has anyone gotten the Java Developers Kit working? 9.5 Has anyone ever used any of the BSD systems for a Firewall? 9.6 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 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 releasable 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 targeted 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.2.1 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.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 http://wwwipd.ira.uka.de/~frueauf/FAQ/NetBSD-Amiga-X-FAQ.txt 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. 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. 1.1 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 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 mutually 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 compatible 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 edited 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.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. 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 Leffler, McKusick, Karels, Quarterman, "The Design and Implementation of the 4.4BSD UNIX Operating System" available in fine book stores everywhere 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.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 publicly releasable 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 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.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). 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? For those of you trying to build installation floppies, you will need to verify the media type on the 'dd' and 'disklabel' commands in the Makefile. The default is to build to 1.2 Meg disks (being the smallest in terms of room). Change the 12100 and floppy5 entries to 14410 and floppy3 (respectivly). 2.0.1 Boot disks (versions and media formats) 2.0.1.1 I have the base system installed, and now I want to install the rest of the system. Where did the 'extract' program go? 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'. Failing that, you can use the following process to extract the sources. - First, 'cd' to where your files are. - Assuming you want to extract the kernel sources, use the following command to extract the files: "cat ksrc* | tar -xvf - -C /" This will combine the pieces, feed them to tar, and load the files in the 'standard' place. 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.1 Binary distribution 2.1.1 I want to install by NFS but I am having all kinds of problems connecting to the Sun server where the files are. 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 an 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 referred 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 (pail@cs.wu.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. 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. Regardless 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. :) Commonly 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. 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 Aim'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. If you have compiled in the VNODEPAGER option in your config file, you can use vnode files for swap space. The precise details are exaplined in the man pages, but the easiest way to start is to include the following line in your /etc/fstab: /dev/vnd0b swap swap sw Defining the file for the vnode is fairly straightforward: vnconfig -c /tmp/swapfile /dev/vnd0b and actually making it swap is as simple as swapon /dev/vnd0b From there, the rest of your questions should be answerable from the vnconfig manpage. 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. 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 boot code 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 = (drive & 0x7F); maj = (drive&0x80 ? 0 : 2); /* a good first bet */ name = names[currname++]; 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 center 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. 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 repartition 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 partition 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_ behavior, 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 except 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 boot up 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.2.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 When I start up my system, it hangs for three or four minutes during the 'netstart' program. Our network nameserver is working OK, and I use it all the time; my resolv.conf file says to use the network nameserver. Why would netstart have such problems using it? When the system is starting, the nameserver hasn't started yet. If you are using any names that must be resolved, the system will attempt to get the names from the nameserver, When that fails (three timeouts at one minute apiece) the name will be resolved from the /etc/hosts file (if the name is available). There are essentially two ways to solve the immediate problem. The first is to reduce the number of entries you have in your /etc/hosts file to the absolute minimum you need for booting and change the order for host resolution from 'bind file' to 'file bind'. If you specify a name in any of your start up files and the name server isn't available, you will still have the hang, but this is only a small annoyance. The second (and generally more effective) way to deal with the problem is to use only numeric addresses in your /etc/* files. This way, the resolver is never called upon to figure out the addresses and your boot-up will always 'just work'. This is sometimes more time intensive to set up, since all of the names in the files need to be removed and replaced with numbers. "C'est la vie". 2.2.11 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 referring 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.12 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 statistics 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.13 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.2 Endless reboot cycles. Another incarnation of this symptom is that the disk geometry on your disk label (as installed by install) is different than the geometry 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. 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.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 used 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-partite 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? 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. 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 kernel 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 ker