The NetBSD Guide
Purpose of this guide
This guide describes the installation and the configuration of the NetBSD operating system as well as the setup and administration of some of its subsystems. It primarily addresses people coming from other Unix-like operating systems, and aims to be a useful guide in the face of the many small problems one encounters when using a new tool.
This guide is not a Unix tutorial: basic knowledge of some concepts and tools is assumed. You should know, for example, what a file and a directory are, and how to use an editor. There are plenty of books explaining basic Unix and operating system concepts, and you should consult one if you need more background information. It is better to choose a general book and avoid titles like "Learning Unix-XYZ, version 18.104.22.168 in 10 days", but this is a matter of personal taste.
Originally, the guide has been a book, which was subsequently moved to the wiki to make it easier to contribute.
If you have additions or comments to the guide, but don't want to create an account, feel free to post your submissions to the www team or the docs mailing list. The text is maintained in Markdown, and you can use the button in the top right corner to show the source of an article.
Table of Contents
I. About NetBSD
- 1. What is NetBSD?
II. System installation and related issues
- 2. Installing NetBSD: Preliminary considerations and preparations
- 3. Example installation
- 3.1. Introduction
- 3.2. The installation process
- 3.3. Keyboard layout
- 3.4. Starting the installation
- 3.5. MBR partitions
- 3.6. Disklabel partitions
- 3.7. Setting the disk name
- 3.8. Last chance!
- 3.9. The disk preparation process
- 3.10. Choosing the installation media
- 3.11. Extracting sets
- 3.12. System configuration
- 3.13. Finishing the installation
- 4. Upgrading NetBSD
III. System configuration, administration and tuning
- 5. The first steps on NetBSD
- 5.1. Troubleshooting
- 5.2. The man command
- 5.3. Editing configuration files
- 5.4. Login
- 5.5. Changing the root password
- 5.6. Adding users
- 5.7. Shadow passwords
- 5.8. Changing the keyboard layout
- 5.9. System time
- 5.10. Secure Shell ssh(1)
- 5.11. Basic configuration in /etc/rc.conf
- 5.12. Basic network settings
- 5.13. Mounting a CD-ROM
- 5.14. Mounting a floppy
- 5.15. Installing additional software
- 5.16. Security alerts
- 5.17. Stopping and rebooting the system
- 6. Editing
- 7. The rc.d System
- 8. Console drivers
- 9. X
- 10. Linux emulation
- 11. Audio
- 12. Printing
- 13. Using removable media
- 13.1. Reading data CDs with NetBSD
- 13.2. Reading multi-session CDs with NetBSD
- 13.3. Allowing normal users to access CDs
- 13.4. Mounting an ISO image
- 13.5. Using video CDs with NetBSD
- 13.6. Using audio CDs with NetBSD
- 13.7. Creating an MP3 (MPEG layer 3) file from an audio CD
- 13.8. Using a CD-R writer with data CDs
- 13.9. Using a CD-R writer to create audio CDs
- 13.10. Creating an audio CD from MP3s
- 13.11. Copying an audio CD
- 13.12. Copying a data CD with two drives
- 13.13. Using CD-RW rewritables
- 13.14. DVD support
- 13.15. Creating ISO images from a CD
- 13.16. Getting volume information from CDs and ISO images
- 13.17. Initializing and using floppy disks
- 14. The cryptographic device driver (CGD)
- 15. Concatenated Disk Device (CCD) configuration
- 16. NetBSD RAIDframe
- 17. NetBSD Logical Volume Manager (LVM) configuration
- 17.1. Anatomy of NetBSD Logical Volume Manager
- 17.2. Install physical media
- 17.3. Configure Kernel Support
- 17.4. Configure LVM on a NetBSD system
- 17.5. Disklabel each physical volume member of the LVM
- 17.6. Create Physical Volumes
- 17.7. Create Volume Group
- 17.8. Create Logical Volume
- 17.9. Example: LVM with Volume groups located on raid1
- 18. Pluggable Authentication Modules (PAM)
- 18.1. About
- 18.2. Introduction
- 18.3. Terms and conventions
- 18.4. PAM Essentials
- 18.5. PAM Configuration
- 18.6. PAM modules
- 18.7. PAM Application Programming
- 18.8. PAM Module Programming
- 18.9. Sample PAM Application
- 18.10. Sample PAM Module
- 18.11. Sample PAM Conversation Function
- 18.12. Further Reading
- 19. Tuning NetBSD
- 20. NetBSD Veriexec subsystem
- 21. Bluetooth on NetBSD
- 22. Miscellaneous operations
IV. Networking and related issues
- 23. Introduction to TCP/IP Networking
- 24. Setting up TCP/IP on NetBSD in practice
- 24.1. A walk through the kernel configuration
- 24.2. Overview of the network configuration files
- 24.3. Connecting to the Internet with a modem
- 24.4. Creating a small home network
- 24.5. Setting up an Internet gateway with IPNAT
- 24.6. Setting up a network bridge device
- 24.7. A common LAN setup
- 24.8. Connecting two PCs through a serial line
- 24.9. IPv6 Connectivity & Transition via 6to4
- 25. The Internet Super Server inetd Allowing and denying hosts - /etc/hosts.allow, /etc/hosts.deny
- 26. The Domain Name System
- 27. Mail and news
- 28. Introduction to the Common Address Redundancy Protocol (CARP)
- 29. Network services
V. Building the system
- 30. Obtaining the sources
- 31. Crosscompiling NetBSD with build.sh
- 32. Compiling the kernel
- 33. Updating an existing system from sources
- 34. Building NetBSD installation media
This guide was born as a collection of sparse notes that Federico Lupi, the original author of the NetBSD Guide, wrote mostly for himself. When he realized that they could be useful to other NetBSD users he started collecting them and created the first version of the guide using the groff formatter. In order to "easily" get a wider variety of output formats (e.g. HTML and PostScript/PDF), he made the "mistake" of moving to SGML/DocBook, which was the format of the sources. Maintainership was picked up by the NetBSD project and its developers later, and the format was changed to XML/DocBook later due to better tools and slightly more knowhow on customisations.
In 2012/2013, the guide was converted in a Google Code-In task by Mingzhe Wang (wmzhere) to Markdown. In early 2013, it was integrated to the NetBSD wiki, along with removing old chapters, restricting numbering schemes and some reformulations.
You can still get the old version of the Guide, which is not maintained anymore.
The NetBSD Guide was originally written by Federico Lupi who managed the sources, coordinated updates, and merged all contributions on his own. Since then, it has been updated and maintained by the NetBSD www team. The Guide has progressed thanks to the contributions of many people who have volunteered their time and effort, supplied material and sent in suggestions and corrections.
Federico's original credits are:
- Paulo Aukar
- Grant Beattie, converted to XML DocBook.
- Manolo De Santis, Audio Chapter
- Eric Delcamp, Boot Floppies
- Hubert Feyrer, who contributed Introduction to TCP/IP Networking including Next generation Internet protocol - IPv6 and the section IPv6 Connectivity & Transition via 6to4 He also helped with the SGML to XML transition.
- Jason R. Fink
- Daniel de Kok, audio and linux chapters fixes.
- Reinoud Koornstra, CVS chapter and rebuilding
/devin the Misc chapter.
- Brian A. Seklecki firstname.lastname@example.org, who contributed the CCD Chapter.
- Guillain Seuillot
- Martti Kuparinen, RAIDframe documentation.
- David Magda
This document is currently maintained by the NetBSD www team. Thanks to their efforts, the document is kept up to date and available online at all times. In addition, special thanks go to (in alphabetical order):
- Hubert Feyrer, for getting the guide up to speed for NetBSD 2.0, and for making numerous improvements to all chapters.
- Jason R. Fink, for maintaining this document and integrating changes.
- Andreas Hallman, for his information in Tunneling 6to4 through an IPFilter firewall
- Joel Knight for the Introduction to the Common Address Redundancy Protocol (CARP). See below for for the accompanying license.
- Daniel de Kok, for constant contributions of new chapters, maintenance of existing chapters and his translation work.
- Hiroki Sato, for allowing us to build PDF and PS versions of this document.
- Jan Schaumann, for maintenance work and
- Lubomir Sedlacik, for some details on using CGD for swap in Suggestions and Warnings
- Dag-Erling Smørgrav, for the article on Pluggable Authentication Modules (PAM). See below for the accompanying license.
- Florian Stöhr, for Example: encrypted CDs/DVDs
Federico Lupi's original license of this guide
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Federico Lupi for the NetBSD Project.
- The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The NetBSD Developers
Copyright © 1999, 2000, 2001, 2002 Federico Lupi
Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The NetBSD Foundation
All brand and product names used in this guide are or may be trademarks or registered trademarks of their respective owners.
NetBSD® is a registered trademark of The NetBSD Foundation, Inc.