File:  [NetBSD Developer Wiki] / wikisrc / guide / index.mdwn
Revision 1.23: download - view: text, annotated - select for diffs
Sun Mar 10 10:19:38 2013 UTC (6 years, 11 months ago) by jdf
Branches: MAIN
CVS tags: HEAD
net-service Guide -> wiki

    1: 
    2: # The NetBSD Guide
    3: 
    4: ## Purpose of this guide
    5: 
    6: This guide describes the installation and the configuration of the NetBSD
    7: operating system as well as the setup and administration of some of its
    8: subsystems. It primarily addresses people coming from other Unix-like operating
    9: systems, and aims to be a useful guide in the face of the many small problems
   10: one encounters when using a new tool.
   11: 
   12: This guide is not a Unix tutorial: basic knowledge of some concepts and tools
   13: is assumed. You should know, for example, what a file and a directory are, and
   14: how to use an editor. There are plenty of books explaining basic Unix and
   15: operating system concepts, and you should consult one if you need more
   16: background information. It is better to choose a general book and avoid titles
   17: like "Learning Unix-XYZ, version 1.2.3.4 in 10 days", but this is a matter of
   18: personal taste.
   19: 
   20: Originally, the guide has been a book, which was subsequently moved to the wiki
   21: to make it easier to contribute.
   22: 
   23: If you have additions or comments to the guide, but don't want to create an
   24: account, feel free to post your submissions to the
   25: [www team](mailto:www@netbsd.org) or the
   26: [docs mailing list](netbsd-docs@netbsd.org). The text is maintained in
   27: Markdown, and you can use the button in the top right corner to show the source
   28: of an article.
   29: 
   30: ## Table of Contents
   31: 
   32: ***I. About NetBSD***
   33: 
   34:  * [[1. What is NetBSD?|guide/intro]]
   35:    * [[1.1. The story of NetBSD]]
   36:    * [[1.2. NetBSD features]]
   37:    * [[1.3. Supported platforms]]
   38:    * [[1.4. NetBSD's target users]]
   39:    * [[1.5. Applications for NetBSD]]
   40:    * [[1.6. How to get NetBSD]]
   41: 
   42: ***II. System installation and related issues***
   43: 
   44: 
   45: ***III. System configuration, administration and tuning***
   46: 
   47:  * [[4. Upgrading NetBSD|guide/upgrading]]
   48:    * [[4.1. Using sysinst]]
   49:    * [[4.2. Using sysupgrade]]
   50:  * [[5. The first steps on NetBSD|guide/boot]]
   51:    * [[5.1. Troubleshooting]]
   52:    * [[5.2. The man command]]
   53:    * [[5.3. Editing configuration files]]
   54:    * [[5.4. Login]]
   55:    * [[5.5. Changing the root password]]
   56:    * [[5.6. Adding users]]
   57:    * [[5.7. Shadow passwords]]
   58:    * [[5.8. Changing the keyboard layout]]
   59:    * [[5.9. System time]]
   60:    * [[5.10. Secure Shell ssh(1)]]
   61:    * [[5.11. Basic configuration in /etc/rc.conf]]
   62:    * [[5.12. Basic network settings]]
   63:    * [[5.13. Mounting a CD-ROM]]
   64:    * [[5.14. Mounting a floppy]]
   65:    * [[5.15. Installing additional software]]
   66:    * [[5.16. Security alerts]]
   67:    * [[5.17. Stopping and rebooting the system]]
   68:  * [[6. Editing|guide/edit]]
   69:    * [[6.1. Introducing vi]]
   70:    * [[6.2. Configuring vi]]
   71:    * [[6.3. Using tags with vi]]
   72:  * [[7. The rc.d System|guide/rc]]
   73:    * [[7.1. Basics]]
   74:    * [[7.2. The rc.d scripts]]
   75:    * [[7.3. Order/dependencies of start determined by rcorder]]
   76:    * [[7.4. rc.d scripts of additional services]]
   77:    * [[7.5. Additional Reading]]
   78:  * [[8. Console drivers|guide/cons]]
   79:    * [[8.1. wscons]]
   80:  * [[9. X|guide/x]]
   81:    * [[9.1. What is X?]]
   82:    * [[9.2. Configuration]]
   83:    * [[9.3. The mouse]]
   84:    * [[9.4. The keyboard]]
   85:    * [[9.5. The monitor]]
   86:    * [[9.6. The video card]]
   87:    * [[9.7. Starting X]]
   88:    * [[9.8. Customizing X]]
   89:    * [[9.9. Other window managers or desktop environments]]
   90:    * [[9.10. Graphical login with xdm]]
   91:  * [[10. Linux emulation|guide/linux]]
   92:    * [[10.1. Emulation setup]]
   93:    * [[10.2. Directory structure]]
   94:    * [[10.3. Emulating /proc]]
   95:    * [[10.4. Using Linux browser plugins]]
   96:    * [[10.5. Further reading]]
   97:  * [[11. Audio|guide/audio]]
   98:    * [[11.1. Basic hardware elements]]
   99:    * [[11.2. Supported audio cards]]
  100:    * [[11.3. BIOS settings]]
  101:    * [[11.4. Configuring the audio device]]
  102:    * [[11.5. Multiple audio devices]]
  103:    * [[11.6. Configuring the kernel audio devices]]
  104:    * [[11.7. Advanced commands]]
  105:  * [[12. Printing|guide/print]]
  106:    * [[12.1. Enabling the printer daemon]]
  107:    * [[12.2. Configuring `/etc/printcap`]]
  108:    * [[12.3. Configuring Ghostscript]]
  109:    * [[12.4. Printer management commands]]
  110:    * [[12.5. Remote printing]]
  111:  * [[13. Using removable media|guide/rmmedia]]
  112:    * [[13.1. Reading data CDs with NetBSD]]
  113:    * [[13.2. Reading multi-session CDs with NetBSD]]
  114:    * [[13.3. Allowing normal users to access CDs]]
  115:    * [[13.4. Mounting an ISO image]]
  116:    * [[13.5. Using video CDs with NetBSD]]
  117:    * [[13.6. Using audio CDs with NetBSD]]
  118:    * [[13.7. Creating an MP3 (MPEG layer 3) file from an audio CD]]
  119:    * [[13.8. Using a CD-R writer with data CDs]]
  120:    * [[13.9. Using a CD-R writer to create audio CDs]]
  121:    * [[13.10. Creating an audio CD from MP3s]]
  122:    * [[13.11. Copying an audio CD]]
  123:    * [[13.12. Copying a data CD with two drives]]
  124:    * [[13.13. Using CD-RW rewritables]]
  125:    * [[13.14. DVD support]]
  126:    * [[13.15. Creating ISO images from a CD]]
  127:    * [[13.16. Getting volume information from CDs and ISO images]]
  128:    * [[13.17. Initializing and using floppy disks]]
  129:  * [[14. The cryptographic device driver (CGD)|guide/cgd]]
  130:    * [[14.1. Overview]]
  131:    * [[14.2. Components of the Crypto-Graphic Disk system]]
  132:    * [[14.3. Example: encrypting your disk]]
  133:    * [[14.4. Example: encrypted CDs/DVDs]]
  134:    * [[14.5. Suggestions and Warnings]]
  135:    * [[14.6. Further Reading]]
  136:  * [[15. Concatenated Disk Device (CCD) configuration|guide/ccd]]
  137:    * [[15.1. Install physical media]]
  138:    * [[15.2. Configure Kernel Support]]
  139:    * [[15.3. Disklabel each volume member of the CCD]]
  140:    * [[15.4. Configure the CCD]]
  141:    * [[15.5. Initialize the CCD device]]
  142:    * [[15.6. Create a 4.2BSD/UFS filesystem on the new CCD device]]
  143:    * [[15.7. Mount the filesystem]]
  144:  * [[17. NetBSD Logical Volume Manager (LVM) configuration|guide/lvm]]
  145:    * [[17.1. Anatomy of NetBSD Logical Volume Manager]]
  146:    * [[17.2. Install physical media]]
  147:    * [[17.3. Configure Kernel Support]]
  148:    * [[17.4. Configure LVM on a NetBSD system]]
  149:    * [[17.5. Disklabel each physical volume member of the LVM]]
  150:    * [[17.6. Create Physical Volumes]]
  151:    * [[17.7. Create Volume Group]]
  152:    * [[17.8. Create Logical Volume]]
  153:    * [[17.9. Example: LVM with Volume groups located on raid1]]
  154:  * [[18. Pluggable Authentication Modules (PAM)|guide/pam]]
  155:    * [[18.1. About]]
  156:    * [[18.2. Introduction]]
  157:    * [[18.3. Terms and conventions]]
  158:    * [[18.4. PAM Essentials]]
  159:    * [[18.5. PAM Configuration]]
  160:    * [[18.6. PAM modules]]
  161:    * [[18.7. PAM Application Programming]]
  162:    * [[18.8. PAM Module Programming]]
  163:    * [[18.9. Sample PAM Application]]
  164:    * [[18.10. Sample PAM Module]]
  165:    * [[18.11. Sample PAM Conversation Function]]
  166:    * [[18.12. Further Reading]]
  167:  * [[19. Tuning NetBSD|guide/tuning]]
  168:    * [[19.1. Introduction]]
  169:    * [[19.2. Tuning Considerations]]
  170:    * [[19.3. Visual Monitoring Tools]]
  171:    * [[19.4. Monitoring Tools]]
  172:    * [[19.5. Network Tools]]
  173:    * [[19.6. Accounting]]
  174:    * [[19.7. Kernel Profiling]]
  175:    * [[19.8. System Tuning]]
  176:    * [[19.9. Kernel Tuning]]
  177:  * [[20. NetBSD Veriexec subsystem|guide/veriexec]]
  178:    * [[20.1. How it works]]
  179:    * [[20.2. Signatures file]]
  180:    * [[20.3. Strict levels]]
  181:    * [[20.4. Veriexec and layered file systems]]
  182:    * [[20.5. Kernel configuration]]
  183:  * [[21. Bluetooth on NetBSD|guide/bluetooth]]
  184:    * [[21.1. Introduction]]
  185:    * [[21.2. Supported Hardware]]
  186:    * [[21.3. System Configuration]]
  187:    * [[21.4. Human Interface Devices]]
  188:    * [[21.5. Personal Area Networking]]
  189:    * [[21.6. Serial Connections]]
  190:    * [[21.7. Audio]]
  191:    * [[21.8. Object Exchange]]
  192:    * [[21.9. Troubleshooting]]
  193:  * [[22. Miscellaneous operations|guide/misc]]
  194:    * [[22.1. Installing the boot manager]]
  195:    * [[22.2. Deleting the disklabel]]
  196:    * [[22.3. Speaker]]
  197:    * [[22.4. Forgot root password?]]
  198:    * [[22.5. Password file is busy?]]
  199:    * [[22.6. Adding a new hard disk]]
  200:    * [[22.7. How to rebuild the devices in /dev]]
  201: 
  202: ***IV. Networking and related issues***
  203: 
  204:  * [[25. The Internet Super Server inetd
  205:  Allowing and denying hosts - /etc/hosts.allow, /etc/hosts.deny|guide/inetd]]
  206:    * [[25.1. Overview]]
  207:    * [[25.2. What is inetd?]]
  208:    * [[25.3. Configuring inetd - /etc/inetd.conf]]
  209:    * [[25.4. Services - /etc/services]]
  210:    * [[25.5. Protocols - /etc/protocols]]
  211:    * [[25.6. Remote Procedure Calls (RPC) - /etc/rpc]]
  212:    * [[25.7. Adding a Service]]
  213:    * [[25.8. When to use or not to use inetd]]
  214:    * [[25.9. Other Resources]]
  215:  * [[26. The Domain Name System|guide/dns]]
  216:    * [[26.1. DNS Background and Concepts]]
  217:    * [[26.2. The DNS Files]]
  218:    * [[26.3. Using DNS]]
  219:    * [[26.4. Setting up a caching only name server]]
  220:  * [[27. Mail and news|guide/mail]]
  221:    * [[27.1. postfix]]
  222:    * [[27.2. fetchmail]]
  223:    * [[27.3. Reading and writing mail with mutt]]
  224:    * [[27.4. Strategy for receiving mail]]
  225:    * [[27.5. Strategy for sending mail]]
  226:    * [[27.6. Advanced mail tools]]
  227:    * [[27.7. News with tin]]
  228:  * [[28. Introduction to the Common Address Redundancy Protocol (CARP)|guide/carp]]
  229:    * [[28.1. CARP Operation]]
  230:    * [[28.2. Configuring CARP]]
  231:    * [[28.3. Enabling CARP Support]]
  232:    * [[28.4. CARP Example]]
  233:    * [[28.5. Advanced CARP configuration]]
  234:    * [[28.6. Forcing Failover of the Master]]
  235:    * [[28.7. License]]
  236:  * [[29. Network services|guide/net-services]]
  237:    * [[29.1. The Network File System (NFS)]]
  238:    * [[29.2. The Network Time Protocol (NTP)]]
  239: 
  240: ***V. Building the system***
  241: 
  242:  * [[30. Obtaining the sources|guide/fetch]]
  243:    * [[30.1. Preparing directories]]
  244:    * [[30.2. Terminology]]
  245:    * [[30.3. Downloading tarballs]]
  246:    * [[30.4. Fetching by CVS]]
  247:    * [[30.5. Sources on CD (ISO)]]
  248:  * [[31. Crosscompiling NetBSD with build.sh|guide/build]]
  249:    * [[31.1. Building the crosscompiler]]
  250:    * [[31.2. Configuring the kernel manually]]
  251:    * [[31.3. Crosscompiling the kernel manually]]
  252:    * [[31.4. Crosscompiling the kernel with build.sh]]
  253:    * [[31.5. Crosscompiling the userland]]
  254:    * [[31.6. Crosscompiling the X Window System]]
  255:    * [[31.7. Changing build behaviour]]
  256:  * [[32. Compiling the kernel|guide/kernel]]
  257:    * [[32.1. Requirements and procedure]]
  258:    * [[32.2. Installing the kernel sources]]
  259:    * [[32.3. Creating the kernel configuration file]]
  260:    * [[32.4. Building the kernel manually]]
  261:    * [[32.5. Building the kernel using build.sh]]
  262:    * [[32.6. Installing the new kernel]]
  263:    * [[32.7. If something went wrong]]
  264:  * [[33. Updating an existing system from sources|guide/updating]]
  265:    * [[33.1. Manual build and update procedure]]
  266:    * [[33.2. Using sysinst]]
  267:    * [[33.3. Using sysbuild and sysupgrade]]
  268:    * [[33.4. More details about the updating of configuration and startup files]]
  269: 
  270: ## Guide history
  271: 
  272: This guide was born as a collection of sparse notes that Federico Lupi, the
  273: original author of the NetBSD Guide, wrote mostly for himself. When he realized
  274: that they could be useful to other NetBSD users he started collecting them and
  275: created the first version of the guide using the groff formatter. In order to
  276: "easily" get a wider variety of output formats (e.g. HTML and
  277: PostScript/PDF), he made the "mistake" of moving to SGML/DocBook, which
  278: was the format of the sources. Maintainership was picked up by the NetBSD
  279: project and its developers later, and the format was changed to XML/DocBook
  280: later due to better tools and slightly more knowhow on customisations.
  281: 
  282: In 2012/2013, the guide was converted in a Google Code-In task by Mingzhe Wang
  283: (wmzhere) to Markdown. In early 2013, it was integrated to the NetBSD wiki,
  284: along with removing old chapters, restricting numbering schemes and some
  285: reformulations.
  286: 
  287: You can still get the
  288: [old version of the Guide](http://netbsd.org/docs/guide), which is not
  289: maintained anymore.
  290: 
  291: ## Bibliography
  292: 
  293: * [AeleenFrisch] Aeleen Frisch. Copyright © 1991. O'Reilly & Associates. *Essential System Administration*.
  294: * [CraigHunt] Craig Hunt. Copyright © 1993. O'Reilly & Associates. *TCP/IP Network Administration*.
  295: * [RFC1034] P. V. Mockapetris. Copyright © 1987. *RFC 1034: Domain names - concepts and facilities*.
  296: * [RFC1035] P. V. Mockapetris. Copyright © 1987. *RFC 1035: Domain names - implementation and specification*.
  297: * [RFC1055] J. L. Romkey. Copyright © 1988. *RFC 1055: Nonstandard for transmission of IP datagrams over serial lines: SLIP*.
  298: * [RFC1331] W. Simpson. Copyright © 1992. *RFC 1331: The Point-to-Point Protocol (PPP) for the Transmission of Multi-protocol Datagrams over Point-to-Point Links*.
  299: * [RFC1332] G. McGregor. Copyright © 1992. *RFC 1332: The PPP Internet Protocol Control Protocol (IPCP)*.
  300: * [RFC1933] R. Gilligan and E. Nordmark. Copyright © 1996. *RFC 1933: Transition Mechanisms for IPv6 Hosts and Routers*.
  301: * [RFC2004] C. Perkins. Copyright © 1996. *RFC 2003: IP Encapsulation within IP*.
  302: * [RFC2401] S. Kent and R. Atkinson. Copyright © 1998. *RFC 2401: Security Architecture for the Internet Protocol*.
  303: * [RFC2411] R. Thayer, N. Doraswamy, and R. Glenn. Copyright © 1998. *RFC 2411: IP Security Document Roadmap*.
  304: * [RFC2461] T. Narten, E. Nordmark, and W. Simpson. Copyright © 1998. *RFC 2461: Neighbor Discovery for IP Version 6 (IPv6)*.
  305: * [RFC2529] B. Carpenter and C. Jung. Copyright © 1999. *RFC 2529: Transmission of IPv6 over IPv4 Domains without Explicit Tunnels*.
  306: * [RFC3024] G. Montenegro. Copyright © 2001. *RFC 3024: Reverse Tunneling for Mobile IP*.
  307: * [RFC3027] M. Holdrege and P. Srisuresh. Copyright © 2001. *RFC 3027: Protocol Complications with the IP Network Address Translator*.
  308: * [RFC3056] B. Carpenter and K. Moore. Copyright © 2001. *RFC 3056: Connection of IPv6 Domains via IPv4 Clouds*.
  309: 
  310: ## Acknowledgements
  311: 
  312: The NetBSD Guide was originally written by Federico Lupi who managed the
  313: sources, coordinated updates, and merged all contributions on his own. Since
  314: then, it has been updated and maintained by the NetBSD www team. The Guide has
  315: progressed thanks to the contributions of many people who have volunteered their
  316: time and effort, supplied material and sent in suggestions and corrections.
  317: 
  318: ### Original acknowledgements
  319: 
  320: Federico's original credits are:
  321: 
  322: * Paulo Aukar
  323: * Grant Beattie, converted to XML DocBook.
  324: * Manolo De Santis, Audio Chapter
  325: * Eric Delcamp, Boot Floppies
  326: * Hubert Feyrer, who contributed
  327: [[Introduction to TCP/IP Networking|guide/net-intro]] including Next
  328: generation Internet protocol - IPv6 and the section
  329: [[IPv6 Connectivity & Transition via 6to4|guide/net-practice#ipv6-6to4]]
  330: He also helped with the SGML to XML transition.
  331: * Jason R. Fink
  332: * Daniel de Kok, audio and linux chapters fixes.
  333: * Reinoud Koornstra, CVS chapter and rebuilding `/dev` in the Misc chapter.
  334: * Brian A. Seklecki [lavalamp@burghcom.com](mailto:lavalamp@burghcom.com), who
  335: contributed the CCD Chapter.
  336: * Guillain Seuillot
  337: * Martti Kuparinen, RAIDframe documentation.
  338: * David Magda
  339: 
  340: ### Current acknowledgements
  341: 
  342: This document is currently maintained by the NetBSD www team. Thanks to their
  343: efforts, the document is kept up to date and available online at all times. In
  344: addition, special thanks go to (in alphabetical order):
  345: 
  346: * Hubert Feyrer, for getting the guide up to speed for NetBSD 2.0, and for
  347: making numerous improvements to all chapters.
  348: * Jason R. Fink, for maintaining this document and integrating changes.
  349: * Andreas Hallman, for his information in
  350: [[Tunneling 6to4 through an IPFilter firewall|guide/net-practice#chap-net-practice-ipv6-6to4-ipf]]
  351: * Joel Knight for the
  352: [[Introduction to the Common Address Redundancy Protocol (CARP)|guide/carp]].
  353: See below for for the accompanying license.
  354: * Daniel de Kok, for constant contributions of new chapters, maintenance of
  355: existing chapters and his translation work.
  356: * Hiroki Sato, for allowing us to build PDF and PS versions of this document.
  357: * Jan Schaumann, for maintenance work and `www/htdocs` management.
  358: * Lubomir Sedlacik, for some details on using CGD for swap in
  359: [[Suggestions and Warnings|guide/cgd#suggestions]]
  360: * Dag-Erling Smrgrav, for the article on
  361: [[Pluggable Authentication Modules (PAM)|guide/pam]]. See below for the
  362: accompanying license.
  363: * Florian Sthr, for
  364: [[Example: encrypted CDs/DVDs|guide/cgd#cryptocds]]
  365: 
  366: 
  367: ### Licenses
  368: 
  369: #### Federico Lupi's original license of this guide
  370: 
  371: Redistribution and use in source and binary forms, with or without modification,
  372: are permitted provided that the following conditions are met:
  373: 
  374: 1. Redistributions of source code must retain the above copyright notice, this
  375: list of conditions and the following disclaimer.
  376: 2. Redistributions in binary form must reproduce the above copyright notice,
  377: this list of conditions and the following disclaimer in the documentation
  378: and/or other materials provided with the distribution.
  379: 3. All advertising materials mentioning features or use of this software must
  380: display the following acknowledgement: This product includes software developed
  381: by Federico Lupi for the NetBSD Project.
  382: 4. The name of the author may not be used to endorse or promote products
  383: derived from this software without specific prior written permission.
  384: 
  385: THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
  386: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  387: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
  388: SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  389: EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
  390: OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  391: INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  392: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  393: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  394: OF SUCH DAMAGE.
  395: 
  396: #### The NetBSD Developers
  397: 
  398: Copyright  1999, 2000, 2001, 2002 Federico Lupi
  399: 
  400: Copyright  2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The NetBSD Foundation
  401: 
  402: All brand and product names used in this guide are or may be trademarks or registered trademarks of their respective owners.
  403: 
  404: NetBSD is a registered trademark of The NetBSD Foundation, Inc.

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb