The Netbsd Guide
Total Page:16
File Type:pdf, Size:1020Kb
The NetBSD Guide (2021/05/08) The NetBSD Developers The NetBSD Guide by The NetBSD Developers Published 2021/05/08 12:08:23 Copyright © 1999, 2000, 2001, 2002 Federico Lupi Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 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. Table of Contents Purpose of this guide............................................................................................................................ xvii I. About NetBSD.................................................................................................................................. xviii 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...................................................................................................2 1.6 How to get NetBSD............................................................................................................2 II. System installation and related issues.................................................................................................1 2 Installing NetBSD: Preliminary considerations and preparations..................................................2 2.1 Preliminary considerations.................................................................................................2 2.1.1 Dual booting...........................................................................................................2 2.1.2 NetBSD on emulation and virtualization...............................................................2 2.2 Install preparations.............................................................................................................2 2.2.1 The INSTALL document.......................................................................................3 2.2.2 Partitions................................................................................................................3 2.2.3 Hard disk space requirements................................................................................4 2.2.4 Network settings....................................................................................................4 2.2.5 Backup your data and operating systems!.............................................................4 2.2.6 Preparing the installation media.............................................................................4 2.2.6.1 Booting the install system from USB........................................................4 2.2.6.2 Booting the install system from CD..........................................................5 2.3 Checklist.............................................................................................................................5 3 Example installation........................................................................................................................6 3.1 Introduction........................................................................................................................6 3.2 The installation process......................................................................................................6 3.3 Keyboard layout.................................................................................................................6 3.4 Starting the installation.......................................................................................................7 3.5 MBR partitions.................................................................................................................10 3.6 Disklabel partitions...........................................................................................................13 3.7 Setting the disk name........................................................................................................17 3.8 Last chance!......................................................................................................................18 3.9 The disk preparation process............................................................................................19 3.10 Installation type..............................................................................................................20 3.11 Choosing the installation medium..................................................................................21 3.11.1 Installing from CD-ROM / DVD / install image media.....................................22 3.11.2 Installing from an unmounted file system..........................................................23 3.11.3 Installing via FTP and Network configuration...................................................25 3.11.4 Installing via NFS..............................................................................................31 3.12 Extracting sets................................................................................................................32 3.13 System configuration......................................................................................................33 3.14 Finishing the installation................................................................................................39 4 Upgrading NetBSD.......................................................................................................................41 4.1 Using sysinst.....................................................................................................................41 iii 4.1.1 Overview..............................................................................................................41 4.1.2 The INSTALL document.....................................................................................41 4.1.3 Performing the upgrade........................................................................................41 4.2 Using sysupgrade..............................................................................................................47 III. System configuration, administration and tuning..........................................................................49 5 The first steps on NetBSD.............................................................................................................50 5.1 Troubleshooting................................................................................................................50 5.1.1 Boot problems......................................................................................................50 5.1.2 Misconfiguration of /etc/rc.conf...........................................................................50 5.2 The man command...........................................................................................................51 5.3 Editing configuration files................................................................................................52 5.4 Login.................................................................................................................................52 5.5 Changing the root password...........................................................................................53 5.6 Adding users.....................................................................................................................53 5.7 Shadow passwords............................................................................................................54 5.8 Changing the keyboard layout..........................................................................................54 5.9 System time......................................................................................................................54 5.10 Secure Shell (ssh(1)).......................................................................................................55 5.11 Basic configuration in /etc/rc.conf..........................................................................55 5.12 Basic network settings....................................................................................................56 5.13 Mounting a CD-ROM.....................................................................................................56 5.14 Mounting a floppy..........................................................................................................57 5.15 Installing additional software.........................................................................................57 5.15.1. Using packages from pkgsrc.............................................................................57 5.15.2. Storing third-party software..............................................................................58 5.16 Security alerts.................................................................................................................58 5.17 Stopping