The Netbsd Operating System
Total Page:16
File Type:pdf, Size:1020Kb
The NetBSD Operating System A Guide Federico Lupi The NetBSD Operating System: A Guide by Federico Lupi Copyright © 1999, 2000, 2001, 2002 by Federico Lupi Copyright © 2003 by The NetBSD Foundation 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. Table of Contents Purpose of this guide .................................................................................................................................. i 1 What is NetBSD ...................................................................................................................................... 1 1.1 The story of NetBSD.................................................................................................................... 1 1.2 NetBSD features .......................................................................................................................... 1 1.3 Supported platforms..................................................................................................................... 2 1.4 NetBSD’s target users .................................................................................................................. 2 1.5 Applications for NetBSD ............................................................................................................. 3 1.6 The philosophy of NetBSD.......................................................................................................... 3 1.7 How to get NetBSD ..................................................................................................................... 4 2 Installation............................................................................................................................................... 5 2.1 Documentation............................................................................................................................. 5 2.2 The layout of a NetBSD installation ............................................................................................ 6 2.3 Installation.................................................................................................................................... 6 2.3.1 Keyboard ......................................................................................................................... 6 2.3.2 Geometries....................................................................................................................... 7 2.3.3 Partitions.......................................................................................................................... 8 2.3.4 Hard disk space requirements.......................................................................................... 8 2.3.5 Retry ................................................................................................................................ 9 2.4 Installation example ..................................................................................................................... 9 2.4.1 Preparing the installation................................................................................................. 9 2.4.2 Creating the installation floppy .....................................................................................10 2.4.3 Last preparatory steps.................................................................................................... 11 2.4.4 Beginning the installation.............................................................................................. 11 2.4.5 Partitions........................................................................................................................ 13 2.4.6 Disklabel........................................................................................................................ 19 2.4.7 Creating a disklabel ....................................................................................................... 19 2.4.8 Final operations ............................................................................................................. 22 2.4.9 Choosing the installation media ....................................................................................22 3 The first boot ......................................................................................................................................... 26 3.1 If something went wrong ........................................................................................................... 26 3.2 Login .......................................................................................................................................... 26 3.3 Changing the keyboard layout ................................................................................................... 27 3.4 The man command..................................................................................................................... 27 3.5 Changing the root password....................................................................................................... 29 3.6 Changing the shell...................................................................................................................... 29 3.7 System time................................................................................................................................ 29 3.8 Basic configuration /etc/rc.conf.......................................................................................... 30 3.9 Enabling the virtual consoles ..................................................................................................... 31 3.10 Rebooting the system ............................................................................................................... 31 4 The second boot..................................................................................................................................... 33 4.1 dmesg ......................................................................................................................................... 33 4.2 Mounting the CD-ROM ............................................................................................................. 33 4.3 Mounting the floppy................................................................................................................... 34 4.4 Accessing a DOS/Windows partition......................................................................................... 34 iii 4.5 Adding users .............................................................................................................................. 35 4.6 Shadow passwords ..................................................................................................................... 36 4.7 Stopping and rebooting the system ............................................................................................ 36 5 Printing .................................................................................................................................................. 38 5.1 Enabling the printer daemon...................................................................................................... 38 5.2 Configuring /etc/printcap ................................................................................................... 39 5.3 Configuring Ghostscript............................................................................................................. 40 5.4 Printer management commands................................................................................................. 41 5.5 Remote printing.......................................................................................................................... 42 6 Compiling the kernel ............................................................................................................................ 43 6.1 Installing the kernel sources....................................................................................................... 43 6.2 Italian keyboard layout..............................................................................................................