The NetBSD operating system

a short guide

Federico Lupi


Table of Contents
Purpose of this guide
1. Licence
2. What is NetBSD
2.1. The story of NetBSD
2.2. NetBSD features
2.3. Supported platforms
2.4. NetBSD's target users
2.5. Applications for NetBSD
2.6. The philosophy of NetBSD
2.7. How to get NetBSD
3. Installation
3.1. Documentation
3.2. The layout of a NetBSD installation
3.3. Installation
3.3.1. Keyboard
3.3.2. Geometries
3.3.3. Partitions
3.3.4. Hard disk space requirements
3.3.5. Retry
3.4. Installation example
3.4.1. Preparing the installation
3.4.2. Creating the installation floppy
3.4.3. Last preparatory steps
3.4.4. Beginning the installation
3.4.5. Partitions
3.4.6. Disklabel
3.4.7. Creating a disklabel
3.4.8. Final operations
3.4.9. Choosing the installation media
4. The first boot
4.1. If something went wrong
4.2. Login
4.3. Changing the keyboard layout
4.4. The man command
4.5. Changing the root password
4.6. Changing the shell
4.7. System time
4.8. Basic configuration /etc/rc.conf
4.9. Setting the host name
4.10. Rebooting the system
5. The second boot
5.1. dmesg
5.2. Mounting the CD-ROM
5.3. Mounting the floppy
5.4. Accessing a DOS/Windows partition
5.5. Adding users
5.6. Shadow passwords
5.7. Localization
5.8. Stopping and rebooting the system
6. Printing
6.1. Enabling the printer daemon
6.2. Configuring /etc/printcap
6.3. Configuring Ghostscript
6.4. Printer management commands
6.5. Remote printing
7. Compiling the kernel
7.1. Installing the kernel sources
7.2. Italian keyboard layout
7.3. Recompiling the kernel
7.4. Creating the kernel configuration file
7.5. Configuring the kernel
7.6. Generating dependencies and recompiling
7.7. If something went wrong
8. The package collection
8.1. Installing the package collection
8.2. Updating the package collection
8.3. Example: installing a program from source
8.3.1. Downloading the sources
8.3.2. Compiling and installing
8.4. Example: installing a binary package
8.5. Package management commands
8.6. Quick Start Packaging Guide
8.6.1. Tools
8.6.2. Getting Started
8.6.3. Filling in the Rest
8.6.4. Checking with pkglint
8.6.5. Running and Checking Build/Installs
8.6.6. Submitting a Package Using send-pr
8.6.7. Final Notes
9. Introduction to TCP/IP Networking
9.1. TCP/IP Networking
9.1.1. Audience
9.1.2. Supported Networking Protocols
9.1.3. Supported Media
9.1.4. TCP/IP Address Format
9.1.5. Subnetting and Routing
9.1.6. Name Service Concepts
9.1.7. Next generation Internet protocol - IPv6
Bibliography
10. Network configuration
10.1. Practice
10.1.1. A walk throught the kernel configuration
10.1.2. Overview of the network configuration files
10.1.3. Connecting to the Internet
10.1.4. Creating a small home network
10.1.5. Connecting two PCs through a serial line
10.2. Advanced Topics
10.2.1. IPNAT
10.2.2. NFS
10.2.3. Setting up /net with amd
10.2.4. IPv6 Connectivity & Transition via 6to4
11. The Domain Name System
11.1. Notes and Pre-Requisites
11.2. What is DNS?
11.3. The DNS Files
11.3.1. /etc/namedb/named.conf
11.3.2. /etc/namedb/localhost
11.3.3. /etc/named/zone.127.0.0
11.3.4. /etc/namedb/diverge.org
11.3.5. /etc/namedb/1.168.192
11.3.6. /etc/namedb/root.cache
11.4. Using DNS
11.5. Setting up a caching only name server
11.5.1. Testing the server
12. Mail and news
12.1. sendmail
12.1.1. Configuration with genericstable
12.1.2. Testing the configuration
12.1.3. Using an alternative MTA
12.2. fetchmail
12.3. Reading and writing mail with mutt
12.4. Strategy for receiving mail
12.5. Strategy for sending mail
12.6. Advanced mail tools
12.7. News with tin
13. Console drivers
13.1. wscons
13.1.1. 50 lines text mode with wscons
13.1.2. wsmouse
13.2. pccons
13.3. pcvt
13.3.1. Changing the screen size
14. Editing
14.1. Introducing vi
14.1.1. The vi interface
14.1.2. Switching to Edit Mode
14.1.3. Switching Modes & Saving Buffers to Files
14.1.4. Yanking and Putting
14.1.5. Navigation in the Buffer
14.1.6. Searching a File, the Alternate Navigational Aid
14.1.7. A Sample Session
14.2. Configuring vi
14.2.1. Extensions to .exrc
14.2.2. Documentation
14.3. Using tags with vi
15. X
15.1. What is X?
15.2. Configuration
15.3. The mouse
15.4. The keyboard
15.5. The monitor
15.6. Video card and X server
15.7. Starting X
15.8. Customizing X
15.9. Other window managers
15.10. Graphical login with xdm
16. Linux emulation
16.1. Emulation setup
16.1.1. Configuring the kernel
16.1.2. Installing the Linux libraries
16.1.3. Installing Acrobat Reader
16.2. Directory structure
17. Audio
17.1. Basic hardware elements
17.2. BIOS settings
17.3. Configuring the audio device
17.4. Configuring the kernel audio devices
17.5. Advanced commands
17.5.1. audioctl
17.5.2. mixerctl
17.5.3. audioplay
17.5.4. audiorecord
18. Obtaining sources by CVS
18.1. Fetching system and userland source
18.2. Fetching pkgsrc
19. CCD Configuration
19.1. Install physical media
19.2. Configure Kernel Support
19.3. Disklabel each volume member of the CCD
19.4. Configure the CCD
19.5. Initialize the CCD device
19.6. Create a 4.4BSD/UFS filesystem on the new CCD device
19.7. Mount the filesystem
20. Miscellaneous operations
20.1. Creating install boot floppies for i386
20.2. Creating a CD-ROM
20.2.1. Creating the ISO image
20.2.2. Writing the image to the CD
20.2.3. Copying a CD
20.2.4. Creating a bootable CD
20.3. Synchronizing the system clock
20.4. Installing the boot manager
20.5. Deleting the disklabel
20.6. Speaker
20.7. Forgot root password?
20.8. Adding a new hard disk
20.9. Password file is busy?
20.10. How to rebuild the devices in /dev
A. Information
A.1. Guide history
B. Installing without sysinst
B.1. Theory of partitioning and installation process
B.1.1. Partitioning
B.1.2. Swap partition size
B.1.3. Swap partition placement
B.1.4. Filesystems
B.1.5. Installing bootloader
B.2. Installation in practice
B.2.1. Boot
B.2.2. Initializing the disk
B.2.3. Using disklabel to create partitions
B.2.4. Creating the filesystems and installing the bootloader
B.2.5. Decompressing the installation files
B.2.6. Uncompressing the distribution sets
B.2.7. Finalizing your installation
C. Contributing to the NetBSD guide
C.1. Translating the guide
C.1.1. What you need to start a translation
C.1.2. Writing SGML/DocBook
C.2. Sending contributions
C.3. SGML/DocBook template
D. Getting started with SGML/DocBook
D.1. What is SGML/DocBook
D.2. Jade
D.3. DocBook
D.4. The DSSSL stylesheets
D.5. Using the tools
D.6. An alternative approach to catalog files
D.7. Producing PostScript output
D.7.1. Installing TeX
D.7.2. Enabling hyphenation for the italian language
D.7.3. Creating the hugelatex format
D.7.4. Installing Jadetex
D.8. Links
E. Aknowledgements
List of Figures
3-1. Partitions
3-2. Beginning the installation
3-3. Confirming the installation
3-4. Choosing a hard disk
3-5. BIOS geometry
3-6. Choosing the partitioning scheme
3-7. Choosing a unit of measure
3-8. fdisk
3-9. Deleting a partition
3-10. Deleted partition
3-11. Partitioning completed
3-12. Configuring the boot selector
3-13. Boot selector configuration
3-14. Disklabel
3-15. Standard disklabel
3-16. Modify the disklabel (sec)
3-17. Modifying a BSD partition
3-18. Modified disklabel
3-19. Selecting the sets
3-20. Installation media
3-21. CD-ROM installation
3-22. Congratulations
9-1. Our demo-network
9-2. Attaching one subnet to another one
9-3. Adresses are divided into more significant network- and less significant hostbits
9-4. IPv6-addresses have a similar structure to class B addresses
9-5. Several interfaces attached to a link result in only one scope ID for the link
10-1. Network with gateway
10-2. A frequently used method for transition is tunneling IPv6 in IPv4 packets
10-3. 6to4 derives a IPv6 from an IPv4 address
10-4. Request and reply can be routed via different gateways in 6to4
10-5. Enabling packet forwarding is needed for a 6to4 router
12-1. Structure of the mail system
List of Examples
4-1. Manual sections
6-1. /etc/printcap
6-2. /usr/local/libexec/lpfilter
6-3. /etc/printcap
6-4. /usr/local/libexec/lpfilter-ps
10-1. resolv.conf
10-2. nsswitch.conf
10-3. Connection script
10-4. Chat file
10-5. Chat file with login
10-6. /etc/ppp/options
10-7. ppp-up
10-8. ppp-down
10-9. /etc/hosts
11-1. strider's /etc/hosts file
11-2. localhost