The NetBSD Operating System

A Guide

Federico Lupi

License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. 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.

  3. 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.

  4. 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.

$NetBSD: index.html,v 1.31 2004/08/31 00:24:24 hubertf Exp $


Table of Contents

Purpose of this guide
1. What is NetBSD?
1.1. The story of NetBSD
1.2. NetBSD features
1.3. Supported platforms
1.4. NetBSD's target users
1.5. Applications for NetBSD
1.6. The philosophy of NetBSD
1.7. How to get NetBSD
2. New features in NetBSD 2.0
2.1. What's new in NetBSD 2.0?
2.2. New ports and enhancements to existing ports
2.3. The NetBSD Packages Collection (pkgsrc)
3. Installation
3.1. Documentation
3.2. The layout of a NetBSD installation
3.3. Installation
4. Example Installation
4.1. Installation example
5. The first boot
5.1. If something went wrong
5.2. Login
5.3. Changing the keyboard layout
5.4. The man command
5.5. Changing the root password
5.6. Changing the shell
5.7. System time
5.8. Basic configuration /etc/rc.conf
5.9. Enabling FFS soft-dependencies
5.10. Rebooting the system
6. The second boot
6.1. dmesg
6.2. Mounting the CD-ROM
6.3. Mounting the floppy
6.4. Accessing a DOS/Windows partition
6.5. Adding users
6.6. Shadow passwords
6.7. Stopping and rebooting the system
7. Printing
7.1. Enabling the printer daemon
7.2. Configuring /etc/printcap
7.3. Configuring Ghostscript
7.4. Printer management commands
7.5. Remote printing
8. Using the build.sh Front End
8.1. Building the tools
8.2. Cross Compiling a Kernel
8.3. Build & Release
8.4. Environment Variables
9. Compiling the kernel
9.1. Installing the kernel sources
9.2. Recompiling the kernel
9.3. Creating the kernel configuration file
9.4. Configuring the kernel
9.5. Generating dependencies and recompiling
9.6. If something went wrong
10. The package collection
10.1. Installing the package collection
10.2. Updating the package collection
10.3. Example: installing a program from source
10.4. Example: installing a binary package
10.5. Package management commands
10.6. Quick Start Packaging Guide
11. Networking
11.1. Introduction to TCP/IP Networking
11.2. Practice
11.3. Advanced Topics
12. The Domain Name System
12.1. Notes and Pre-Requisites
12.2. What is DNS?
12.3. The DNS Files
12.4. Using DNS
12.5. Setting up a caching only name server
13. Mail and news
13.1. sendmail
13.2. fetchmail
13.3. Reading and writing mail with mutt
13.4. Strategy for receiving mail
13.5. Strategy for sending mail
13.6. Advanced mail tools
13.7. News with tin
14. Console drivers
14.1. wscons
14.2. pccons
14.3. pcvt
15. Editing
15.1. Introducing vi
15.2. Configuring vi
15.3. Using tags with vi
16. X
16.1. What is X?
16.2. Configuration
16.3. The mouse
16.4. The keyboard
16.5. The monitor
16.6. The video card
16.7. Starting X
16.8. Customizing X
16.9. Other window managers
16.10. Graphical login with xdm
17. Linux emulation
17.1. Emulation setup
17.2. Directory structure
18. Audio
18.1. Basic hardware elements
18.2. BIOS settings
18.3. Configuring the audio device
18.4. Configuring the kernel audio devices
18.5. Advanced commands
19. Obtaining sources by CVS
19.1. Fetching system and userland source
19.2. Fetching pkgsrc
20. CCD Configuration
20.1. Install physical media
20.2. Configure Kernel Support
20.3. Disklabel each volume member of the CCD
20.4. Configure the CCD
20.5. Initialize the CCD device
20.6. Create a 4.2BSD/UFS filesystem on the new CCD device
20.7. Mount the filesystem
21. The cryptographic device driver
21.1. Configuring kernel support
21.2. Setting up a cgd device
21.3. Swap encryption
22. rc.d System
22.1. The rc.d Configuration
22.2. The rc.d Scripts
22.3. The Role of rcorder and rc Scripts
22.4. Additional Reading
23. Root Filesystem on RAID-1 with RAIDframe
23.1. Introduction
23.2. Initial install
23.3. Setting up the second disk
23.4. Configuring the RAID device
23.5. Setting up filesystems
23.6. Setting up kernel dumps
23.7. Moving the existing files into the new filesystems
23.8. Enabling RAID autoconfiguration
23.9. The first boot with RAID-1
23.10. Adding the first disk
23.11. Testing kernel dumps
24. The Internet Super Server
24.1. Overview
24.2. What is Inetd
24.3. Protocols
24.4. Services
24.5. RPC
24.6. Inetd
24.7. Adding a Service
24.8. When to use or not to use inetd
24.9. Other Resources
25. Miscellaneous operations
25.1. Creating install boot floppies for i386
25.2. Creating a CD-ROM
25.3. Synchronizing the system clock
25.4. Installing the boot manager
25.5. Deleting the disklabel
25.6. Speaker
25.7. Forgot root password?
25.8. Adding a new hard disk
25.9. Password file is busy?
25.10. How to rebuild the devices in /dev
A. Information
A.1. Where to get this document
A.2. Guide history
B. Contributing to the NetBSD guide
B.1. Translating the guide
B.2. Sending contributions
B.3. SGML/DocBook template
C. Getting started with XML/DocBook
C.1. What is XML/DocBook
C.2. Jade
C.3. DocBook
C.4. The DSSSL stylesheets
C.5. Using the tools
C.6. An alternative approach to catalog files
C.7. Producing PostScript output
C.8. Links
D. Acknowledgements
D.1. Original acknowledgements
D.2. Current acknowledgements
E. Bibliography
Bibliography

List of Figures

3.1. Partitions
4.1. Beginning the installation
4.2. Confirming the installation
4.3. Choosing a hard disk
4.4. BIOS geometry
4.5. Choosing the partitioning scheme
4.6. Choosing a unit of measure
4.7. fdisk
4.8. Deleting a partition
4.9. Deleted partition
4.10. Partitioning completed
4.11. Configuring the boot selector
4.12. Boot selector configuration
4.13. Disklabel
4.14. Standard disklabel
4.15. Modify the disklabel (sec)
4.16. Modifying a BSD partition
4.17. Modified disklabel
4.18. Selecting the sets
4.19. Installation media
4.20. CD-ROM installation
4.21. Congratulations
11.1. Our demo-network
11.2. Attaching one subnet to another one
11.3. Addresses are divided into more significant network- and less significant hostbits
11.4. IPv6-addresses have a similar structure to class B addresses
11.5. Several interfaces attached to a link result in only one scope ID for the link
11.6. Network with gateway
11.7. A frequently used method for transition is tunneling IPv6 in IPv4 packets
11.8. 6to4 derives a IPv6 from an IPv4 address
11.9. Request and reply can be routed via different gateways in 6to4
11.10. Enabling packet forwarding is needed for a 6to4 router
13.1. Structure of the mail system

List of Examples

5.1. Manual sections
7.1. /etc/printcap
7.2. /usr/local/libexec/lpfilter
7.3. /etc/printcap
7.4. /usr/local/libexec/lpfilter-ps
11.1. resolv.conf
11.2. nsswitch.conf
11.3. Connection script
11.4. Chat file
11.5. Chat file with login
11.6. /etc/ppp/options
11.7. ppp-up
11.8. ppp-down
11.9. /etc/hosts
12.1. strider's /etc/hosts file
12.2. localhost