Digital UNIX System Administration
Course Guide, Volume 1
Order Number: EY-U659E-S1.0002
September 1996
Digital Equipment Corporation makes no representations that the use of its products
in the manner described in this publication will not infringe on existing or future
patent rights, nor do the descriptions contained in this publication imply the granting
of licenses to make, use, or sell equipment or software in accordance with the
description.
Reproduction or duplication of this courseware in any form, in whole or in part, is
prohibited without the prior written permission of Digital Equipment Corporation.
Possession, use, or copying of the software described in this publication is authorized
only pursuant to a valid written license from Digital or an authorized sublicensor.
© Digital Equipment Corporation 1995, 1996. All rights reserved. Printed in U.S.A.
The following are trademarks of Digital Equipment Corporation: Alpha AXP,
CompacTape, DEC, DECevent, DEC VET, DEC Fortran, DECthreads, DEC Chip,
DECnet, DECwindows, Digital, DNA, LAT, POLYCENTER, OpenVMS, TURBOchannel,
ULTRIX, and the DIGITAL logo.
The following are third-party trademarks used in this course:
AIX is a registered trademark of International Business Machines Corp.
Futurebus/Plus is a registered trademark of Force Computers GMBH, Federal Republic
of Germany.
Global Knowledge Network and the Global Knowledge Network logo are trademarks of
Global Knowledge Network, Inc.
IEEE is a registered trademark of the Institute of Electrical and Electronics Engineers,
Inc.
Motif, OSF and OSF/1 are registered trademarks of the Open Software Foundation.
MS–DOS is a registered trademark of Microsoft Corporation.
NFS is a registered trademark of Sun Microsystems, Inc.
Open Software Foundation is a trademark of the Open Software Foundation.
POSIX is a registered trademark of the Institute of Electrical and Electronics.
PostScript is a registered trademark of Adobe Systems, Inc.
NFS and Sun Microsystems are registered trademarks of Sun Microsystems, Inc.
UNIX is a registered trademark in the United States and other countries licensed
exclusively through X/Open Company Ltd.
X Window System is a trademark of the Massachusetts Institute of Technology.
This document was prepared using VAX DOCUMENT Version 2.1.
Contents
About This Course . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
1 Introducing UNIX System Management
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3
System Manager Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4
UNIX Software Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6
The Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–7
Digital UNIX Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–8
Digital UNIX Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–8
Digital UNIX Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–8
File System Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–9
Digital UNIX System Internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10
User Process Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10
Daemon Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–11
Process Environment: Scheduling and Priority . . . . . . . . . . . . . . . . . . 1–11
Real Time Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–13
Memory Management: Paging and Swapping . . . . . . . . . . . . . . . . . . . 1–13
Block versus Character I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–14
Superuser and the Root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15
Superuser Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15
Root Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15
Root Login Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15
Root Login Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–16
Common Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–17
Managing with CDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–17
Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–17
Application Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–18
Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–20
Daily Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–21
Selecting System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–22
Monitoring and Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–23
Storage Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–24
Using Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–25
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26
System Manager Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26
UNIX Software Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26
Digital UNIX Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26
iii
Digital UNIX System Internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26
Superuser and Root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–27
Common Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–27
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–28
Superuser and the root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–28
CDE and Superuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–28
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–29
Superuser and the root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–29
CDE and Superuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–29
2 Managing Disks and File Systems
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2
Disk Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4
Disk Drive Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4
Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4
Heads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Tracks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Cylinders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Sectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Disk Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6
Partitions and File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8
Disk Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8
Partitions on a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8
Hierarchical File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8
File System and Partition Relationships . . . . . . . . . . . . . . . . . . . . . . . 2–9
Partition Tables and Disk Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10
Deriving Disk Parameters with /etc/disktab . . . . . . . . . . . . . . . . . . . . 2–10
Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . . . . 2–12
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–12
Displaying the Current Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . 2–12
Configure Partitions Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14
Disk/Partition Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14
Modifying a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–17
Changing Partition Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–18
Repartitioning a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–19
Viewing and Changing Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–20
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–20
Changing Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–21
Expanding a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–22
Repartitioning a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–24
Digital UNIX File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25
Virtual File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25
Accessing a File Through VFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–26
UNIX File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–26
UNIX File System Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–28
MFS File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–28
Network File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–29
iv
Compact Disk File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–30
System Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31
Types of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31
Digital UNIX File Directory Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . 2–31
Organizing System Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–32
Advanced File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34
Features and Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34
Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–35
UFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–36
AdvFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37
File Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–38
Guidelines for File Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39
Filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39
Guidelines for Filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–40
Creating a UFS File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–41
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–41
Using the newfs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–41
Checking a UNIX File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–43
When to Check File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–43
Using the fsck Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–43
Mounting and Unmounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . 2–45
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–45
Using the mount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–46
Using the fstab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–47
Using the umount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–49
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51
Disk Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51
Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51
Partitions and File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51
Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . 2–51
Viewing and Changing Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . 2–51
Digital UNIX File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–52
System Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–52
Advanced File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53
Creating a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53
Checking a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53
Mounting a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54
Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . 2–54
Viewing and Changing Partition Sizes with disklabel . . . . . . . . . . . . . 2–54
Creating a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54
Checking a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54
Mounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–56
Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . 2–56
Viewing and Changing Partition Sizes with disklabel . . . . . . . . . . . . . 2–56
Creating a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–57
Checking a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–57
Mounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–57
v
3 System Shutdown and Startup
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2
Shutting Down and Rebooting the System . . . . . . . . . . . . . . . . . . . . . . . . 3–3
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–3
Reasons for System Shutdown and Reboot . . . . . . . . . . . . . . . . . . . . . 3–3
Methods for System Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4
Using the shutdown Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4
Shutting Down to Single User Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 3–5
Complete Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7
Using the halt Command to Stop the Processor . . . . . . . . . . . . . . . . . 3–7
Using the fasthalt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–8
Shutting Down to Single User Mode with init . . . . . . . . . . . . . . . . . . . 3–8
Stopping the Processor with init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9
Other Methods of Shutting Down the System . . . . . . . . . . . . . . . . . . . 3–9
Rebooting the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9
Using the reboot Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9
Shutting Down and Rebooting the System with CDE . . . . . . . . . . . . . . . . 3–11
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–11
Invoking Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–11
Shutdown Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–12
Shutdown Message Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–13
Shutdown Reboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–15
Bootstrapping a Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16
Steps in the Bootstrap Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16
Loading the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16
Initializing the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–17
Hardware Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–17
Creating System Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–17
Single User Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–18
Initialization Script Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–18
Multiuser Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–19
Run Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–19
Digital UNIX Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–20
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–20
Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–20
Changing Run Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–21
The /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–22
Digital UNIX /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–23
Entries in the /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–23
Execution of /sbin/rc*.d Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–24
Selected Contents of the rc*.d Directories . . . . . . . . . . . . . . . . . . . . . . 3–26
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–29
Shutting Down and Rebooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–29
Shutting Down and Rebooting with CDE . . . . . . . . . . . . . . . . . . . . . . 3–29
Bootstrapping a Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . 3–29
Digital UNIX Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–29
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30
System Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30
CDE Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30
Booting the Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30
vi
Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–31
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32
System Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32
CDE Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32
Booting the Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32
Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32
4 Updating System Firmware
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2
Firmware Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
Architectural View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3
Console Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
Systems Reference Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
SRM Commands and Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6
Advanced RISC Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–7
Changing Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–8
Firmware Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9
Update Firmware Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Digital Firmware Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
SRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
ARC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Changing Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11
Firmware Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–12
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13
Validate Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14
Validate Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14
5 Installing the System
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2
Preparing for an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3
Installation Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3
Planning Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3
Planning Swap Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–4
Default Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–4
Custom Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–5
Update Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–5
Hardware Required for Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
Booting from the Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6
Common Desktop Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7
Common Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8
vii
Default Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8
Common Setup Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–9
Custom Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–11
View Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–12
Partition Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–13
UNIX Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–15
Creating the Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–15
Booting the New Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–16
Kernel Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–17
Post Installation Login and Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–18
Performing an Update Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–20
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–20
Update Install File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–20
Characteristics of an Update Installation . . . . . . . . . . . . . . . . . . . . . . 5–21
Update Installation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–21
Update Administration Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–24
upadmin Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–24
Customized System File Admin Menu . . . . . . . . . . . . . . . . . . . . . . . . . 5–25
Saving Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–25
Deleting Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–26
Viewing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–26
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27
Preparing for an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27
Installation Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27
Performing an Update Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–28
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–28
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–29
Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–29
6 Connecting to the Network
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2
Introducing UNIX Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–3
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–3
UNIX Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–3
Introducing Internet Gateways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–5
Gateway Connects Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–5
Using Internet Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6
Internet Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6
Internet Address Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7
Sample Internet Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7
Ethernet Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–8
Using Subnetwork Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9
Subnetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9
Broadcast Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–10
TCP/IP Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
Hosts File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
viii
Trusted Hosts File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–13
Lineprinter Daemon File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14
Internet Daemon Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14
Networks File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15
Protocols File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15
Services File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–16
Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . . . . 6–17
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17
Starting Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17
Configuring an Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–18
Adding or Modifying Information in /etc/hosts . . . . . . . . . . . . . . . . . . . 6–21
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24
Introducing UNIX Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24
Introducing Internet Gateways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24
Using Internet Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24
Using Subnetwork Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24
TCP/IP Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–25
Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . 6–25
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–26
Internet Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–26
Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . 6–26
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–27
Internet Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–27
Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . 6–27
7 Loading and Licensing Software
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2
Loading and Unloading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . 7–3
Preparing to Load Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–3
Using the setld Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–3
Displaying Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–4
Software Subset Display Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–4
Loading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–5
Deleting a Software Subset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–8
Licensing Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9
Types of Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9
A Sample PAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9
Using the lmf Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–11
Using lmf to Register a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–12
Using lmfsetup to Register a License . . . . . . . . . . . . . . . . . . . . . . . . . 7–12
Using the CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14
Starting the CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14
Using the License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–15
Using Edit List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–16
Using Edit New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–16
Using File Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–17
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–20
Loading and Unloading Software Subsets . . . . . . . . . . . . . . . . . . . . . . 7–20
ix
Licensing Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–20
Using the CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–20
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–21
Loading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–21
Checking Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–21
Deleting Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–22
Licensing Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–22
Using CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–22
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23
Loading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23
Checking Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23
Deleting Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23
Licensing Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–24
Using CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–25
8 Configuring the Kernel
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2
Building a New Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–3
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–3
System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–4
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–4
Global Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–5
Changing Parameters for Performance . . . . . . . . . . . . . . . . . . . . . . . . 8–5
System Definition Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6
Options Keyword Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6
Makeoptions Keyword Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6
Pseudodevice Keyword Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6
Building a Static Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–10
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–10
Using the doconfig Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–10
Configuring the System Dynamically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12
Loading a Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12
Unloading a Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12
Querying Subsystem State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–13
Subsystem Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–14
Automatically Configured Subsystems . . . . . . . . . . . . . . . . . . . . . . . . . 8–14
Modifying System Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–15
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–15
Subsystem Attribute Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–15
Identifying Dynamic Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–16
Modifying Attributes at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–16
Subsystem Attributes Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17
Updating Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17
Removing Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17
List Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17
Deleting Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18
Building a New Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18
System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18
x
Building a Static Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18
Dynamic System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18
Modifying System Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19
System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19
Building a Static Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19
Dynamically Configure the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19
Modifying a Running Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19
Persistent Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20
System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20
Building a Static Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20
Dynamically Configure the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20
Modifying a Running Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20
Persistent Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–21
9 Configuring Peripherals
About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–2
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–2
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–2
Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–3
Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–4
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–4
Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–7
Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–7
Configuring Pseudoterminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–8
LAT Terminal Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–9
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–9
Adding Terminals on a Terminal Server . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10
Configuring LAT Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10
Running latsetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10
Controlling the LAT Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–12
Configuring Disk and Tape Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–13
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–13
DDR Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–13
Configuring a Printer with CDE Printer Configuration . . . . . . . . . . . . . . . 9–14
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–14
Using the CDE Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . 9–14
CDE Printer Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . 9–15
Configuring a Remote Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–15
The Advanced... Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–16
The /etc/printcap File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–17
Configuring a Local Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–18
Local Printer /etc/printcap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–20
Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–21
How Printing Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–21
Print System Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–22
Using the lptest Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–22
Using the lpc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–23
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26
Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26
Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26
LAT Terminal Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26
xi
Adding Terminals on a Terminal Server . . . . . . . . . . . . . . . . . . . . . . . 9–26
Configuring Disks and Tape Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26
Configuring a Printer with the CDE Printer Configuration . . . . . . . . . 9–27
Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–27
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28
Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28
Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28
Adding Terminals on a Terminal Server . . . . . . . . . . . . . . . . . . . . . . . 9–28
Dynamic Device Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28
Adding a Printer with CDE Printer Configuration . . . . . . . . . . . . . . . 9–28
Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–29
Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–30
Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–30
Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–30
Adding Terminals on a Terminal Server . . . . . . . . . . . . . . . . . . . . . . . 9–31
Dynamic Device Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–31
Adding a Printer with CDE Printer Configuration . . . . . . . . . . . . . . . 9–31
Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–31
Index
Examples
2–1 Root Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10
2–2 An /etc/disktab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–11
2–3 Displaying the Disk Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–20
2–4 Expanding a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–23
2–5 Using the newfs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–42
2–6 Invoking the fsck Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–44
2–7 Using the mount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–47
2–8 An /etc/fstab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–48
2–9 Using the umount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–49
2–10 Mounting and Unmounting File Systems . . . . . . . . . . . . . . . . . . . . . . 2–49
3–1 Typical Multiuser Mode ps Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–6
3–2 Typical Single User ps Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7
3–3 Digital UNIX /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–23
3–4 An /sbin/rc2 File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–25
3–5 Selected Contents of the rc*.d Directories . . . . . . . . . . . . . . . . . . . . . . 3–26
5–1 Creating the Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–16
5–2 Update Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–21
7–1 Listing Software Subsets with setld . . . . . . . . . . . . . . . . . . . . . . . . . . 7–5
7–2 Loading Software Subsets with setld . . . . . . . . . . . . . . . . . . . . . . . . . . 7–6
7–3 Removing a Software Subset with setld . . . . . . . . . . . . . . . . . . . . . . . 7–8
7–4 A Sample PAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–10
7–5 Using the lmfsetup Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–13
8–1 Alpha AXP System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . 8–8
8–2 Building a Kernel with the doconfig Program . . . . . . . . . . . . . . . . . . . 8–10
9–1 The /dev Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–4
9–2 Using the latsetup Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10
xii
9–3 Using the lptest Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–23
9–4 Using the lpc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–25
Figures
1 Course Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
1–1 System Manager Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4
1–2 UNIX Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6
1–3 Logging In to a Terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–11
1–4 PID/PPID Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–12
1–5 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–18
1–6 System Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–19
1–7 Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–20
1–8 DailyAdmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–21
1–9 System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–22
1–10 Monitoring and Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–23
1–11 Storage Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–24
1–12 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–25
2–1 Disk Drive Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4
2–2 Functional View of Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . 2–7
2–3 Overlapping Disk Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8
2–4 File System Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–9
2–5 Navigating to the Disk Configuration Window . . . . . . . . . . . . . . . . . . 2–12
2–6 Disk Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–13
2–7 Configure Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14
2–8 Disk Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15
2–9 Partition Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–16
2–10 Partition Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–17
2–11 Partition Bar Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–18
2–12 Result of Partition Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–19
2–13 Expanding a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–22
2–14 File System Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25
2–15 Accessing a File Through VFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–26
2–16 Small Blocks Require More Overhead . . . . . . . . . . . . . . . . . . . . . . . . . 2–27
2–17 Large Blocks Waste Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–27
2–18 Large Blocks and Small Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–27
2–19 UNIX File System Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–28
2–20 Remote Mounting with NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–30
2–21 Digital UNIX System Directory Hierarchy . . . . . . . . . . . . . . . . . . . . . 2–32
2–22 UFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–36
2–23 AdvFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37
2–24 File Migration in AdvFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–38
2–25 File Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–38
2–26 Filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39
2–27 File Systems Before Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–45
2–28 File Systems After Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–46
3–1 Overview of System Shutdown and Reboot . . . . . . . . . . . . . . . . . . . . . 3–4
xiii
3–2 Shutdown Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–11
3–3 Shutdown Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–12
3–4 Shutdown Options Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–13
3–5 Warning Users of Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–14
3–6 Shutdown Reboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–15
3–7 Overview of Digital UNIX Initialization Files . . . . . . . . . . . . . . . . . . . 3–21
4–1 Console Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4
4–2 Console Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5
5–1 Initiating an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7
5–2 Status Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8
5–3 Default Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–9
5–4 Ready, Set, Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–10
5–5 Custom Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–11
5–6 Selecting Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–12
5–7 Disk Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–14
5–8 Configure Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–15
6–1 Exchanging a Message on a UNIX Network . . . . . . . . . . . . . . . . . . . . 6–4
6–2 Gateway Connecting Two Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–5
6–3 Internet Address Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7
6–4 Subnet Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9
6–5 Subnetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–10
6–6 Broadcast Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–11
6–7 Invoking the Network Configuration Manager . . . . . . . . . . . . . . . . . . 6–18
6–8 Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–19
6–9 Configuring Ethernet Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–20
6–10 Optional IFCONFIG Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–21
6–11 Host File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–22
6–12 Hosts Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–23
7–1 CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14
7–2 Minimum Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–15
7–3 List a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–16
7–4 Edit New Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–17
7–5 File Open option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–18
7–6 PAK in User File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–19
9–1 Providing Access for Terminals and Printers . . . . . . . . . . . . . . . . . . . . 9–9
9–2 Starting Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–14
9–3 Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–15
9–4 Remote Printer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–16
9–5 Advanced Remote Printer Settings Window . . . . . . . . . . . . . . . . . . . . 9–17
9–6 Local Printer Settings Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–18
9–7 Advanced Local Printer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–19
xiv
Tables
1 Conventions Used in This Course . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
1–1 System Manager Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5
1–2 Root Login Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–16
2–1 Types of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31
2–2 UNIX System Directory Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–33
2–3 AdvFS Features and Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34
3–1 shutdown Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–5
3–2 halt Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7
3–3 fasthalt Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–8
3–4 reboot Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–10
3–5 The /etc/inittab File Action Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–22
4–1 Administrator Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6
4–2 ARC Console Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–8
4–3 DEC 2000 AXP Outline Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–10
6–1 Parts of an Internet Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6
6–2 TCP/IP Network Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12
7–1 Load Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–6
7–2 CDE License Manager VS LMF Commands . . . . . . . . . . . . . . . . . . . . 7–20
8–1 Global Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–5
9–1 Print System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–22
9–2 Line Printer Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–24
xv
About This Course
xvii
About This Course
About This Course
Introduction The Digital UNIX System Administration course is designed for
those individuals who will be managing and operating a Digital
UNIX system.
Your Course Guide presents a number of topics on system
administration, and provides pointers to documentation and
additional references. Textual information is interspersed with
lab activities to allow you to practice what you have learned.
The Course Guide is divided into chapters designed to cover a
single topic or group of related topics. The chapters are divided
into smaller units that cover a more limited topic or subtopic.
Examples are provided to demonstrate concepts.
This preface describes the contents of the course, suggests ways in
which you can most effectively use the materials, and sets up the
conventions for the use of terms in the course. It includes:
• Course description — a brief overview of the course contents
• Target audience — who should take this course
• Prerequisites — the skills and knowledge needed to ensure
your success in this course
• Course goals and nongoals — what skills or knowledge the
course will and will not provide
• Chapter organization — the structure of each chapter
• Course map — the sequence in which you should cover each
chapter
• Chapter descriptions — brief descriptions of each chapter
• Course conventions — explanation of symbols and signs used
throughout this course
• Resources — documentation and books to help you successfully
complete this course
Course
Description
This course describes the tasks that a system manager needs to
perform to get a UNIX operating system installed and ready for
users, including such responsibilities as:
• Installing operating system software
• Managing and maintaining file systems
• Customizing the system kernel
• Configuring peripheral devices
• Managing user accounts
• Performing system backups
• Monitoring system activity
xviii
About This Course
• Troubleshooting system problems
This course is designed to lead you through the tasks you must
perform as the manager of a Digital UNIX system. The format
of presenting information followed by exercises gives you the
practice you need to understand the course material.
Target
Audience
This course is designed for individuals with some experience in
a UNIX® environment, who will be managing a Digital UNIX
system.
Prerequisites To get the most from this course, students should be able to:
• Log in to a UNIX system
• Use an editor on the system
• Manage files and directories
• Use the Common Desktop Environment to manage files and
programs
• Move within the UNIX File System
• Use nonprivileged commands
• Write and debug simple shell programs
These prerequisites can be satisfied by taking the following
course:
• UNIX Utilities and Commands lecture/lab or self-paced course
® UNIX is a registered trademark in the United States and other countries
licensed exclusively through X/Open Company Ltd.
xix
About This Course
Course Goals To set up and manage a Digital UNIX system, you should be able
to:
• Identify system management responsibilities
• Identify components of UNIX systems
• Install the operating system
• Shut down and boot the system
• Create and manage file systems
• Configure devices: terminals, disk drives, tape drives, printers
• Add and remove users on the system
• Back up and restore files and file systems
• Load and license optional software
• Monitor system performance
• Join and maintain membership in a local area network
• Describe some popular network services
This course introduces UNIX networking services and
demonstrates how to configure a system on a TCP/IP network.
It does not cover network design, troubleshooting, or network
services installation. Students needing these skills should take
the Network Management course.
Nongoals This course does not cover the following topics:
• UNIX basic utilities and commands
• Hardware installation and configuration
• Network services setup
• Network design, internals, or troubleshooting
• Programming
• Multisystem security
• Core dump analysis
• Cluster software
UNIX System
Administration
Curriculum
This course is the first course in the UNIX system administration
curriculum. It has the prerequisite of experience using a
UNIX system. This course is the prerequisite for several other
administration courses:
• Digital UNIX Network Administration
This course is designed for students who will be managing
a UNIX network (which includes a Digital UNIX system),
who want to increase their knowledge of Digital UNIX
networking. This includes configuration and management
of TCP/IP networking, NFS, NIS, BIND, Bootp, DHCP,
dataless configurations, LAT, remote installation, SNMP,
xx
About This Course
and SLIP/PPP. The course demonstrates how to set up and
manage Digital UNIX networks using the Common Desktop
Environment (CDE), the new standard graphical user interface
for UNIX systems.
• Digital UNIX Security Management
This course is designed for individuals with experience
managing a Digital UNIX operating system, who are
interested in learning how to recognize and address security
threats in the base security level of the Digital UNIX
environment. Course topics include security terms, threats,
security holes, installing and configuring a secure base level
Digital UNIX system, managing a secure system, and base
level and enhanced security auditing.
• Digital UNIX Performance Management
This course is designed for individuals with experience
managing a Digital UNIX operating system, who are
interested in maximizing the performance on their systems.
Course topics include factors that affect system performance,
monitoring and identifying system bottlenecks, and system
tuning.
• Managing Digital UNIX Using the Advanced File System
(AdvFS), Logical Storage Manager (LSM), and Redundant
Arrays of Inexpensive Disks (RAID)
This courses describes advanced Digital UNIX system
management tasks that system administrators need to
perform to fully utilize the more sophisticated Digital UNIX
functionality, particularly, the Advanced File System (AdvFS),
Logical Storage Manager (LSM), and Redundant Arrays of
Inexpensive Disks (RAID).
• DECsafe Available Server Environment Configuration and
Management
This course describes in detail how to plan, install,
configure, test and troubleshoot a DECsafe Available Server
Environment (ASE).
• TruCluster Software Configuration and Management
This course describes in detail how to install the hardware and
software components and how to set up TruCluster Software
highly available services.
xxi
About This Course
Chapter
Organization
This course is divided into 16 chapters. Each chapter covers a
skill or related group of skills required to fulfill the course goals.
In this course, each chapter consists of:
• An introduction to the subject matter of the chapter.
• One or more objectives that describe the goals of the chapter.
• A list of resources, or materials for further reference. Some
of these manuals are included with your course materials.
Others may be available for reference in your classroom or lab.
• The text of each chapter, which includes outlines, tables,
figures, and examples.
• The summary includes a brief review of the topics presented
in the chapter.
• Lab Exercises enable you to practice your skills and to
measure your mastery of the information in the chapter.
A test is provided for student self-assessment. It allows you to
measure whether or not the learning objectives were achieved.
Course Map The course map shows how each chapter is related to other
chapters and to the course as a whole. Before studying a chapter,
you should master all of its prerequisite chapters. The course map
shows the current chapters and the order in which they should
be presented. The direction of the arrows determine the order in
which the chapters should be studied, from bottom to top.
xxii
About This Course
Figure 1 Course Map
SystemShutdown
andStartup
Archiving
Configuring
Peripherals
ZKOX−055000111−01−RGS
Monitoring
theSystem
InstallingtheSystem
ManagingDisksand
FileSystems
UpdatingSystem
Firmware
Loadingand
LicensingSoftware
Kernel
Configuringthe
UserEnvironment
Managingthe
UsingDECevent
IntroducingUNIX
SystemManagement
IntroducingSMP,
Connectingto
aNetwork
LSM,andClusters
Introducing
NetworkServices
xxiii
About This Course
Chapter
Descriptions
The following list summarizes the contents of each chapter.
• Introducing UNIX System Management — provides an
overview to system hardware and operating system software,
their components and functions; describes the responsibilities
of a system manager and the privileges of the superuser or
root account.
• Managing Disks and File Systems — discusses disk drives
and their physical and logical structure, the different file
systems, reviews file types and major directories in an OSF/1
system; discusses the steps to add a file system: create, check,
and mount, using standard tools.
• System Shutdown and Startup — demonstrates the UNIX
shutdown, halt and reboot commands, provides instructions on
how to boot a Digital UNIX system, and provides background
on what happens on the system as it boots.
• Updating System Firmware — discusses the underlying
principles of the firmware operating system, as well as the
consoles required to support multiple operating systems.
• Installing the System — describes the planning and
procedures necessary to install a Digital UNIX operating
system.
• Connecting to the Network — discusses UNIX, or Internet
networking, including Internet addressing and the files needed
to configure the network; demonstrates netconfig to perform
the configuration.
• Loading and Licensing Software — demonstrates use
of the Digital UNIX software loading utility, setld, to
manage the software subset inventory, and load and unload
software subsets; demonstrates the use of the Digital License
Management Facility to control access to software.
• Configuring the Kernel — describes the system
configuration file, how to modify the system configuration,
when to build a new kernel, use of the doconfig shell script
to build a kernel automatically, and how to use the make
command to build a kernel manually.
• Configuring Peripherals — describes how to add terminals,
add pseudoterminals, disk and tape drives, and set up and test
printers.
• Archiving — addresses the issue of protecting user data from
accidental loss by backing up the data. A new NetWorker
SingleServer Save and Restore application is presented which
backs up and recovers files and file systems.
• Managing the User Environment — discusses the user
account files passwd and group and demonstrates how to create,
modify, and remove user accounts on the system; shows how
xxiv
About This Course
to manage processes running on the system and manage user
disk space.
• Monitoring the System — discusses useful tools and utilities
to monitor the system and diagnose system problems.
• Using DECevent — describes the replacement utility for
UERF on Alpha systems. This new utility has interfaces for
command line, online display and a GUI.
• Introducing SMP, LSM and Clusters — presents an
overview of symmetric multiprocessing, Digital UNIX cluster
products and the Logical Storage Manager.
• Introducing Network Services — describes network
services: DECnet network, NFS service, NIS (YP), the Domain
Name Service, and Remote Installation Service.
xxv
About This Course
Course
Conventions
Table 1 gives an explanation of the conventions used in this
course.
Table 1 Conventions Used in This Course
Convention Meaning
keyword Keywords and new concepts are displayed in this
type.
examples Examples, commands, options and pathnames
appear in this type.
command(x) Cross-references to command documentation
include the section number in the reference
pages. For example, fstab(5) means fstab is
referenced in Section 5.
$ A dollar sign represents the user prompt.
# A number sign represents the superuser prompt.
bold Within interactive examples, boldface type
indicates user input.
key The box symbol indicates that the named key on
the keyboard is pressed.
.
.
.
In examples, a vertical ellipsis indicates that not
all of the lines of the example are shown.
[ ] In syntax descriptions, brackets indicate items
that are optional.
variable In syntax descriptions, this type indicates items
that are variable.
.
.
.
In syntax descriptions, an ellipsis indicates the
item may be repeated.
xxvi
About This Course
Resources Students should use the following manuals and books as
references for this course:
• Your Digital UNIX system management documentation
Digital UNIX Operating System, Version 4.0 Software
Product Description
Release Notes
Technical Overview
System Administration
Digital UNIX Installation Guide
Network Administration
DEC Verifier and Exerciser Tool User’s Guide
• Maurice Bach, (c) 1986, The Design of the UNIX Operating
System, Prentice-Hall, ISBN 0-13-201799-7
• Douglas Comer, (c) 1991, Internetworking with TCP/IP,
Volume I, Prentice-Hall, ISBN 0-13-468505-9
• Leffler, McKusick, Karels, and Quarterman, (c) 1989, The
Design and Implementation of the 4.3BSD UNIX Operating
System, Addison-Wesley, ISBN 0-201-06196-1
• Nemeth, Snyder, & Seebass, (c) 1989, UNIX System
Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6
• (c) 1991, Guide to OSF/1: A Technical Synopsis, O’Reilly &
Associates
xxvii
1
Introducing UNIX System Management
Introducing UNIX System Management 1–1
About This Chapter
About This Chapter
Introduction The system manager is the person behind-the-scenes of any
computer site. Few users are aware of exactly how much
the system manager does to make their login sessions easier.
This chapter discusses the responsibilities of the system
manager, which, though sometimes complicated, are really not so
mysterious.
Overall, a system manager is responsible for creating a smooth
system environment. This includes providing the system tools
users need to do their jobs, and keeping system performance at a
high level. To accomplish these goals, a system manager must be
knowledgeable about the system from both software and hardware
aspects. Only in this way can you match the responsiveness of
your current system to the needs of the people using it.
This chapter is an introduction to managing a UNIX system.
It provides an overview to operating system software — their
components and functions. It describes the responsibilities of a
system manager and the privileges of the superuser or root
account. Finally, it demonstrates how to become the root user.
Major topics discussed in this chapter are:
• System manager responsibilities
• Hardware that makes up this system
• Software environment of the operating system
• Internal functioning of the operating system
• Use of the Common Desktop Environment (CDE)
Objectives To describe the role of the system administrator and the UNIX
system, you should be able to:
• Identify system manager responsibilities
• Describe the role of the UNIX operating system and its
components
• Describe the Digital UNIX features
• Describe internal operating system functions related to system
management
• Describe the superuser and the root login procedure
• Describe the Common Desktop Environment (CDE) interface
1–2 Introducing UNIX System Management
About This Chapter
Resources For more information on the topics in this chapter, see the
following:
• Nemeth, Snyder, & Seebass, (c) 1989, UNIX System
Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6,
Chapters 1 and 3 describe system manager duties and
privileges
• Leffler, McKusick, Karels, and Quarterman, (c) 1989, The
Design and Implementation of the 4.3BSD UNIX Operating
System, Addison-Wesley, ISBN 0-201-06196-1, Describes the
internal functions of the BSD based UNIX operating system
• Maurice Bach, (c) 1986, The Design of the UNIX Operating
System, Prentice-Hall, ISBN 0-13-201799-7, Describes the
internal functions of the System V based UNIX operating
system
• Digital UNIX Operating System, Version 4.0 Software Product
Description
• Guide to OSF/1: A Technical Synopsis, (c) 1991, O’Reilly &
Associates
• The Design of the OSF/1 Operating System, Open Software
Foundation, Prentice-Hall
Introducing UNIX System Management 1–3
System Manager Responsibilities
System Manager Responsibilities
Overview Every computer site designates a person to be responsible for
the day-to-day operation of the computer system, including both
software and hardware. This person is known as the system
manager or system administrator.
A site following the security guidelines of the US Department
of Defense (DoD) Orange Book will divide these responsibilities
between a system administrator and a security administrator.
A large site may have a number of system operators to assist the
system manager with the tasks.
Some of these tasks are visible to users and, in fact, directly
benefit them, such as creating user logins. Others are less obvious
but no less important, such as storing copies of user files on tape
for future use.
Figure 1–1 System Manager Responsibilities
Install and Configure
the System
Assist Users
Shut Down and
Start Up System
Manage Disk Space
Maintain Archives Control User Access
Monitor the System
Troubleshoot
System Manager
ZKOX−055000111−02−RGS
The system manager needs special privileges to perform
specialized tasks that affect the running of a system.
The tasks of the system manager are described briefly in the
following table.
1–4 Introducing UNIX System Management
System Manager Responsibilities
Table 1–1 System Manager Tasks
Task Description
Install and configure
the system
Installs distribution kit containing new software or software
updates
Configures the kernel or devices
Shut down and start up
the system
Shuts down and starts up a system to perform maintenance
Control user access Adds new users to the system’s user login and group files;
modifies or deletes changed accounts
Maintains an appropriate level of security on the system
Manage disk space Maintains the file systems, checks disk usage and, if
necessary, establishes disk quotas
Maintain archives Provides an archive of user files and a continuity of
information through the use of system backup and restore
facilities
Monitor the system Tracks system activity through online accounting procedures
to determine how effectively system resources are being used
Troubleshoot the system Identifies and resolves routine system problems involving
hardware and software; repairs damaged file systems
Assist users Much of a system manager’s day can be filled with user
application problems and answering user’s questions
Introducing UNIX System Management 1–5
UNIX Software Environment
UNIX Software Environment
Overview An operating system can be viewed as a resource management
program. Its primary purpose is to manage hardware and
software resources in a way to maximize work capacity and
productivity of the system.
The UNIX operating system is often depicted as a series of layers,
as shown in Figure 1–2.
Figure 1–2 UNIX Layers
Hardware
Device Drivers
Kernel
Shell
Application Programs
ZKO−060000135−50−RGS
The hardware is at the center. The operating system is the
interface between the user process and the hardware.
The UNIX kernel is minimized to provide those features that
can only be performed within the operating system. If special
system privileges are not needed, those operations will be done by
auxiliary programs external to the kernel.
The Digital UNIX operating system takes this one step further by
breaking the kernel into two layers. The inner layer is the Mach
operating system kernel; the outer layer adds UNIX services.
Theoretically, this outer layer could be replaced by a layer
providing some other operating system services.
1–6 Introducing UNIX System Management
UNIX Software Environment
When the system is running, the kernel is in main memory. The
kernel is responsible for:
• Process control and scheduling
• Memory management
• Device I/O
• System error handling
The shell surrounds the kernel and acts as a user interface. It
handles:
• Foreground and background execution
• Pipes and filters
• Configurable environment
• Flexible command language
• I/O redirection
The Kernel The UNIX kernel is the central controlling program that provides
basic system facilities.
• The Digital UNIX kernel is the executable file /vmunix.
• It is compiled from source files, object files and configurable
parameters.
• It is loaded into memory when the system boots.
• It runs programs and manages resources.
Once kernel initialization is complete and the various system
daemons have been created and made runnable, the kernel waits
for requests:
• User programs requesting services from the kernel through
system calls
• Hardware devices getting kernel response through interrupts
The kernel manages system resources, such as memory, the CPU,
and devices for user processes. When you run a program, the
UNIX operating system creates a process to handle it.
Introducing UNIX System Management 1–7
Digital UNIX Features
Digital UNIX Features
Digital UNIX
Components
The Digital UNIX operating system is a 64-bit advanced kernel
architecture based on Carnegie Mellon University’s Mach V2.5
operating system kernel. It includes components from Berkeley
Software Distribution (BSD) 4.3 and 4.4, System V, and other
sources. The result is a simple, extensible kernel that was
designed for parallel and distributed environments.
The STREAMS facility makes it possible to write flexible, modular
device drivers and is compatible with SVR4 STREAMS.
The extensible run-time loader provides shared library support,
support for memory mapped files, and dynamic module loading.
Dynamically loading modules into an already running program
enables device drivers and other system code to be loaded into a
kernel without rebuilding or rebooting the system. The loader can
also be extended to support multiple object module formats.
The command set comes from the AIX operating system and is
based on commands from BSD and System V operating systems.
Digital UNIX
Features
Digital UNIX is based on OSF/1 R1.0, R1.1, and R1.2 technology,
and the Motif R1.2.3 graphical user interface and programming
environment. It provides numerous features to assist application
programmers, including:
• Symmetric Multiprocessing (SMP)
Enables systems containing two or more processors to execute
the same copy of the operating system and access common
memory.
• Multithread Support
DECthreads provides a pthreads interface that complies with
both the POSIX and DCE semantics.
• Realtime Support
Provides a kernel option to enhance the performance of
realtime applications conforming to the POSIX standard.
• Shared Libraries
Provides a full complement of dynamic shared libraries based
on System V semantics.
• Memory Mapped Files
Supports the Berkeley mmap function that allows an application
to access data files with memory operations rather than file
input and output operations.
• Full features of the X Window System, Version 11, Release
6(X11R6). Provides X Window Display, X Window System
Application Interface and Terminal Interfaces.
1–8 Introducing UNIX System Management
Digital UNIX Features
• Supports terminal servers using the LAT protocol.
• Provides a number of scripts and GUI tools for system
management tasks.
Digital UNIX complies with numerous standards and industry
specifications including:
• The X/Open XPG4 and XTI
• POSIX, FIPS and System V Interface Definition (SVID)
Digital UNIX is compatible with Berkeley 4.3 and System V
programming interfaces. It conforms with the OSF Application
Environment Specification (ASE) that specifies an interface for
developing portable applications that will run on a variety of
hardware platforms.
File System
Support
Digital UNIX supports the following file system types:
• POLYCENTER Advanced File System (AdvFS)
A journaled local file system that provides higher availability
and greater flexibility that traditional UNIX file systems.
• UNIX File System (UFS)
Compatible with Berkeley 4.3 Tahoe release.
• Network File System (NFS)
Allows transparent file access over TCP/IP networks
• Memory File System (MFS)
Provides the same file system structure as UFS, but resides in
virtual memory.
• ISO 9660 Compact Disk File System (CDFS)
A standard for volume and file structure for the interchange of
information using CD–ROM.
• File-on-File Mounting File System (FFM)
Allows regular, character, or block-special files to be mounted
over regular files (used primarily by SVR4).
• /proc File System
Allows running processes to be accessed and manipulated as
files by ordinary system calls (compatible with SVR4).
• /dev/fd File System (FDFS)
A pseudo-file system layered beneath the virtual file system
(UFS).
Introducing UNIX System Management 1–9
Digital UNIX System Internals
Digital UNIX System Internals
Overview To ensure the smooth operation of your Digital UNIX system,
you should have some knowledge of the internal workings of
UNIX. The following topics will help you to better understand the
functions of your system.
• User process creation
• Daemons
• Scheduling and priority
• Paging and swapping
• Block versus character I/O
User Process
Creation
A program is an executable file, and a process is an instance
of the program in execution. The kernel (/vmunix), the C shell
csh and the vi editor are all programs. Two users can run the
vi editor simultaneously (that is, two independent processes
using one program). A process can create another process using
the fork(2) system call. The process that invokes the fork is
the parent process and the newly created process is the child
process.
When the system starts up (boots), the kernel is copied into
memory and initialized. The kernel creates the init process. init
is the ancestor of all user shells. It creates a process for each
terminal port, and calls /etc/getty(8) to put a login message on
the terminal. /etc/getty reads in the username and calls login to
log in, or verify the user and execute the user shell.
Unlike traditional single-threaded UNIX processes, Digital
UNIX processes can be multithreaded. Multithreading and other
parallelization are integral to the Mach kernel of the Digital
UNIX operating system. Multiple threads can share an address
space, file descriptors, and so forth. Therefore, threads require
very little system overhead and provide improved performance.
Note
Further information on threads can be found in the Guide
to DECthreads.
When a user responds to the login prompt by entering his or her
user name:
1. getty reads the user name and invokes /bin/login(1), passing
the user name.
2. login prompts for the password, verifies the user, and invokes
the shell listed in /etc/passwd.
1–10 Introducing UNIX System Management
Digital UNIX System Internals
3. The shell interprets all user commands.
When the user logs out, init updates the login history file
/var/adm/wtmp and creates a new getty process listening on that
port.
The following figure illustrates the sequence of events for a user
logging in to the Digital UNIX system from a terminal.
Figure 1–3 Logging In to a Terminal
"program"
init
init getty login ksh
ksh
pid 2345pid 2345
exit()
exec()
wait() => 2345
exit()
exec()
fork()=2345
fork()=1234
pid 1 wait()=>1234
Terminal Login
ZKO−060000135−43−RGS
exit()exit()exit()
exec() exec()pid 1234pid 1234 pid 1234
Daemon
Processes
Another type of process is the daemon; daemon processes are not
associated with any users but perform system functions, such as
printer spooling, network control and time-dependent activities.
Many daemons are started when the system boots.
Process
Environment:
Scheduling and
Priority
UNIX is a timesharing system; it allows many processes to run
at the same time.
The kernel identifies each process by a process number, or
process ID (PID). Process 0 is a special process created when
the system boots. init has process ID 1. Executing the ps -f
command shows the user processes, their PIDs and their parents’
PIDs, or PPIDs. You can see that each process has a parent, for
example tty4 (Korn shell process) is the parent of the telnet
process. You can also see by following backwards the PPIDs that
tty3 (Korn shell process) is the ancestor of the ftp process.
Introducing UNIX System Management 1–11
Digital UNIX System Internals
Figure 1–4 PID/PPID Numbers
On a time-sharing system, the kernel allocates the CPU to
a process for a period of time, called a time slice, and then
switches to another process. The switch is called a context
switch. The kernel, which is executing in the context or the
environment of a process, saves the state of the process and
enough information about the process and what it was doing to
resume later where it left off.
Every process has a scheduling priority. All processes start with
some base priority (in the range 0 to 63); lower numbers represent
higher priority. System processes have higher priority than user
processes. The kernel picks the process with the highest priority
to run next.
Users can lower the priority of their own processes. The
superuser can lower or raise the priority of processes. The system
also adjusts priorities internally on a timesharing policy; a process
that is using CPU time has its priority lowered, while a process
that is waiting to run has its priority raised. This ensures that all
waiting processes will get their turn to run. The ps lax command
shows the user-adjusted priority (NICE column) and the system
priority (PRI column). The timesharing policy has the goal of
equitably sharing the processors among the various processes.
Digital UNIX also supports a fixed-priority policy, where the goal
is to provide preferential treatment to particular processes. For
fixed-priority processes, the scheduler priority is equal to the base
priority.
1–12 Introducing UNIX System Management
Digital UNIX System Internals
Real Time
Processing
A real-time process reacts to external events within a specified
time limit, and reacts in a predictable way. Real-time tasks can
vary from process control for manufacturing to simulators for
flight training.
Digital UNIX provides preemption and fixed-priority scheduling
to support real-time processes. Preemption allows a high
priority process to take control of the CPU if it becomes runnable
while a lower priority process is currently executing.
The real-time scheduling interface supports three policies that
give the programmer the ability to select which class a process
should belong to:
• Timesharing - Standard Digital UNIX scheduling policy.
Process priority is adjusted periodically by the kernel based on
CPU usage and system load average.
• FIFO - Fixed priority first-in first-out policy. If no higher
priority process preempts, the process runs until it
relinquishes the CPU through a blocking call; there is no
quantum time limit.
• Round-robin - Fixed-priority policy similar to FIFO, but adds
a time quantum. A process must relinquish control of the
CPU if it has used its quantum and another process of equal
priority is ready to run.
Memory
Management:
Paging and
Swapping
The kernel is in main memory along with the currently executing
process. However, physical memory is a limited resource;
generally not all active processes can fit into memory. Disk space
is used as a secondary memory managed by paging and swapping.
The paging/swapping area is set up during system installation
and can be resident on a local disk or in the case of diskless
workstations, on a disk available over the network.
Programs can be written larger than physical memory up to some
maximum size virtual memory. The hardware manipulates
programs and data in lengths called pages. Special code
translates the virtual memory page addresses to physical
addresses. When the process tries to access data on a page not
in physical memory, the kernel retrieves it from paging space on
disk and overwrites a page in memory.
The kernel keeps as many processes in physical memory as it can
and lets each one execute during its time slice. (UNIX) swapping
occurs when a process needs to be loaded into memory to be
executed, but there is no room for it. Another process is swapped
out, or saved to the swap area on disk to free up memory.
Digital UNIX uses a slightly different notion of swapping. A
process may consist of multiple threads sharing an address space.
Swapping out a thread’s address space would make the other
threads in the same process unrunnable. The swapout daemon
scans the list of all threads to identify those that have been idle
Introducing UNIX System Management 1–13
Digital UNIX System Internals
for more than 10 seconds. The pageout daemon can then free the
memory pages associated with the thread’s kernel stack. The goal
is still to free memory. And a thread must still be swapped in
when it is made runnable.
Block versus
Character I/O
When a process wants to access data from a file on a disk drive,
the kernel brings the data into memory where the process can
examine it, alter it and ask to store or rewrite it.
Device drivers, or special code in the kernel controls the
operation of peripheral devices.
Mass storage devices such as disk drives are treated as block or
character devices. A block device is a random-access storage
device. A memory buffer, called the buffer cache, is used to read
a block of bytes to the device at one time. This technique can
reduce the amount of disk traffic and improve response time if
processes tend to manipulate data within the same block. One
disadvantage is that if the system halts suddenly, the updated
buffer cache may not be written out to disk.
A character device, also called a raw device, does not use the
buffer.
A disk device can be treated as both a block and a raw device and
has a separate logical name for each.
1–14 Introducing UNIX System Management
Superuser and the Root Login
Superuser and the Root Login
Superuser
Privileges
A UNIX system manager has special system privileges that
exceed those of ordinary users. For this reason, the system
manager is called the superuser. UNIX systems reserve the
login name root (user ID 0) for the superuser. Root owns and
controls many important system files and directories.
As root, the superuser’s special system privileges include complete
access to any file or directory as well as privilege to:
• Override all file mode permissions
• Bypass all normal security checks
• Kill any existing process
• Shut down the system
Root Security Root is a very powerful user, so powerful that a system manager
who carelessly uses its privileges can accidentally destroy
an entire file system. Consequently, you should keep the
root password a secret, known only to you and one (or more)
experienced backup person at your site. This person should have
the knowledge to perform system management responsibilities.
To protect against potential superuser abuse, you should change
the root password regularly with the passwd command.
• Always log in as root using su because the system logs every
set user to root attempt in /var/adm/sialog.
• Perform nonprivileged commands as a nonprivileged user to
prevent accidental system damage.
• You can log in directly as root only on terminals set up as
secure in /etc/securettys.
Network terminals or LAT terminals should not be set up as
secure for security reasons.
Root Login
Procedure
While you can log in directly as root, the following is the
suggested login procedure:
1. Log in under your personal login name.
2. Use the su command to set user ID to root.
3. When you have successfully entered the root password, the
system returns the superuser prompt (#).
4. Change to the root or other directory.
Press Ctrl/D to exit the root shell and return to your original shell.
Introducing UNIX System Management 1–15
Superuser and the Root Login
Root Login
Restrictions
Digital UNIX and many other UNIX systems restrict the direct
login as root to terminals flagged as secure in /etc/securettys
(Base Level).
Some UNIX systems restrict the use of the su command (to set
user to root) to terminals flagged as su in /etc/securettys .
Digital UNIX systems restrict the use of the su command (to set
user to root) to members of group 0 (system group).
When someone uses the su command to set user to root, it is
logged in the /var/adm/sialog file. If the file does not exist,
the user must create it, for example using the command
touch /var/adm/sialog.
Table 1–2 shows the logged messages for three different root login
attempts.
Table 1–2 Root Login Comparisons
Terminal Session Log Messages Description
Preferred Method
login: joe
Password:
$ su
Password:
#
Successful authentication for
su from joe to root
User uses the su command to log
in as root.
The system records the
successful set UID.
su Failure
login: joe
Password:
$ su
Password:
Sorry
$
Failure on authentication for
su from joe to root
User fails to enter the correct
password.
System refuses access as root.
Record of unsuccessful set UID.
Less Secure Method
login: root
Password:
#
The system does not log a
message.
Consequently, it is difficult to
determine who it is.
Check the log file /var/adm/sialog for authorized and
unauthorized su attempts.
1–16 Introducing UNIX System Management
Common Desktop Environment
Common Desktop Environment
Managing with
CDE
UNIX system management is made easier with the introduction of
the Common Desktop Environment (CDE). CDE does not change
the basics of system management in terms of responsibility
or tasks to be performed. Rather it presents a window-like
environment to the system manager for performing management
tasks. Special system privileges that exceed those of ordinary
users are still required (superuser). CDE can perform many
management tasks such as:
• Account management
• Print management
• Network management
• Disk management
• Archiving
• File system sharing
• Host management
• License management
• BIND
• Mail
• NFS
• NIS setup
• System startup and shutdown
Front Panel CDE is entered automatically when the user logs in to a
workstation. Figure 1–5 shows the front panel, which provides
the window controls.
The major controls (left to right):
• File Manager - provides different views of system files
• Personal Applications - can be used to start up a terminal
window or a text editor
• Workspace - virtual desktop; four are set up by default
• Exit - log out
• Style Manager - allows the user to select colors, fonts, screen
saver and so forth
• Application Manager - contains the system management
applications
Introducing UNIX System Management 1–17
Common Desktop Environment
Figure 1–5 Front Panel
Clock
Calendar
PersonalApplications
FileManager Mailer Printer
StyleManager
ApplicationManager
HelpManager
TrashCan
Exit
Lock
Workspaceswitch
Busylight
Blankcontrol
ZKOX−5256−202−RGS
Note
For a more thorough explanation of the features of CDE,
refer to the Common Desktop Environment: Users Guide
Application
Manager
This icon is used (MB1) to invoke the various system management
tasks which may be performed with or through the common
desktop environment. The figure shows the path used to get to
the System_Admin application.
1–18 Introducing UNIX System Management
Common Desktop Environment
Figure 1–6 System Management
Five main groups of tools are displayed:
• Configuration
• DailyAdmin
• MonitoringTuning
• Storage_Management
• Tools
Introducing UNIX System Management 1–19
Common Desktop Environment
Configuration
Manager
When the user or administrator selects the Configuration icon,
the Application Manager - Configuration window is displayed.
Each icon in the window represents a major configuration tool,
which when selected brings the user to the actual management
options available.
Figure 1–7 Configuration Manager
1–20 Introducing UNIX System Management
Common Desktop Environment
Daily
Administration
Illustrated in the next figure are the tasks which may require
daily attention such as adding or modifying a user account
(Account Manager). File management is performed with the
Archiver and File System Sharing tools. The License Manager is
used to load software licenses. Shutdown allows the administrator
to issue shutdown notices to users as well as select the shutdown
and reboot characteristics. Hosts may be selected for remote
access to X Windows using the Host Manager.
Figure 1–8 DailyAdmin
Introducing UNIX System Management 1–21
Common Desktop Environment
Selecting
System
Information
Selecting System Information yields status on system resources
such as CPU, Memory and so forth, as shown in the next figure.
Figure 1–9 System Information
1–22 Introducing UNIX System Management
Common Desktop Environment
Monitoring and
Tuning
These tools allow the administrator to view the status of the
system and also fine tune the operation for either the kernel or
the processes on the system.
Figure 1–10 Monitoring and Tuning
Introducing UNIX System Management 1–23
Common Desktop Environment
Storage
Management
This management option provides controls for Digital added value
storage system solutions.
Figure 1–11 Storage Management
The Bootable_Tape icon invokes the btcreate utility to build a
standalone bootable kernel on UFS and AdvFS file systems.
The Logical Storage Manager icon starts the dxlsm utility to
create and manage logical volumes (its use requires a license).
The Prestoserve I/O Accelerator can be used to display the
dxpresto window to monitor the effectiveness of the cache. Cache
statistics such as:
• Writes/second
• Hits/second
may be observed. User controls are provided to vary the display.
1–24 Introducing UNIX System Management
Common Desktop Environment
Using Tools Here the administrator may select and display statistical
information on these topics.
• I/O
• Network
• Virtual Memory
• Who?
Figure 1–12 Tools
Introducing UNIX System Management 1–25
Summary
Summary
System
Manager
Responsibilities
The system manager is responsible for providing a working
computing environment for his users. This may include the
following tasks:
• Install and configure the system
• Shut down and start up the system
• Control user access
• Manage disk space
• Maintain archives of user and system files
• Monitor the system
• Troubleshoot the system
• Assist users
UNIX Software
Environment
An operating system is a dedicated computer program whose
primary purpose is to execute other programs, managing the
hardware and system resources for those programs.
The UNIX operating system consists of:
• Device drivers, special software to communicate with
peripheral devices
• Kernel, the main part of the operating system, responsible for
controlling system resources
• Other utilities and programs
Digital UNIX
Features
The Digital UNIX operating system consists of:
• Symmetric Multiprocessing (SMP)
• Multithread Support
• Realtime Support
• Shared Libraries
• Memory Mapped Files
Digital UNIX
System
Internals
Some of the Digital UNIX system internal functions:
• A process is a program executing in memory.
• When the system boots, the kernel is copied into memory, and
it starts init, which creates processes for all terminal ports.
• Daemons are system processes.
• Every process has a process ID and a priority.
• The kernel gives CPU time to the process with the highest
priority.
1–26 Introducing UNIX System Management
Summary
• Memory is divided into pages. The kernel uses a paging
technique to let a process use more memory than is physically
present.
• Managing more processes than fits into memory requires
swapping to free process memory to bring another process into
memory.
• Block I/O uses a buffer to read and write entire disk blocks at
a time. Character or raw I/O does not use the buffer.
Superuser and
Root Login
UNIX system managers use the root login name (UID 0).
• root has special system privileges.
• To log in as root, first log in to your own account, then use the
su command.
Common
Desktop
Environment
UNIX system management is made easier with the introduction of
the Common Desktop Environment (CDE). CDE does not change
the basics of system management in terms of responsibility
or tasks to be performed. Rather it presents a window-like
environment to the system manager for performing management
tasks.
Introducing UNIX System Management 1–27
Exercises
Exercises
Superuser and
the root Login
1. Try the su command:
a. Find out the root password from your instructor.
b. If your system has the PAKs installed, and user account
created, log in under your personal login name and use the
whoami command.
c. Use the su command to switch to the root login. Be sure to
type the root password correctly.
d. Try the whoami and who am i commands. Why is there a
difference in the result?
e. Check the /var/adm/sialog file for the message that
describes your successful root login.
f. Log out as root.
2. Try the su command again, but this time type the root
password incorrectly. Find the message that describes your
unsuccessful root login.
CDE and
Superuser
1. Get the root password for your system from your instructor.
2. Log in as Root.
3. Create a user account for your lab team (SAxx - where xx is
your team number) using the CDE Account Manager.
4. Log out.
5. Log in as SAxx.
6. Invoke the Disk Manager.
Note
You need the root password. This is consistent with the
superuser module for system management.
7. Record the number and type of disks on your system.
1–28 Introducing UNIX System Management
Solutions
Solutions
Superuser and
the root Login
1. Try the su command:
a. No solution required.
b. login: sue
$ whoami
sue
$
c. $ su
Password:
#
d. whoami prints your current login name; while who am i
prints your login name from /var/adm/utmp.
# whoami
root
# who am i
tinker!sue ttyp1 May 26 08:18 (:0.0)
#
e. # grep root /var/adm/sialog
Successful authentication for su from sue to root
f. # Ctrl/D
$
2. Unsuccessful root login:
$ su
Password:
Sorry
$
# grep root /var/adm/sialog
Successful authentication for su from sue to root
Failure on authentication for su from sue to root
CDE and
Superuser
1. Get the root password for your system from your instructor.
2. Log in as Root.
3. Create a user account for your lab team (SAxx - where xx is
your team number) using the CDE Account Manager. You may
use the ADD icon or choose New Local User from the Account
pull-down menu.
4. Log out.
5. Log in as SAxx.
6. Invoke the Disk Manager.
Select the Disk icon from the Application Manager -
Configuration window.
Introducing UNIX System Management 1–29
Solutions
7. Record the number and type of disks on your system.
Select a disk from the Disk Configuration window.
Click the Configure... button.
Click the Cancel button to exit without making changes to the
running system disks.
1–30 Introducing UNIX System Management
2
Managing Disks and File Systems
Managing Disks and File Systems 2–1
About This Chapter
About This Chapter
Introduction This chapter is an introduction to UNIX file systems. It illustrates
the parts of a physical disk and how the disk is organized logically
to hold separate file systems. It describes the different types of
file systems supported by Digital UNIX and the generic interface,
the Virtual File System (VFS). It reviews the types of files and
overviews the organization of system files. It demonstrates how to
change partition sizes, create a file system, check the file system,
and mount and dismount the file system.
Lab exercises provide practice using the disklabel, newfs, fsck,
mount, and umount commands.
The term sector means the fixed-size, hardware-oriented unit
(generally 512 bytes) and block to represent the unit defined by
the file system (typically 1024, 4096 or 8192 bytes).
Objectives To manage UNIX file systems, you should be able to:
• Identify the various components of a disk drive
• Explain the concepts of logical volumes
• Explain the purpose and contents of the logical disk partitions
• View and change partition sizes using CDE
• View and change partition sizes
• Explain the organization and advantages of the various file
systems
• Describe the organization of system files
• Describe the Advanced File System
• Create a new file system
• Check a file system’s consistency
• Mount and unmount a file system
Resources For more information on the topics in this chapter, see the
following:
• Nemeth, Snyder, & Seebass, (c) 1989, UNIX System
Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6,
Chapters 4 and 12
• Digital UNIX System Administration, Chapter 7
• Leffler, McKusick, Karels, and Quarterman, (c) 1989, The
Design and Implementation of the 4.3BSD UNIX Operating
System, Addison-Wesley, ISBN 0-201-06196-1, Chapter 7
describes the UNIX file system
2–2 Managing Disks and File Systems
About This Chapter
• POLYCENTER Advanced File System Technical Summary
• ULTRIX to DEC OSF/1 Migration Guide, describes the file
systems and directory structure
• Marshall Kirk McKusick, "Fsck - The UNIX File System
Check Program" in UNIX Supplementary Documents
Managing Disks and File Systems 2–3
Disk Drives
Disk Drives
Disk Drive
Structure
Each circular plate is called a platter. The top and bottom
surfaces in the stack are not generally used.
Disk capacity can be enlarged by increasing the:
• Size of the platter (this increases seek time and reduces
performance)
• Number of platters in the stack
• Density at which information is written
Figure 2–1 Disk Drive Structure
SECTOR
TRACK
SURFACE
CYLINDER
HEADS
G S F _ 0 6 9 8 _ 8 9 . D G
Surfaces • Top and bottom of a disk platter
• Coated with a magnetic material
2–4 Managing Disks and File Systems
Disk Drives
Heads • Perform read and write on disk surface
• One head per surface
• Mounted inline vertically on a movable arm
Tracks • Concentric circles as traced by a head on a continuously
rotating surface.
• Many tracks can be formed on a single surface.
Cylinders Cylinders are imaginary figures formed by dropping a top surface
track down through the tracks directly below on all surfaces.
All sectors on all recording surfaces are located at the same
distance from the center spindle of the disk.
Cylinder zero (0) includes:
• Track 0, surface 0
• Track 0, surface 1
• Track 0, surface 2
• Track 0, surface 3
• And so forth
A cylinder group is a set of contiguous cylinders.
Sectors A sector is the smallest contiguous region on a disk that may be
accessed with a single I/O operation.
A sector is addressed by its logical block number (LBN).
• All surfaces are divided into pie slices.
• Each portion of a single track inside one pie slice is a sector.
• There are 512 bytes of information per sector.
Disk Operation The disk rotates at a high rate of speed. The heads are mounted
on arms that move in and out from the center. The heads hover
very close to the surface without touching it. If a head does touch
the surface, this is a head crash and can destroy the surface of
the platter.
To read or write a block of data, the head seeks, or moves to the
correct track, and the driver waits until the correct sector rotates
underneath the head.
Managing Disks and File Systems 2–5
Logical Volumes
Logical Volumes
Overview Logical volumes add a level of abstraction between the physical
disk devices and the file system.
Logical volumes can be implemented at several different layers:
• Hardware
RAID devices (HSZ10/15, HSZ20/40) - several physical
disks are seen as one unit
• Device driver
Partition - a group of contiguous cylinders on one physical
disk is seen as one unit
Logical Storage Manager (LSM) - several physical disks or
partitions from several disks are seen as one unit
Note
The hardware and driver implementations are file system
independent; you can put any file system on a logical unit.
• File system
POLYCENTER Advanced File System (AdvFS) - several
physical disks or partitions are seen as one unit
The following figure shows the functional layering of components.
A configuration can use any combination of the logical volume
implementations.
2–6 Managing Disks and File Systems
Logical Volumes
Figure 2–2 Functional View of Logical Volumes
Disk Disk RAID Device
File Systems
Disk Device Drivers
Logical Volume Driver
UFS AdvFS
ZKOX−2037−20−RGS
Managing Disks and File Systems 2–7
Partitions and File Systems
Partitions and File Systems
Disk Partitions For better performance for access, UNIX systems divide disks into
chunks called partitions, known by letters a through h. Some
disks have fewer than eight partitions.
Partitions are groups of sectors, which means they are sized in
multiples of 512 bytes.
One possible configuration of our example disk is:
• Partition a - Root file system
• Partition b - Swapping/paging area
Swapping/paging space is used when there is not enough
room in physical memory for user programs or data. Some
information is copied from memory to the swap area, to free
up memory for other information.
• Partition g - /usr directory
Every UNIX file system is located within a logical volume, such
as a partition. Disks can have more than one file system, but only
one UNIX file system can exist on a partition. You should not use
overlapping partitions for a file system.
Remember, a partition is a logical division of a disk.
Partitions on a
Disk
The following figure shows overlapping partitions on a disk.
Figure 2–3 Overlapping Disk Partitions
Physical Disk
c
a b g
d e f
ZKO−060000135−11−RGS
Hierarchical
File Systems
A file system is a hierarchical structure consisting of directories
and files. For example, partition a on the system disk contains:
• Root file system (/)
• Such directories as /dev and /etc
2–8 Managing Disks and File Systems
Partitions and File Systems
A file system has inode and superblock file structures for storing
files. Partitions do not have these file structures.
UNIX file systems are separate:
• Each file system has its own partition or logical disk.
• A file system does not extend across the partition boundary
unless the Advanced File System (AdvFS), or the Logical
Storage Manager (LSM) is used.
• File systems must not overlap like partitions. For example,
if a file system is created in partition c, none of the other
partitions on that disk can be used. This helps maintain data
integrity and security and also allows for expansion.
When you run out of disk space, buy another disk and
mount it into the hierarchy as another file system.
• Makes backups easier: separates active files from less-active
files in different file systems and backs up active file systems
more often.
The following figure shows a file system hierarchy.
Figure 2–4 File System Hierarchy
/
usr vmunix
staff lib bin
joe sue ls vi
ZKO−060000135−51−RGS
File System
and Partition
Relationships
There is a one-to-one correspondence between file systems and
partitions. For example, partition a on the system disk contains
the root file system (/) consisting of all its files.
Managing Disks and File Systems 2–9
Partitions and File Systems
Example 2–1 Root Directory
$ ls -F /
bin@ genvmunix* lost+found/ osf_boot* tmp/ vmunix*
dev/ home/ mnt/ sbin/ usr/
etc/ lib@ opt/ sys@ var@
• File systems are separate and distinct.
• A file system does not extend across a partition boundary,
unless the system uses logical volumes to create logical
volumes.
• File systems must not overlap.
• File systems are created with the newfs(8) command.
• To make a file system on a partition visible in the directory
hierarchy and available to users, mount the file system.
Partition Tables
and Disk
Labels
The disk device driver needs to know the partition sizes for each
disk. It treats each partition as though it were a separate disk
drive.
Early versions of UNIX had tables defining partition locations and
sizes compiled into the driver. More recent versions of BSD UNIX
moved the partition table information into a text file,
/etc/disktab. ULTRIX /etc/disktab includes the disk geometry
and default partition sizes, but not the partition offsets.
Digital UNIX puts partition information into a disk label in sector
number LABELSECTOR of the disk, usually sector 0. The label is
used by the disk device driver and boot program to recognize the
drive and partitions. If a disk is not labeled, partition information
is obtained from /etc/disktab.
Example 2–2 shows a sample /etc/disktab file.
Digital UNIX recognizes partition tables created by earlier Digital
UNIX and DEC OSF/1 releases and ULTRIX systems.
Deriving Disk
Parameters
with
/etc/disktab
The /etc/disktab file is a simple database that describes disk
geometries and disk partition characteristics (patterned after the
termcap terminal database). Fields are separated by a colon (:)
and disk names (first field) are separated by a vertical line ( | ).
The following table shows the layout of the partitions for an RZ23
Winchester disk.
Partition Offset Size (sectors)
Block Size
(bytes)
Fragment
Size (bytes)
a 0 131072 8192 1024
b 131072 262144 8192 1024
c 0 1299174 8192 1024
2–10 Managing Disks and File Systems
Partitions and File Systems
Partition Offset Size (sectors)
Block Size
(bytes)
Fragment
Size (bytes)
d 393216 301986 8192 1024
e 695202 301986 8192 1024
f 997188 301986 8192 1024
g 393216 819200 8192 1024
h 1212416 86758 8192 1024
For more information on any type of disk, see that type in the
Reference Pages; for example, rz(7).
The following example shows a section of an /etc/disktab file.
Example 2–2 An /etc/disktab File
# Disk geometry and partition layout tables.
# Key:
# ty type of disk
# dt drive type (SCSI MSCP etc.)
# ns #sectors/track
# nt #tracks/cylinder
# nc #cylinders/disk
# o[a-h] partition offset
# P[a-h] partition sizes in sectors
# b[a-h] partition block sizes in bytes
# f[a-h] partition fragment sizes in bytes
rz56|RZ56|DEC RZ56 Winchester:
:ty=Winchester:dt=SCSI:ns#54:nt#15:nc#1632:
:oa#0:pa#131072:ba#8192:fa#1024:
:ob#131072:pb#262144:bb#8192:fb#1024:
:oc#0:pc#1299174:bc#8192:fc#1024:
:od#393216:pd#301986:bd#8192:fd#1024:
:oe#695202:pe#301986:be#8192:fe#1024:
:of#997188:pf#301986:bf#8192:ff#1024:
:og#393216:pg#819200:bg#8192:fg#1024:
:oh#1212416:ph#86758:bh#8192:fh#1024:
Managing Disks and File Systems 2–11
Viewing and Changing Partition Sizes with CDE
Viewing and Changing Partition Sizes with CDE
Overview In general, you change the partitions during the initial
installation or when your file system is running out of space.
The CDE Disk Manager is available during system installation.
Note
The disklabel command is available in the Digital UNIX
standalone environment.
Displaying
the Current
Partition Sizes
To display the current partition sizes, begin at the CDE Front
Panel and select the Application Manager icon.
Figure 2–5 Navigating to the Disk Configuration Window
2–12 Managing Disks and File Systems
Viewing and Changing Partition Sizes with CDE
The three Pop-up windows shown will be individually displayed
as the user selects (double-clicks MB1) each of the options.
• System_Management_Utilities
• Configuration
• Disk
The Disk Configuration Pop-up window is displayed with the list
of available disk devices on the system. Click the desired disk
and then the Configure... button.
Figure 2–6 Disk Configuration
Managing Disks and File Systems 2–13
Viewing and Changing Partition Sizes with CDE
Configure
Partitions
Window
The Configure Partitions window is now displayed, which shows
the current partitions of the selected disk.
Figure 2–7 Configure Partitions
A number of major features are displayed which should be noted:
• rz2 is an RZ26 with 1050 megabytes.
• The bar at the top of the window shows the default partitions
of the disk.
• The selected partition is shown as h.
• The handles on the bar graph are used to change the
beginning and end points of the selected partition.
Disk/Partition
Information
Disk and partition information can be displayed in other forms by
using the:
• Disk Attributes... button
• Partition Table button
Disk Attributes presents the user with an overall view of the disk
geometry.
2–14 Managing Disks and File Systems
Viewing and Changing Partition Sizes with CDE
Figure 2–8 Disk Geometry
Clicking the Partition Table button will display the following
window, which presents all the allowable partitions on the disk.
Managing Disks and File Systems 2–15
Viewing and Changing Partition Sizes with CDE
Figure 2–9 Partition Table
The full partition table displayed from two points of view.
Partitions a, b, and h are highlighted by the bold box which
indicates these partitions are in use. All other partitions are
displayed without highlighting, which signifies they are allowable
based on the defaults for the type of disk.
Note
Appendix F of the Digital UNIX Installation Guide
contains extensive information on the default partitions
supported for Digital Storage Architecture (DSA) and
Small Computer System Interface (SCSI) disks.
In this case the table is based on the disk type we selected, an
RZ26. Based on the table information, we see that no other
partition can be configured since all the disk space is in use.
These two displays allow the user to easily determine the
characteristics of the device prior to implementing a change in the
organization of the device.
2–16 Managing Disks and File Systems
Viewing and Changing Partition Sizes with CDE
Modifying a
Partition
Assume that we make a command decision to alter the partitions
on the disk to accommodate another file system which is to
support a specific application. Furthermore, the application
requires 365M bytes of longterm storage which we will allocate to
partition g.
From a procedural point of view, we first select the default
partitions labeled a,b,g,h to set up the table, as seen in the
following figure.
Figure 2–10 Partition Size
The partition bar now shows that partitions g and h appear to be
similar in size. In fact, a quick check of the Selected Partition:
h shows that its size is 429. But what is the unit of measure?
An examination of the Units: field shows the unit of measure is
Megabytes - , therefore it is a 429M byte partition.
The size of the g partition may be examined by simply clicking
the appropriate area on the partition bar. You can determine that
this partition is also a 429M byte partition.
Note
Up until this point, nothing on the disk has been changed.
Verify that the changes are accurate and then click the Commit
button. This action will write the new changes onto the disk
label.
Managing Disks and File Systems 2–17
Viewing and Changing Partition Sizes with CDE
The last action remaining is to choose the file system type for the
new partition using the File System selection button.
Changing
Partition Size
If a custom size partition is required, the user can resize the
partitions by using the bar graph.
Figure 2–11 Partition Bar Graph
Note that there are 10 flags on the bar graph beginning on the
top left of partition a. These are the handles used to grab and
resize each partition.
• Top handles are for the left boundary.
• Middle handles move both boundaries of adjoining partitions.
• Bottom handles are for the right boundary.
The circular objects between the handles denote that two
partitions are adjacent to each other. Also note the gap (no
circular object) between partition g and h; indicating a gap on the
disk between partitions.
Use the following actions to customize any partition:
• Click and drag MB1 on top handles to move the left boundary.
• Click and drag MB1 on bottom handles to move the right
boundary.
2–18 Managing Disks and File Systems
Viewing and Changing Partition Sizes with CDE
Figure 2–12 Result of Partition Changes
This figure shows the size of the g partition as 365M bytes, which
is the size required for our application. Note that the gap poses
no problem; it only leaves unusable space on the disk. Partition h
could be expanded if needed.
Note
Since the partitions are being changed, remember that any
file system using those partitions must now be restored.
Repartitioning
a Disk
The following are suggestions for repartitioning a disk.
• Increase a partition if a file system or swap area is running
out of space.
• For easier backups, size partitions based on your backup
device’s storage capacity.
• Create separate file systems on separate disks for /, /usr, var,
and users’ home directories to improve performance and make
backups easier.
• Divide swap space between two partitions on different disks to
improve performance.
Managing Disks and File Systems 2–19
Viewing and Changing Partition Sizes
Viewing and Changing Partition Sizes
Overview In general, you change the partitions during the initial
installation or when your file system is running out of space.
The disklabel command is available in the Digital UNIX
standalone environment. You must have superuser privileges to
use the disklabel command.
The partition size and offset are in 512-byte sectors. The offset is
the starting sector number for the partition.
To display the current partition sizes, use disklabel -r with the
raw device name for partition a or c. The example shows how to
display a disk label.
Example 2–3 Displaying the Disk Label
# disklabel -r /dev/rrz0a
# /dev/rrz0a:
type: SCSI 1
disk: rz55 2
label: 3
flags: 4
bytes/sector: 512 5
sectors/track: 36
tracks/cylinder: 15
sectors/cylinder: 540
cylinders: 1224
rpm: 3600 6
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0 7
7 partitions: 8
# size offset fstype [fsize bsize cpg]
a: 40960 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 75*)
b: 122880 40960 4.2BSD 1024 8192 16 # (Cyl. 75*- 303*)
c: 649040 0 unused 1024 8192 # (Cyl. 0 - 1201*)
d: 152446 163840 unused 1024 8192 # (Cyl. 303*- 585*)
e: 152446 316286 unused 1024 8192 # (Cyl. 585*- 868*)
f: 180308 468732 unused 1024 8192 # (Cyl. 868*- 1201*)
g: 485200 163840 4.2BSD 1024 8192 16 # (Cyl. 303*- 1201*)
#
1 Controller type; for example, SCSI, ESDI, SMD, MSCP
2 Disk type name
3 Optional label
4 Flags; for example, removable, RAMDISK, ECC
5 Disk geometry section
2–20 Managing Disks and File Systems
Viewing and Changing Partition Sizes
6 Hardware characteristics section
• Rotational speed in revolutions per minute.
• Sector interleave compensates for a slow controller;
specified as the denominator of the ratio (sectors read
/sectors passed over). Therefore an interleave of 1 (ratio
1/1) implies contiguous layout, while 2 (ratio 1/2) implies
logical sector numbering is every other sector.
• Other skew techniques compensate for a slow controller; 0
implies no skew.
• trackskew is the offset of sector 0 on track N relative to
sector 0 on track N+1.
• cylinderskew is the offset of sector 0 on cylinder N relative
to sector 0 on cylinder N+1.
7 Drive type specific data (if any)
8 Partition table
• Partition name
• Partition size in sectors
• Starting sector number
• File system type; for example, unused, swap, 4.2BSD, ufs,
raw, AdvFS, LSMpubl, database
• Fragment size in bytes
• Block size in bytes
• Cylinders per group
• Cylinder numbers
If your disk does not have a label, you will get a message such as:
# disklabel -r /dev/rrz2a
Bad pack magic number (label is damaged, or pack is unlabeled)
Changing
Partition Sizes
You might change your partition sizes when:
• A file system is running out of space
• Before doing a software installation, when your planning
indicates you need more space
To change partition sizes:
1. Use df to determine if a partition is too large or too small and
which other partitions on that disk are being used.
2. Back up all affected file systems.
3. Unmount the file systems on the disk whose label you want to
change.
4. Display the current partition sizes and calculate the new sizes
and offsets.
Managing Disks and File Systems 2–21
Viewing and Changing Partition Sizes
5. Use disklabel -e -r to edit the disk label. Display the new
partition sizes.
6. Use newfs to create a file system on the partition and fsck to
check it.
7. Mount the file system, restore files to it, and use it.
8. Backup the disk label information to a file using a command
similar to the following:
disklabel -r rz0 > /usr/label_rz0
If necessary, you can restore the disk label using this file.
If the disk does not have any file systems on it (that is, a new
disk), write a default label using disklabel -w -r disk disktype
and start with Step 4.
To expand partition a from 40960 to 49152 sectors, for example,
we must increase the offset and decrease the size of partition b by
49152-40960=8192 sectors.
The disklabel -e command invokes the editor specified by the
EDITOR environment variable or the vi editor. The -r option
affects the disk label on the disk, rather than the copy in memory.
Be aware that the vi editor is not available when you boot
to single user mode or work in the Digital UNIX standalone
environment.
Expanding a
Partition
For example, we want to increase partition a on an RZ23 disk to
include all of partition b so we can divide the disk into partitions
a and g. Note: in the following example, partition b is not being
used.
Figure 2–13 Expanding a Partition
Before
0 40960 99458
a b g
After
0 99458
a g
ZKOX−055000111−04−RGS
The following example shows how to change partition sizes.
2–22 Managing Disks and File Systems
Viewing and Changing Partition Sizes
Example 2–4 Expanding a Partition
# /sbin/disklabel -r /dev/rrz2a
# /dev/rrz2a:
type: SCSI
disk: rz23
label:
.
.
.
8 partitions:
# size offset fstype [fsize bsize cpg]
a: 40960 0 unused 1024 8192 # (Cyl. 0 - 155*)
b: 58498 40960 unused 1024 8192 # (Cyl. 155*- 376*)
c: 204864 0 unused 1024 8192 # (Cyl. 0 - 775)
d: 35135 99458 unused 1024 8192 # (Cyl. 376*- 509*)
e: 35135 134593 unused 1024 8192 # (Cyl. 509*- 642*)
f: 35136 169728 unused 1024 8192 # (Cyl. 642*- 775*)
g: 105406 99458 unused 1024 8192 # (Cyl. 376*- 775*)
h: 70271 134593 unused 1024 8192 # (Cyl. 509*- 775*)
# /sbin/disklabel -e -r /dev/rrz2a
(invokes an editor; we change partition a size from 40960 to 99458)
type: SCSI
disk: rz23
label:
flags:
bytes/sector: 512
sectors/track: 33
tracks/cylinder: 8
sectors/cylinder: 264
cylinders: 776
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize cpg]
a: 99458 0 unused 1024 8192 # (Cyl. 0 - 155*)
b: 58498 40960 unused 1024 8192 # (Cyl. 155*- 376*)
c: 204864 0 unused 1024 8192 # (Cyl. 0 - 775)
d: 35135 99458 unused 1024 8192 # (Cyl. 376*- 509*)
e: 35135 134593 unused 1024 8192 # (Cyl. 509*- 642*)
f: 35136 169728 unused 1024 8192 # (Cyl. 642*- 775*)
g: 105406 99458 unused 1024 8192 # (Cyl. 376*- 775*)
h: 70271 134593 unused 1024 8192 # (Cyl. 509*- 775*)
~
(when you exit the editor, you will be prompted)
write new label? [y]: Return
(continued on next page)
Managing Disks and File Systems 2–23
Viewing and Changing Partition Sizes
Example 2–4 (Cont.) Expanding a Partition
# /sbin/disklabel -r /dev/rrz2a
# /dev/rrz2a:
type: SCSI
disk: rz23
label:
.
.
.
8 partitions:
# size offset fstype [fsize bsize cpg]
a: 99458 0 unused 1024 8192 # (Cyl. 0 - 376*)
b: 58498 40960 unused 1024 8192 # (Cyl. 155*- 376*)
c: 204864 0 unused 1024 8192 # (Cyl. 0 - 775)
d: 35135 99458 unused 1024 8192 # (Cyl. 376*- 509*)
e: 35135 134593 unused 1024 8192 # (Cyl. 509*- 642*)
f: 35136 169728 unused 1024 8192 # (Cyl. 642*- 775*)
g: 105406 99458 unused 1024 8192 # (Cyl. 376*- 775*)
h: 70271 134593 unused 1024 8192 # (Cyl. 509*- 775*)
We can display the disk label again, showing the changes we have
made. Notice the cylinder numbers for partition a have been
automatically updated.
Repartitioning
a Disk
The following are suggestions for repartitioning a disk.
• Increase a partition if a file system or swap area is running
out of space.
• To make backups easier, size partitions based on your backup
device’s storage capacity.
• Create separate file systems on separate disks for /, /usr, var,
and users’ home directories to improve performance and make
backups easier.
• Divide swap space between two partitions on different disks to
improve performance.
2–24 Managing Disks and File Systems
Digital UNIX File Systems
Digital UNIX File Systems
Overview The Digital UNIX operating system supports the following types
of file systems:
• UNIX file system (UFS)
• Network File System (NFS)
• Memory File System (MFS)
• Compact disk file system (CDFS) (ISO 9660)
• POLYCENTER Advanced File System (AdvFS)
• File on File Mounting File System (FFM)
• /proc File System
• /dev/fd File System (FDFS)
The CDFS file system also supports CD–ROMs recorded using
Rock Ridge Interchange Protocol R1.09. The AdvFS is a local file
system that uses journaling to recover from unplanned system
restarts. The FFM file system allows regular, character, or
block-special files to be mounted over regular file systems, and is
primarily used on the SVR4-compatible system.
These operating systems support multiple types of file systems by
using a Virtual File System:
• VFS provides file system independent support for system calls.
• Different file system types are not apparent to the general
user.
The following figure illustrates the virtual file system interface
providing access to other file systems.
Figure 2–14 File System Interface
ZKO−055−000147−124−RGS
VFS
UFS AdvFS NFS CDFS
Virtual File
System
To support different file system types, Digital UNIX includes a
generalized set of file system data structures as an interface called
the virtual file system (VFS). The VFS layer provides support
for system calls and dispatches the calls to the appropriate file
system.
Managing Disks and File Systems 2–25
Digital UNIX File Systems
VFS is similar in concept to the ULTRIX operating system generic
file system (GFS) or the Sun Microsystem virtual file system
(VFS).
VFS sits logically on top of the other file systems. A file system
call goes to a VFS routine that determines the file system type it
applies to, then calls a specific file system routine.
Accessing a
File Through
VFS
Accessing a file through the virtual file system:
• Each open file is represented by a vnode in the system vnode
table.
• A process accesses a file through a file descriptor in its file
descriptor table.
• This descriptor points to an entry in the system file table.
• The system file table includes a pointer to the vnode table.
• The vnode table points to the disk blocks.
• A memory buffer cache holds currently used disk blocks, for
faster access.
The following figure shows the process of accessing a file through
VFS.
Figure 2–15 Accessing a File Through VFS
ZKOX−055000111−05−RGS
Process
Descriptor Table
System
Open File Table
Vnode Table
Buffer Cache
Disk
descriptor file structure
vnode
descriptor
descriptor
vnode
vnode
file structure
file structure
file structure
UNIX File
System
The UNIX File System (UFS) uses a large block size to maximize
the amount of data transferred with each I/O request. UFS is
2–26 Managing Disks and File Systems
Digital UNIX File Systems
also known as the Berkeley fast file system, developed by the
University of California at Berkeley.
• File names can contain up to 255 characters.
• The goal is to lay out files for fast access and minimal waste of
space.
Uses a large block size (4096 or 8192 bytes) to maximize
data transfer
Allows blocks to be split into fragments to reduce wasted
space
There are two differences between UFS and System V:
• Use of blocks and fragments
• Changed file system layout using cylinder groups
Figure 2–16 Small Blocks Require More Overhead
FILE 1
FILE 2
X X X X X X X X
X
ZKO−RA0188−11−RGS
Figure 2–17 Large Blocks Waste Space
FILE 1
FILE 2
X X X X X X X X
X
ZKO−RA0188−12−RGS
Figure 2–18 Large Blocks and Small Fragments
FILE 1
FILE 2
X X X X X X X X
X
ZKO−RA0188−13−RGS
In the first two figures, we see file systems with only one block
size, no fragment size. A small block size requires more overhead
and more time to handle large files. A large block size wastes
space when files are small.
Managing Disks and File Systems 2–27
Digital UNIX File Systems
4.3BSD, ULTRIX, and Digital UNIX file systems allow a block
to be divided into smaller pieces called fragments. The default
fragment size is typically 1K byte. When disk space is needed,
either a block or a fragment can be allocated.
Note
If a file is > 96K bytes, the system does not bother to
allocate a fragment; it assumes the file will grow larger, so
it allocates a full block.
Block and fragment sizes are specified when the file system
is created. The defaults can be seen in the disk label or /etc
/disktab.
Many units in the file system are measured in fragments rather
than blocks.
For the layout policies to be effective, the file system cannot be
kept completely full. Each file system maintains a parameter
(minfree) for the minimum percentage of file system blocks that
can be free. Below this threshold, only the superuser can allocate
blocks. Reducing this percentage may hurt performance in a file
system that is actively allocating and freeing blocks.
UNIX File
System Layout
Cylinder groups require more overhead for storing extra structure,
but the gain in performance is worth it.
The superblock is replicated in a different position in each
cylinder group to prevent loss of critical data in case an entire
cylinder or surface is damaged.
The following figure illustrates the UNIX file system layout.
Figure 2–19 UNIX File System Layout
Partition
Cylinder Group 0 Cylinder Group N
ZKO−060000135−13−RGS
Boot
Block
Super
Block
Alternate
Super
Block
Alternate
Super
Block
Cylinder
Group
Block
Cylinder
Group
Block
Inode
Table
Inode
Table
Data DataData
MFS File
System
The mfs command builds a Memory File System (MFS), which is a
UFS file system in virtual memory, and mounts it on the specified
mount-node. When the file system is unmounted, MFS exits and
the contents of the file system are lost. If MFS is sent a signal
2–28 Managing Disks and File Systems
Digital UNIX File Systems
while running, for example during system shutdown, it attempts
to unmount its corresponding file system.
For a memory file system, the special-device file provides only a
set of configuration parameters, including the size of the virtual
memory segment to allocate. If the special-device file is omitted,
you must specify the segment size. The special-device file is
usually the primary swap area, because that is where the file
system is backed up when free memory gets low and the memory
supporting the file system has to be paged.
You can enable /tmp as a memory file system by adding an entry
in the /etc/fstab file. For example, the following line creates a 10
Megabyte memory file system, mounted on /tmp:
-s20480 /tmp mfs rw 1 0
Note that the contents of a memory file system are lost whenever
a reboot or unmount is performed.
You must be superuser to use this command.
Note
Refer to the man page on MFS for further information.
Network File
System
Network File System (NFS) is a service that allows you to mount
directories across the network and treat those directories as if
they were local.
NFS is a facility for sharing files in a heterogeneous environment
of processors, operating systems and networks. Sharing is
accomplished by mounting a remote file system or directory on a
local system and then reading or writing files as though they were
local.
Exporting file systems consists of creating an /etc/exports(5nfs)
file that lists directories that other systems have permission to
access.
The exporting system, or server, plays a passive role in file
sharing. The system that imports a file system, the client, can
mount that file system at any point within its local file system.
Imported file systems are not copied to the client’s own file system
but are accessed transparently using remote procedure calls.
Imported file systems appear to a client system user as local files.
The following figure shows system Cabala importing two
directories from system Cherub.
Managing Disks and File Systems 2–29
Digital UNIX File Systems
Figure 2–20 Remote Mounting with NFS
/
bin usr etc
cherub
man
man1 ... man8
file1 file2
cabala (Client)
/
bin usr etc
project
man
man1 ... man8
file1 file2
cherub (Server)
ZKOX−055000111−19−RGS
share share
A system that acts as a server can also act as a client. A server
that exports file systems can also mount remote file systems
exported by other systems, therefore becoming a client.
Compact Disk
File System
Digital UNIX systems support the compact disk, read-only
memory file system, CDFS, based on the international standard
ISO 9660-1988. Volumes recorded in the ISO 9660-1988
(interchange level 2) or High Sierra Group (HSG) format can be
mounted for reading. CDFS is a configurable kernel option. See
cdfs(4) and mount(8cdfs) for more information.
Mount options for CDFS:
defperm Ignores permission bits specified on the disk and
uses value 0666 with root owner
nodefperm Uses on-disk permissions, if present
noversion Ignores ’;#’ on file names; useful for mounting a CD
containing MS–DOS applications
Default mount options are ro,defperm
CDFS is based on the international standard ISO 9660-1988 and
allows read-only access.
2–30 Managing Disks and File Systems
System Organization
System Organization
Types of Files A file in the UNIX system is a sequence, or stream of bytes.
The Digital UNIX operating system supports the following file
types.
Table 2–1 Types of Files
File Type Symbol Function
Regular file - Contains executable program, shell
script, ASCII text, or source code
Directory d Contains the names of files or other
directories
Character
device file
c References a device driver that does
its own input and output buffering,
such as a terminal
Block device file b References a device driver that
performs I/O in large chunks (1024
or more bytes) and the kernel
provides buffering support, such
as a disk
UNIX domain
socket
s Provides a communication
connection between processes
Named pipe p Provides a communication
connection between processes
Symbolic link l Contains the name of another file (or
directory) to which it points
The symbol column shows the file type symbol that appears in a
long directory listing.
UNIX systems provide access to devices through special device
files. For example, you can use the character or block disk device
file name in several commands.
Digital UNIX
File Directory
Hierarchy
System files are organized by function and use.
The following figure highlights the main system directories.
Managing Disks and File Systems 2–31
System Organization
Figure 2–21 Digital UNIX System Directory Hierarchy
dev etc sbin tmp usr var vmunix
man
runnls init.d rc0.d rc2.d rc3.d bin ccs include sbin share adm spool
ZKOX−055000111−16−RGS
sys
/
A goal in the Digital UNIX system directory hierarchy is efficient
organization. Files are separated by function and intended use.
Commonly used command files should be in the normal search
path in users’ .profile or .login files.
var may be a separate file system or a directory under /usr.
Organizing
System Files
The following table highlights the main system directories.
2–32 Managing Disks and File Systems
System Organization
Table 2–2 UNIX System Directory Hierarchy
Directory Description
/ The root directory of the hierarchy; includes
files and directories used to boot and
initialize the operating system
dev Files and directories for input and output
operations to physical and pseudodevices
etc System administration files and databases
nls National language support databases
sbin Commands to boot and initialize the system
in single-user mode
init.d Application specific scripts for startup and
shutdown
rcn.d The rc files executed for system state n
tmp Temporary files
usr Local commands, reference pages, libraries,
spooling directories, and so forth
bin Common utilities and applications
ccs C compilation system; tools and libraries
used to generate C programs
include Program header files
sbin System administration utilities and other
system utilities
share Architecture-independent ASCII files
man Online reference pages
shlib Binary loadable shared libraries
var Multipurpose log, temporary, varying, and
spool files
adm Common administration files and databases
crash For saving kernel crash dumps
cron Files used by cron
sendmail Configuration and database files for sendmail
syslog Files generated by syslog
spool Miscellaneous printer and mail system
spooling directories
Managing Disks and File Systems 2–33
Advanced File System
Advanced File System
Overview The POLYCENTER Advanced File System (AdvFS) is a local
file system that uses journaling to recover from unplanned
system restarts significantly faster than UFS. AdvFS provides
a flexible structure, decoupling file systems from physical disks,
and allowing a growth path. The separately licensed Advanced
File System utilities product provides multidisk capabilities and
management utilities.
AdvFS is transparent to users and programmers. It maintains
compatibility with the standard file system interface. AdvFS
provides a number of utility programs for system administrators
to manage the system.
Features and
Benefits
AdvFS and Utilities provide a number of features over traditional
file systems, as shown in the following table.
Table 2–3 AdvFS Features and Benefits
Feature Benefit
Rapid crash
recovery
Write-ahead logging eliminates the need to use
the fsck utility to check and repair file systems
and reduces the time needed to mount file
systems.
Extended
capacity
Extends the size of both files and file systems,
supporting distributed systems, databases, and
office-automation systems.
Disk spanning A file or file system can span multiple disks
within a shared storage pool.
Online resizing The size of the file system can be dynamically
changed by adding or removing disks while the
system is in use.
Online backup You can back up the contents of your file
system without interrupting the work flow of
system users.
Online defrag-
mentation
Improves system performance by making files
more contiguous, while the system remains in
use.
Online domain
balancing
Improves system performance by spreading
files among the disks in the storage pool, while
the system remains in use.
(continued on next page)
2–34 Managing Disks and File Systems
Advanced File System
Table 2–3 (Cont.) AdvFS Features and Benefits
Feature Benefit
File-level
striping
Improves file transfer rates by spreading
segments of individual files across several
disks.
File undelete Improves data availability by allowing system
users to recover deleted files.
Enhanced
performance
File operations, such as creating, renaming,
reading and writing, are faster than with
traditional file systems, making AdvFS ideal as
the local file system on an NFS server.
Components The POLYCENTER Advanced File System consists of two
components:
• Advanced File System (AdvFS) is a file system option on the
Digital UNIX operating system. If you registered the Digital
UNIX operating system license PAKs, you can install and use
the file system.
The basic file system provides:
Recoverability
Fast restart
One partition or volume per domain
Multiple filesets per domain
Fileset quotas
vdump, vrestore, and other commands to manage the file
system
• Advanced File System Utilities is a separately licensed,
optional layered product. It enhances the file system
capabilities and system management.
The Utilities product provides:
Multivolume capabilities
Online reconfiguration
Cloning
File undelete
Defragmenter
Domain balancer
File striping
Managing Disks and File Systems 2–35
Advanced File System
UFS Storage
Model
The UNIX file system (UFS) is a good example of a traditional file
system. Each disk (or disk partition) contains one separate file
system. You mount the file system into the directory hierarchy
using mount points.
The directory hierarchy layer is tightly bound to the physical
storage layer. When a file system becomes full, it is impossible to
move selected files without changing the pathnames of those files.
The following figure shows the tight binding between the directory
hierarchy and physical storage.
Figure 2–22 UFS Storage Model
root file system
ZKOX−2037−21−RGS
file system file system
This is why many people consider the terms file system and
partition to be equivalent.
2–36 Managing Disks and File Systems
Advanced File System
AdvFS Storage
Model
Unlike UFS, AdvFS separates the two layers. The directory
hierarchy layer handles file naming and the file system interface
— opening and reading files. The physical storage layer handles
write-ahead logging, file allocation, and physical disk I/O
functions.
The following figure shows the separation of directory and storage
layers in AdvFS.
Figure 2–23 AdvFS Storage Model
ZKOX−2037−22−RGS
Directory
Hierarchy
Layer
Storage
Layer
This separation allows you to manage the physical storage of
files separately from the directory hierarchy. For example, you
can move a file from one disk to another within a storage domain
without changing its pathname.
The following figure shows how to move a file’s physical location
without changing its pathname.
Managing Disks and File Systems 2–37
Advanced File System
Figure 2–24 File Migration in AdvFS
ZKOX−2037−23−RGS
Directory
Hierarchy
Layer
Storage
Layer
Two new concepts in the AdvFS design are file domain and fileset.
File Domains A file domain is a named set of one or more volumes that
provides a shared pool of physical storage. A volume is any
mechanism that behaves like a UNIX block device, for example:
• An entire disk
• A disk partition
• A logical volume configured with the Logical Storage Manager
(LSM)
The following figure shows a file domain with two volumes.
Figure 2–25 File Domain
ZKOX−2037−24−RGS
The first step in setting up an Advanced File System is creating
a file domain. When created, a file domain consists of a single
volume. If you have the Advanced File System Utilities product
installed and licensed, you can add more volumes.
2–38 Managing Disks and File Systems
Advanced File System
Guidelines for
File Domains
Follow these guidelines for creating file domains:
• Avoid I/O scheduling contention and enhance system
performance by dedicating the entire disk (partition c) to a file
domain.
• You can have 100 active file domains per system. A file
domain is active when at least one of its filesets is mounted.
• Although the risk of media failure is slight, a single failure
within a file domain renders the entire domain useless. In the
case of media failure, you must recreate the file domain and
restore all the files. To reduce the risk of domain failure, limit
the number of volumes per file domain to three. You should
also store a copy of your configuration information — domain
and fileset names and associated volumes.
• To maintain high performance, avoid splitting a disk between
two file domains.
Filesets A fileset represents a portion of the directory hierarchy. Each
fileset is a uniquely named set of directories and files that form a
subtree structure.
The following figure shows three filesets.
Figure 2–26 Filesets
ZKOX−2037−25−RGS
A fileset is similar to a file system in many ways:
• You mount filesets like you mount file systems.
• Filesets are units on which you enable quotas.
• Filesets are units that you back up.
Filesets offer features not provided by file systems:
• You can clone a fileset and back it up while users are still
accessing the original.
• A fileset can span several disks in a file domain.
Managing Disks and File Systems 2–39
Advanced File System
Guidelines for
Filesets
Follow these guidelines for creating filesets:
• You can create an unlimited number of filesets per system;
however, the number of filesets you can simultaneously mount
is limited to 512.
• The more filesets that you establish, the greater your
flexibility. On the other hand, a greater number of filesets
increases your management overhead.
2–40 Managing Disks and File Systems
Creating a UFS File System
Creating a UFS File System
Overview You do not need to create the root and /usr file systems before
installing the system; these are created as part of the installation.
If you want separate file systems for users’ home directories,
layered products, or other files, you must create these file systems
after the installation.
Using the
newfs
Command
When you have a new partition or logical volume, you must
prepare it to hold files by creating a file system.
To create a new file system, use the newfs(8) command.
newfs [ -N ] [ options ] device type
-N Displays file system parameters without creating a file
system.
options Options depend on the type of file system; for example,
for UFS you can specify the size in sectors or the
number of bytes per inode. See newfs(8) for more
options.
device The unmounted, raw device name; for example, /dev
/rrz1a.
type The disk type from /etc/disktab.
You must be root to use newfs.
The newfs command destroys all data on an existing file system.
The following example shows how to create a UFS file system
with a block size of 8192 bytes and fragment size of 1024 bytes on
partition c of an RZ28 disk, which is drive 1.
Managing Disks and File Systems 2–41
Creating a UFS File System
Example 2–5 Using the newfs Command
# /usr/sbin/newfs -b 8192 -f 1024 /dev/rrz1c rz28
Warning: calculated sectors per cylinder (1584) disagrees with disk label (1376)
/dev/rrz1c: 4110480 sectors in 2595 cylinders of 16 tracks, 99 sectors 1
2007.1MB in 163 cyl groups (16 c/g, 12.38MB/g, 3008 i/g)
super-block backups (for fsck -b #) at: 2
32, 25488, 50944, 76400, 101856, 127312, 152768, 178224,
203680, 229136, 254592, 280048, 305504, 330960, 356416, 381872,
405536, 430992, 456448, 481904, 507360, 532816, 558272, 583728,
609184, 634640, 660096, 685552, 711008, 736464, 761920, 787376,
811040, 836496, 861952, 887408, 912864, 938320, 963776, 989232,
1014688, 1040144, 1065600, 1091056, 1116512, 1141968, 1167424, 1192880,
1216544, 1242000, 1267456, 1292912, 1318368, 1343824, 1369280, 1394736,
1420192, 1445648, 1471104, 1496560, 1522016, 1547472, 1572928, 1598384,
1622048, 1647504, 1672960, 1698416, 1723872, 1749328, 1774784, 1800240,
1825696, 1851152, 1876608, 1902064, 1927520, 1952976, 1978432, 2003888,
2027552, 2053008, 2078464, 2103920, 2129376, 2154832, 2180288, 2205744,
2231200, 2256656, 2282112, 2307568, 2333024, 2358480, 2383936, 2409392,
2433056, 2458512, 2483968, 2509424, 2534880, 2560336, 2585792, 2611248,
2636704, 2662160, 2687616, 2713072, 2738528, 2763984, 2789440, 2814896,
2838560, 2864016, 2889472, 2914928, 2940384, 2965840, 2991296, 3016752,
3042208, 3067664, 3093120, 3118576, 3144032, 3169488, 3194944, 3220400,
3244064, 3269520, 3294976, 3320432, 3345888, 3371344, 3396800, 3422256,
3447712, 3473168, 3498624, 3524080, 3549536, 3574992, 3600448, 3625904,
3649568, 3675024, 3700480, 3725936, 3751392, 3776848, 3802304, 3827760,
3853216, 3878672, 3904128, 3929584, 3955040, 3980496, 4005952, 4031408,
4055072, 4080528, 4105984,
#
1 Partition size, tracks/cylinder, sectors/track from the disk
label.
2 The superblock contains critical data about the file system, so
it is duplicated in each cylinder group.
2–42 Managing Disks and File Systems
Checking a UNIX File System
Checking a UNIX File System
When to Check
File Systems
File systems are checked automatically when the system starts.
You should check a file system before mounting it manually or
backing it up.
Using the fsck
Command
Use the fsck(8) command to check a UNIX file system. Advanced
file systems and network file systems do not need to be checked.
The fsck command looks for and corrects inconsistencies such as:
• Unreferenced inodes
• Link count number in inode is too large
• Missing blocks in the free list
• Blocks in the free list that are also in files, or blocks that are
in two files
• Incorrect counts in the superblock
fsck [ options ] [ filesystem ]
options Some options for UFS file systems:
-p Checks and corrects a set of
inconsistencies. If it encounters other
errors, it exits.
Without the -p option, fsck works
interactively, prompting before each
correction.
-b block Specifies the block to use as the
superblock. (Block 32 is usually used
as alternate superblock.)
-y Assumes a yes response to all prompts.
-n Assumes a no response to all prompts.
filesystem The raw device name for the file system you want
checked; for example, /dev/rrz1a. If you do not specify
a file system, all file systems in /etc/fstab are checked.
Orphaned files are put in the lost+found directory, using the inode
as a name. If the lost+found directory does not exist, you can
create it with the mklost+found(8) command. If you choose not
to create it, it will be created automatically if orphaned files are
found.
You must be root to use fsck.
Check file systems when they are unmounted. Since the root file
system cannot be unmounted, check it in single-user mode. This
will prevent fsck reporting and attempting to fix inconsistencies
due to normal system operations. Example 2–6 shows how to
invoke the fsck command.
Managing Disks and File Systems 2–43
Checking a UNIX File System
Example 2–6 Invoking the fsck Command
# /usr/sbin/fsck /dev/rrz1c
** /dev/rrz1c
** Last Mounted on /usr/local
** Phase 1 - Check Blocks and Sizes 1
** Phase 2 - Check Pathnames 2
** Phase 3 - Check Connectivity 3
** Phase 4 - Check Reference Counts 4
** Phase 5 - Check Cyl groups 5
699 files, 92155 used, 3596 free (204 frags, 424 blocks, 0.2% fragmentation) 6
# fsck /dev/rrz3g
** /dev/rrz3g
File system unmounted cleanly - no fsck needed 7
# fsck /dev/rrz3b 8
** /dev/rrz3b
BAD SUPER BLOCK: MAGIC NUMBER WRONG 9
USE -b OPTION TO FSCK TO SPECIFY LOCATION OF AN ALTERNATE
SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8).
# fsck -b 32 /dev/rrz3b 1 0
1 Phase 1 checks for consistency of inodes.
2 Phase 2 checks for directories that point to incorrect inodes.
3 Phase 3 checks for unreferenced directories.
4 Phase 4 checks link counts in files and directories.
5 Phase 5 checks bad, duplicated or unreferenced blocks and
total free block count.
6 fsck displays the number of files in the file system, the
number of used and free blocks, and the percentage of
fragmentation.
7 fsck recognizes when a file system has been unmounted
cleanly.
8 Here we attempt to check the swap area, which does not
contain a file system.
9 The superblock has been corrupted (or in this case does not
exist). The command can be repeated, specifying an alternate
superblock with the -b option.
1 0 We can specify an alternate superblock block number to the
fsck command.
2–44 Managing Disks and File Systems
Mounting and Unmounting File Systems
Mounting and Unmounting File Systems
Overview Visualize the root directory and its files as a tree. By grafting a
branch (or file system) to the tree, you can create a larger tree.
However, you need a point at which to attach the file system.
In UNIX this grafting point is a directory. When created, the
directory /usr is an ordinary directory, but when a file system is
grafted to this directory, /usr becomes an entry point to the new
file system.
This act of grafting is called mounting. The result is that a user
can move easily from file system to file system as if moving from
directory to directory.
To make the files in a file system available to users, mount the
file system into the directory hierarchy. The following figures
illustrate this concept.
Figure 2–27 File Systems Before Mounting
/
dev etc sbin tmp usr
file1 file2 file3
bin lib sbin share sys
ZKOX−055000111−07−RGS
1
2
Managing Disks and File Systems 2–45
Mounting and Unmounting File Systems
Figure 2–28 File Systems After Mounting
/
dev etc sbin tmp usr
file1 file2 file3
bin lib sbin share sys
ZKOX−055000111−08−RGS
1
2
Disk 1 is the system disk containing the root file system. Disk 2
is another disk containing a file system. Before it is mounted, the
files on it are not accessible.
Once it is mounted, the files are accessible through the directory
mount point, in this case /usr.
This figure illustrates another important point. Usually you
will not mount a file system on a directory that contains files.
However, you can do so without deleting or damaging the files.
The files will be invisible and inaccessible until the file system is
unmounted.
The mount command is available in the Digital UNIX standalone
environment.
The root file system is mounted automatically when the system is
booted, and cannot be unmounted.
Using the
mount
Command
To mount a file system under an existing directory, use mount.
mount [ options ] [ device ] [ mountpoint ]
options Some options include:
-a Mounts all file systems listed in /etc
/fstab
-t Specifies a type of file system to mount;
for example
# mount -a -t ufs
-r Specifies mount with read-only access
-o Specifies file system specific options
device The special device name
mountpoint The existing directory to mount the file system
under
2–46 Managing Disks and File Systems
Mounting and Unmounting File Systems
To display the currently mounted file systems, use mount without
arguments.
Example 2–7 Using the mount Command
# mount -t ufs /dev/rz0h /usr/users
# mount -t ufs -o ro,nosuid /dev/rz1c /usr/local
# mount
/dev/rz0a on / type ufs (rw)
/dev/rz0g on /usr type ufs (rw)
/dev/rz0h on /usr/users type ufs (rw)
/dev/rz1c on /usr/local type ufs (ro,nosuid)
For file system specific options, see mount(8).
If you are mounting a remote file system (using NFS), use one of
the following formats in place of the device:
host:remote_directory
remote_directory@host
When the system is booted to single-user mode, the root file
system is mounted read-only. If you have to write to the root file
system, you must change the permissions to read-write.
mount -u /
If the device and mount point are listed in /etc/fstab, you can
shorten the command to mount mountpoint. The system will find
the device in /etc/fstab.
Many Digital CD–ROM disks are UFS rather than ISO 9660
(CDFS) format and are mounted with the -r option:
mount -r /dev/rz4c /mnt
Using the fstab
File
Some file systems such as /usr and /usr/users are used
frequently. To save yourself the trouble of mounting file systems
each time the system starts up, you can maintain a file system
table called /etc/fstab.
The /etc/fstab file contains the names of file systems which are
frequently used. The /etc/fstab file is read and the file systems
mounted when the system goes into multiuser mode. If you boot
to single-user mode, the root file system is mounted read-only.
The file /etc/fstab provides the system with information about
the mounting procedure:
• Disk partitions to mount - for UFS file systems, this is the
block special file name
• Directories to mount them on
• Order to mount - they are mounted in the order listed
Managing Disks and File Systems 2–47
Mounting and Unmounting File Systems
So root directory (/) should be listed first, and any file system
should be listed above a file system which will be mounted under
it. Example 2–8 shows a sample /etc/fstab file.
Example 2–8 An /etc/fstab File
# cat /etc/fstab
1 2 3 4 5 6
/dev/rz0a / ufs rw 1 1
/dev/rz0g /usr ufs rw 1 2
/dev/rz0b swap1 ufs sw 0 0
/dev/rz0h /usr/users ufs rw 1 2
/usr/share/man@tinker /usr/share/man nfs ro,bg,soft,nosuid 0 0
/dev/rz1c /usr/lib/dxbook cdfs ro 0 0
1 Special device name or remote file system to be mounted
2 Directory where the file system is mounted
3 Type of file system: ufs, nfs, swap, or cdfs
4 Mount options for the type of file system (a comma-separated
list)
Common options:
ro Read-only access
rw Read-write access
rq Read-write access with quotas
sw Swap/paging space
xx Ignore this file system entry
5 Backup frequency for dump: 0 indicates the file system is not
backed up
6 fsck pass order (root is 1): 0 indicates the file system is not
checked
You must be superuser to edit the /etc/fstab file.
For file system specific options, see mount(8), mount(8), mount(8).
The fsck command can check file systems on different drives
simultaneously, improving its performance. However, file systems
on the same drive are checked sequentially.
Caution for CDFS
Compact disks are read-only, so they should not be checked
by fsck (passnum should be 0).
Do not create an entry in /etc/fstab for a compact disk
unless you leave the disk in the drive. If you boot your
system without a compact disk in the drive indicated in
fstab, mount will hang trying to mount it.
2–48 Managing Disks and File Systems
Mounting and Unmounting File Systems
Using the
umount
Command
Use the umount command to unmount a file system. The format
for umount is:
umount [ options ] [ mountpoint ]
options Some options include:
-A Attempts to unmount all file systems
currently mounted
-a Unmounts all file systems listed in /etc
/fstab
-t Specifies a type of file system to unmount;
for example
# umount -a -t ufs
-h Specifies a host for unmounting all file
systems remotely mounted in /etc/fstab.
mountpoint The existing directory where the file system is
mounted
You must unmount a file system if you want to check it with fsck
or change its partition size with disklabel.
You cannot unmount a file system if one of the files or directories
is in use.
You cannot unmount the root file system. Example 2–9 shows
how to use the umount command.
Example 2–9 Using the umount Command
# mount
/dev/rz0a on / type ufs (rw)
/dev/rz0g on /usr type ufs (rw)
/dev/rz0h on /usr/users type ufs (rw)
/dev/rz1c on /usr/local type ufs (ro)
/usr/share/man@tinker on /usr/share/man type nfs (ro,bg,soft,nosuid)
# umount /usr/local
# umount /usr
umount /dev/rz0g: Mount device busy
# umount -h tinker
The following example shows the mount and umount commands.
Example 2–10 Mounting and Unmounting File Systems
# who 1
superman tty00 Apr 29 13:57
# ls /mnt 2
# pwd 3
/
(continued on next page)
Managing Disks and File Systems 2–49
Mounting and Unmounting File Systems
Example 2–10 (Cont.) Mounting and Unmounting File Systems
# mount 4
/dev/rz0a on / type ufs (rw)
/dev/rz0g on /usr type ufs (rw)
# mount /dev/rz2a /mnt 5
# mount 6
/dev/rz0a on / type ufs (rw)
/dev/rz0g on /usr type ufs (rw)
/dev/rz2a on /mnt type ufs (rw)
# ls /mnt 7
.#clipboard.clp .@today’s_test.doc System.cab
.@System.cab .DesktopState clipboard.clp
.@clipboard.clp .deskprint today’s_test.doc
# umount /dev/rz2a 8
# mount 9
/dev/rz0a on / type ufs (rw)
/dev/rz0g on /usr type ufs (rw)
# ls /mnt 1 0
#
1 Superuser ensures that no one is logged in and using the
directory /mnt.
2 Directory /mnt is empty.
3 Superuser ensures that working directory is not the directory
/mnt.
4 Superuser wants to mount /dev/rz2a and displays the list of
currently mounted file systems. The file system /dev/rz2a is
not mounted.
5 Superuser mounts the file system /dev/rz2a under the
directory /mnt.
6 The mount table shows that /dev/rz2a is now mounted under
/mnt.
7 The directory /mnt was empty before the mount. Now it is
an access point to the files contained in the file system on
/dev/rz2a.
8 Superuser unmounts /dev/rz2a.
9 The mount table shows that /dev/rz2a is no longer mounted.
1 0 The directory /mnt is empty and is no longer an access point to
a mounted file system.
2–50 Managing Disks and File Systems
Summary
Summary
Disk Drives In a disk:
• A disk surface is the top or bottom of a disk platter.
• The drive head, one per surface, is mounted on a movable arm
to read and write on the disk surface.
• A disk track is a circle as traced by a head on a rotating
surface.
• A disk cylinder is an imaginary figure formed by dropping a
top surface track down through the tracks directly below on
all surfaces.
• A disk sector is the surface pie slice on a single track.
Logical
Volumes
Logical Volumes add a level of abstraction between the physical
disk devices and the file system.
Partitions and
File Systems
Partitions:
• Are logical divisions of a disk drive.
• Have default sizes, by drive type, but can be altered by the
superuser.
Default partition sizes are in /etc/disktab.
• Each partition can hold one file system.
File systems:
• Are a hierarchical structure consisting of directories and files.
• Each file system is contained in a partition unless the Logical
Storage Manager is used.
• File systems must not overlap.
• Separate file systems can be mounted together to form one
visible hierarchy.
Viewing and
Changing
Partition Sizes
with CDE
Partition size information is stored in the disk label.
• To display the current partition sizes, use the CDE Disk
Manager to view current disk label settings.
• Use the CDE Disk Manager to change the disk label.
Viewing and
Changing
Partition Sizes
Partition size information is stored in the disk label.
• To display the current partition sizes, use disklabel -r with
the raw device name for partition a or c.
• Use disklabel -e -r to change the disk label.
Managing Disks and File Systems 2–51
Summary
Digital UNIX
File Systems
Digital UNIX supports the following file systems:
• Virtual file system (VFS) — a generic file system interface
allowing transparent access to other file system types
• UNIX file system (UFS) — the Berkeley fast file system
• NFS (Network File System) — mount directories across the
network and treat them as local
• Memory File System (MFS)
• Compact disk file system (CDFS) (ISO 9660) — mount
compact disks, read-only
• POLYCENTER Advanced File System (AdvFS)
• File on File Mounting File System (FFM)
• /proc File System
System
Organization
The Digital UNIX operating system supports the following file
types.
File Type Symbol Description
Regular file - Executable program, text, or source
code
Directory d Contains the names of files or other
directories
Character
device file
c References a device driver that does
its own input and output buffering,
such as a terminal
Block device file b References a device driver that
performs I/O in large chunks and the
kernel provides buffering support,
such as a disk
UNIX domain
socket
s Provides a communication
connection between processes
Named pipe p Provides a communication
connection between processes
Symbolic link l Contains the name of another file
System files are organized by function and use. The major system
directories are as follows:
2–52 Managing Disks and File Systems
Summary
Directory Description
/ The root directory of the hierarchy; includes files
and directories used to boot and initialize the
operating system
/dev Character and block device files
/etc System administration files and databases
/sbin Commands to boot and initialize the system in
single-user mode
/tmp Temporary files
/usr Local commands, reference pages, libraries,
spooling directories, and so forth
/var Multipurpose log, temporary, varying, and spool
files
Advanced File
System
The POLYCENTER Advanced File System (AdvFS) is a local file
system that offers rapid crash recovery, extended capacity, online
management, and enhanced performance.
The Advanced File System consists of two components:
• Advanced File System is a file system option with the Digital
UNIX operating system
• Advanced File System utilities is a separately licensed,
optional layered product
The key concept in the AdvFS design is the separation of physical
storage layer and directory hierarchy layer.
Two new concepts in the AdvFS design are file domain and fileset.
• A file domain is a named set of one or more volumes that
provides a shared pool of physical storage.
• A fileset is a uniquely named set of directories and files that
form a subtree structure.
Creating a File
System
To create a new file system, use the newfs(8) command.
Checking a File
System
To check a file system, use the fsck(8) command.
Mounting a File
System
To make the files in a file system available to users, mount the
file system into the directory hierarchy.
• To mount a file system under an existing directory, use mount.
• File systems mounted regularly can be listed in /etc/fstab(4)
and will be mounted automatically when the system boots to
multiuser mode.
• To unmount a file system, use umount.
Managing Disks and File Systems 2–53
Exercises
Exercises
Viewing and
Changing
Partition Sizes
with CDE
The director of finance will be implementing a new application
which requires (for security purposes) its own file system with a
storage requirement of 100M bytes. Create a file system on your
system that will support the new application.
1. Use the CDE Disk Manager to apply the changes to the
appropriate disk.
2. Create a new d partition suitable for use with UFS.
Note
Do not commit the changes on disk unless directed to do
so by your instructor!
Viewing and
Changing
Partition Sizes
with disklabel
1. Display the disk label of a disk on your system.
2. Your instructor will tell you if a disk is available to be
repartitioned. If so, use disklabel -e to edit the disk label. Do
not use the -r option. If your instructor does not specify which
partitions to change, increase partition d by 1000 sectors and
make other appropriate changes.
What happens when you display the disk label?
3. Do the above exercise again, this time using the -r option on
edit. Add a name (label) to your disk.
Creating a File
System
1. Check the Reference Pages for newfs(8) options.
2. Your instructor will tell you if a disk partition is available for
creating a file system. If so, use newfs to create a UFS file
system.
Checking a File
System
1. Check the Reference Pages for fsck(8) options.
2. Use fsck without options to check a file system.
3. Use fsck with the -y option to check a file system.
Mounting File
Systems
1. Check the Reference Pages for mount(8), mount(8cdfs),
mount(8nfs), and mount(8ufs) options.
2. Use mount without arguments to display currently mounted file
systems.
3. Display the /etc/fstab file. What is the purpose of this file?
Name two programs that use this file.
2–54 Managing Disks and File Systems
Exercises
4. Your instructor will tell you if a file system is available to
practice mounting and unmounting.
a. In your home directory, create a subdirectory named test.
b. In that subdirectory, create a file named file1.
c. Be sure you are in your home directory (not the new
subdirectory).
d. Become root user.
e. Mount the file system (get the device name from your
instructor) under your test directory.
f. List the test directory. What happened to the file file1?
g. Create a new file newfile1 in the test directory.
h. Unmount the file system.
i. List the test directory. Was the file file1 deleted?
j. Create a subdirectory test2 and mount the file system
there.
k. Where is the file newfile1?
Managing Disks and File Systems 2–55
Solutions
Solutions
Viewing and
Changing
Partition Sizes
with CDE
1. Use the Application Manager and select:
a. System_Management_Utilities
b. Configuration
c. Disk
2. Choose the disk to be modified and select the Configure...
option. The figure below shows partition d with a size of 100
Mb.
Viewing and
Changing
Partition Sizes
with disklabel
1. Sample solution:
2–56 Managing Disks and File Systems
Solutions
# disklabel -r /dev/rrz0a
# /dev/rrz0a:
type: SCSI
disk: rz55
label:
flags:
bytes/sector: 512
sectors/track: 36
tracks/cylinder: 15
sectors/cylinder: 540
cylinders: 1224
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
7 partitions:
# size offset fstype [fsize bsize cpg]
a: 40960 0 unused 1024 8192 # (Cyl. 0 - 75*)
b: 122880 40960 unused 1024 8192 # (Cyl. 75*- 303*)
c: 649040 0 unused 1024 8192 # (Cyl. 0 - 1201*)
d: 152446 163840 unused 1024 8192 # (Cyl. 303*- 585*)
e: 152446 316286 unused 1024 8192 # (Cyl. 585*- 868*)
f: 180308 468732 unused 1024 8192 # (Cyl. 868*- 1201*)
g: 485200 163840 4.2BSD 1024 8192 16 # (Cyl. 303*- 1201*)
#
2. Editing the disk label without the -r option affects only the
copy in memory, not the label on the disk.
3. Displaying the disk label should show your changes: for
partition d, increase the size by 1000 but not the offset; if
partition e is adjacent to d, increase e’s offset by 1000 and
decrease its size by 1000. Add the disk name after the label:
field.
Creating a File
System
1. No solution required.
2. # newfs /dev/rrz1g RZ56
Checking a File
System
1. No solution required.
2. # fsck /dev/rrz1g
3. # fsck -y /dev/rrz1g
Mounting File
Systems
1. No solution required.
2. Solution varies.
# mount
/dev/rz0a on / type ufs (rw)
/dev/rz0g on /usr type ufs (rw)
/dev/rz0h on /usr/users type ufs (rw)
/dev/rz1c on /usr/local type ufs (ro)
Managing Disks and File Systems 2–57
Solutions
3. The fstab file contains descriptive information about the file
systems usually mounted.
fstab is used by dump, fsck, mount, and umount.
4.
a.$ mkdir test
b.$ touch test/file1
c.$ pwd
/usr/users/me
d.$ su
e.# mount /dev/rz1d /usr/users/me/test
f.# ls test
lost+found
g.# touch test/newfile1
h.# umount /dev/rz1d
i.# ls test
file1
j.$ mkdir test2
# mount /dev/rz1d /usr/users/me/test2
k.# ls test2
lost+found newfile1
#
The file system was temporarily mounted over the contents of
the test directory. No file was deleted.
2–58 Managing Disks and File Systems
3
System Shutdown and Startup
System Shutdown and Startup 3–1
About This Chapter
About This Chapter
Introduction As system manager, you may have to add system resources or
monitor system resources in single user mode. In these cases you
must shut down and reboot your system or shut down to single
user mode. You may even have to modify the system startup
procedures.
This chapter discusses the shutdown, halt, reboot, and init
commands to shutdown, reboot and change run levels on a Digital
UNIX system.
The chapter also discusses booting Digital UNIX systems.
Appendix A shows commands, environment variables and
examples for booting a number of systems. Refer to Appendix
A and to the section in the System Administration guide that
explains booting for your hardware.
The chapter provides background information on what happens
on a UNIX system as it boots. Finally, it provides information
about, and examples of, the initialization files.
Lab exercises provide practice shutting down and booting the
system to single user and multiuser mode, and examining the
initialization files.
Objectives To effectively control system startup and shutdown, you should be
able to:
• Shut down a UNIX system to single user mode or the halt
state using the command line interface
• Shut down a UNIX system to single user mode or the halt
state using the CDE Shutdown application
• Bootstrap a powered down or halted Digital UNIX system and
describe how the init command changes system run levels
• Describe the need for, and uses of, the Digital UNIX
initialization files
Resources For more information on the topics in this chapter, see the
following:
• Digital UNIX System Administration, Chapters 2, 3 and 4
• Nemeth, Snyder, & Seebass, UNIX System Administration
Handbook, Chapter 2
• Leffler, McKusick, Karels, and Quarterman, The Design
and Implementation of the 4.3BSD UNIX Operating System,
Chapter 13
• Digital Services Advisory for Digital UNIX, Chapter 12
Note that this is Digital Confidential
3–2 System Shutdown and Startup
Shutting Down and Rebooting the System
Shutting Down and Rebooting the System
Overview Shutting down, or rebooting the system is not usually a scheduled
event, but it is something you, as system administrator, will
perform periodically. Most of the time you will shut down the
system in a manner to cause the least disruption to the users.
However, you will occasionally have to shut down the system
rapidly, causing some disruption for the users. There will also
be cases when the system shuts itself down suddenly, causing
substantial disruption to the users.
This section describes various methods for shutting down and
rebooting the system.
Reasons
for System
Shutdown and
Reboot
When adding new hardware, the system must be powered down
prior to adding the new hardware. The system must first be shut
down. After the system has been shut down and the hardware
installed, you must modify the kernel configuration file and
rebuild the kernel.
To install a new version of system software, you must shut the
system down and boot from the distribution media. To upgrade
system software, you may have to shut down.
To install a layered product, you may need to shut the system
down to single user mode, install the software, make some
changes to the configuration file, then build a new kernel and
reboot the system. Note that not all layered products require
changes to the configuration file and building a new kernel.
If you modify the system by altering option values in the
configuration file to enhance system performance, a new kernel
must be built, then the system rebooted.
File systems can become corrupted by improper shutdown
procedures, hardware failures, or by power outages and surges.
If file system corruption is suspected, you will want to shut down
and reboot to run a file system consistency check, fsck. If fsck
detects an unexpected inconsistency, it leaves the system in single
user mode, allowing you to run the program manually.
After noticing several errors of the same type in the event log,
you may suspect an impending hardware failure. You may want
to shut down the system to more closely examine the suspect
hardware.
System Shutdown and Startup 3–3
Shutting Down and Rebooting the System
Methods
for System
Shutdown
There are a number of ways you can shut down and reboot your
UNIX system.
• Use the:
CDE Shutdown manager
shutdown command
halt or fasthalt command
init command
• Send a signal to the init process.
• Turn off the power.
Figure 3–1 provides an overview of various commands used to
shut down or reboot a UNIX system.
Figure 3–1 Overview of System Shutdown and Reboot
#
>>>
>>>
halt, fasthalt
ZKOX−055000111−09−RGS
reboot
shutdown −r, reboot
shutdown −h, init 0
shutdown, init s
Halt
Mode
Single
User
Mode
Multiuser
Mode
Using the
shutdown
Command
Use the shutdown command to halt, reboot, or return to single user
mode. The command provides the most consideration for other
users. You must be logged in as root to execute this command.
The format for the shutdown command is:
shutdown [-fhknr] time [warning-message]
The shutdown options are shown in Table 3–1.
3–4 System Shutdown and Startup
Shutting Down and Rebooting the System
Table 3–1 shutdown Command Options
Option Causes
A shutdown to single user mode.
-f A fast shutdown, bypassing the messages to other users
and bringing the system down as quickly as possible.
-h The system is to shut down and halt at console level.
-k A shutdown message to be sent to all users, warning
them of an impending shutdown. The system does not
actually shut down.
-n A shutdown without synchronizing the disks or logging
the shutdown.
-r The system is to shut down and automatically reboot.
The time argument specifies when shutdown will bring the system
down. You can use now for an immediate shutdown or specify a
future time with one of two formats:
Format Description
+number Brings the system down in number minutes.
yymmddhhmm Shuts the system down at the absolute time
specified. The hours and minutes may be separated
by a colon (:).
The other argument is the message you want send to all users
currently logged in to the system. This optional message is sent
along with the shutdown notification message at increasingly
shorter intervals as the time for shutdown approaches.
Shutting Down
to Single User
Mode
When used without any options, the shutdown command brings the
system to single user mode. The system notifies all users of the
impending shutdown.
An example shutdown command might look like the following:
shutdown +10 System coming down for routine maintenance
Besides notifying the users of the impending shutdown, the
system also:
• Disables logins
• Logs the shutdown in the event log file and /var/adm/wtmp
• Stops accounting and event logging
• Stops all remaining processes
• Sends the TERM signal to the init process, which brings the
system to single user mode
System Shutdown and Startup 3–5
Shutting Down and Rebooting the System
Shutdown is complete when the system console displays single
user mode.
INIT: SINGLE USER MODE
#
You have superuser access to the system through the console,
using the Bourne shell to perform administrative tasks.
Prior to the transition from multiuser to single user mode, the
output from the process status (ps -aef) command might look like
the one shown in Example 3–1.
Example 3–1 Typical Multiuser Mode ps Output
UID PID PPID C STIME TTY TIME CMD
root 0 0 1.5 Aug 19 ?? 04:51:51 [kernel idle]
root 1 0 0.0 Aug 19 ?? 0:00.39 /sbin/init -sa
root 3 1 0.0 Aug 19 ?? 0:00.42 /sbin/kloadsrv
root 40 1 0.0 Aug 19 ?? 1:54.21 /sbin/update
root 113 1 0.0 Aug 19 ?? 0:01.15 /usr/sbin/syslogd
root 115 1 0.0 Aug 19 ?? 0:00.01 /usr/sbin/binlogd
root 177 1 0.0 Aug 19 ?? 0:53.15 /usr/sbin/routed -q
root 309 1 0.0 Aug 19 ?? 0:00.55 /usr/sbin/portmap
root 311 1 0.0 Aug 19 ?? 0:00.11 /usr/sbin/mountd -i
root 313 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/nfsd -t8 -u8
root 315 1 0.0 Aug 19 ?? 0:00.01 /usr/sbin/nfsiod 7
root 318 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/rpc.statd
root 320 1 0.0 Aug 19 ?? 0:00.05 /usr/sbin/rpc.lockd
root 346 1 0.0 Aug 19 ?? 0:00.03 /usr/sbin/dnalimd
root 349 346 0.0 Aug 19 ?? 0:05.28 /usr/sbin/dnaevld
root 381 346 0.0 Aug 19 ?? 3:01.33 /usr/sbin/dnascd
root 382 381 0.0 Aug 19 ?? 0:00.10 /usr/sbin/dnansd
root 383 381 0.0 Aug 19 ?? 0:00.37 /usr/sbin/dnaksd
root 387 346 0.0 Aug 19 ?? 0:10.55 /usr/sbin/dnsadv
root 429 1 0.0 Aug 19 ?? 0:03.10 /usr/sbin/dtssd
root 433 387 0.0 Aug 19 ?? 0:00.21 /usr/sbin/dnsclerk -U r
root 435 346 0.0 Aug 19 ?? 0:00.07 /usr/sbin/dnanoded
root 482 1 0.0 Aug 19 ?? 0:00.37 /usr/sbin/osaknmd
root 522 1 0.0 Aug 19 ?? 0:14.64 -accepting connections
root 542 1 0.0 Aug 19 ?? 0:03.79 /usr/sbin/xntpd -g -x -
root 576 1 0.0 Aug 19 ?? 0:04.26 /usr/sbin/os_mibs
root 579 1 0.0 Aug 19 ?? 1:37.92 /usr/sbin/snmpd
root 581 1 0.0 Aug 19 ?? 28:48.23 /usr/sbin/advfsd
root 592 1 0.0 Aug 19 ?? 0:00.17 /usr/sbin/inetd
root 625 1 0.0 Aug 19 ?? 0:00.60 /usr/sbin/cron
root 657 1 0.0 Aug 19 ?? 0:00.20 /usr/lbin/lpd
root 676 1 0.0 Aug 19 ?? 0:00.12 /usr/bin/mmeserver -con
root 690 1 0.0 Aug 19 ?? 0:00.49 /usr/dt/bin/dtlogin -da
root 702 1 0.0 Aug 19 ?? 0:00.84 lpsbootd -F /etc/lpsodb
root 705 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la
root 706 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la
root 707 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la
root 708 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la
root 709 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la
root 710 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la
root 711 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la
root 712 690 0.0 Aug 19 ?? 38:37.93 /usr/bin/X11/X :0 -auth
root 781 592 0.0 Aug 19 ?? 0:00.10 rpc.ttdbserverd
3–6 System Shutdown and Startup
Shutting Down and Rebooting the System
The ps -aef command output after transition to single user mode
might look like the one shown in Example 3–2. Notice how few
processes are running.
Example 3–2 Typical Single User ps Output
UID PID PPID C STIME TTY TIME CMD
root 0 0 1.5 Aug 19 ?? 04:51:51 [kernel idle]
root 1 0 0.0 Aug 19 ?? 0:00.39 /sbin/init -sa
root 4921 4744 0.0 Aug 26 ttyp1 0:01.27 ksh
root 20911 20901 0.0 15:47:22 ttypb 0:00.06 ps -aef
Complete
Shutdown
When used with the -h or -r options, the shutdown command
typically performs the following functions in addition to the
functions performed by the shutdown command when used with no
options:
• Runs the sync command to synchronize the disks
• Unmounts the file systems
• Halts the processor
If the command was shutdown -r, the shutdown command
automatically starts a reboot operation to return the system to
multiuser mode.
Using the halt
Command
to Stop the
Processor
Use the halt command to cause a transition from single user
mode to the halt state. Use it only if you are not going to restart
immediately. You can turn off the system power when the system
displays the console prompt.
The halt command:
• Logs the system halt in the event log and /var/adm/wtmp
• Kills running processes
• Synchronizes the disks
• Halts the processors
• Can be run only by root
Descriptions for the various options to the halt command are
shown in Table 3–2.
Table 3–2 halt Command Options
Option Function
-l Does not log the halt
-n Prevents the use of sync to write data to the disks and
does not log the halt
-q Causes a quick halt; does not log the halt and makes
no attempt to kill the system processes
System Shutdown and Startup 3–7
Shutting Down and Rebooting the System
For example:
# halt
syncing disks... done
halting.... (transferring to monitor)
The halt is logged in /usr/adm/syslog.dated/date/auth.log.
Using the
fasthalt
Command
The fasthalt command halts the system and flags a subsequent
reboot not to carry out a file system consistency check (fsck).
The fasthalt command:
• Creates the file /fastboot, used by startup scripts to prevent
the execution of fsck
• Invokes the halt command to halt the processors
Note
Use the fasthalt command with extreme caution and
never use it unless you are certain that the file systems
are in excellent shape.
The format for the fasthalt command is:
fasthalt [-l -n -q]
The options for the fasthalt command are described in
Table 3–3.
Table 3–3 fasthalt Command Options
Option Function
-l Does not log the halt
-n Prevents the use of sync to write data to the disks and
does not log the halt
-q Causes a quick halt; does not log the halt and makes
no attempt to kill the system processes
Shutting Down
to Single User
Mode with init
Use the init command to shut down the system from multiuser
mode to single user mode.
The format for the command is:
init s
The init command scans the /etc/inittab file to determine which
commands and scripts must be run to bring the system to single
user mode.
3–8 System Shutdown and Startup
Shutting Down and Rebooting the System
Stopping the
Processor with
init
A Digital UNIX system may be halted with the init command.
The format for the command is:
init 0
The init command scans the /etc/inittab file to determine which
commands and scripts must be run to bring the system to halt
mode.
The init command may be executed in either multiuser or
single user mode. You would not normally use init to shut down
the system or halt the system unless you have provided ample
warning to the users with the wall command.
Other Methods
of Shutting
Down the
System
Other methods for shutting down the system include:
• Sending the TERM signal (15) to the init process brings the
system to single user mode.
• Sending the KILL signal (9) to the init process may bring the
system to console level.
• Turning off the power.
Note
These methods are not recommended for shutting down
a system because the results are unpredictable. The
best way to shut down the system is with the shutdown
command.
Rebooting the
System
If you make changes to system software or configuration files that
are executed only when the system is booted, you must reboot for
these changes to take effect. Also some devices, such as printers,
can become unusable for unknown reasons and require resetting,
which may not be possible without reinitializing the system.
Under these circumstances, you may have to reboot the system.
Using the
reboot
Command
The reboot command normally stops all processes, synchronizes
the disks, logs the reboot, and writes a shutdown entry into the
login accounting file.
The reboot command does not provide a time delay, nor does it
inform users of an impending shutdown and reboot. Do not use
the reboot command if users are logged in; use the shutdown -r
command instead.
You must have root privileges to use the reboot command.
The format for the reboot command is:
reboot [-lnq]
The descriptions of the various reboot options are shown in
Table 3–4.
System Shutdown and Startup 3–9
Shutting Down and Rebooting the System
Table 3–4 reboot Command Options
Option Function
-l Does not log the reboot
-n Prevents the use of sync to write data to the disks and
does not log the reboot
-q Causes a quick reboot; does not log the reboot and
makes no attempt to kill the system processes
Caution
Using the reboot -n command can result in file system
damage and should only be used with extreme caution. Do
not use this command unless fsck has just been used to
repair the root file system.
If you are in the single user mode, you can reboot with the reboot
command. In this case, reboot synchronizes the disks, then
reboots to the default run level.
3–10 System Shutdown and Startup
Shutting Down and Rebooting the System with CDE
Shutting Down and Rebooting the System with CDE
Overview Using the CDE Shutdown application applies the same underlying
mechanics of the system shutdown as the command line interface
command shutdown. The Common Desktop Environment merely
makes the task easier to perform through the use of the
window-like interface.
Invoking
Shutdown
This application is invoked in the standard manner, beginning
with the selection of the Application Manager icon in the Front
Panel.
• Application Manager
• System_Admin
• DailyAdmin
• Shutdown
The following figure shows the Application Manager - DailyAdmin
window, and the Get Password Pop-up window.
Figure 3–2 Shutdown Selection
System Shutdown and Startup 3–11
Shutting Down and Rebooting the System with CDE
Note that the shutdown application will prompt the user for
the proper root password. No further activity is permitted until
the password is supplied. After the correct password is entered,
the Shutdown Manager window is displayed, as shown in the
following figure.
Figure 3–3 Shutdown Window
Shutdown
Options
The selections include:
• Halt
• Reboot
• Single User
• Message Only
Each option gives the administrator the same functionality as the
command line interface command shutdown.
Click the arrows in the time scroll bar to change the time to
shutdown.
You can display more options by clicking MB1 on the dark
downward arrow. The three additional controls are:
• Broadcast Message to NFS Clients - used where users on
another host may be accessing file remotely from this host
• Preshutdown Script - may be defined to shut down with a
particular methodology
3–12 System Shutdown and Startup
Shutting Down and Rebooting the System with CDE
• Other Options
a. Fast - used to bypass fsck on the next boot
b. No Disk Sync - do not write contents of memory to disk
prior to shutdown
Figure 3–4 Shutdown Options Selection
Shutdown
Message Only
The Message Only radio button gives advance warning to users
that the system will be shut down at a predetermined time for
system maintenance. Since no shutdown will actually occur
and only a message is sent to users, the time displayed has no
impact.
System Shutdown and Startup 3–13
Shutting Down and Rebooting the System with CDE
Figure 3–5 Warning Users of Shutdown
3–14 System Shutdown and Startup
Shutting Down and Rebooting the System with CDE
Shutdown
Reboot
Selecting this shutdown option will cause a shutdown based on
the time selected, followed by an automatic reboot.
Figure 3–6 Shutdown Reboot
System Shutdown and Startup 3–15
Bootstrapping a Digital UNIX System
Bootstrapping a Digital UNIX System
Overview Bootstrapping, more commonly called booting, is the process of
starting up a computer from a powered-down or halted condition.
During the boot process, the operating system kernel is loaded
into memory and started. Many tasks must be performed during
this process to initialize the system before it can be used.
Several problems can prevent a system from booting including:
• Corrupt kernel file
• Configuration does not match kernel configuration
• Hardware problems
• Damaged file systems
• Corrupt initialization files
The booting process:
• Is hardware dependent
• Differs from system type to system type
Steps in the
Bootstrap
Process
The bootstrapping process can be divided into seven steps:
1. Load the kernel of the operating system into memory.
2. Initialize the kernel.
3. Check hardware configuration.
4. Create system processes.
5. Superuser intervention for manual boot.
6. Execute the initialization script files.
7. Multiuser operation.
Loading the
Kernel
The kernel of the operating system is a program, and the first
step in the bootstrap process is to load this program into memory
so that it can be executed. The default kernel path for Digital
UNIX is /vmunix.
Loading the operating system is generally a multistage process:
1. The console software reads and loads the contents of logical
block number (LBN) 0 (bootblock).
2. The code from block 0 has a few bytes of code which reads the
primary bootstrap code from LBN 1-15.
3. This code then loads the secondary bootstrap program
/osfboot.
3–16 System Shutdown and Startup
Bootstrapping a Digital UNIX System
4. The secondary bootstrap program is a more intelligent loader
program. It takes information about the boot mode, the
boot device type, how to boot, and what to boot, and loads
the specified kernel. The boot loader is generally capable of
communicating with the operator by issuing general and error
messages, and accepting input.
Initializing the
Kernel
Without sufficient memory, system initialization will fail. If
memory initialization succeeds, most systems display a message
indicating the amount of total memory, and the amount of
memory available (total memory minus the memory allocated to
the kernel).
Once the kernel has been loaded, it starts executing and
initializing itself. During kernel initialization, the kernel:
• Determines how much memory is left after loading the kernel
• Reserves memory for the buffer cache and for internal static
tables
• Sets up page tables and enables memory management
• Creates the environment for process 0 and several system
server threads
• Initializes the buffer cache
Hardware
Configuration
During startup, the Digital UNIX operating system initializes
hardware that has been configured into the kernel. During
hardware initialization, problems may be caused by hardware
devices that do not interrupt, or the presence of unsupported
hardware devices or controllers.
Digital UNIX V4.0 automatically configures devices with dynamic
device recognition (DDR). The hardware configuration is generally
displayed on the console.
If a device is missing or does not respond, it is marked as
nonexistent, and the driver is disabled. If the device is later
reconnected, it will not be usable until the system is rebooted.
Creating
System
Processes
Process 0 is the kernel idle task, but is in fact multithreaded. It
consists of many threads to perform such things as paging in and
out, scheduling, swapping in and out, device interrupt service,
and kernel idle.
The init Process 1 is the first process to execute a program in
user mode, and is the parent process to all subsequent processes.
The init process (/sbin/init) is started with the -a flag, which
causes it to run as a daemon, and differentiates it from the init
command that root can execute.
System Shutdown and Startup 3–17
Bootstrapping a Digital UNIX System
The init command provides a means to shut down a Digital
UNIX system from multiuser mode to single user mode or to halt
the system.
Single User
Mode
If the system is booted to single user mode, only the root file
system is mounted. If a program not in the root partition is
required, you must mount the required file system.
In addition, the root file system is mounted for read-only access.
If you need to write to the root file system, you must change the
access using the mount -u command.
Because the daemons are not running at this time, many
commands that depend upon server processes will not function
properly (like mailx).
Normally you would boot to single user mode to perform
administrative tasks that are best accomplished with no other
users on the system. For instance, you might be checking out new
hardware, mounting and monitoring file systems, or changing
disk partitions.
When you exit single user mode with Ctrl/D or exit, init continues
with the startup tasks to transition to multiuser mode.
Initialization
Script
Execution
The init process executes the rc (run command) script files.
The names of these files vary among the various UNIX
implementations. In Digital UNIX and System V, the init process
determines which script files should be run based upon entries in
the /etc/inittab file. init spawns a copy of the Bourne shell to
run the script files.
Some of the tasks performed by the rc* scripts are:
• Setting the name of the system
• Checking the disks with fsck
• Mounting the file systems listed in /etc/fstab
• Removing files from the /tmp directory
• Notifying the kernel of additional swap partitions
• Starting up daemons and network services
• Turning on system accounting and disk quotas
• Configuring network interfaces
• Enabling logins
3–18 System Shutdown and Startup
Bootstrapping a Digital UNIX System
Multiuser Mode Depending upon the system, a /usr/sbin/getty process may be
started for the console, or for a workstation, a CDE process is
started.
Remote logins are not accepted unless the network has been
started.
If a getty process terminates, the init process restarts it.
Run Levels A Digital UNIX system is considered to be in a run level at any
given time. Each run level has a specific group of processes that
run at that level.
Digital UNIX run levels include:
0 Shut down and halt the system
s Single user mode
2 Multiuser mode with no network
3 Multiuser mode with network services
During a system boot, the init program scans each line in the
/etc/init file and carries out the command on all lines containing
the number of the run level that the system is changing to.
On a Digital UNIX system, the root user can use the init
command to change run levels. For instance, for a Digital UNIX
system at run level three, the command init 2 would cause a
change in run levels to run level two. The command, init s would
cause a change in run levels to "s", the single user mode. The
command, init 0 would halt the system.
During a change in run levels, init scans the /etc/inittab file to
determine which commands and scripts to execute.
Use the who -r command to show the current run level.
System Shutdown and Startup 3–19
Digital UNIX Initialization Files
Digital UNIX Initialization Files
Overview When the Digital UNIX system boots, the kernel starts the init
process (/sbin/init -a), which examines the /etc/inittab file to
determine the default run level. The init process executes the
commands on any line in the /etc/inittab file with a run level
entry that corresponds to the default run level.
The superuser may execute the init command to cause a change
in run levels. In this case, the desired run level is provided as an
argument to the init command (for example, init 2). In this case,
the init command signals the init process, process 1, which scans
the /etc/inittab and executes entries which contain the specified
new run level. Entries containing the boot or bootwait action field
are not executed.
Of course, if the system is going to be shut down, or the run level
changed to a run level that would exclude the normal user from
system use, the root user should use the wall command to notify
the users the system is going to be shut down.
Initialization
Files
The following files and directories are used to boot or change run
levels for Digital UNIX:
• /etc/inittab: The first file looked at by init. It designates the
scripts or programs to run for a change in run level.
• /sbin/rc0, /sbin/rc2, or /sbin/rc3: Master script files used to
control the change to run level 0, S, 2, or 3.
• /sbin/rc0.d, /sbin/rc2.d, or /sbin/rc3.d: Directories
containing links to the scripts or programs to be run to
change to run level 0, S, 2, or 3. The script /sbin/rc0 uses
the directory /sbin/rc0.d, while /sbin/rc2 uses the directory
/sbin/rc2.d, and /sbin/rc3 uses the directory /sbin/rc3.d.
• /sbin/init.d: The directory containing all of the scripts or
programs that can be executed during any change in run level.
Figure 3–7 provides an overview of the use of the initialization
files for Digital UNIX.
3–20 System Shutdown and Startup
Digital UNIX Initialization Files
Figure 3–7 Overview of Digital UNIX Initialization Files
inet
s2:23:wait:/sbin/rc2 
< /dev/console 
> /dev/console 2>&1
/etc/inittab /sbin/rc2.d /sbin/init.d
enlogin
ZKOX−055000111−17−RGS
K05inet
../init.d/inet
/sbin
rc2
is:3:initdefault:
S25enlogin
../init.d/enlogin
.
.
. .
.
. .
.
.
rc0
rc3
For a boot, the init process searches the /etc/inittab file for the
line containing the action entry of initdefault.
For other changes in run levels, init searches for any entries,
starting at the top of the file, which contain the desired new run
level.
Changing Run
Levels
Assume that you are booting run level is 2, or that we are
changing run level from 3 to 2. From the figure, the command
"/sbin/rc2 < /dev/console > /dev/console 2>&1" will be executed.
Note that there are other commands in the /etc/inittab file that
are not shown that would be executed prior to this command.
Standard input, standard output, and standard error are all
directed to/from the console. Those entries with the boot or
bootwait action fields are executed first, than the remaining
entries for the pertinent run level are executed.
The Bourne shell script file, rc2 in /sbin (/sbin/rc2) is executed.
This script file checks to see if it is a boot (previous run level
was single user) or if it is a change in run level. In either
case, the link files in /sbin/rc2.d will cause execution of files in
/sbin/init.d.
If we are booting, all files linked to files with an "S" as the first
letter in the file name are executed. The "S" indicates "start". If
it is a change from run level 3 to run level 2, all files linked to
files with a "K" as the first letter in the file name will be executed.
The "K" indicates "kill". Then, all files linked to files with an
"S" as the first letter in the file name are executed. If there is a
change from run level 3 to run level 2, there are daemons that
have to be stopped (no network services in run level 2).
Also, if we are changing from run level 3 to run level 2, once the
files with names beginning with "K" have been run, all /sbin
/rc2.d files with names beginning with "S" are then executed. It
is the responsibility of the individual scripts to decide what to do
when the system is coming up and going down.
In the figure, the link, K05inet --> ../init.d/inet, causes the
execution of /sbin/init.d/inet, which is just one of the commands
used to stop the network processes.
System Shutdown and Startup 3–21
Digital UNIX Initialization Files
The link, S25enlogin --> ../init.d/enlogin, causes the execution
of /sbin/init.d/enlogin, which will enable logins if we are
booting.
The /etc/inittab
File
The format for the entries in the etc/inittab file is:
ID:run-levels:action:process
ID A 14-character string used to identify the entry.
run-levels Contains the number of one or more run levels.
action Indicates how to handle the process field.
process Script file or command to execute.
Definitions for the action field are shown in Table 3–5.
Table 3–5 The /etc/inittab File Action Field
Action Description
boot 1 Run when the system transfers to the specified run level from a lower level
for the first time (that is, during booting). init starts the process but does
not wait for its termination.
bootwait 1 Run when /etc/inittab is read for the first time. init starts the process
and waits for its termination. If the process terminates, it is not restarted.
initdefault Specifies the default run level. If more than one number is present in the
run level field, the highest run level is used.
off If the process is currently running, init sends SIGTERM, waits 20
seconds, then sends the kill signal, SIGKILL. If the process does not
exist, init ignores the entry.
once init starts the process but does not wait for its termination. When the
process stops, it is not restarted.
powerfail If init receives the SIGPWR powerfail signal, the process is executed.
powerwait If init receives the SIGPWR powerfail signal, it executes the process and
waits for the process to terminate before resuming processing of the /etc
/inittab file.
respawn If the process does not exist or if the process terminates, init restarts the
process.
sysinit Executed before init tries to access the console.
wait init starts the process and waits for it to terminate. init will not process
any further /etc/inittab entries until the process terminates.
1During booting, init processes the entries with action fields of boot or bootwait for the defined run level before processing
other entries for the run level.
The fields in each entry of the /etc/inittab file are separated by
colons (:).
The ID field in the entry may be null.
If the run-level field is null, the entry is valid for all run levels.
3–22 System Shutdown and Startup
Digital UNIX Initialization Files
If the field is null, the colon must still be present.
Digital UNIX
/etc/inittab File
A sample Digital UNIX /etc/inittab file is shown in
Example 3–3.
Example 3–3 Digital UNIX /etc/inittab File
# cat /etc/inittab
is:3:initdefault:
ss:Ss:wait:/sbin/rc0 shutdown < /dev/console > /dev/console 2>&1
s0:0:wait:/sbin/rc0 off < /dev/console > /dev/console 2>&1
fs:23:wait:/sbin/bcheckrc < /dev/console > /dev/console 2>&1
kls:Ss:sysinit:/sbin/kloadsrv < /dev/console > /dev/console 2>&1
sysconfig:23:wait:/sbin/init.d/autosysconfig start < /dev/console > /dev/console 2>&1
update:23:wait:/sbin/update > /dev/console 2>&1
it:23:wait:/sbin/it < /dev/console > /dev/console 2>&1
kmk:3:wait:/sbin/kmknod > /dev/console 2>&1
s2:23:wait:/sbin/rc2 < /dev/console > /dev/console 2>&1
s3:3:wait:/sbin/rc3 < /dev/console > /dev/console 2>&1
cons:1234:respawn:/usr/sbin/getty console console vt100
#
The following table describes some of the processes started in the
inittab file.
Process Function
bcheckrc Checks and mounts file systems listed in /etc/fstab
kloadsrv Starts the kernel load server daemon for dynamically
loading object modules
update Starts the update daemon to synchronize disks
it Makes sure the system is configured
kmknod Creates device special files for kernel layered
products
Entries in the
/etc/inittab File
is:3:initdefault — If we are not booting to single user mode, the
init process uses this entry to determine the default run level; in
this case, 3. All entries that have a 3 in the run level field will be
executed.
ss:Ss:wait:/sbin/rc0 shutdown — Execute the /sbin/rc0 script file
with "shutdown" as the input argument. The init process waits
until the rc0 script completes execution before executing any
other commands (there are no other commands with a run level of
"S" or "s", in /etc/inittab)
s0:0:wait:/sbin/rc0 off — Execute the /sbin/rc0 script file with
"off" as the input argument. Note that this is the same as the
previous entry, except that in this case the rc0 script has "off" as
an input argument instead of "shutdown".
System Shutdown and Startup 3–23
Digital UNIX Initialization Files
fs:23:bootwait:/sbin/bcheckrc — When booting to run level 2 or
3, the file systems are checked (fsck) and mounted. Note that
/sbin/bcheckrc first checks for the existence of the file /fastboot.
If /fastboot exists, the file system check is bypassed. init waits
for the script to terminate, but does not restart it.
s2:23:wait:/sbin/rc2 — When booting to run level 2 or 3, init
starts /sbin/rc2, waits for /sbin/rc2 to terminate, and does not
continue until the script has completed.
s3:3:wait:/sbin/rc3 — When booting to run level 3, init starts
/sbin/rc3 after /sbin/rc2 completes. Again, init waits for
/sbin/rc3 to terminate before it continues.
Execution of
/sbin/rc*.d Files
When shutting the system down to single user mode or halting
the system with the init command, the /sbin/rc0 script file is
invoked. When booting to run level 2 or 3, /sbin/rc2 is invoked.
When booting to run level 3, /sbin/rc3 is executed after /sbin/rc2
has completed. Also, if the init command is used to change the
run level from 3 to 2, /sbin/rc2 is executed.
When one of the rc0, rc2, or rc3 scripts executes, files in the
corresponding /sbin/rc*.d directory are executed. These files are
links to files in the /sbin/init.d directory.
A sample /sbin/rc2 is shown in Example 3–4. This script is used
when the system is booting to run level 2 or 3, or changing from
run level 3 to run level 2.
3–24 System Shutdown and Startup
Digital UNIX Initialization Files
Example 3–4 An /sbin/rc2 File
trap "echo" 2 1
PATH=/sbin:/usr/sbin:/usr/bin
export PATH
# Just exit if /usr not mounted.
if [ ! -d "/usr/sbin" ] 2
then
exit
fi
# Determine action from runlevel information
set ‘who -r‘ 3
if [ $9 = "S" ]; then 4
stty sane tab3 2>/dev/null
echo "The system is coming up. Please wait..."
BOOT=yes
elif [ $7 = "2" ]; then 5
echo "Changing to system level 2."
if [ -d /sbin/rc2.d ]; then
for f in /sbin/rc2.d/K*
do
if [ -s $f ]; then
/sbin/sh $f stop
fi
done
fi
fi
if [ -d /sbin/rc2.d ]; then 6
for f in /sbin/rc2.d/S*
do
if [ -s $f ]; then
/sbin/sh $f start
fi
done
fi
if [ "$BOOT" = "yes" -a $7 = "2" ]; then 7
echo "The system is ready."
elif [ $7 = "2" ]; then 8
echo "Change to state 2 has been completed."
fi
An explanation of the /sbin/rc2 script file follows:
1 The trap prevents an interrupt from killing the script.
2 If the /usr/sbin directory is not mounted, terminate execution
of this script. The /usr/sbin directory contains commands
executed by the script files in /sbin/init.d.
3 Use the who -r command to determine the current system run
level.
4 If the change is from single user mode (parameter 9 is "S") we
must be booting to run level 2 or 3.
Reset the console terminal to a reasonable value and
redirect error output to the bit bucket.
Echo the message that the system is coming up to the
console terminal.
System Shutdown and Startup 3–25
Digital UNIX Initialization Files
Set the BOOT variable to "yes".
5 If the present run level (the run level we are changing from) is
not single user mode, and we are changing to run level 2, then
we must be in run level 3 (for present Digital UNIX systems).
If the directory /sbin/rc2.d exists, fork a Bourne shell to
execute every file in /sbin/rc2.d that begins with a K (kill).
Pass "stop" as the argument. Keep in mind that the files
in /sbin/rc2.d are just soft links to files in /sbin/init.d.
6 If we are changing from run level 3 to run level 2, or if we are
booting to run level 2 or 3:
If the directory /sbin/rc2.d exists, fork a Bourne shell
to execute every file in /sbin/rec2.d that begins with
an "S" (start). Pass "start" as an argument. The files in
/sbin/rc2.d are soft links to files in /sbin/init.d.
7 If the BOOT variable is "yes" (we were booting) and parameter
7 from the who -r command is 2 (we are booting to run level 2),
echo the message that the system is ready. If we are booting
to run level 3, we still have to execute the files in /sbin/rc3.d.
When they are complete, echo the "system ready" message.
8 If we were not booting, but just changed run level from 3 to 2,
echo the message "Change to state 2 has been completed".
Selected
Contents
of the rc*.d
Directories
Portions of ls -o outputs are shown for the /sbin/rc*.d directories
in Example 3–5.
Example 3–5 Selected Contents of the rc*.d Directories
# ls -o /sbin/rc0.d
lrwxr-xr-x 1 root bin 17 Mar 28 1995 K00enlogin -> ../init.d/enlogin
lrwxrwxrwx 1 root bin 13 Mar 28 1995 K05lpd -> ../init.d/lpd
lrwxrwxrwx 1 root bin 13 Apr 18 12:21 K07lat -> ../init.d/lat
lrwxrwxrwx 1 root bin 15 Mar 28 1995 K08audit -> ../init.d/audit
lrwxrwxrwx 1 root bin 14 Apr 1 08:35 K09dhcp -> ../init.d/dhcp
.
.
.
lrwxrwxrwx 1 root bin 16 Mar 28 1995 K45syslog -> ../init.d/syslog
lrwxrwxrwx 1 root bin 15 Mar 28 1995 K47write -> ../init.d/write
lrwxrwxrwx 1 root bin 14 Mar 28 1995 K50inet -> ../init.d/inet
lrwxrwxrwx 1 root bin 15 Mar 28 1995 K52quota -> ../init.d/quota
lrwxrwxrwx 1 root bin 17 Apr 9 12:24 K99nsrd -> /sbin/init.d/nsrd
# ls -o /sbin/rc2.d
(continued on next page)
3–26 System Shutdown and Startup
Digital UNIX Initialization Files
Example 3–5 (Cont.) Selected Contents of the rc*.d Directories
lrwxrwxrwx 1 root bin 13 Mar 28 1995 K00lpd -> ../init.d/lpd
lrwxrwxrwx 1 root bin 13 Apr 18 12:21 K03lat -> ../init.d/lat
lrwxrwxrwx 1 root bin 14 Apr 1 08:35 K04dhcp -> ../init.d/dhcp
lrwxrwxrwx 1 root bin 15 Mar 28 1995 K05inetd -> ../init.d/inetd
.
.
.
lrwxrwxrwx 1 root bin 18 Mar 28 1995 S00savecore -> ../init.d/savecore
lrwxrwxrwx 1 root bin 16 Mar 28 1995 S05paging -> ../init.d/paging
lrwxrwxrwx 1 root bin 18 Mar 28 1995 S06mfsmount -> ../init.d/mfsmount
lrwxrwxrwx 1 root bin 19 Mar 28 1995 S10recpasswd -> ../init.d/recpasswd
lrwxrwxrwx 1 root bin 17 Mar 28 1995 S25enlogin -> ../init.d/enlogin
lrwxrwxrwx 1 root bin 17 Mar 28 1995 S35streams -> ../init.d/streams
# ls -o /sbin/rc3.d
lrwxrwxrwx 1 root bin 14 Mar 28 1995 S00inet -> ../init.d/inet
lrwxr-xr-x 1 root bin 15 Mar 28 1995 S01quota -> ../init.d/quota
lrwxrwxrwx 1 root bin 18 Mar 28 1995 S08startlmf -> ../init.d/startlmf
lrwxrwxrwx 1 root bin 16 Mar 28 1995 S10syslog -> ../init.d/syslog
lrwxrwxrwx 1 root bin 17 Mar 28 1995 S11gateway -> ../init.d/gateway
.
.
.
lrwxrwxrwx 1 root bin 15 Mar 28 1995 S63write -> ../init.d/write
lrwxrwxrwx 1 root bin 13 Mar 28 1995 S65lpd -> ../init.d/lpd
lrwxrwxrwx 1 root bin 17 Mar 28 1995 S80crashdc -> ../init.d/crashdc
lrwxrwxrwx 1 root system 16 Mar 28 1995 S95xlogin -> ../init.d/xlogin
lrwxrwxrwx 1 root bin 17 Apr 9 12:24 S99nsrd -> /sbin/init.d/nsrd
• All file names in /sbin/rc0.d start with a K. The script,
/sbin/rc0 is only executed when the run level is being changed
to single user (init s) or the system halted (init 0). Therefore,
all the scripts called by sbin/rc0 are used to stop processes or
daemons.
• All file names in /sbin/rc2.d starting with a K are executed
when called by /sbin/rc2 when the run level is changing from
3 to 2. These scripts also stop processes or daemons. Those
file names that start with an S are used to start processes
or scripts when the system is booting to run level 2 or 3.
Remember that /sbin/rc2 is executed when booting to run
level 2 or 3.
• There are no file names in /sbin/rc3.d that start with a K.
The script, /sbin/rc3, is only executed when the system is
booting to run level 3, and all processes and daemons are
being started; none are being stopped.
• Notice the following three files:
/sbin/rc0.d/K30nfs --> ../init.d/nfs
/sbin/rc2.d/K35nfs --> ../init.d/nfs
/sbin/rc3.d/S35nfs --> ../init.d/nfs
System Shutdown and Startup 3–27
Digital UNIX Initialization Files
Note that each file is a link to the same file, /sbin/init.d/nfs.
• Notice the following three files:
/sbin/rc0.d/K60cron --> ../init.d/cron
/sbin/rc2.d/K20cron --> ../init.d/cron
/sbin/rc3.d/S57cron --> ../init.d/cron
Again, each file is a link to the same file, /sbin/init.d/cron.
• When the script in /sbin/init.d is called, it is passed an
argument:
start: Start the process or daemon
stop: Stop the process or daemon
• The files in each of the /sbin.rc*.d directories are numbered
to ensure that they are executed in the correct order. The
numbers are spread out to allow the insertion of other files
between existing files.
• As system administrator, you can customize your system by
adding scripts to /sbin/init.d and the appropriate links in the
/sbin/rc*.d directories.
3–28 System Shutdown and Startup
Summary
Summary
Shutting Down
and Rebooting
Shutting down and rebooting the system is a task often performed
by a system administrator. You should shut down the system in a
manner that causes as little disruption as possible to the users.
Methods of shutting down the system include:
• Invoking the CDE Shutdown application
• Using the shutdown command
• Using the halt or fasthalt command
• Using the init command
• Sending the TERM signal to the init process
• Killing the init process
• Turning off the power
The shutdown command is the safest and most thorough way to
initiate a halt, reboot, or to return to single user mode.
File systems are not unmounted during the transition to single
user mode. File systems are unmounted during the transition to
the halt state. The sync command is used during the transition to
the halt state to synchronize the disks.
Both the halt and fasthalt commands cause a transition to the
halt state. The fasthalt command flags a subsequent reboot not
to carry out a file system consistency check.
Do not use the reboot command from multiuser mode; use the
shutdown -r command instead.
Shutting Down
and Rebooting
with CDE
Use the CDE Shutdown application to shut down the system. It
has all the facilities of the command line interface command.
Bootstrapping
a Digital UNIX
System
During a system boot, the kernel starts the init process.
The superuser may execute init with an argument of the run
level to change to.
The init process and the init command search the /etc/inittab.
Digital UNIX
Initialization
Files
There are specific commands in /etc/inittab and commands to
execute rc* scripts.
The rc* scripts direct the execution of other files in the
appropriate /sbin/rc*.d directory. The files in the /sbin/rc*.d
directories are links to files in the /sbin/init.d directory.
The /sbin/rc scripts pass an argument of start or stop, which
determines if processes or daemons are to be stopped or started.
System Shutdown and Startup 3–29
Exercises
Exercises
System
Shutdown and
Startup
1. Shut down the system to single user mode.
a. Log in as root.
b. Execute the mount command (with no arguments) to
determine which file systems are mounted. Make a list of
mounted file systems for future reference.
c. Use the ps command to display the process status. Ensure
that you get both the process and parent process IDs.
If you have access to a printer, redirect the command
output to a file and print the file. If not, make a list of all
processes for which the init process is the parent process.
d. Shut the system down to single user mode with the
command:
# shutdown now Shutting down, back up soon
#
e. When the system indicates that it has reached single user
mode, execute the mount command. Compare the mounted
file systems with the list you made of mounted file systems
when the system was in multiuser mode.
f. Execute the ps command and compare the display to the
printed file or list you made above. Look for processes
started by the init process that no longer exist.
2. Halt the system.
Execute the halt command to change from single user
mode to the halt mode (>>> prompt).
CDE Shutdown
and Startup
An important application has erred and must be restarted. The
only way to do so is to restart the entire system. It is now 11:59
a.m. and since most users will be taking lunch at 12 noon, shut
down the system in 2 minutes. Since no other maintenance action
is required, immediately reboot the system after shutdown.
Booting the
Digital UNIX
System
1. Check the manual for your system and find the boot
instructions.
2. Boot to single user mode.
3. Boot to multiuser mode.
3–30 System Shutdown and Startup
Exercises
Initialization
Files
Modify the initialization files/directories to cause a distinct
message to be displayed on the console each time the cron daemon
started or stopped when the system boots, or when the init
command changes run levels from run level 3 to 2, s or 0, or from
s to 2 or 3.
Hint
You do not have to change any of the existing initialization
files. You only have to create one file that echoes the
message and the links to this file. Use case to check for
the input arguments of "start" or "stop". Place the links
after the original links to the file that starts or stops the
cron daemon.
System Shutdown and Startup 3–31
Solutions
Solutions
System
Shutdown and
Startup
1. Shut down the system to single user mode. No solution
required.
2. Halt the system. Ensure everyone is logged out, halt the
system and log the shutdown.
# who
# halt
.
.
.
>>>
CDE Shutdown
and Startup
Choose the following options from the Shutdown Manager:
• Reboot
• Time to Shutdown = 2 minutes
• Shutdown message = Shutting down system in 2 minutes to
restart application ... please log off now! System will reboot at
12:01 ...thanks Don
• Send message to NFS clients
• Press the Shutdown button
Booting the
Digital UNIX
System
1. No solution required.
2. Sample solution for DEC 3000 Model 400:
>>> boot -fl s
3. Sample solution for DEC 3000 Model 400. The solution
assumes the boot default device is DKA100.
>>> boot -fl a -fi "vmunix" DKA100
If you always want to boot to multiuser mode, set the
auto_action to auto or boot and the boot_osflags to a.
If you do not provide a device and file name, the system uses
the default variables bootdef_dev and boot_file.
Initialization
Files
Create the file /sbin/init.d/sysman_lab. This script checks for the
input argument of "start" or "stop" and echoes the appropriate
message to the console.
3–32 System Shutdown and Startup
Solutions
# cat /sbin/init.d/sysman_lab
#!/sbin/sh
#
# /sbin/init.d/sysman_lab
#
# Written for UNIX System Management lab exercise
#
# This file is an additional script executed
# when the init command is used to change run levels
# or the system is booted.
#
# It is called after the cron daemon is started or stopped
# and echoes a message on the console which indicates whether
# the cron daemon was started or stopped
PATH=/sbin:/usr/sbin:/usr/bin:
export PATH
case "$1" in
’start’)
echo ""
echo "CRON SERVICE REALLY STARTED"
echo ""
echo "This message was brought"
echo "to you by the acting"
echo "system administrator!"
echo ""
echo "Good Day"
echo ""
;;
’stop’)
echo ""
echo "CRON SERVICE REALLY STOPPED"
echo ""
echo "This message was brought"
echo "to you by the acting"
echo "system administrator!"
echo ""
echo "Good Day"
echo ""
;;
*)
echo "usage: $0 {start|stop}"
;;
esac
#
In the /sbin/rc0.d, sbin/rc2.d, and /sbin/rc3.d directories, create
the links to the file /sbin/init.d/sysman_lab. The link has to be
after the link which starts or stops the cron daemon in each of the
directories.
# cd /sbin/rc0.d
# ln -s ../init.d/sysman_lab K65sysman_lab
# cd ../rc2.d
# ln -s ../init.d/sysman_lab K25sysman_lab
# cd ../rc3.d
# ln -s ../init.d/sysman_lab S57gsysman_lab
#
System Shutdown and Startup 3–33
4
Updating System Firmware
Updating System Firmware 4–1
About This Chapter
About This Chapter
Introduction This lesson is an introduction to the system firmware used
by Alpha systems. It illustrates the parts of a system and
how they interact. It describes the different types of firmware
systems supported by Digital and the generic interfaces used. It
demonstrates how to determine firmware correctness and take
appropriate action.
Lab exercises provide practice to evaluate and plan for the correct
firmware version.
We will use the term ARC or SRM to denote the firmware system
console type.
Objectives To manage Digital UNIX systems, you should be able to:
• Explain the organization and advantages of the various
firmware systems
Resources For more information on the topics in this chapter, see the
following:
• Digital UNIX Installation Guide, Chapter 1
Note
Each platform will have specific documentation for
reference information. For example AlphaServer 2000
/2100, or DEC3000 M500.
• Hardware Reference Guide
• Firmware Reference Guide
• Firmware Update Procedures
4–2 Updating System Firmware
Firmware Systems
Firmware Systems
Overview The firmware system is the layer which interfaces between the
hardware and the operating system. It also provides the console
functions to support the operating system and the low-level
operator functions such as:
• Initialize, test, and prepare the system platform
• Provide boot options
• System control and monitoring
The Digital firmware systems support the following types of
operating systems:
• Digital OpenVMS
• Digital UNIX
• Microsoft Windows NT
Architectural
View
On Alpha systems, the console firmware system is loaded by
default when the platform is powered on. This system defines
three general areas of functionality for a given system:
• Hardware configuration and test
• User control
• Software bootstrap
These functions can also be described in terms of the nature
of their interface between subsystems, as well as the system
operator or administrator. Figure 4-1 shows these relationships.
Updating System Firmware 4–3
Firmware Systems
Figure 4–1 Console Interfaces
Hardware
Platform
Hardware Interface
Operating System User Interface
System Firmware
sdi−dw−fw.eps
Console
Systems
There are two console subsystems; SRM and ARC, with the latter
supporting only the Windows NT operating system. Note also
that some utilities may only be called with certain firmware
systems.
• Systems Reference Manual
• Advanced RISC Computing
Systems
Reference
Manual
This is the architectural standard defined to support Digital
UNIX, OpenVMS, and ELX (VMS realtime system) operating
systems. It is used by the operating system to communicate with
the hardware control functions. SRM specifies the requirements
of procedural tasks and the format of critical data structures.
Console firmware services provide initialization and configuration
when the system is powered on or reset. The firmware system
indicates successful completion with the SRM console prompt
>>>
4–4 Updating System Firmware
Firmware Systems
Figure 4-2 shows a brief overview of the initialization tasks.
Figure 4–2 Console Initialization
sdi−dw−fw−init.ps
Power On
Hardware
Test
Hardware
Configuration
Cache
Initialization
Reset I/O
Subsystem
Start
Drivers
SRM Prompt
>>>
Display
Reset
The console is now ready to support the command line interface
(CLI) environment.
Note
The console terminal used as the operator interface may
be either a serial terminal (VTxxx or equivalent) or a
VGA-compatible graphics terminal.
While at the console prompt the operator or administrator may
use any of the commands in the following format.
Updating System Firmware 4–5
Firmware Systems
>>> command [-flags] [parameters ...]
Examples of console commands are:
>>> sh auto
AUTO_ACTION = HALT
>>> sh bootdef_dev
BOOTDEF_DEV = DKA300
>>> sh boot_osflags
BOOT_OSFLAGS = A
SRM
Commands
and Tasks
System management task support is provided through the
SRM console allowing the operator or user to customize the
environment or take special actions. Table 4-1 briefly lists some
of these tasks with the command used.
Table 4–1 Administrator Tasks
Task Command
Boot the operating system
software
boot
Change the default startup action set auto_action
Initialize the system init
Set the default operating system set os_type
Display the system configuration show config
Invoke the ARC console firmware arc
There are certain system management tasks that can only be
performed using the SRM console.
• The test command to test the system
• The show fru command (field replaceable unit) to examine
system bus options for errors
• To set or change certain environment variables such as enable
multiple CPUs or fast SCSI devices as an example
Note
For a complete SRM console command list with
explanatory information consult your Firmware Reference
Guide for the hardware platform required. For example,
AlphaServer 2000/2100, or DEC3000 M500.
4–6 Updating System Firmware
Firmware Systems
Advanced RISC
Computing
This console supports the architectural standard subscribed to
and required for the Windows NT operating system. Included
in the standards are requirements for system components,
subsystem interfaces, and the hardware abstraction layer.
Note that the ARC console provides the same basic services
defined in Figure 4-2 when the system is powered on or reset.
However the interface presented to the operating system and the
user interface is quite different.
• Operating system hooks are defined by the ARC standard.
• The console device must be a VGA graphics-compatible
terminal to support Windows NT.
• The user interface is menu based.
For example the boot menu ...
ARC Multiboot Alpha AXP Version n.nn
Copyright (c) 1993 Microsoft Corporation
Copyright (c) 1993 Digital Equipment Corporation
Boot menu:
Boot Windows NT
Boot an alternate operating system
Run a program
Supplementary menu ...
Use the arrow keys to select, then press Enter.
Table 4-2 illustrates the menu choices.
Updating System Firmware 4–7
Firmware Systems
Table 4–2 ARC Console Menu
Menu Selections
Boot Menu Functions Boot the default boot selection
Boot an alternative boot selection
Run a program
Access the supplementary menu
Supplementary Menu
Functions
Install new firmware
Install Microsoft Windows NT from a compact disc
Set up the system...
Display the hardware configuration
Return to the boot menu
Setup Menu Functions Set the system time
Set the default system partition
Configure the system floppy drives and keyboard
Manage the ARC boot selections
Set the system to boot automatically
Run the EISA configuration utility
Edit the system environment variables
Reset the system to factory defaults
Help
Switch to OpenVMS or UNIX console
Go to Supplementary menu, do not save changes...
Go to Supplementary menu, save changes...
Changing
Consoles
Since it is not possible to use one console for all combinations of
operating system and utility commands, it is necessary to change
from one console to another.
• Several commands, including the test command, are run from
the SRM console.
• The configuration utilities for the EISA (ECU) and RAID
(RCU) are run using the ARC menu interface.
Switching from SRM to ARC
>>> arc
Switching from ARC to SRM
1. From the Boot menu, select Supplementary menu
4–8 Updating System Firmware
Firmware Systems
2. From the Supplementary menu, select Set up the System ...
3. From the Setup menu, select Switch to OpenVMS or Digital
UNIX console.
4. Select your operating system console, then select the Setup
menu and press Enter
5. When the "Power-cycle the system to implement the change"
message is displayed, press the Reset button.
When the console system is loaded and the system is initialized,
the SRM console prompt
>>>
is displayed.
Firmware
Version
The operating system is dependent on the console system for
its interface to the hardware, and subsequent correct behavior.
Therefore it is critical to use the console system at the defined
revision level for the version of the operating system being used.
Actually there are three factors to consider when determining the
firmware version to use:
• Operating system type and version
• Firmware revision
• Hardware platform
So one starting point is found in the installation manual for
the operating system under consideration. For Digital UNIX
V4.0, consult the Digital UNIX Installation Guide Chapter 1,
Installation Overview and Preinstallation Tasks. Find the table
which lists the minimum firmware level for each Alpha system
type.
An alternative method is to use the Firmware Update Procedures
document associated with the hardware platform. This document
is on the firmware CD ROM and lists the firmware revision for
the platform with corresponding operating system versions which
it will support.
If your system is not at the minimum firmware level, you must
update the firmware prior to building the new operating system.
Update
Firmware
Process
Digital distributes console firmware whenever the operating
system is updated or as is required. To run Digital UNIX V4.0
your system might require a firmware update. Firmware updates
are found on the Alpha Systems Firmware CD–ROM compact disc
that is included with your Digital UNIX media kit.
The first step of the upgrade is to read the documentation
provided:
Updating System Firmware 4–9
Firmware Systems
1. The Alpha AXP Systems Firmware Update Release Notes
Overview describes how to mount the firmware CD–ROM and
print processor-specific firmware update instructions.
2. The xxxxx Systems Firmware Update Procedures document
specifies the detailed task required to perform the update.
Note
Replace "xxxxx" with the product name of your system.
A generic outline of the detailed tasks is presented in the
following table.
Table 4–3 DEC 2000 AXP Outline Example
Step Action Performed
Power on System If operating system is running, perform a shutdown
-h, then power cycle the platform
Update Operating System Type Set the flash write mode
Power Cycle the System Enable the flash part to receive the firmware load
Determine the CD–ROM Drive Find the device ID ... look for RRD in the device
name field
Load the Firmware Disc Inset the CD into the device
Boot from the CD–ROM Select Update from the menu
Update the System Enter the update command to write the new code to
the flash part
Verify the Checksum Enter the verify command to perform the checksum
Exit from the Firmware Update
Utility
Enter the exit command
Set up the Keyboard Use the set keyboard command
Power Cycle the System A new configuration is required since the old
EISA information was overwritten by the update
procedure; run the EISA Configuration utility
4–10 Updating System Firmware
Summary
Summary
Digital
Firmware
Systems
The firmware system is the layer that interfaces between the
hardware and the operating system. It also provides the console
functions to support the operating system and the low level
operator functions such as:
• Initialize, test, and prepare the system platform
• Provide boot options
• System control and monitoring
Digital firmware supports the following operating systems:
• Digital OpenVMS
• Digital UNIX
• Microsoft Windows NT
Architecture On Alpha systems, the console firmware system is loaded by
default when the platform is powered on. This system defines
three general areas of functionality for a given system:
• Hardware configuration and test
• User control
• Software bootstrap
SRM This is the architectural standard defined to support Digital
UNIX, OpenVMS, and ELX (VMS realtime system) operating
systems. It is used by the operating system to communicate with
the hardware control functions. SRM specifies the requirements
procedural tasks and the format of critical data structures.
ARC This console supports the architectural standard subscribed to
and required for the Windows NT operating system. Included
in the standards are requirements for system components,
subsystem interfaces, and the hardware abstraction layer.
Changing
Consoles
Since it is not possible to use one console for all combinations of
operating system and utility commands, it is necessary to change
from one console to another.
• Several commands, including the test command, are run from
the SRM console.
• The configuration utilities for the EISA (ECU) and RAID
(RCU) are run using the ARC menu interface.
Updating System Firmware 4–11
Summary
Firmware
Version
The operating system is dependent on the console system for
its interface to the hardware, and subsequent correct behavior.
Therefore it is critical to use the console system at the defined
revision level for the version of the operating system being used.
Actually there are three factors to be considered when
determining the firmware version to be used:
• Operating system type and version
• Firmware revision
• Hardware platform
4–12 Updating System Firmware
Exercises
Exercises
Validate
Version
1. Determine the firmware version currently running on your
system. Is it valid for use with Digital UNIX Version 4.0?
2. Planning and implementation of the next operating system
release requires a detailed configuration of the EISA devices
on your system. You must interrupt a normal multiuser
operating system to get the information.
Updating System Firmware 4–13
Solutions
Solutions
Validate
Version
1. These are the steps to determine the firmware version:
a. At the console prompt, type the command show version
b. Verify firmware version against Chapter 1 of the Digital
UNIX Installation Guide
2. These are the steps to obtain the configuration information:
a. shutdown -h +60 shutting down for 10 minutes
b. arc
c. Access the supplementary menu
d. Access the setup menu
e. Run the EISA configuration utility
f. Return to the supplementary menu without saving changes
g. Return to the boot menu
h. Boot the default selection
4–14 Updating System Firmware
5
Installing the System
Installing the System 5–1
About This Chapter
About This Chapter
Introduction This chapter discusses the decision making, planning, and
procedures that must be accomplished prior to actually initiating
installation of the operating system.
This chapter shows you how to invoke the new Common Desktop
Environment (CDE) installation process using the CDE GUI tool.
This chapter also describes the characteristics of both the
default and custom installation types and discusses how these
installations are performed.
Finally, this chapter describes how to perform an update
installation and how to make adjustments to files after completing
the update installation process.
Objectives To install the Digital UNIX operating system, you should be able
to:
• Plan and prepare for an installation
• Invoke the CDE windows setup procedure and demonstrate an
awareness of the tools and utilities offered under this option
• Perform an update installation
Resources For more information on the topics in this chapter, see the
following:
• Digital UNIX Installation Guide
• Digital UNIX Release Notes
• Digital UNIX Operating System Version 4.0 SPD
5–2 Installing the System
Preparing for an Installation
Preparing for an Installation
Overview This section discusses the characteristics of the default, custom,
and update installation procedures.
Depending on your needs, you can perform a default, a custom,
or an update installation. See the installation decision tree in
Chapter 1 of the Digital UNIX Installation Guide.
In addition to deciding on the installation type, you must
complete the following steps before starting any operating system
installation:
1. Always review the Release Notes. The Release Notes identify
any last-minute changes to the software.
2. See the Digital UNIX Operating System Version 4.0 to verify
that you have the hardware required for installation.
3. If you are installing on a working system, back up the system.
4. Inventory the contents of the software distribution kit.
5. Review your system hardware and the Digital UNIX
Installation Guide Chapter 1 documentation to determine if a
firmware upgrade is required.
6. If you are doing a custom installation of Digital UNIX,
plan your disk space. A complete list of all subset(s) and
corresponding space required can be found in Appendix E of
the Digital UNIX Installation Guide.
Installation
Media Types
Use the following distribution media for any of the installation
types.
• A CD–ROM optical disc
• Remote Installation Services (RIS)
Planning Disk
Space
Deciding between a Default and Custom installation is really a
matter of assessing your system assets (available memory and
disk space) and your installation requirements. A major part
of this process involves planning your disk space requirements.
This is thoroughly discussed in the Planning Disk Space chapter
of the Digital UNIX Installation Guide. This chapter provides
worksheets that help you:
• Identify available disks
• Plan the swap space
• Plan the /var area
• Plan the /usr file system
Installing the System 5–3
Preparing for an Installation
• Decide whether to use the default disk partition layout or the
existing disk partition layout, and change the partition layout,
if necessary.
Planning Swap
Space
The Digital UNIX Installation Guide suggests that the swap
space should be at least the size of the processor’s physical
memory. In practice, this is just not enough swap space. If you
have more that a few processes running, you will quickly run out
of swap space. You should allocate two to three times the size of
the processor’s physical memory for swap space. Since partition
sizes are specified in blocks, and there are 2048 blocks to 1 Mbyte,
if you have 32 Mbytes of physical memory, you would allocate:
32 x 2048= 65,536
x 2
------
131,072 Blocks allocated for swap space
Default
Installation
The default installation will automatically size the default disk
for the correct storage required and then performs the installation
in this manner:
• Provides by default the UFS file system layout
• Allocates 64 MB of disk space for the root file system on
partition a
• Allocates the b partition for dumps and swap space
• Allocates the g partition of the disk for the /usr and /var file
system
• Loads the mandatory software subsets
Select the default installation if you do not need to:
• Preserve custom partition tables or disklabels. Custom
partition tables are partition tables that have been changed to
sizes other that the default values.
• Allocate the /usr file system on a separate disk.
• Allocate a separate /var file system.
• Allocate a second swap space.
• Install optional software at this time.
If necessary, you can install additional software subsets after
the initial installation, by using the setld utility. See System
Administration for information on installing software subsets
after the installation.
5–4 Installing the System
Preparing for an Installation
Custom
Installation
With the custom installation, you can:
• Select the default disk partitions and the default file system
layout, or you can decide on which disks you want the file
systems to reside.
• Allocate disk space for the root file system.
• Choose to install some or all of the optional subsets. Make
sure there is enough disk space to install all optional subsets
in the /usr file system.
The mandatory subsets are automatically installed.
Choose the custom installation only if you need to perform any of
the following tasks:
• Preserve custom partition tables or disk labels
• Select file system layouts other than the defaults
• Allocate the /usr file system to a specific disk partition
• Allocate more than one swap area
• Allocate the /var area to the same disk partition as /usr or to
a different disk partition
• Add optional supported software subsets
Update
Installation
The update installation has the following characteristics:
• Preserves disk partitions
• Preserves file systems
• Leaves user files added to the system intact
• Merges user-customizations into protected system files
• Detects, logs, and saves unprotected user-customized system
files
• Detects and logs obsolete files
The update installation updates:
• All Version 3.2C mandatory and optional subsets installed on
the system.
• New Digital UNIX Version 4.0 mandatory subsets
Caution
Once you start an update installation, you cannot stop it.
If you do, you are likely to lose system files.
New Digital UNIX optional subsets must be added with the setld
utility after the installation update completes.
The old subset information in /usr/.smdb. gets deleted.
Installing the System 5–5
Preparing for an Installation
The update installation installs from either a CD–ROM or a RIS
server.
Hardware
Required for
Installation
Installation of the Digital UNIX operating system requires some
or all of the following hardware:
• Software distribution device corresponding with the software
distribution media. If you are installing from the RIS area,
see your server administrator for instructions.
• Ethernet for RIS installation
• System disk (required)
• Data disks (optional). In some cases, you do not need data
disks to install the Digital UNIX operating system. Note,
however, that if you perform a custom installation, you can
allocate certain file systems to a disk other than the system
disk.
• Console terminal (required): Use the console terminal
to communicate with the system during the installation.
Depending on the system configuration, you can perform the
installation at either a serial hardcopy terminal, a serial video
terminal, or at the console display if the system is a graphics
workstation.
Booting from
the Media
The initial boot to build the new system from the CD–ROM
distribution media requires you to use the CD–ROM disk. The
following command may be issued on the running system to
determine the correct device.
# file /dev/rrz*c
There is more than one type of device depending on the platform
type, but all devices will have a common component (RRD) and
device type component (xx).
RRDxx
Alternately you may identify the CD–ROM device when the
system is halted at the console prompt with the command
>>> sh device
The booting procedure varies according to the platform. Consult
the Digital UNIX Installation Guide Chapter 4 for the exact
procedure. Appendix A of the same guide provides the procedure
for mounting and unmounting the media.
You may also boot over the network from the Remote Installation
Server (RIS), again refer to Chapter 4 for instructions.
5–6 Installing the System
Common Desktop Installation
Common Desktop Installation
Overview This environment provides a windows-based graphical user
interface for the initial phases of an installation as well as system
management activities such as changing the root disk partition
layout prior to performing a custom installation.
Note that a graphic capable console is required. A character cell
interface is provided for character cell based consoles.
Figure 5–1 Initiating an Installation
Root:
Partition
Device
Name
FileSystem
Type
Disk
Type
Disk
Number
Controller
Type
Controller
Number
SetupDone ViewSoftware UNIXShell Help
Device,Partition,andFileSystemSelection:
PartitionDisks
InstallType: Date: − − (mm−dd−yy)Default
(hh:mm:24hrFormat)
SDI−DW−01−RGS
InstallationSetup
<Ret>
<Ret>
:
HostName:
RootPassword:
VerifyPassword:
Time:
Location:
TimeZone:
This installation setup window is automatically invoked after
booting from the installation media. Instructions are found in
Chapter 4 of the Installation Guide - Booting Your Processor or
Single-Board Computer.
Hint
Two pieces of information are needed to get started with
the boot: system type and the disk configuration. These
console commands can be used:
• show device displays disk info
Installing the System 5–7
Common Desktop Installation
• show config displays the system type
Common
Desktop
Environment
The common desktop environment is a new graphical user
based interface which also has an installation component. This
component is automatically invoked when the system is booted
from the distribution media in either of two methods:
• Using the CD–ROM media disk 1 of 3
• Using the remote installation (RIS) technique
When the system boots, the user first sees a Pop-up window
display as evidence of a successful boot.
Figure 5–2 Status Window
LoadingKeyboardMap.
.
.
ScanningSystemHardware
Pleasewait...
sdi−dw−04−rgs
Default
Installation
The next display is the installation setup window which sets the
desired installation parameters. The default type of installation
is automatically selected as the Default, as shown in the setup
window illustration. The user is required to enter only the
common setup parameters as noted previously.
At this point the installation manager will check that the
default disk has the required capacity to continue the default
configuration process. Next, the calculated values are displayed
for the device, partition, and file system selection parameters.
5–8 Installing the System
Common Desktop Installation
Figure 5–3 Default Parameters
Root:
Partition
Device
Name
FileSystem
Type
Disk
Type
Disk Controller
Number Type
Controller
Number
SetupDone ViewSoftware UNIXShell Help
Device,Partition,andFileSystemSelection:
PartitionDisks
InstallType: Date: − − (mm−dd−yy)Default
(hh:mm:24hrFormat)
sdi−dw−02−rgs
InstallationSetup
<Ret>
<Ret>
:
HostName:
RootPassword:
VerifyPassword:
Time:
Location:
TimeZone:
rz0 UFS rz25 0 SCSI 0a
Common Setup
Features
Regardless of the type of installation selected, a common set of
parameters are required:
• Host Name
• Root Password
• Verify Password
• Date
• Time
• Location
• Time Zone
Since all parameters are now defined by the user and the default
configuration process, the user may now click the Setup Done
button to continue the automatic configuration of the system. A
Pop-up window appears where the user is prompted to start the
installation by clicking OK.
Installing the System 5–9
Common Desktop Installation
Figure 5–4 Ready, Set, Go
ReadyToBeginInstallation
OK
sdi−dw−03−rgs
Installation now begins and the following tasks are performed:
1. File System Creation
Note
The file systems are created for root, usr, var and swap1.
2. Loading Software Subsets
Note
The mandatory software subsets are loaded onto the
new file systems. You will see "Loading 1 of x subset(s)".
This task may take from 45 to 120 minutes depending
on distribution media and processor type; completion
is signaled by the message "x of x subset(s) installed
successfully".
3. Rebooting the System
When the system halts, enter the displayed variables at the
console prompt to reboot from the newly installed disk.
Note
The system displays the new boot information on the
console.
>>> set boot osflags A
>>> set bootdef_dev DKA0 (the disk just installed)
>>> boot
At this point the automatic system build begins:
• System Configuration - This task begins the process of
tailoring the software subsets for use by the operating system
5–10 Installing the System
Common Desktop Installation
and the hardware. Console messages are displayed as each
subset is processed.
• Kernel Build - The kernel is now built automatically and the
user is then prompted to boot the new operating system.
Custom
Installation
A custom installation is warranted when the disks, partitions, file
systems, and software to be loaded require tailoring.
Note that the common parameters described in the previous
Default Installation section, also apply in this case. So we will
begin discussion with the parameters needed to provide the
desired customizations.
First we consider the setup of the disks.
Figure 5–5 Custom Installation
Root:
Partition
Device
Name
FileSystem Disk
TypeType
Disk Controller
Number
Controller
NumberType
Device,Partition,andFileSystemSelection:
InstallType:
Date: − − (mm−dd−yy)Custom
(hh:mm:24hrFormat)
sdi−dw−05−rgs
InstallationSetup
<Ret>
<Ret>
:
Usr:
Var:
Swap1:
Swap2:
HostName:
RootPassword:
VerifyPassword:
Time:
Location:
TimeZone:
SetupDone ViewSoftware UNIXShell HelpPartitionDisks
rz0
rz0
In/Usr
rz0
rz1
a
g
b
b
UFS
UFS
UFS
UFS
rz25
rz25
rz25
rz25
0
0
0
1
SCSI
SCSI
SCSI
SCSI
0
0
0
0
To enable the custom menus, click Custom in the Install Type:
entry field. This causes the display to change so that all variables
are displayed.
Installing the System 5–11
Common Desktop Installation
• Root
• Usr
• Var
• Swap1
• Swap2
Simply key in the desired parameters for each category. For
information on planning considerations, see Chapter 3 of the
Installation Guide.
View Software Click the View Software button to display the Software Selection
window. The user can examine the mandatory and optional
software subsets, and also select the optional subsets to be
loaded.
Figure 5–6 Selecting Software
sdi−dw−swsel.eps
Software Selection
Help
Remove All
OK Cancel
Add All
Remove
Add
Available Software:
Selected Software::
File System Status:
General Applications
Additional Terminfo Databases
root: 28.1 MB free usr: 298 MB free
Computer Aided System Tutor
var:
DOS Tools
free
GNU Emacs
− Required −
(MANDATORY) Base System
(MANDATORY) Base System − Hardware Support
General Applications
Local Area Transport (LAT)
(MANDATORY) Tcl Commands
5–12 Installing the System
Common Desktop Installation
Installation is enhanced by using this new graphic technique
to display the software subsets which are mandatory as well
as optional. Note the (MANDATORY) subset indicator in the
Selected Software list box. Optional software is shown in the
Available Software list box. To select optional software:
1. Select the software subset from the Available Software list
box.
2. Click the Add button.
Optionally you may add all of the optional software. Note that
the Remove All button will remove all the optional software, but
not the mandatory software.
Particularly useful is the File System Status area. Root and usr
file system available space is automatically recalculated for each
software subset when it is added. If the file system free space is
consumed, you may remove specific subsets or cancel the selection
entirely. The Cancel button will place you back at the Installation
Setup window where you may change the disk and partition
parameters to store the required software.
Partition Disks Clicking the Partition Disks button displays a window in which
the partitions of a disk can be viewed or altered. Note that this
is a CDE version of the disklabel program to manage disks.
The CDE interface allows you to navigate, view and alter disk
partitions using the mouse versus the disklabel program where
you enter commands and options.
Installing the System 5–13
Common Desktop Installation
Figure 5–7 Disk Parameters
Root:
Partition
Device
Name
FileSystem Disk
TypeType
Disk Controller
Number
Controller
NumberType
Device,Partition,andFileSystemSelection:
InstallType:
Date: − − (mm−dd−yy)Custom
(hh:mm:24hrFormat)
sdi−dw−05−rgs
InstallationSetup
<Ret>
<Ret>
:
Usr:
Var:
Swap1:
Swap2:
HostName:
RootPassword:
VerifyPassword:
Time:
Location:
TimeZone:
SetupDone ViewSoftware UNIXShell HelpPartitionDisks
rz0
rz0
In/Usr
rz0
rz1
a
g
b
b
UFS
UFS
UFS
UFS
rz25
rz25
rz25
rz25
0
0
0
1
SCSI
SCSI
SCSI
SCSI
0
0
0
0
Partitions may be modified using the GUI-based window shown
here. All the necessary parameters are displayed for the user.
5–14 Installing the System
Common Desktop Installation
Figure 5–8 Configure Partitions
UNIX Shell Clicking the UNIX Shell button in the Installation Setup
window places the system in single user mode with superuser
privileges. This option is provided for experienced UNIX
system administrators who want to perform file system or disk
maintenance tasks prior to the installation. The capabilities of
the shell are:
• Edit a file using ed or vi text editors.
• Create new file systems.
• Restore file systems.
• Modify partition tables.
• Mount other disks and file systems.
• Repair UFS file systems.
Refer to Chapter 7 of the Installation Guide for commands and
operational procedures for maintenance tasks.
Creating the
Operating
System
When you have configured the disks, partitions, and file systems,
as well as the section of optional software to load, you are now
ready to begin the installation by clicking Setup Done. The
following example continues the custom installation, loading
only the mandatory software subsets and illustrates the console
output.
Installing the System 5–15
Common Desktop Installation
Example 5–1 Creating the Operating System
*** Creating the root file system on device rz3a ***
*** Creating the usr file system on device rz3g ***
*** Creating the var file system on device rz3h ***
*** Creating the swap1 file system on device rz2b ***
*** Loading the operating system software subsets ***
The installation procedure will now load the software on your
disk partitions. This process will take from 45 to 120 minutes
to complete depending on your distribution media and processor type.
Checking file system space required to install specified subsets:
Working....Tue Mar 28 17:08:46 EST 1995
File system space checked OK.
29 subset(s) will be installed.
Loading 1 of 29 subset(s)....
Base System
Copying from /ALPHA/BASE (disk)
Working....Tue Mar 28 17:09:02 EST 1995
Working....Tue Mar 28 17:11:04 EST 1995
Working....Tue Mar 28 17:13:06 EST 1995
Working....Tue Mar 28 17:15:08 EST 1995
Working....Tue Mar 28 17:17:09 EST 1995
Verifying
Working....Tue Mar 28 17:18:46 EST 1995
Loading 2 of 29 subset(s)....
Base System - Hardware Support
Copying from /ALPHA/BASE (disk)
Working....Tue Mar 28 17:19:44 EST 1995
Verifying
.
.
.
Loading 29 of 29 subset(s)....
Graphical Print Configuration Application
Copying from /ALPHA/BASE (disk)
Verifying
29 of 29 subset(s) installed successfully.
Install start: Tue Mar 28 17:04:10 EST 1995
Install finish: Tue Mar 28 18:08:09 EST 1995
Issue the following console commands to set your default bootpath variable
and to boot your system disk to multiuser:
>>> set boot_osflags A
>>> set bootdef_dev "DKA300"
>>> boot
Booting the
New Operating
System
At this point the new operating system has been built with the
parameters listed on the console output in the previous example.
You must enter the boot parameters and boot the new system.
5–16 Installing the System
Common Desktop Installation
Kernel
Configuration
After the new system is booted, the kernel configuration and build
procedure begins. You will be prompted to select kernel options.
-------------------------------------------------------------------------
%IT START% Thu Feb 29 12:55:40 EST 1996
-------------------------------------------------------------------------
swapon: /dev/rz3b: already a swap device
swapon: adding /dev/rz3b as swap device.
*** SYSTEM CONFIGURATION ***
Configuring "Base System " (OSFBASE400)
Configuring "Base System - Hardware Support " (OSFHWBASE400)
Configuring "Compiler Back End " (OSFCMPLRS400)
Configuring "Kernel Header and Common Files " (OSFBINCOM400)
Configuring "Standard Kernel Modules " (OSFBIN400)
Configuring "Hardware Kernel Header and Common Files" (OSFHWBINCOM400)
Configuring "Hardware Kernel Modules " (OSFHWBIN400)
Configuring "Basic Networking Services " (OSFCLINET400)
.
.
.
Configuring "Graphical System Administration Utilities" (OSFXADMIN400)
Configuring "Graphical Print Configuration Application" (OSFXPRINT400)
Configuring "Ref Pages: Admin/User " (OSFMANOS400)
Configuring "Ref Pages: Windows Admin/User " (OSFMANWOS400)
Configuring "Ref Pages: Realtime " (OSFMANRT400)
Configuring "Ref Pages: Programming " (OSFMANOP400)
Configuring "Ref Pages: Windows Programming " (OSFMANWOP400)
Configuring "Ref Pages: CDE Development " (OSFCDEMANOP400)
Configuring "Ref Pages: CDE Admin/User " (OSFCDEMANOS400)
The system name assigned to your machine is ’vrroom’.
*** KERNEL CONFIGURATION AND BUILD PROCEDURE ***
*** KERNEL OPTION SELECTION ***
Installing the System 5–17
Common Desktop Installation
Selection Kernel Option
--------------------------------------------------------------
1 System V Devices
2 Logical Volume Manager (LVM)
3 NTP V3 Kernel Phase Lock Loop (NTP_TIME)
4 Kernel Breakpoint Debugger (KDEBUG)
5 Packetfilter driver (PACKETFILTER)
6 Point-to-Point Protocol (PPP)
7 STREAMS pckt module (PCKT)
8 X/Open Transport Interface (XTISO, TIMOD, TIRDWR)
9 File on File File System (FFM)
10 ISO 9660 Compact Disc File System (CDFS)
11 Audit Subsystem
12 ACL Subsystem
13 All of the above
14 None of the above
15 Help
--------------------------------------------------------------
Enter the selection number for each kernel option you want.
For example, 1 3 [14]: 6
You selected the following kernel options:
Point-to-Point Protocol (PPP)
Is that correct? (y/n) [y]: y
Do you want to edit the configuration file? (y/n) [n]:
The system will now automatically build a kernel
and then reboot. This will take approximately 15
minutes, depending on the processor type.
When the login prompt appears after the system
has rebooted, use ’root’ as the login name and
the SUPERUSER password that was entered during
this procedure, to log into the system.
*** PERFORMING KERNEL BUILD ***
Working....Thu Feb 29 13:01:10 EST 1996
Working....Thu Feb 29 13:03:11 EST 1996
Error opening license database /var/adm/lmf/ldb
lmf: No such file or directory
-------------------------------------------------------------------------
%IT STOP% Thu Feb 29 12:55:40 EST 1996
-------------------------------------------------------------------------
Post
Installation
Login and
Setup
When you log in to the system (with graphics capability) for the
first time, the CDE login window is displayed. Enter root as
the username and then enter the root password specified at the
beginning of the installation. The display window created has
four components:
• A Help Viewer window, Introducing the Desktop
• A Pop-up window labeled: Action Required
5–18 Installing the System
Common Desktop Installation
• A post-install Configuration Checklist window
• The CDE Front Panel appears at the bottom of your screen
Note
These components are explained in Chapter 6 of the
Digital UNIX Installation Guide.
The catman command creates formatted versions of the online
reference pages and creates the source files for the whatis
database. By invoking the catman command, you will improve the
performance of viewing reference pages and will keep the whatis
database up-to-date. The apropos command also uses the whatis
database to display appropriate commands. See the catman(8) for
more information on how to use the command.
Installing the System 5–19
Performing an Update Installation
Performing an Update Installation
Overview The update installation is for Alpha systems running Digital
UNIX Version V3.2C or later. This upgrade installation process
will also be used in future releases of the operating system.
You can initiate an update installation by running the
installupdate utility. Before you run this utility, there are a
number of conditions and restrictions you need to be aware of:
• Your current system must be running Digital UNIX Version
3.2C or later.
• You have upgraded your firmware appropriately.
• There can be no changes of symbolic links to directories
or conversely, no location changes of directories that have
symbolic links.
• Certain layered products will cause the update installation to
quit. You need to remove these layered products before doing
an update installation:
DECnet
Internationalization
Open 3D
• You must have enough disk space.
Update Install
File Types
You need to be aware of the file types that the update installation
utility works with during and after the software is installed. The
file types are:
• Protected Customized System Files
• Version 3.2C system files that are automatically merged with
Version 4.0
• File prefix is .new..filename. The .mrg..filename is used to
perform protected system file merges.
• Any customizations you have made to V3.2C versions of
protected system files are merged with Version 4.0.
• Unprotected Customized System Files
Version 3.2C files that are not merged with Version 4.0
files.
These files are saved with the extension .PreUPD.
File names get stored in /var/adm/smlogs
/upd_custom_files.
5–20 Installing the System
Performing an Update Installation
You must manually merge file customizations. To perform
administrative tasks on these files, use the updadmin utility.
• Obsolete System Files
System files no longer shipped with operating system.
File names stored in /var/adm/smlogs/upd_obsolete_files.
Characteristics
of an Update
Installation
The update installation has the following characteristics:
• Preserves disk partitions
• Preserves file systems
• Leaves user files added to the system intact
• Merges user-customizations into protected system files
• Detects, logs, and saves unprotected user-customized system
files
• Detects and logs obsolete files
The update installation updates:
• All Version 3.2C mandatory and optional subsets installed on
the system.
• New Digital UNIX Version 4.0 mandatory subsets
Caution
Once you start an update installation, you cannot stop it.
If you do, you are likely to lose system files.
New Digital UNIX optional subsets must be added with the setld
utility after the installation update completes.
The old subset information in /usr/.smdb. gets deleted.
The update installation installs from either a CD–ROM or a RIS
server.
Update
Installation
Procedure
An update installation creates the log file:
/var/adm/smlogs/update.log
The example shows a /var/adm/smlogs/update.log.
Example 5–2 Update Installation Log
#shutdown +5 Performing Update Installation 1
#swapon -e 2
#bcheckrc 3
#/sbin/installupdate /dev/rz4c
or 4
#/sbin/installupdate /cdmnt
(continued on next page)
Installing the System 5–21
Performing an Update Installation
Example 5–2 (Cont.) Update Installation Log
Working....Mon Feb 28 15:01:22 EST 1994
The Digital UNIX 4.0 Update Installation will update the
following Digital UNIX products:
Digital UNIX V3.2C
Digital Equipment Corporation recommends that you perform complete
system software backups before proceeding.
Press RETURN to review message again.
Do you want to continue the update installation? (y/n) []:y 5
****** Checking current state of system
Depending on the system configuration, this may take
up to 20 minutes...
Working....Mon Feb 28 15:04:02 EST 1994
Working....Mon Feb 28 15:06:02 EST 1994
Working....Mon Feb 28 15:08:02 EST 1994
Working....Mon Feb 28 15:12:02 EST 1994
Working....Mon Feb 28 15:15:02 EST 1994
Working....Mon Feb 28 15:18:02 EST 1994
Unprotected customized system files have been found on
this system and have been saved to ’filename.PreUPD’.
A listing of the files has been logged in
/var/adm/smlogs/upd_custom_files. 6
After the update installation has completed, use the
Update Administration Utility (/usr/sbin/updadmin)
to perform system administration tasks on these files.
****** Updating system to Digital UNIX V4.0
Working....Mon Feb 28 15:23:02 EST 1994
Base System
Copying from /dev/rz4c
Working....Mon Feb 28 15:26:11 EST 1994
Verifying
Working....Mon Feb 28 15:28:02 EST 1994
Base System - Hardware Support
Copying from /dev/rz4c
Working....Mon Feb 28 15:33:19 EST 1994
Verifying
Working....Mon Feb 28 15:35:02 EST 1994
Compiler Backend
Copying from /dev/rz4c
Working....Mon Feb 28 15:36:19 EST 1994
Verifying
Working....Mon Feb 28 15:37:02 EST 1994
Kernel Header and Common Files
Copying from /dev/rz4c
Working....Mon Feb 28 15:38:19 EST 1994
Verifying
Working....Mon Feb 28 15:38:59 EST 1994
(continued on next page)
5–22 Installing the System
Performing an Update Installation
Example 5–2 (Cont.) Update Installation Log
Standard Kernel Objects
Copying from /dev/rz4c
Working....Mon Feb 28 15:40:09 EST 1994
Verifying
Working....Mon Feb 28 15:41:12 EST 1994
Hardware Kernel Objects
Copying from /dev/rz4c
Working....Mon Feb 28 15:42:29 EST 1994
Verifying
Working....Mon Feb 28 15:43:22 EST 1994
Basic Networking Services
Copying from /dev/rz4c
Working....Mon Feb 28 15:44:23 EST 1994
Verifying
Working....Mon Feb 28 15:46:11 EST 1994
X Servers
Copying from /dev/rz4c
Working....Mon Feb 28 15:47:17 EST 1994
Verifying
Working....Mon Feb 28 15:49:19 EST 1994
Basic X Environment
Copying from /dev/rz4c
Working....Mon Feb 28 15:51:33 EST 1994
Verifying
Working....Mon Feb 28 15:55:24 EST 1994
.
. 7
.
CDA(tm) for X/Motif Development
Copying from /dev/rz4c
Verifying
*** Merging new file ./.new..DXsession into
existing ./.proto..DXsession
Merge completed successfully
*** Merging new file ./etc/.new..gettydefs into
existing ./etc/.proto..gettydefs
*** Merging new file ./etc/.new..securettys into
existing ./etc/.proto..securettys
Merge completed successfully
*** Merging new file ./usr/share/lib/.new..termcap into
existing ./usr/share/lib/.proto..termcap
.
.
.
Merge completed successfully.
Update Installation complete.
rebooting system... 8
1 Shut the system down to single user mode.
Installing the System 5–23
Performing an Update Installation
2 Start system swapping.
3 Mount the local file systems. If you already have a mount
instruction in your /etc/fstab file, you can skip this step.
4 Invoke the installupdate utility. Two ways are shown in the
procedure; one using the CD–ROM device, and another using
a CD–ROM mount point. See the Digital UNIX Installation
Guide for additional instructions to install from a RIS server.
5 The utility displays a reminder to back up your system and
asks you if you want to continue.
6 The utility notes unprotected customized system files
(*.PreUPD files) and logs their names in the /var/adm/smlogs
/upd_custom_files.
7 Partial listing to save paper.
8 The utility sends an Update Installation complete message
and reboots the system.
The installupdate program next runs the IT utility to upgrade
the configuration as described in the /var/adm/smlogs/it.log.
Review the /var/adm/smlogs/it.log sample in the Digital UNIX
Installation Guide. Because the system name, date and time
have been specified in a previous installation, the IT utility skips
these configuration questions and begins configuring the software
immediately.
Update
Administration
Utility
The Update Administration utility enables you to manage:
• Protected system files
• Unprotected system files
• Obsolete files
You can save, delete, or view any of these file types.
If you choose to save files, the updadmin utility lets you save files
to a directory on disk, to a tar image on disk, or to a tape media
device. Review the updadmin utility in the Performing and Update
Installation chapter of the Digital UNIX Installation Guide.
Run the Update Administration utility after the update
installation configuration event has occurred. The command you
enter is:
#/usr/sbin/updadmin
upadmin Main
Menu
The utility displays a main menu:
Update Administration Utility Main Menu
---------------------------------------
c) Update Customized File Administration
o) Obsolete System File Administration
P) PreMRG File Administration
x) Exit this utility:
5–24 Installing the System
Performing an Update Installation
You can save, delete, or view any of these three file types.
If you decide to save files, the utility lets you save files to a
directory on a disk, to a tar image on a disk, or to a tape media
device.
If you decide to delete files, the utility checks to see if you have
saved the files. If you have not saved the files, the utility gives
you the option to save the files before deleting them.
The view option displays information on each file based on the
type of file administration you are performing.
Customized
System File
Admin Menu
If you choose to manage Unprotected Customized System files,
updadmin displays a short message and the menu:
Unprotected Customized System File Admin Menu
---------------------------------------------
s) Save files
d) Delete files
v) View list of files
x) Return to previous menu
Enter your choice:
The other file type choices yield a different message, but similar
menu items.
Saving, deleting, and viewing the various file types is discussed
further.
Saving Files If you choose the Save Files menu option (s), updadmin displays
the menu:
Select a method of archiving your files:
---------------------------------------
d) Save files to directory on disk
i) Save files to tar image on disk
t) Save files to tape media device
Enter your choice from the menu above, or press RETURN
to go back to the previous menu:
If you choose d, the updadmin utility prompts:
Enter the directory that you want to use to back up customized
files, or press RETURN to go back to the previous
menu:
If you choose i, the updadmin utility prompts:
Enter the name of the tar file that you want to use to back up
customized files, or press RETURN to go back to the previous
menu:
Installing the System 5–25
Performing an Update Installation
If you choose t, the updadmin utility prompts:
Enter the name of the tape backup device (for example: /dev/nrmt0h)
that you want to use to back up customized files, or press RETURN
to go back to the previous menu:
Deleting Files If you choose d from the File Admin menu to delete files, updadmin
looks to see if the files were backed up. If they were not, it
displays a message similar to:
==================================================================
Back up customized files not detected.
If you have not backed up the customized files yet, please do so at
this time by answering ’no’ to the question below and selecting the
’s’ option from the previous menu:
===================================================================
Please confirm your intent to delete customized system files
from the system. [y/n]:
Viewing Files The view option displays a list of files based on your updadmin
main menu selection. If you choose to display Unprotected
Customized files, updadmin lists files by Digital UNIX subset name
similar to:
============================================
== Unprotected Customized OSFBASE Files
============================================
./usr/sbin/setup.PreUPD (DELETED FROM SYSTEM)
./etc/zoneinfo/Australia/South.PreUPD (DELETED FROM SYSTEM)
=============================================
== Unprotected Customized OSFINET Files
=============================================
./usr/sbin/screend.PreUPD (DELETED FROM SYSTEM)
./usr/named.PreUPD (DELETED FROM SYSTEM)
Enter ’r’ to review files again, or press RETURN to go back
to the previous menu:
5–26 Installing the System
Summary
Summary
Preparing for
an Installation
Depending upon your needs, you can perform a default, custom,
or an update installation.
Digital UNIX Installation Guide, Planning Your Disk Space
chapter provides worksheets that help you:
• Identify available disks
• Plan the swap space
• Plan the var area
• Plan the /usr file system
• Decide whether to use the default disk partition layout or the
existing disk partition layout, and change the partition layout
if necessary
The default installation provides a default file system layout
and loads the mandatory software subsets. With the custom
installation you can select the disk partitions and you can
choose to install some or all of the optional subsets. The update
installation updates a previous version of the operating system
without having to restore system files.
Installation
Setup
A new installation environment (CDE) supports the initial phases
of an installation as well as system management activities such
as changing the disk partition layout prior to performing a custom
installation.
Performing
an Update
Installation
With the update installation:
• You can update a Digital UNIX Version 3.2C or later system
to a V4.0 system without having to restore system files using
the updateinstall utility.
• You can save, delete, and view system files using the updadmin
utility.
Installing the System 5–27
Exercises
Exercises
Installation Perform a custom installation with the following requirements:
1. Calculate the storage required for the mandatory subsets plus
10% for optional subsets that may be required in the future.
2. Configure the root disk and partition and an alternate swap
area.
3. Place the /var and /usr file systems on different disks. All file
systems are to be UFS.
4. Install the reference pages.
5–28 Installing the System
Solutions
Solutions
Installation 1. Calculate the storage required for the mandatory subsets and
optional subsets that may be required in the future.
Appendix E in the Installation Guide lists the storage
requirements.
Note
Refer to the Custom Installation section for the next three
requirements.
2. Configure the root disk and partition and an alternate swap
area.
3. Place the /var and /usr file systems on different disks.
4. All file systems are to be UFS.
Installing the System 5–29
6
Connecting to the Network
Connecting to the Network 6–1
About This Chapter
About This Chapter
Introduction This chapter shows how to connect your system to a local area
TCP/IP network using CDE Network Configuration Manager.
Objectives To start a UNIX system network, you should be able to:
• Describe UNIX networking
• Describe how a gateway connects two networks
• Describe Internet addressing
• Describe subnetwork addresses
• Identify the purpose of the main files used by the TCP/IP
network
• Set up a TCP/IP network using CDE
Resources For more information on the topics in this chapter, see the
following:
• Request for Comment (RFCs) available by anonymous FTP
from ftp.nisc.sri.com rfc/rfc####.txt or by electronic mail to
mail-server@nisc.sri.com
RFC 1118, E. Krol, "The Hitchhikers Guide to the
Internet," September 1989
RFC 1011, J. Reynolds and J. Postel, "Official Internet
Protocols," May 1987
RFC 1206, G. Malkin and A. Marine, "FYI on Questions
and Answers: Answers to Commonly Asked New Internet
User Questions," February 1991
RFC 1208, O. Jacobsen and D. Lynch, "Glossary of
Networking Terms," March 1991
• Digital UNIX Network Administration
• Internetworking with TCP/IP, Volume I
• UNIX System Administration Handbook, Chapter 14
• Digital UNIX Reference Pages
6–2 Connecting to the Network
Introducing UNIX Networking
Introducing UNIX Networking
Overview A network is a group of computer systems connected by
hardware and software to exchange information and share
resources. The communication is governed by a set of rules, or
protocol. Different sets of protocols define different types of
networks.
The first UNIX network application was UUCP, the UNIX to
UNIX copy program, developed in the mid 1970s. UUCP, a
batch-processing/spooling system, is typically used between
systems with dial-up telephone lines or direct serial lines. UUCP
is still in widespread use today.
The TCP/IP suite of network protocols was developed on BSD
UNIX in the early 1980s. Provided with 4.2 BSD, this networking
system became very popular. The TCP/IP protocol suite has been
ported to some other operating systems. Extensive research has
been done, not only on communicating in local networks, but also
across internetworks, connecting separate networks.
The DECnet network offers an alternative to the TCP/IP network
for systems with DECnet software. It offers the same basic
functionality as the TCP/IP network, that is, remote login, file
transfer, electronic mail, and task-to-task communication.
There are a number of network services for sharing resources or
data around a network. Some of these include:
• NFS — A network file system allowing transparent file access
over TCP/IP networks
• NIS — A distributed database lookup service for a local
TCP/IP network
• Internet Domain Name Service — A host name and address
lookup service for the Internet network
• DMS — Dataless Management Services utility on Digital
UNIX server systems provides software for workstations to
share
• RIS — Remote Installation Services utility on Digital UNIX
systems provides software installation over the network
UNIX
Networking
A common way for processes to communicate with each other is
to use a client-server model. One process, the client, requests
services from the other process, the server.
Figure 6–1 illustrates how messages get exchanged from a client
to a server.
Connecting to the Network 6–3
Introducing UNIX Networking
Figure 6–1 Exchanging a Message on a UNIX Network
Client
Program
Server
Program
Message
Protocol
ZKOX−055000098−02−RGS
Host Host
Network
Each computer system on the network is called a host. Every
host has a unique name and network address. Each host has an
interface, or controller, connecting it to the network.
There are two types of communication:
• Connection-oriented—Uses virtual circuits for transmission.
Virtual circuits provide an apparent direct communication line
between two processes. Connection-oriented services include
automatic sequencing, error control, and flow control.
• Connectionless—Uses datagrams for transmission. Each
datagram is an independent message. Connectionless service
is transaction-oriented, and delivery and duplication protection
are not usually guaranteed.
For two processes to communicate there have to be rules covering
how processes are supposed to interact, to send messages to each
other. A protocol is a set of rules defining how data is sent over
a network.
Some of the tasks performed by protocols:
• Error detection—implemented by checksums, sequence
numbers, acknowledgments, and timers
• Error elimination (reliability)—implemented by retransmission
of packets or correction methods, for example, Hamming code
• Flow control—implemented by receive windows,
acknowledgments
• Addressing—implemented by address fields, passed with the
data
Popular technologies for connecting computers include Ethernet,
token ring, and Fiber Distributed Data Interface (FDDI).
6–4 Connecting to the Network
Introducing Internet Gateways
Introducing Internet Gateways
Gateway
Connects
Networks
Two distinct networks are connected by a gateway that is
attached to both networks. The gateway passes information from
one network to the other.
The gateway may be a simple device to copy data from one side
to the other, such as a repeater or bridge. A repeater is a
hardware device that connects Ethernet cable sections to extend
the local area network. It passes all data packets to the other
side. A bridge is a device that connects Ethernet cable sections
to extend the local area network. It scans each data packet to see
if it should be forwarded to the other side. Bridges and repeaters
extend a local network, rather than connecting separate networks.
A bridge is an intelligent repeater; a bridge can decide whether to
pass packets to the other side.
The gateway may be more sophisticated and examine the data
to decide if it should be forwarded, such as a router. A router
connects two logical networks; a router can decide how to pass
packets to a nonadjacent network. A router is what we usually
mean by a gateway on a UNIX network. Note that if a computer
system is a gateway, it must have more than one network
interface.
The gateway may perform data format conversions if the two
networks it connects use different protocols.
The figure shows host 3 as a gateway connecting two networks.
Figure 6–2 Gateway Connecting Two Networks
Host 1 Host 2
Host 4
Host 3
Host 5
Network 1
Network 2
Gateway
ZKOX−060000065−04−RGS
Connecting to the Network 6–5
Using Internet Addressing
Using Internet Addressing
Overview Every network interface must have a unique address. For one
process to contact another, it must know, or be able to find out,
the other’s address.
There are several layers of addresses.
Lower layer protocols may use an address. For example, Ethernet
uses a 48-bit address fixed in the hardware of each network
interface. The IEEE assigns ranges of numbers to manufacturers
of Ethernet controllers to control the uniqueness of the addresses.
The IP protocol layer uses ARP to convert an Internet address to
an Ethernet address.
Internet
Addresses
The IP protocol defines a 32-bit address. This is normally written
as four numbers separated by periods, with each representing 8
bits of the address, for example, 128.30.0.99.
The address is divided logically in two parts, as shown in the
following table.
Table 6–1 Parts of an Internet Address
Part Description
Network
number
Must be the same for all hosts connected to the
same network. No two networks can have the
same number if they are connected in any way, for
example, by a gateway or cable.
Host number No two hosts on the same network can have the
same number.
Network numbers are assigned by the Network Information
Center (NIC) to control uniqueness. Host numbers are assigned
by the local network manager.
To contact the NIC:
• Toll-free telephone number in the US: (800) 235-3155
• Electronic mail: hostmaster@nic.ddn.mil
The designers of the Internet wanted to limit the length of the
address while allowing a maximum number of users. Therefore,
the address space is partitioned for different types of networks:
• Class A networks use the first 8 bits for the network number
and the remaining 24 bits for the host number. This allows a
few networks with a lot of hosts.
• Class B networks use the first 16 bits for the network number
and the remaining 16 bits for the host number.
6–6 Connecting to the Network
Using Internet Addressing
• Class C networks use the first 24 bits for the network number
and the remaining 8 bits host number. This allows a lot of
networks with up to 254 hosts.
• Class D is a special set of addresses used for multicasting.
Host numbers of all zeros or all ones are reserved for broadcast
addresses.
The IP header will contain the source and destination Internet
addresses.
Very few networks are large enough to require Class A addresses.
Digital Equipment Corp. has a Class A address, and uses
subnetworks to manage groups of hosts.
Internet
Address
Classes
The following figure shows the Internet address classes.
Figure 6–3 Internet Address Classes
Type X . X . X . X
Reserved
Class A
Reserved
Class D
Class B
Class C
0
1−126
127
128−191 . 1−254
192−223 . 1−254 . 1−254
224−239
Host
Host
Host
Reserved 240−255
ZKOX−060000065−06−RGS
Network number 127 is reserved for the local loopback address.
Address 255.255.255.255 is a global broadcast address
Sample
Internet
Addresses
The following table shows some sample addresses.
Internet Address Class Network Number Host Number
16.126.16.250 A 16 126.16.250
130.180.23.45 B 130.180 23.45
195.100.78.50 C 195.100.78 50
Users prefer to use a host name, such as tinker, rather than
remember the Internet address. Each host on the network has
access to a hosts database to convert host names to Internet
addresses. It may be a file, such as /etc/hosts, or a name service,
such as the Internet Domain Name Service.
Connecting to the Network 6–7
Using Internet Addressing
Ethernet
Addresses
An Ethernet address can be determined on a local network
by using the ARP protocol. This checks an internal table or
broadcasts the Internet address to the local network and waits for
the host with that address or a local ARP server to reply with the
Ethernet address.
6–8 Connecting to the Network
Using Subnetwork Addresses
Using Subnetwork Addresses
Overview Subnetworks allow you to divide a large network into smaller
logical groups.
Part of the host address is designated as the subnet number.
Figure 6–4 shows how an address is divided up.
Figure 6–4 Subnet Address
Network Address Subnet Address Host Address
Internet
Network address Internet Host Address
ZKOX−060000065−07−RGS
The subnet number is usually the first octet of the host number.
Class C networks do not usually use subnets; they have only 8
bits for the host number.
Routing from outside your network does not change; you are still
viewed as one network. It is only within your network that you
see separate networks.
Subnetworks Figure 6–5 shows the Class B network 128.12 with two subnets.
Note in the figure that Host 3 is a gateway; it has one interface
on each subnetwork.
Connecting to the Network 6–9
Using Subnetwork Addresses
Figure 6–5 Subnetworks
Host 1 Host 2
Host 4
Host 3
Host 5
ZKOX−060000065−08−RGS
Subnet 128.12.5
Subnet 128.12.7
128.12.5.1
128.12.7.1
128.12.5.2 128.12.5.3
128.12.7.2 128.12.7.3
A netmask is used to indicate the network and subnetwork
address parts of the Internet address. The netmask is 32 bits,
the same as the Internet address. Each bit in the netmask with
a value 1 indicates the corresponding bit in the Internet address
is part of the network or subnetwork address; each 0 bit indicates
the corresponding bit in the address is part of the host number.
Address 128.12.5.2 with netmask 255.255.255.0 indicates host
number 2 has a Class B address and an 8-bit subnet.
Broadcast
Addresses
The Internet Protocol broadcast address allows messages to be
sent to all hosts on the network at the same time. This is called a
broadcast.
All hosts on a network must have the same broadcast address.
The default format for a broadcast address is network address (or
network and subnet address) followed by all bits set to one.
• A Class B network with an 8-bit subnet 128.12.7 would have a
broadcast address 128.12.7.255
• A Class B network (without subnetworks) 128.12 would have
a broadcast address 128.12.255.255
6–10 Connecting to the Network
Using Subnetwork Addresses
Figure 6–6 Broadcast Addresses
ZKOX−060000065−09−RGS
Network Address 1111 . . . 1111
Network Address Subnet Address 1111 . . . 1111
Broadcast to all Hosts on the Network
Broadcast to all Hosts on the Subnetwork
Some older versions of UNIX used a broadcast address of the
network address followed by all 0 bits.
Connecting to the Network 6–11
TCP/IP Files
TCP/IP Files
Overview The Internet, or TCP/IP network, is configured using a number of
files, as described in the table.
Table 6–2 TCP/IP Network Files
File Function
/etc/hosts Lists known hosts and their addresses.
/etc/hosts.equiv Lists trusted hosts for login purposes.
(Optional)
/etc/hosts.lpd Lists trusted hosts for remote printer use.
(Optional)
/etc/inetd.conf Lists Internet services managed by the
inetd(8) daemon.
/etc/networks Lists network and subnetwork names.
/etc/protocols Lists known Internet protocols.
/etc/services Lists known Internet services and port
numbers.
There are also a number of daemons used in TCP/IP networking:
inetd Internet service daemon. When it receives a service
request, it invokes a process to service the request.
rwhod Daemon maintains the database used by rwho(1) and
ruptime(1). It periodically queries the state of the
system and broadcasts it to other systems; it receives
status broadcasts and stores status in the /var/rwho
directory.
routed Daemon manages network routing tables.
Hosts File The /etc/hosts file contains a list of the known hosts on the
network.
Each host is listed on a separate line with fields separated by
blanks. The format is:
address hostname [alias . . . ]
#
# Host Database
#
127.0.0.1 localhost
128.12.5.2 tinker
128.12.5.1 TAILOR tailor taylor
128.12.5.3 SOLDIER soldier
128.12.7.2 SPY007 spy
6–12 Connecting to the Network
TCP/IP Files
The host file allows the system to look up the Internet address,
given a host name. The system administrator can edit this file
and add or remove entries to add or remove a host system on the
network.
A system on a busy network might have an /etc/hosts file
hundreds of lines long. It is not practical to keep this type of
list up to date. Many systems now use the Internet Domain
Name Service (implemented by BIND), where a name server
dynamically provides the host name to address lookups.
The UNIX term host is equivalent to node in DECnet terminology.
Trusted Hosts
File
The /etc/hosts.equiv file specifies which hosts are trusted on
your system. This is a systemwide file maintained by the root
user.
This file:
• Has impact on only the local host.
• Allows a user from a remote system to:
Log in to the same account on your system without a
password (using rlogin)
Copy a file from your system (using rcp)
Execute a command on your system (using rsh)
Enter one system name and optional user names per line.
# Trusted hosts
tailor joe sam
spy
The ~/.rhosts file allows an individual user to specify which hosts
and accounts are trusted on your system in his account.
This file:
• Can exist in each user’s home directory
• Allows a user from a remote system to:
Log in to the same account on your system without a
password (using rlogin)
Copy a file from your system (using rcp)
Execute a command on your system (using rsh)
The file format is:
hostname [username]
Connecting to the Network 6–13
TCP/IP Files
Lineprinter
Daemon File
The /etc/hosts.lpd file specifies which hosts may send print jobs
to your local printers.
• Enter one system name per line.
# Remote printer access
tailor
• A line starting with an asterisk (*) allows print jobs from all
hosts to be accepted.
• The rs symbol in the /etc/printcap file will restrict use of a
printer to users on the local system.
The syntax ~/file means the file is in a user’s home directory.
Internet
Daemon
Configuration
File
The /etc/inetd.conf file specifies the network services the
inetd(8) daemon manages.
# Internet server configuration database
# Syntax: ServiceName SocketType ProtocolName Wait/NoWait UserName 
# ServerPath ServerArgs
ftp stream tcp nowait root /usr/sbin/ftpd ftpd
telnet stream tcp nowait root /usr/sbin/telnetd telnetd
shell stream tcp nowait root /usr/sbin/rshd rshd
login stream tcp nowait root /usr/sbin/rlogind rlogind
exec stream tcp nowait root /usr/sbin/rexecd rexecd
#tftp dgram udp wait root /usr/sbin/tftpd tftpd /tmp
.
.
.
• inetd waits for service requests, then activates the appropriate
program to provide the service.
• Modify this file to add a nonstandard service or remove a
service from the system.
• Begin a line with a number sign (#) to comment it out and
remove the service. Remove the comment and restart inetd to
enable a service.
In earlier versions of UNIX, each of these network services had a
daemon running all the time, consuming a lot of system resources.
The 4.3 BSD version of UNIX introduced a manager daemon
inetd(8) to wait for service requests and start the appropriate
daemon.
The configuration file is installed properly when set up for the
standard network services. However, you may add user-written
services or remove a service from your system.
6–14 Connecting to the Network
TCP/IP Files
Networks File The /etc/networks file allows file hosts on the same network or
subnetwork to be referred to as a group.
• Enter each network on a single line with fields separated by
blanks.
• Format is:
netname netnumber [alias . . . ]
The first field is the network name.
The second field is the network number (just the network
part of the Internet address).
Any remaining fields are aliases.
• Example
# Internet networks
#
loop 127 loopback
engineering 128.12.5 eng
accounting 128.12.7 act
Some commands, such as route(8) will accept a network name as
an argument.
The netstat(1) command can display network names defined in
/etc/networks.
The /etc/networks file is installed with the loop network name.
Other entries are optional.
Protocols File The /etc/protocols file lists the known Internet protocols and
their numbers.
• List each protocol on a separate line along with its protocol
number and any aliases.
# Internet (IP) protocols
#
ip 0 IP # internet protocol, pseudo protocol number
icmp 1 ICMP # internet control message protocol
ggp 3 GGP # gateway-gateway protocol
tcp 6 TCP # transmission control protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
• Modify this file to add a protocol to the network.
The protocols file is installed properly when set up for standard
protocols.
If a programmer writes his or her own protocol, it should be
added to /etc/protocols for inetd to manage daemons using it.
Connecting to the Network 6–15
TCP/IP Files
Services File The /etc/services file lists the Internet service programs and
their well-known port numbers.
• Enter each service on a separate line along with its port
number, protocol name, and any aliases.
.
.
.
ftp 21/tcp
telnet 23/tcp
whois 43/tcp nicname
bootps 67/udp
bootpc 68/udp
tftp 69/udp
finger 79/tcp
hostnames 101/tcp hostname
exec 512/tcp
login 513/tcp
who 513/udp whod
shell 514/tcp cmd # no passwords used
syslog 514/udp
printer 515/tcp spooler # line printer spooler
ntalk 517/udp
talk 518/udp
• Modify this file to add a service to the network.
If two processes on different systems want to communicate, they
may agree on a predetermined or well-known port number. For
example, the sendmail program uses port 25. When sendmail
on one system wants to contact sendmail on another system, it
connects to port 25 on the remote system.
6–16 Connecting to the Network
Setting Up and Managing a TCP/IP Network Using CDE
Setting Up and Managing a TCP/IP Network Using CDE
Overview The Network Configuration Manager or netconfig can be used
to configure network interfaces, enable and disable daemons,
configure the system as an IP router, and modify and delete
entries in certain files.
• Use Network Configuration Manager to configure the following
network interfaces:
Ethernet
FDDI
SLIP
Token Ring
• Enable or disable the following daemons:
gated
routed
rwhod
• Configure the system as an IP router
• Add, modify and delete entries in
/etc/routes
/etc/gateways
/etc/hosts
/etc/hosts.equiv
/etc/networks
Starting
Network
Configuration
To start the Network Configuration application:
1. Click the Application Manager icon in the Front Panel.
2. Double-click the System_Admin icon.
3. Double-click the Configuration icon.
4. Double-click the Network icon.
In the first example, we will start the Network Configuration
Manager by double-clicking the Network Application icon in the
Configuration group shown in Figure 6–7.
Connecting to the Network 6–17
Setting Up and Managing a TCP/IP Network Using CDE
Figure 6–7 Invoking the Network Configuration Manager
SDI3-1A
Configuring an
Interface
To configure an interface, in the Network Configuration main
window, select the interface from the Available Network
Components list box.
To modify an interface, select the interface from the Configured
Network Components list box.
In this example, we will modify the Ethernet interface.
1. We select Ethernet Interface-ln0 under Configured Network
Components, then click Modify Configuration...
6–18 Connecting to the Network
Setting Up and Managing a TCP/IP Network Using CDE
Figure 6–8 Network Configuration
SDI3-1B
2. The Configuring Ethernet Interface dialog box is displayed.
• The interface status in the example indicates that the
primary Ethernet is UP.
• The Interface Configuration indicates whether or not the
interface will be started on the next configuration reboot.
• The host name specifies the name for the interface which
in the example is vrroom.
• The IP address in the example is user supplied and
the network mask in the example is a class C mask
255.255.255.0.
Connecting to the Network 6–19
Setting Up and Managing a TCP/IP Network Using CDE
Figure 6–9 Configuring Ethernet Interface
SDI3-2A
3. To expand the dialog box, click the bold face arrow on the
bottom left of the box. The dialog box expands to display
additional parameters.
Optional IFCONFIG flags:
• Under optional IFCONFIG flags, ARP is selected. This
means that the Address Resolution Protocol (ARP) is
enabled. When this is the case, links between IP address
and MAC address are placed in the ARP cache by the
protocol. The default is ARP enabled.
6–20 Connecting to the Network
Setting Up and Managing a TCP/IP Network Using CDE
Figure 6–10 Optional IFCONFIG Flags
SDI3-2B
• Promiscuous directs the interface to receive all packets
rather than just those directed to the host. This feature is
normally disabled.
• The multicast feature allows the detection of multicast
MAC packets such as ones with the LSB of the first byte
equal to 1. Note, a broadcast address is one with all MAC
bits equal to 1. In special cases, special debug driver
code can be used. If this is the case, the Debug button is
selected.
• Under optional IFCONFIG arguments in the example is
the standard MTU size for Ethernet of 1500 bytes (octets).
• Hop count is zero since the Ethernet card is zero hops from
anybody (if RIP happens to be on).
4. Click Commit to save any changes, then click Close after the
changes have been committed.
Adding or
Modifying
Information in
/etc/hosts
You can view and change entries in the /etc/hosts file through
this application.
1. In the Network Configuration main window, click Host File
from the Configured Network Components list box.
Connecting to the Network 6–21
Setting Up and Managing a TCP/IP Network Using CDE
Figure 6–11 Host File
SDI3-3A
2. Click Modify Configuration. The Hosts dialog box is displayed.
In the example, the contents of the /etc/hosts file is displayed
in the text window. Five entries are displayed.
3. To modify an existing entry, select the entry (as in the
example), and the details are loaded into the four fields: Host
Name, Host Address, Aliases, and Comment. Any of these
fields can be edited. The four fields can be cleared by clicking
on the clear button. After making the desired changes, click
Commit and then Close.
6–22 Connecting to the Network
Setting Up and Managing a TCP/IP Network Using CDE
Figure 6–12 Hosts Dialog Box
SDI3-3C
Connecting to the Network 6–23
Summary
Summary
Introducing
UNIX
Networking
A network consists of two or more computer systems linked
together for the purpose of exchanging information and sharing
resources.
Each computer system on the network is called a host. Every host
has a unique name and address.
For two processes to communicate, they have to agree on a
protocol, a set of rules covering how processes are supposed to
interact, to send messages to each other.
Introducing
Internet
Gateways
Two distinct physical networks are connected by a gateway that is
attached to both networks. The gateway passes information from
one network to the other.
Using Internet
Addressing
Every network interface must have a unique address. For one
process to contact another, it must know, or be able to find out the
other’s address.
The IP protocol defines a 32-bit address, normally written as four
numbers separated by periods, with each representing 8 bits of
the address, for example, 128.30.0.99.
The Internet address is logically divided in two parts: network
number and host number. There are different classes of
addresses, depending on the length of the parts.
Each host on the network has access to a hosts database to
convert host names to Internet addresses.
Using
Subnetwork
Addresses
Subnetworks allow you to divide a large network into smaller
logical groups.
• Part of the host address is designated as the subnet number.
• A netmask is used to indicate the network and subnetwork
address parts of the Internet address.
The Internet Protocol broadcast address allows messages to be
sent to all hosts on the network at the same time.
6–24 Connecting to the Network
Summary
TCP/IP Files The Internet, or TCP/IP network is configured using a number of
files, described in the following table.
File Function
/etc/hosts Lists known hosts and their addresses.
/etc/hosts.equiv Lists trusted hosts for login purposes.
(Optional)
/etc/hosts.lpd Lists trusted hosts for remote printer use.
(Optional)
/etc/inetd.conf Lists Internet services managed by the
inetd(8) daemon.
/etc/networks Lists network and subnetwork names.
/etc/protocols Lists known Internet protocols.
/etc/services Lists known Internet services and port
numbers.
Setting Up and
Managing a
TCP/IP Network
Using CDE
The Network Configuration Manager or netconfig can be used
to configure network interfaces, enable and disable daemons,
configure the system as an IP router, and modify and delete
entries in certain files.
Connecting to the Network 6–25
Exercises
Exercises
Internet Files 1. Display each of the following files on your system.
a. /etc/hosts
b. /etc/hosts.equiv
c. /etc/inetd.conf
d. /etc/networks
e. /etc/protocols
f. /etc/services
2. Check the Reference Pages for more information on each of
these files.
Setting Up and
Managing a
TCP/IP Network
Using CDE
1. Use the Network Configuration Manager to configure your
network interface. You must get your system IP address from
your instructor or system administrator.
2. Use the Network Configuration Manager to add an entry to
the hosts files. You must get the name and address of another
system in the classroom or Lab area.
6–26 Connecting to the Network
Solutions
Solutions
Internet Files 1. All the files should be similar to the examples in the text.
/etc/hosts.equiv will probably be blank; use of this file in a
secure environment is not recommended.
2. No solution necessary.
Setting Up and
Managing a
TCP/IP Network
Using CDE
See the examples in the text.
Connecting to the Network 6–27
7
Loading and Licensing Software
Loading and Licensing Software 7–1
About This Chapter
About This Chapter
Introduction Some system and optional software is organized into software
subsets, collections of executable and data files needed to perform
a specific function or provide a particular class of services.
Digital UNIX systems provide the setld(8) utility to manage these
subsets:
• Load subsets onto the system
• Delete subsets from the system
• Inventory the subsets
• Verify the integrity of the subsets
• Configure subsets with node-specific information
Many software packages including the operating system are
licensed. Digital uses the License Management Facility and the
new CDE License Manager to manage software licenses online.
This chapter demonstrates the Digital UNIX software loading
utility setld to view the software subset inventory and load and
unload software subsets. It also overviews the Digital License
Management Facility (lmf) utility and the CDE License Manager.
Lab exercises provide practice with setld options and the CDE
License Manager.
Objectives To install optional software on a Digital UNIX system, you should
be able to:
• Add and remove software subsets
• Use the License Management Facility to manage online
licenses
• Describe the CDE environment
Resources • Digital UNIX Installation Guide, Chapter 8 shows the options
to the setld command.
• Digital UNIX Software License Management
• Digital UNIX System Administration
7–2 Loading and Licensing Software
Loading and Unloading Software Subsets
Loading and Unloading Software Subsets
Preparing to
Load Software
Digital UNIX software is organized into subsets.
Use the setld(8) command to load and manage software subsets
from a distribution media after installation.
Before loading subsets, you may wish to check for sufficient disk
space:
• Use df to determine disk space.
• Consult the Release Notes for subset sizes and file systems
affected.
Note
setld will automatically check that there is adequate file
space for the subset(s) requested to be installed.
Using the setld
Command
The format for the setld command is:
/usr/sbin/setld [-D dir] -option [location]
[subset...]
• dir is an optional path specifying the destination.
• option includes:
l loads subset from distribution on location and updates
the internal inventory.
d deletes subset from the system and updates the internal
inventory.
i gives an inventory of all subsets known to the system, or
all files for subset.
c configures subset by passing a message to the subset
control program.
x extracts subset from distribution on dev into current
working directory or dir (does not update internal
inventory).
v verifies subset by checking its existence and by running
its installation verification procedure.
Except for the -i option, you must be superuser to run
setld.
• location specifies the distribution location. location can be:
A device special file name: /dev/rz4c—CD–ROM
The name of a directory: /mnt/ALPHA — disk distribution
directory
Loading and Licensing Software 7–3
Loading and Unloading Software Subsets
The name of a remote installation server: tinker: —
remote host
• subset specifies the name of the subset (see the Release Notes.)
To load software from a CD–ROM disk, mount the disk at a
convenient mount point and specify that mount point as the
location for example:
# mount -r /dev/rz4c /mnt
# setld -l /mnt/ALPHA
The setld utility should not load or extract software if it would
cause the percentage of free space on the file system to fall below
10 percent (or minfree).
Displaying
Software
Subsets
Use the setld -i command to display an inventory of software
subsets. This shows the status of each subset (installed, not
installed, and so forth).
The status of a subset is determined by the existence of a lock
file or by the condition of its installation control file. If one of
these two files does not exist, or if the control file is incomplete,
the subset is considered to be incorrectly installed. Lock file,
control file and inventory file for each subset are located in the
/usr/.smdb. directory.
The inventory (-i) option has two variations:
• List software subsets and their status
setld -i
Status field may be:
* blank - if the subset is not installed
* installed - if the subset is installed
* corrupt - if the subset failed to install correctly
* incomplete - if information in the subset control file is
not complete
• List files included in a particular subset
setld -i subset
Software
Subset Display
Examples
Example 7–1 shows how to display software subsets with and
without specifying a software subset name. When you invoke
setld without a subset name, it lists all available subsets and
identifies which ones are currently installed. When you specify a
subset name, setld lists all of the files for that subset.
7–4 Loading and Licensing Software
Loading and Unloading Software Subsets
Example 7–1 Listing Software Subsets with setld
$ /usr/sbin/setld -i
Subset Status Description
------ ------ -----------
BRXCKIT320 NetWorker Digital Client Kit
BRXSMAN320 NetWorker Server Reference Pages
BRXSOAKIT320 installed NetWorker Server for Digital UNIX
DIABASE210 installed DECevent Base kit (Translation / Analysis)
EDXAXP200 installed Edex Alpha AXP Digital UNIX Outpost
EDXHQ200 installed Edex Alpha AXP Digital UNIX Headquarters
EDXMAN200 installed Edex man pages
OSFACCT400 System Accounting Utilities (System Administration)
OSFADVFS400 POLYCTR advfs (System Administration)
OSFADVFSBIN400 POLYCTR advfs Kernel Modules (Kernel Build Environment)
.
.
.
OSFXEXAMPLES400 X Window and X/Motif Programming Examples(Software Development)
OSFXINCLUDE400 X Window and X/Motif Header Files (Software Development)
OSFXLIBA400 X Window and X/Motif Static Libraries(Software Development)
OSFXMAIL400 DECwindows Mail Interface (Mail Applications)
OSFXMIT400 Additional X Applications (Windows Applications)
OSFXNEST400 Nested X Server (Windows Applications)
OSFXOEM400 X Customizations for OEM (Windowing Environment)
OSFXPRINT400 installed Graphical Print Configuration Application(System Administration)
OSFXSYSMAN400 installed Graphical Base System Management Utilities(System Administration)
OSFXVFB400 Virtual X Frame Buffer (Windows Applications)
$ /usr/sbin/setld -i OSFPRINT400
./etc/.new..lprsetup.dat
./sbin/init.d/lpd
./sbin/rc0.d/K05lpd
./sbin/rc2.d/K00lpd
./sbin/rc3.d/S65lpd
./usr/bin/cancel
./usr/bin/lp
./usr/bin/lpq
./usr/bin/lpr
./usr/bin/lprm
./usr/bin/lpstat
./usr/lbin/ansi_2of
.
.
.
./usr/lbin/vpsf
./usr/lbin/vsort
./usr/lbin/xf
./usr/lib/nls/msg/en_US.ISO8859-1/lprsetup.cat
./usr/lib/nls/msg/en_US.ISO8859-1/printer.cat
./usr/sbin/lpc
./usr/sbin/lprsetup
./usr/sbin/lptest
./usr/var/spool/lpd
Loading
Software
Subsets
Use the setld -l command to load a software subset.
The following table shows some of the possible source and
destination combinations.
Loading and Licensing Software 7–5
Loading and Unloading Software Subsets
Table 7–1 Load Commands
Load Command Explanation
setld -l /dev/rmt2h Load software subsets from tape unit 2
setld -l /dev/rmt2h OSFUUCP400 Load OSFUUCP400 subset from tape
setld -D /mnt -l /dev/rmt2h OSFUUCP400 Load OSFUUCP400 to directory /mnt from
tape
setld -D /mnt -l mars: OSFUUCP400 Load OSFUUCP400 to directory /mnt from
installation server mars
setld -l /mnt/ALPHA OSFUUCP400 Load OSFUUCP400 from disk distribution in
/mnt/ALPHA
If you use the load option and do not specify a subset, a list of
subsets will be provided. Software subsets previously installed
will not be listed.
The following example shows loading subsets from a CD–ROM
drive to a distribution directory.
Example 7–2 Loading Software Subsets with setld
# /usr/sbin/setld -l /dev/rz4c
Please make sure your installation drive is mounted and on-line.
Are you ready? (y/n): y
The subsets listed below are optional:
1) X11/DECwindows 100dpi Fonts 10) Doc. Preparation for Ref. Pages
2) System Accounting Utilities 11) Doc. Preparation Extensions
3) System Exercisers 12) UNIX(tm) SVID2 Compatibility
4) Serviceability Tools 13) Network Mgmt. Common Agent
5) Additional DECwindows Applications 14) Local Area Transport (LAT)
6) CDA(tm) Worksystem Base Services 15) Communications Utilities
7) CAD(tm) Base Services 16) Remote Installation Service
8) RAND Corp. Mail Handler (MH) 17) Revision Control System
9) DECwindows Mail 18) UNIX(tm) to UNIX(tm) Copy Facility
19) All of the above
20) Exit without installing any subsets
Enter one or more choices, for example, 1 2 4-6, or
press RETURN to redisplay menu: 2 17
You are installing the following subsets:
System Accounting Utilities Revision Control System
Is this correct? (y/n): y
System Accounting Utilities (OSFACCT400)
Copying from /dev/rz4c
Verifying
Revision Control System (OSFRCS400)
Copying from /dev/rz4c
Verifying
(continued on next page)
7–6 Loading and Licensing Software
Loading and Unloading Software Subsets
Example 7–2 (Cont.) Loading Software Subsets with setld
#
# /usr/sbin/setld -D /usr/local -l /dev/rz4c OSFPRINT400
Please make sure your installation drive is mounted and on-line.
Are you ready (y/n)? y
Printer Support Environment (OSFPRINT400)
Copying from /dev/rz4c
Verifying
#
Loading and Licensing Software 7–7
Loading and Unloading Software Subsets
Deleting a
Software
Subset
Use the setld -d command to remove a software subset.
Do not remove software subsets by any command other than
setld because the system keeps a record of the software that is
installed.
The setld utility checks and warns:
• If a subset has been marked during manufacture so it cannot
be deleted
• If a subset being deleted is required by other subsets installed
on the system
Example 7–3 shows how to remove a software subset.
Example 7–3 Removing a Software Subset with setld
# /usr/sbin/setld -d OSFRCS400
Deleting Revision Control System (OSFRCS400).
# setld -d OSFBASE400
setld: Sorry, You may not delete the Base System (OSFBASE400) subset
#
7–8 Loading and Licensing Software
Licensing Your Software
Licensing Your Software
Overview Digital UNIX systems use the Digital License Management
Facility (LMF) to control access to software.
• Each licensed software package comes with a Product
Authorization Key (PAK), a set of license information that
may be hardcopy or an online file.
• The PAK is loaded into a system database.
• Software can query the database to see if it is licensed, or for
how much capacity.
One possible use of licensing is to allow vendors to provide a full
working copy of software for a limited time demonstration. After
60 days, the license can expire and the program will not run.
Types of
Licenses
There are several types of licenses:
• Availability or capacity licenses — Grants license units
based on the power of the hardware without restrictions for
particular processors.
Once a product has been licensed on a processor, users
have unlimited access to the product.
• Activity or per-user licenses — Restricts the number of
simultaneous users of a product.
The number of licensed users can be increased by
purchasing additional license units.
The licenses for DEC OSF/1 Version 4.0 are:
• osf-usr A two-user license (basic license)
• osf-svr A license for a RIS server
• osf-dev A developer’s license (required to use dbx)
dbx -k for kernel debugging does not require the developer’s
license; all other uses of dbx do.
A Sample PAK The following example shows a sample PAK for the Remote
Installation Service.
Loading and Licensing Software 7–9
Licensing Your Software
Example 7–4 A Sample PAK
LICENSE PAK
(PRODUCT AUTHORIZATION KEY)
*************************************************
PAK ID:
Issuer: DEC 1
Authorization Number: SQM021856 2
PRODUCT ID:
Product Name: OSF-SVR 3
Producer: DEC 4
NUMBER OF UNITS:
Number of units: 100 5
KEY LEVEL:
Version: 1.0 6
Product Release Date: 1-MAR-1996 7
KEY TERMINATION DATE:
Key Termination Date: 1-APR-1996 8
RATING:
Availability Table Code: CONSTANT=100 9
Activity Table Code: 1 0
MISCELLANEOUS:
Key Options: NO_SHARE 1 1
Product Token: 1 2
Hardware-Id: 1 3
Checksum: 1-POFE-IHOI-FHNH-KHDK 1 4
*************************************************
1 Issuer is the LMF name for the supplier of the PAK; usually
DEC, may be DEC_EUROPE or other vendor
2 Authorization number uniquely identifies license
3 Product name is the LMF name for product - may be slightly
different than that in Software Product Description due to
LMF internal restrictions
4 Producer is name of company producing the software product
5 Number of units is number of license units supplied with this
PAK; zero (0) means unlimited size (See also table code fields)
6 Version is software product version (optional); if present, LMF
restricts product use to versions up to and including that
version
7 Product release date (optional); if present, LMF restricts
product use to versions released on or before that date
8 Key termination date (optional) is termination date of PAK.
After this date the PAK is no longer valid. (Useful for
providing a demonstration version of product.)
9 Availability table code (for availability license) the number of
units required to give unlimited use on a processor
7–10 Loading and Licensing Software
Licensing Your Software
1 0 Activity table code (for activity license) the number of units
required for each simultaneous user of the product
1 1 Key options: (optional)
• MOD_UNITS indicates you may modify the Number of
units field using lmf modify rather than enter a new license
• NO_SHARE indicates you cannot combine two or more
licenses for the product on the same processor
1 2 Product token field is not currently used by LMF
1 3 Hardware-id field is not currently used by LMF
1 4 Checksum is a checksum for all data on PAK; it ensures that
you entered the PAK data correctly and completely
Using the lmf
Command
The lmf utility maintains a file of registered software licenses
called the License Database. The lmf utility creates the License
Database from information on the PAK that is supplied with
software products. By default, the License Database is in
/usr/var/adm/lmf.
The lmf utility also updates the kernel cache. The kernel
cache contains the active license information that is read by
license-checking functions in products that provide full LMF
support. The license-checking functions check that a product has
a valid license before making the product available for use. Use
the lmf command list cache to list all products loaded in the
kernel cache.
You can use the lmf utility to do the following:
Activity lmf command
Monitor changes to the license database history
Display registered products on the system list
Cancel a license on a specified date cancel
Delete a license from the database delete
Prevent a license being loaded into the kernel cache;
temporarily disable a license
disable
Enable a license to be loaded into the kernel cache enable
Issue a reconstructed PAK for the product and remove the
license from the database
issue
Register data from a PAK in the database register
Load enough license units into the kernel cache to enable
use of the product
load
Copy license details for all enabled products from the
database to the kernel cache
reset
Loading and Licensing Software 7–11
Licensing Your Software
Activity lmf command
Unload enough license units from the kernel cache to reduce
the use of the product by the number of users specified
unload
You can enter lmf commands on the command line.
# lmf register
Alternatively, you can enter the lmf utility and type the
commands after the prompt.
# lmf
lmf> register
You should register and load any license for your operating
system. For example:
# /usr/sbin/lmf register
# /usr/sbin/lmf load 0 osf-svr
Using lmf to
Register a
License
Use lmf register to edit an empty template and register the
license details from the PAK. The editor used is defined by the
EDITOR environment variable, or defaults to vi.
When you type in lmf register, the system invokes the editor and
displays an empty template. You should use the editor commands
to type in the PAK data.
You can type the data in uppercase or lowercase letters; LMF
converts it to uppercase. Any fields which are blank on the PAK
should be left blank; any fields filled in on the PAK should be
typed exactly as you see them. LMF may return a checksum error
if you omit or incorrectly enter any license data.
You can bypass the editor by registering a PAK from a file that
contains valid license data by using the following command
# lmf register - < PAK_file
When you leave the editor, LMF scans the completed template to
make sure you entered the license data correctly.
If the license data is correct, LMF registers the license in the
license database.
Using lmfsetup
to Register a
License
You can use the /usr/sbin/lmfsetup shell script to register data
supplied by a PAK.
• lmfsetup prompts you for the data associated with each field
on a PAK.
• Once you enter all the data, LMF makes sure you have
supplied entries for all mandatory fields and that the value in
the Checksum field validates the license data.
If the data is correct, LMF registers the PAK in the license
database.
7–12 Loading and Licensing Software
Licensing Your Software
If any data is incorrect, LMF displays the appropriate
error message and gives you an opportunity to reenter the
data.
Example 7–5 shows how to use the lmfsetup command.
Example 7–5 Using the lmfsetup Command
# lmfsetup
Register PAK (type q or quit to exit) [template] Return
Issuer : DEC
Authorization Number : SQM021856
Product Name : OSF-SVR
Producer : DEC
Number of units : 100
Version : 1.0
Product Release Date : 1-MAR-1996
Key Termination Date : 1-APR-1996
Availability Table Code : CONSTANT=100
Activity Table Code :
Key Options : NO_SHARE
Product Token :
Hardware-Id :
Checksum : 1-POFE-IHOI-FHNH-KHDK
Loading and Licensing Software 7–13
Using the CDE License Manager
Using the CDE License Manager
Overview Digital UNIX Version 4.0 workstations or graphic systems use
the CDE License Manager to control access to software. This
CDE application presents a new user interface as part of the
DailyAdmin tools for system administration. Note that the license
architecture and strategy remains consistent with that described
earlier for the lmf utility. The license actions with the CDE
License Manager are:
• File Open - to add a license from a file
• Edit New - to add a license with an editor
• Edit List - to list a specific license
• Edit Issue - to write a PAK to a file
• Edit Delete - to delete a license
Starting the
CDE License
Manager
As with the other system administration tools, the CDE License
Manager is invoked through System_Management_Utilities. The
next figure shows the CDE License Manager being selected from
the DailyAdmin window.
Figure 7–1 CDE License Manager
Note that the system is protected from casual user input through
the use of this Pop-up window which requires the root password
to continue.
7–14 Loading and Licensing Software
Using the CDE License Manager
Using the
License
Manager
The License Manager window shows the current licenses loaded
into the system. This figure displays two licenses.
• OSF-BASE
• OSF-USR
Both are required for Digital UNIX Version 4.0. The base
license grants the right to use the various services of the Digital
UNIX operating system on a single processor. This license also
authorizes two concurrent interactive users of the system. The
usr license allows multiple users on the system and requires the
base license. The actual number of users allowed is a functional
piece of the license PAK as noted earlier.
The menu options for license operations are:
• File Open - to add a license from a file
• Edit New - to add a license with an editor
• Edit List - to list a specific license
• Edit Issue - to write a PAK to a file
• Edit Delete - to delete a license
Figure 7–2 Minimum Licenses
Note that the OSF-BASE license is highlighted, meaning that it
has been selected (MB1) by the user.
Loading and Licensing Software 7–15
Using the CDE License Manager
Using Edit List To view the details of a currently loaded license on the system:
1. Select Edit from the menu bar.
2. Choose List from the pull-down menu.
The List License window is displayed.
Figure 7–3 List a License
Using Edit New During the course of a system installation, the system
administrator is required to enter a new license on the platform.
From the License Manager window, select Edit and choose New
from the pull-down menu if you have a hardcopy of the license
information and want to manually enter it into the system. The
New License window is displayed and shown in the next figure.
7–16 Loading and Licensing Software
Using the CDE License Manager
Figure 7–4 Edit New Option
Enter the license details for the PAK using this window. When
all information is complete, click OK to load the license into the
license database. Alternately you could click Apply, which also
loads the new license but does not exit the New License window,
allowing you to enter another license after pressing the Clear
button.
Using File
Open
You can enter a new license from a file located on the system
rather than using the editing method. The default file location is
shown in the next figure.
Loading and Licensing Software 7–17
Using the CDE License Manager
Figure 7–5 File Open option
Optionally you may select another folder which contains the
license information as shown in the following figure.
7–18 Loading and Licensing Software
Using the CDE License Manager
Figure 7–6 PAK in User File
Loading and Licensing Software 7–19
Summary
Summary
Loading and
Unloading
Software
Subsets
Digital UNIX software is organized into subsets. Use the
setld command to load and manage software subsets from a
distribution media after installation.
setld -i Displays inventory of software subsets
setld -l Loads software subsets
setld -d Deletes software subsets
Licensing Your
Software
Digital UNIX systems use the Digital License Management
Facility (LMF) to control access to software.
• Each licensed software package comes with a Product
Authorization Key (PAK), a set of license information which
may be on paper or an online file.
• The PAK is loaded into a system database.
• You can use the /usr/sbin/lmf utility to register a license and
manage the license database.
• You can use the /usr/sbin/lmfsetup shell script to register a
license.
Using the
CDE License
Manager
You can use the CDE License Manager to administer licenses.
Table 7–2 CDE License Manager VS LMF Commands
CDE License Manager LMF
Edit List list
Edit Delete delete
Edit Issue issue
Edit New register
Edit New lmfsetup
File Open register - < file
7–20 Loading and Licensing Software
Exercises
Exercises
Instructor Note
The following exercises are designed to be both
instructional and practical in that they support other lab
exercises to follow. Give priority to the CDE licensing
exercise over the LMF setup exercise.
• Licensing - each platform must have at a minimum a
base and a usr license. Have these available for the
student team on each platform.
a. OSF-BASE on hardcopy - students use EDIT NEW
option
b. OSF_USR in a file - students use FILE OPEN
• SW loading notes
a. DECevent is used in Chapter 13 (DIABASE210)
b. NetWorker Save and Restore in Chapter 10
(BRXCKIT320, BRXMAN320, BRXSOAKIT320)
c. DEC_Fortran_RTL (DFARTL364) is used only to
practice deleting a subset loaded in error
*** The installation guide incorrectly lists some of the
software subsets.
If CD–ROMs are not available in the classroom, and
subsets are available on a RIS server, students will have to
set up the network.
Also, the RIS server needs to have the appropriate subsets
loaded.
Loading
Software
Subsets
1. Determine the subsets required for these applications.
DEC_EVENT
NetWorker_SingleServer
DEC_Fortran_RTL
2. Display the inventory of software subsets.
3. Load the subsets required for class exercises.
Checking
Software
Subsets
1. Determine if the Printer Support Environment subset is
loaded.
2. List the contents of the Printer Support Environment subset.
Loading and Licensing Software 7–21
Exercises
Deleting
Software
Subsets
Oops ... we really do not need the DEC Fortran subset. Delete it
from the system.
Licensing Your
Software
1. Use the lmf list command to display registered products.
2. Use lmf register and enter the fields from the sample PAK
in the text. When you leave the editor, the checksum will not
validate (this is not a valid PAK). Abort the operation.
3. Use lmfsetup to enter the PAK data. If your instructor has a
valid PAK, use that data.
Using CDE
License
Manager
1. Check the system for existing licenses.
2. Enter the OSF-BASE license and the OSF-USR license.
7–22 Loading and Licensing Software
Solutions
Solutions
Loading
Software
Subsets
1. Consult the Installation Guide, Appendix C and record the
subset names below.
DEC_EVENT _______________________________
NetWorker_SingleServer _______________________________
DEC_Fortran_RTL _______________________________
2. Display the inventory of software subsets.
# /usr/sbin/setld -i
3. Load the subsets required for class exercises.
# /usr/sbin/setld -l DIABASE210
# /usr/sbin/setld -l BRXCKIT320 BRXMAN320 BRXSOAKIT320
# /usr/sbin/setld -l DFARTL364
Checking
Software
Subsets
1. Determine if the Printer Support Environment subset is
loaded.
# setld -i | grep rint
OSFPRINT400 Printer Support Environment
2. List the contents of the Printer Support Environment subset.
# setld -i OSFPRINT400
./sbin/init.d/lpd
./sbin/rc0.d/K05lpd
./sbin/rc2.d/K00lpd
./sbin/rc3.d/S65lpd
./usr/bin/lp
./usr/bin/lpq
./usr/bin/lpr
./usr/bin/lprm
./usr/bin/lpstat
.
.
.
Deleting
Software
Subsets
# /usr/sbin/setld -d DFARTL364
Loading and Licensing Software 7–23
Solutions
Licensing Your
Software
1.
# lmf list
No entries in license database
2.
# lmf register
(displays template using editor)
Licensed Software Product
Product Authorization Key
Enter data on lines terminated with:
Issuer : DEC
Authorization Number : SQM021856
Product Name : OSF-SVR
Producer : DEC
Number of units : 100
Version : 1.0
Product Release Date : 1-MAR-1996
Key Termination Date : 1-APR-1996
Availability Table Code : CONSTANT=100
Activity Table Code :
Key Options : NO_SHARE
Product Token :
Hardware-Id :
Checksum : 1-POFE-IHOI-FHNH-KHDK
Comment:
Checksum does not validate
Abort (a), Retry with new template (n), Retry with old template (o) ? a
#
3.
# lmfsetup
(prompts each line)
Register PAK (type q or quit to exit) [template] Return
Issuer : DEC
Authorization Number : SQM021856
Product Name : OSF-SVR
Producer : DEC
Number of units : 100
Version : 1.0
Product Release Date : 1-MAR-1996
Key Termination Date : 1-APR-1996
Availability Table Code : CONSTANT=100
Activity Table Code :
Key Options : NO_SHARE
Product Token :
Hardware-Id :
Checksum : 1-POFE-IHOI-FHNH-KHDK
Checksum does not validate
Do you wish to retry? [Yes] N
PAK registration for template canceled
Register PAK (type q or quit to exit) [template] q
#
7–24 Loading and Licensing Software
Solutions
Using CDE
License
Manager
1. Select the CDE License Manager from the DailyAdmin
window. In the CDE License Manager window, select Edit and
choose List from the pull-down menu.
No entries in license database
2. Select the CDE License Manager from the DailyAdmin
window. In the CDE License Manager window, select Edit and
choose New from the pull-down menu.
using the license PAK information supplied by your instructor
Loading and Licensing Software 7–25
8
Configuring the Kernel
Configuring the Kernel 8–1
About This Chapter
About This Chapter
Introduction The kernel is the central program that manages the computer
system. It controls system scheduling, memory management,
input and output services, device management, and organization
of the file systems. The kernel is set up, or configured, and built
for each system at every site.
The system configuration file allows the system administrator
to specify the devices and some system parameters that define
the system. The configuration software uses this file to build the
kernel. Performing a system installation builds a static kernel
configured for that system.
Digital UNIX 4.0 systems provide the capability to configure the
system statically (as in past system releases) or use the new
dynamic technique.
In a static configuration, you edit a configuration file, search
build a new kernel, and reboot the system.
Dynamic configuration allows you to configure and load
kernel subsystems without rebooting. You update the subsystem
configuration database and the kernel will automatically configure
the subsystem.
Dynamic configuration is available only for drivers and
subsystems that are set up to be dynamically loadable. You can
use dynamic configuration to change certain system parameters,
for example.
Objectives To configure the kernel for a Digital UNIX system, you should be
able to:
• Identify when to build a new kernel
• Describe the system configuration file
• Use doconfig to build a kernel automatically
• Dynamically configure a kernel with sysconfig and sysconfigdb
• Reconfigure kernel attributes
Resources • System Tuning and Performance Management
• Digital UNIX System Administration, Chapters 4 and 5
• Nemeth, Snyder, & Seebass, UNIX System Administration
Handbook, Chapter 8 describes BSD configuration file and
building a kernel
8–2 Configuring the Kernel
Building a New Kernel
Building a New Kernel
Overview You may need to build a new kernel to:
• Add a new device and its static driver to your configuration
• Remove a device and its static driver from your configuration
• Tune the operating system
• Add layered products
You can configure a kernel:
• Automatically with doconfig(8) for a static kernel
• Dynamically modify kernel attributes and subsets with
sysconfig and sysconfigdb
With either method, the system configuration file is modified and
kernel is reconfigured.
Some drivers can be dynamically loaded. To add one of these,
you do not have to change the configuration file and rebuild the
kernel.
If you remove a device and its driver from your configuration, it
is not necessary to change the configuration file and rebuild the
kernel, but doing so will reduce the size of the kernel.
An example of a system tuning operation is changing from one
swap area to two separate swap areas on two disks, to improve
performance. (This can be done using the /etc/fstab file, rather
than building a new kernel.) Another example of system tuning is
increasing the percentage of memory allocated to the I/O buffer
cache.
Some layered products require building a new kernel; some do
not. For example, Pathworks and LSM require changing system
parameters and building a new kernel.
A kernel can be modified using the sysconfig command to
load/unload dynamic subsystems; as well as change system
attributes.
You must be logged in as root to perform either procedure.
Building a kernel using doconfig -c can be done in multiuser
mode. But you must shut down and reboot the new kernel for the
changes to take effect.
Configuring the Kernel 8–3
System Configuration File
System Configuration File
Overview The system configuration file is a text file. It can be modified by
using an editor, such as vi, or the new CDE Personal Applications
Editor. In general, this file does not need to be edited.
The configuration file defines extensions to the kernel. File
systems, network protocol families, physical and pseudodevice
drivers, and STREAMS drivers and modules are supported as
subsystems, or extensions.
If you have enough disk space, you can build more than one
kernel, and boot selectively among them, to turn various devices
or features on or off.
Many of the parameters in /sys/conf/param.c have equivalent
configuration file keywords which would override the default value
in param.c. Whenever possible, use /usr/bin/X11/dxkerneltuner to
alter the value of tunable system parameters.
The system configuration file and other files used to build the
kernel are located in subdirectories of /sys:
/usr/sys/conf/NAME The system configuration file.
(NAME is the system name
in uppercase letters.)
/usr/sys/conf/GENERIC A generic configuration file
used as a template; contains
all possible software and
hardware options.
/usr/sys/conf/param.c Contains default values
for a number of system
parameters.
/usr/sys/conf/files List of common files used to
build the system.
/usr/sys/conf/files.NAME List of files specific to this
system.
The system configuration file uses a number of keywords
described in the following sections. See Digital UNIX System
Administration, Chapter 4, for a list of configuration keywords
and their values.
System Administration also describes an extension for static
kernel configuration for layered products, using the /sys/conf
/NAME.list and config.file files.
The next several pages describe entries in the system
configuration file.
8–4 Configuring the Kernel
System Configuration File
Global
Keywords
Global keyword values describe the system. The following table
provides some examples.
Table 8–1 Global Keywords
Keyword Function Example
ident Identifies the kernel; generally the
system name in uppercase letters
ident TINKER
maxdsiz Defines the maximum process data
segment size
maxdsiz 33554432
maxssiz Defines the maximum process stack
size
maxssiz 33554432
maxusers Sizes several system data structures,
including the system process table
maxusers 32
maxthreads Defines the maximum number of
threads per task
maxthreads 256
bufcache Defines the percentage of physical
memory allocated for I/O buffer cache
bufcache 20
cpu Defines the specific architectural
machine type
cpu "DEC3000_500"
Guidelines for setting maxusers:
System Description
maxusers
Value
Limited memory and a small number of users 8 or 16
Moderate hardware and moderate number of users 32
Large system with heavy work load 64
If you are not sure 32
Default 32
Changing
Parameters for
Performance
Changing any of the tunable parameters has tradeoffs; you gain
in one area and lose in another.
Use the maxusers parameter to restrict system usage. It controls
the sizes of several important system resources including the total
number of files and processes that can be open/active at any one
time. This indirectly controls the number of simultaneous users
the system can support providing no license restrictions apply.
You can increase the number of entries in the block and character
device switch tables to accommodate loadable drivers. If you
receive a message from the config command or from the loadable
driver configuration manager cfgmgr indicating a table is too
small, edit the configuration file and specify values for the options
MAX_BDEVSW or MAX_CDEVSW. For example:
Configuring the Kernel 8–5
System Configuration File
options MAX_BDEVSW=80
options MAX_CDEVSW=130
System
Definition
Keyword
The system definition identifies the name of the kernel, the
location of the root file system and dump and swap areas. It uses
the keyword configuration.
The recommended configuration entry is as follows:
config vmunix swap generic
This selects the a partition of the disk from which the kernel
was booted as the root file system and the swap areas from the
/etc/fstab file. The crash dump area is the same as the first
swap area.
You can also specify the disk and partition for the root file system
and the swap and dump areas.
config vmunix root on rz4a swap on rz1b and rz2b dumps on rz1b
Options
Keyword
Definitions
Options keyword definitions specify software to be compiled into
the system, including subsystems and additional functionality.
Many are mandatory, not optional.
Some examples of options definitions:
options Mach
options OSF
options CDFS
options NFS
options UFS
options RT
Makeoptions
Keyword
Definitions
Makeoptions keyword definitions are passed to the compiler,
assembler, and linker when building the kernel.
This example turns on debugging:
makeoptions CDEBUGOPTS="-g3"
Pseudodevice
Keyword
Definitions
Pseudodevice definitions identify pseudodevice drivers for
terminal services, the Logical Storage Manager, network services,
and so forth.
Some examples of pseudodevice definitions:
pseudo-device rpty
pseudo-device xcons
pseudo-device ether
pseudo-device lsm1
Pseudodevice definitions identify components for which there is
no associated hardware; for example, a pseudoterminal.
Pseudoterminals are used for incoming network logins and for
interactive windows. The pty entry defines the maximum number
of pseudoterminals; it can be any value less than or equal to 3162.
For example:
8–6 Configuring the Kernel
System Configuration File
pseudo-device rpty
For pseudoterminals, the system configuration file can include
either options RPTY, or pseudo-device pty or pseudo-device rpty,
but not both.
Configuring the Kernel 8–7
System Configuration File
Example 8–1 Alpha AXP System Configuration File
ident "GERTIE"
options UERF
options OSF
options _LMF_
options BIN_COMPAT
options COMPAT_43
options MACH
options MACH_IPC_TCACHE
options MACH_IPC_WWA
options MACH_IPC_XXXHACK
options BUFCACHE_STATS
options INOCACHE_STATS
options STAT_TIME
.
.
.
#
# Standard options.
#
options UNIX_LOCKS
options SER_COMPAT
options RT_PREEMPT
options RT_SCHED
options RT_SCHED_RQ
options RT_PML
options RT_TIMER
options RT_SEM
options RT_SEM
options RT_IPC
#
makeoptions CDEBUGOPTS="-g3"
makeoptions COMPRESS="-compress"
makeoptions PROFOPTS="-DPROFILING -DPROFTYPE=4"
#
# Max number of processors in the system (DO NOT CHANGE)
#
processors 16
#
# Special options (see configuring the kernel chapter
# in the Guide to System Administration)
#
dfldsiz 134217728
maxdsiz 1073741824
dfldsiz 2097152
maxssiz 33554432
cpu "DEC3000_500"
maxusers 32
config vmunix swap generic
(continued on next page)
8–8 Configuring the Kernel
System Configuration File
Example 8–1 (Cont.) Alpha AXP System Configuration File
bus tc0 at nexus?
callout after_c "../bin/mkdata tc"
bus tcds0 at tc0 slot 6 vector tcdsintr
controller scsi0 at tcds0 slot 0
controller scsi1 at tcds0 slot 1
bus tcds1 at tc0 slot 1 vector tcdsintr
controller scsi2 at tcds1 slot 0
controller scsi3 at tcds1 slot 1
bus tza0 at tc0 slot 4 vector tzaintr
controller scsi4 at tza0 slot 0
controller scc0 at tc0 slot 7 vector sccintr
controller fb0 at tc0 slot 8 vector faint
controller bba0 at tc0 slot 7 vector banter
controller ln0 at tc0 slot 7
pseudo-device sysv_hab
pseudo-device svid_three_hab
pseudo-device svr_four_hab
pseudo-device soe_two_hab
pseudo-device rt_hab
pseudo-device ether
pseudo-device loop
pseudo-device prf 6
pseudo-device lv 2
pseudo-device lsm_ted 0
pseudo-device lsm 1
pseudo-device ws
Configuring the Kernel 8–9
Building a Static Kernel
Building a Static Kernel
Overview The doconfig program creates a new (or modifies an existing)
system configuration file, creates the special device files for
statically configured drivers, and builds a new Digital UNIX
system kernel.
You need the following Digital UNIX software subsets installed to
rebuild your kernel:
• OSFBINnnn
• OSFBINCOMnnn
nnn corresponds to the operating system version.
Use setld -i to verify that these subsets are installed.
Using the
doconfig
Program
The following example shows how to automatically build a
kernel.
Example 8–2 Building a Kernel with the doconfig Program
1 $ su
2 # cp /vmunix /vmunix.old
3 # cp /genvmunix /vmunix
4 # /usr/sbin/shutdown -r now Boot generic kernel
5 # /usr/sbin/shutdown now To single-user mode
6 # /usr/sbin/doconfig
*** KERNEL CONFIGURATION AND BUILD PROCEDURE ***
*** FILE NAME SPECIFICATION ***
Enter a name for the kernel configuration file. [TINKER] Return
A configuration file with the name ’TINKER’ already exists.
Do you want to replace it? (y/n) [n]: y
. . .
*** KERNEL OPTION SELECTION ***
Selection Kernel Option
---------------------------------------------------------------
1 Streams Socket Coexistence (DLPI & STRIFNET)
2 Data Link Interface (DLI)
3 X/Open Transport Interface (XTISO)
4 ISO 9660 Compact Disc File System (CDFS)
5 All of the above
6 None of the above
---------------------------------------------------------------
Enter the selection number for each kernel option you want.
For example, 1 3 : 4
. . .
(continued on next page)
8–10 Configuring the Kernel
Building a Static Kernel
Example 8–2 (Cont.) Building a Kernel with the doconfig Program
Configuration file complete.
Do you want to edit the configuration file? (y/n) [n]: Return
*** CREATING SPECIAL FILES FOR DEVICES ***
A log file listing special device files is located in /dev/MAKEDEV.log
*** PERFORMING KERNEL BUILD ***
. . .
The new kernel is /sys/TINKER/vmunix.
7 # mv /sys/TINKER/vmunix /vmunix
8 # /usr/sbin/shutdown -r now Boot new kernel
1 You must be the root user to run doconfig and shut down the
system.
2 Optionally, save a copy of the running kernel. If there is not
sufficient space in the root file system, save it elsewhere.
3 When creating a new configuration file or adding new
hardware with doconfig, the system must be running the
generic kernel so that it can recognize all devices.
4 Reboot the system using the generic kernel.
5 Log in as root and shut down the system to single-user mode.
6 Run the doconfig program.
• The script will ask questions about the configuration file
(system) name and time zone and give you the option to
edit the configuration file. (The prompts will be familiar to
anyone who has run the installation script.)
• doconfig builds a new kernel and displays its pathname.
7 Move the new kernel to the root directory.
8 Reboot the system.
Note
If there are problems booting the new kernel, there may
be errors in the configuration file. You can boot the generic
kernel to single-user mode and copy the original kernel
back to /vmunix.
You can build a new kernel from an existing configuration
file by using doconfig with the -c option and the name of the
configuration file to bypass the questions, for example:
doconfig -c TINKER
You do not need to be running the generic kernel, and you need
to reboot only once after moving the new kernel to /vmunix. You
should still save the original kernel before creating a new one.
Configuring the Kernel 8–11
Configuring the System Dynamically
Configuring the System Dynamically
Overview Digital UNIX 4.0 supports a dynamic technique to configure a
kernel which differs significantly from the static method.
• Static method - edit configuration files, rebuild and reboot the
kernel
• Dynamic technique - uses commands which modify a special
database to configure the kernel
A related technique is bootstrap linking which is a method to
defer the actual linking of a kernel until boot time. A bootstrap
linked kernel is actually a set of directives in a sysconfig file that
tell the bootstrap program how to build the kernel in memory.
Some kernel subsystems such as the decnet subsystem are
dynamically loadable, meaning that you can add the subsystem
to or remove the subsystem from the kernel without rebuilding
the kernel. The following subsystems provided by Digital are
dynamically loadable:
• decnet for DECnet network software
• lat for Local Area Terminal
When you need to load, unload, or modify a dynamic subsystem,
use the /sbin/sysconfig command. Note that you must have
superuser privileges and also know the name of the subsystem
you want to manage. Subsystems are installed in either the
/subsys directory or the /var/subsys directory. Once a subset
is installed, a file named subsystem-name.mod appears in one of
the two directories. This name is used as input to the /etc/sbin
/sysconfigtab command.
Loading a
Subsystem
To load a subsystem use the following command
# /sbin/sysconfig -c decnet
This command would configure the kernel with DECnet network
software.
Unloading a
Subsystem
To unload a subsystem use the following command
# /sbin/sysconfig -u decnet
This command would unconfigure and unload the subsystem from
the kernel.
8–12 Configuring the Kernel
Configuring the System Dynamically
Querying
Subsystem
State
Subsystems may be in three different states:
• Loaded and configured (available for use)
• Loaded and unconfigured (not available for use but still
loaded)
• Unloaded (not available)
To query the state of subsystems use the following command
# /sbin/sysconfig -s
This command would list all subsystems, for example:
cm: loaded and configured
generic: loaded and configured
io: loaded and configured
ipc: loaded and configured
proc: loaded and configured
sec: loaded and configured
rt: loaded and configured
bsd_tty: loaded and configured
xpr: loaded and configured
dli: loaded and configured
atm: loaded and configured
atmip: loaded and configured
lane: loaded and configured
uni3x: loaded and configured
advfs: loaded and configured
net: loaded and configured
ppp: loaded and configured
snmpinfo: loaded and configured
bufcall: loaded and configured
streams: loaded and configured
dlb: loaded and configured
kinfo: loaded and configured
strstd: loaded and configured
timod: loaded and configured
tirdwr: loaded and configured
ldtty: loaded and configured
xtiso: loaded and configured
pts: loaded and configured
ufs: loaded and configured
vfs: loaded and configured
vm: loaded and configured
cma_dd: loaded and configured
cam_disk: loaded and configured
cam_tape: loaded and configured
cam: loaded and configured
tc: loaded and configured
bba: loaded and configured
ws: loaded and configured
sfbp: loaded and configured
lsm: loaded and configured
ddr: loaded and configured
kio: loaded and configured
kds: loaded and configured
lat: loaded and configured
Configuring the Kernel 8–13
Configuring the System Dynamically
If the user wants to check the state of only one subsystem, simply
list the subsystem name.
# /sbin/sysconfig -s ufs
Subsystem
Type
Prior to deciding on the method to use when a subset needs to be
managed, the administrator must understand if the subset is of
the static or dynamic type. The -m parameter yields the following:
# /sbin/sysconfig -m kinfo decnet
kinfo: static
decnet: dynamic
Automatically
Configured
Subsystems
Up to this point the kernel has been modified with dynamically
loaded subsets which are only valid until the next boot. This
is OK for a test environment but what if the subset is to be
used permanently and should be loaded on every system boot?
The system determines which subsystems to configure into the
kernel at system boot time by checking the list of automatically
configured subsystems.
This list is maintained using the sbin/init.d/autosysconfig
command. This command has three options: list, add, and delete.
List provides the list of loadable subsystems that the system
automatically configures at each reboot. Examples are:
# /sbin/init.d/autosysconfig list
# /sbin/init.d/autosysconfig add lat
# /sbin/init.d/autosysconfig delete lat
8–14 Configuring the Kernel
Modifying System Attributes
Modifying System Attributes
Overview Subsystem attributes may be modified for various reasons with
system performance and general tuning being the most probable.
There are two methods used:
• The sysconfig command allows attributes to be changed in the
current running system. Changes are not valid over a reboot.
• The sysconfigtab database stores modifications so that they
remain in effect or survive a system reboot. This is the
prefered method for modifying system parameters.
Note
Refer to System Administration manual Chapter 4 for the
list of subsystems provided by Digital which support this
type of boot-time modification.
Note that the attributes stored in the database or those changed
with the sysconfig command will override those found in the
system configuration file and the param.c file. The latter two
files should be viewed as definitions of the default values for
the kernel. These commands can be accessed through the CDE
interface /usr/bin/X11/dxkernelturner.
Subsystem
Attribute
Values
Actual values for the parameter or attribute in question are
identified as the first step. Use the command parameter -q option
and specify the name of the subsystem.
# /sbin/sysconfig -q generic
generic:
clock-frequency = 1024
booted_kernel = vmunix
booted_args = vmunix
lockmode = 0
lockdebug = 0
locktimeout = 15
max-lock-per-thread = 16
lockmaxcycles = 0
rt_preempt_opt = 0
rt-preempt-opt = 0
cpu_enable_mask = 18446744073709551615
cpu-enable-mask = 18446744073709551615
msgbuf_size = 4096
message-buffer-size = 4096
dump-sp-threshold = 4096
lite-system = 0
physio_max_coalescing = 65536
kmem-debug = 0
old-obreak = 1
user_cfg_pt = 40100
Configuring the Kernel 8–15
Modifying System Attributes
Identifying
Dynamic
Values
Attributes that can be modified in the running system can be
identified by using the -Q option.
# /sbin/sysconfig -Q generic
generic:
clock-frequency - type=INT op=CQ min_val=0 max_val=524288
booted_kernel - type=STRING op=Q min_len=0 max_len=0
booted_args - type=STRING op=Q min_len=0 max_len=0
lockmode - type=LONG op=CQ min_val=0 max_val=4
lockdebug - type=LONG op=CQ min_val=0 max_val=1
locktimeout - type=LONG op=C min_val=0 max_val=9223372036854775807
max-lock-per-thread - type=INT op=CQ min_val=0 max_val=1024
lockmaxcycles - type=LONG op=CRQ min_val=0 max_val=9223372036854775807
rt_preempt_opt - type=LONG op=CQ min_val=0 max_val=1
rt-preempt-opt - type=LONG op=CQ min_val=0 max_val=1
cpu_enable_mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615
cpu-enable-mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615
msgbuf_size - type=LONG op=CQ min_val=0 max_val=1048576
message-buffer-size - type=LONG op=CQ min_val=0 max_val=1048576
dump-sp-threshold - type=INT op=CRQ min_val=0 max_val=4096
lite-system - type=INT op=CQ min_val=0 max_val=1
physio_max_coalescing - type=INT op=CRQ min_val=0 max_val=262144
kmem-debug - type=LONG op=CQ min_val=0 max_val=1
old-obreak - type=LONG op=CQ min_val=0 max_val=1
user_cfg_pt - type=INT op=RQ min_val=40000 max_val=50000
Minimum and maximum values are displayed along with the field
op=CRQ.
• C - attribute may be modified when the subsystem is initially
loaded
• R - attribute may be modified when the subsystem is running
• Q - attribute may be queried
Modifying
Attributes at
Run Time
This option is particularly useful when the superuser wishes to
experiment with modifications or test the system. You can use
the /sbin/sysconfig -r command specifying the attribute, the new
value, and subsystem name.
For example to change the lockmaxcycles value in the generic
subsystem:
sysconfig -r generic lockmaxcycles=100
Note that this new attribute value will be applied to the running
kernel, but will not be retained over the next reboot.
8–16 Configuring the Kernel
Modifying System Attributes
Subsystem
Attributes
Database
Assuming the previous experiment results in improved system
behavior, the system administrator must make the attribute
value change persistent, that is the new value is to be used with
every reboot. This is accomplished by using the /etc/sysconfigtab
database to store the changes. Note however that placing a
change in the database will not cause the attribute to be modified
in the running kernel. You must use the /sbin/sysconfig -r
command or reboot.
To add, update or remove entries in the database, you must create
a stanza -format file which contains the desired information.
generic:
lockmaxcycles=100
Next issue the command to add the new attribute value.
# /sbin/sysconfigdb -a -f filename
where filename is the name of the stanza-format file.
Updating
Attributes
Use the -u option to update the entire definition of a subsystem
that is already in the /etc/sysconfigtab database.
# /sbin/sysconfigdb -u -f filename generic
This command would update the generic subsystem based on the
parameters in the filename file.
Removing
Attributes
Use the -r option to remove one or attributes as defined in the
stanza file.
# /sbin/sysconfigdb -r -f filename
List Attributes Use the -l option to list the entries in the /etc/sysconfigtab
database. Specify the subset name on the command line,
otherwise all entries in the database are listed.
# /sbin/sysconfigdb -l ufs
Deleting
Attributes
This command is used to delete the definition of a subsystem
entry from the database. In other words, the subsystem receives
default values the next time it is configured. In this example, the
generic subsystem will be set to default values.
# /sbin/sysconfigdb -d generic
Configuring the Kernel 8–17
Summary
Summary
Building a New
Kernel
You need to build a new kernel to:
• Add a new device and its static driver to your configuration
• Remove a device and its static driver from your configuration
• Tune the operating system
• Add layered products
System
Configuration
File
The system configuration file describes how you want the
configuration software to build the kernel. It identifies some some
system parameters that affect how the kernel operates. Kernel
subsystems are:
• File systems
• Network protocol families
• Physical and pseudodevice drivers
• STREAMS drivers and modules
Building a
Static Kernel
The doconfig(8) program creates a new or modifies an existing
system configuration file, creates the special device files for
statically configured drivers, and builds a new Digital UNIX
system kernel.
Dynamic
System
Configuration
Digital UNIX Version 4.0 supports a dynamic technique to
configure a kernel that differs significantly from the static
method.
• Static method - edit configuration files, rebuild and reboot the
kernel
• Dynamic technique - uses commands that modify a special
database to configure the kernel
Modifying
System
Attributes
Subsystem attributes that are dynamic in nature may be modified
with the sysconfig command. Persistent modifications (those that
remain across reboots) are handled in the sysconfigtab database.
8–18 Configuring the Kernel
Exercises
Exercises
System
Configuration
File
1. Locate and display the generic configuration file.
2. Locate and display the current configuration file.
3. Change the system configuration file to increase the ubc buffer
cache to 70%. Make a copy of the configuration file before you
change it. (Hint: Add the bufcache line with the other global
keywords.)
4. Determine the maximum number of users (maxusers) in your
configuration file.
5. Determine which file systems are configured in your kernel.
(Hint: See the options.)
Building a
Static Kernel
1. Use doconfig(8) to build a new kernel. Follow the steps in
Example 8–2.
2. Edit the system configuration file to increase the buffer cache
by 5%. Use doconfig -c to build a new kernel.
Dynamically
Configure the
Kernel
1. Dynamically configure the lat subsystem into the running
kernel.
2. Verify that it is successfully configured.
Modifying a
Running Kernel
1. Determine the value of the dynamic attribute lockmaxcycles in
the generic subset.
2. Is it possible to change the attribute value in the running
kernel?
3. If yes, change the value to 100.
Persistent
Changes
Modify the value of the dynamic attribute lockmaxcycles in the
generic subset so that it configures correctly across multiple
reboots of the system.
Configuring the Kernel 8–19
Solutions
Solutions
System
Configuration
File
1. # more /sys/conf/GENERIC
2. For a system named tinker,
# more /sys/conf/TINKER
3. Add or change the line
ubc_maxpercent 70
4.
# grep maxusers /sys/conf/TINKER
maxusers 32
5. # grep FS /sys/conf/TINKER
options NFS
options CDFS
options SYSV_FS
options UFS
Building a
Static Kernel
1. See Example 8–2.
2. # doconfig -c TINKER
*** KERNEL CONFIGURATION AND BUILD PROCEDURE ***
.
.
.
The new kernel is /sys/TINKER/vmunix.
Dynamically
Configure the
Kernel
1. To add the subsystem:
# /sbin/sysconfig -c lat
2. Verify the subsystem:
# /sbin/sysconfig -s lat
lat: loaded and configured
Modifying a
Running Kernel 1. Determine the value:
# /sbin/sysconfig -q generic lockmaxcycles
Record value here ___________
2. Change value possible:
8–20 Configuring the Kernel
Solutions
# /sbin/sysconfig -Q generic
generic:
clock-frequency - type=INT op=CQ min_val=0 max_val=524288
booted_kernel - type=STRING op=Q min_len=0 max_len=0
booted_args - type=STRING op=Q min_len=0 max_len=0
lockmode - type=LONG op=CQ min_val=0 max_val=4
lockdebug - type=LONG op=CQ min_val=0 max_val=1
locktimeout - type=LONG op=C min_val=0 max_val=9223372036854775807
max-lock-per-thread - type=INT op=CQ min_val=0 max_val=1024
YES -----------------+
V
lockmaxcycles - type=LONG op=CRQ min_val=0 max_val=9223372036854775807
rt_preempt_opt - type=LONG op=CQ min_val=0 max_val=1
rt-preempt-opt - type=LONG op=CQ min_val=0 max_val=1
cpu_enable_mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615
cpu-enable-mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615
msgbuf_size - type=LONG op=CQ min_val=0 max_val=1048576
message-buffer-size - type=LONG op=CQ min_val=0 max_val=1048576
dump-sp-threshold - type=INT op=CRQ min_val=0 max_val=4096
lite-system - type=INT op=CQ min_val=0 max_val=1
physio_max_coalescing - type=INT op=CRQ min_val=0 max_val=262144
kmem-debug - type=LONG op=CQ min_val=0 max_val=1
old-obreak - type=LONG op=CQ min_val=0 max_val=1
user_cfg_pt - type=INT op=RQ min_val=40000 max_val=50000
3. Modify running kernel:
# /sbin/sysconfig -r generic lockmaxcycles=100
Shutdown -r now checking lockmaxcycles
# /sbin/sysconfig -q generic lockmaxcycles
Record value here ___________
Persistent
Changes
Edit a change file in the stanza-format change_lockmaxcycles.
(change_lockmaxcycles)
generic:
lockmaxcycles=100
Check the database for existing entries.
# /sbin/sysconfigdb -l
No entries should be found.
Apply the change.
# /sbin/sysconfigdb -a -f change_lockmaxcycles
Shutdown -r now testing database change.
Recheck the value of lockmaxcycles.
# /sbin/sysconfig -q generic lockmaxcycles
Configuring the Kernel 8–21
9
Configuring Peripherals
Configuring Peripherals 9–1
About This Chapter
About This Chapter
Introduction The system communicates with peripheral devices, such as
terminals, printers, and disk drives through device drivers.
These device drivers are accessed through special files. Special
files provide two interfaces:
• Block interface — all access is through the buffer cache
• Character interface — no kernel buffering
The Digital UNIX operating system supports two types of
configurable drivers:
• Traditional static drivers — configured into the system and
compiled into the kernel
• Dynamically loadable drivers — may be loaded or unloaded
from a running system
Most devices are set up by the installation procedure. At boot
time, autoconfiguration code determines which of the traditional
devices are actually present.
To add a device to your system:
• Devices must be physically connected after the operating
system is shut down and the computer system is powered
down.
• When the operating system is running, you must make some
changes to system files so that the kernel will recognize these
new devices.
A driver must be specifically designed to be dynamically loadable;
it must link its interrupt handler into the interrupt table and
it must create entries in the device switch tables for it to be
accessible. As vendors gain more experience with Digital UNIX,
more dynamic drivers will be available. This chapter concentrates
on the traditional drivers.
This chapter demonstrates how to add various peripheral devices
to the system using the MAKEDEV script. This chapter assumes you
know how to build the kernel.
Objectives To configure peripheral devices into the system, you should be
able to:
• Describe device files
• Configure terminals and pseudoterminals
• Describe the Digital UNIX LAT service
• Configure the LAT devices for a terminal server
• Describe dynamic device configuration for disk and tape drives
9–2 Configuring Peripherals
About This Chapter
• Configure printers on a Digital UNIX system using the CDE
Printer Configuration.
• Manage the print system
Resources For more information on the topics in this chapter, see the
following list of resources:
• Nemeth, Snyder, & Seebass, (c) 1989, UNIX System
Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6,
Chapters 7, 9, 10, 11 and 12
• Digital UNIX System Administration, Appendix A
• Digital UNIX Reference Pages, Section 7: Special Files
• Digital UNIX Network Administration, Chapters 4 and 13
Configuring Peripherals 9–3
Device Files
Device Files
Overview The special files in /dev provide access to the device drivers in the
kernel.
Some devices, such as disks, have both character and block device
files; they prefix the character device name with an "r" for raw.
Each device is identified by a device number, which consists of
two parts:
• Major number — identifies the driver or type of device
• Minor number — interpreted by the driver; usually identifies
the particular device; often called the unit number
The major number is used as an index into the cdevsw table for
character devices or bdevsw table for block devices. Each entry in
these tables contains entry points for the associated driver code.
The minor number may set a particular characteristic of the
device. For example, a tape drive may use minor numbers to
represent various recording densities.
Special files in /dev provide access to devices. Example 9–1 shows
some special files in the /dev directory.
Example 9–1 The /dev Directory
# file /dev/*
/dev/MAKEDEV: /sbin/sh shell script -- commands text
/dev/MAKEDEV.log: ascii text
/dev/SYSV_PTY: /sbin/sh shell script -- commands text
/dev/atm_cmm: character special (47/0)
/dev/audit: character special (17/0)
/dev/binlogdmb: socket
/dev/cam: character special (30/0)
/dev/console: character special (0/0) VS_SLU #0 GRAPHICS terminal #0
/dev/kbinlog: character special (31/0)
/dev/kcon: character special (3/1)
/dev/keyboard0: character special (25/1) VS_SLU #0 LK401 terminal #1
/dev/klog: character special (3/0)
/dev/kmem: character special (2/1)
/dev/lat: directory
/dev/log: socket
/dev/mem: character special (2/0)
/dev/mouse0: character special (23/1) VS_SLU #0 VSXXXAA terminal #1
/dev/nrmt0a: character special (9/5127) SCSI #0 TLZ06 tape #5 (SCSI ID #5)
/dev/nrmt0h: character special (9/5123) SCSI #0 TLZ06 tape #5 (SCSI ID #5)
/dev/nrmt0l: character special (9/5121) SCSI #0 TLZ06 tape #5 (SCSI ID #5)
/dev/nrmt0m: character special (9/5125) SCSI #0 TLZ06 tape #5 (SCSI ID #5)
/dev/null: character special (2/2)
/dev/pfcntr: character special (26/0)
/dev/pipe: character special (32/58)
(continued on next page)
9–4 Configuring Peripherals
Device Files
Example 9–1 (Cont.) The /dev Directory
/dev/prf: character special (37/0)
/dev/printer: socket
/dev/ptm: character special (32/7)
/dev/ptmx: character special (32/63)
/dev/ptmx_bsd: character special (32/7)
/dev/pts: directory
/dev/ptyp0: character special (7/0)
/dev/ptyp1: character special (7/1)
/dev/ptyp2: character special (7/2)
/dev/ptyp3: character special (7/3)
.
.
.
/dev/ptyqf: character special (7/31)
/dev/rmt0a: character special (9/5126) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0)
offline
/dev/rmt0h: character special (9/5122) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0)
offline
/dev/rmt0l: character special (9/5120) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0)
offline
/dev/rmt0m: character special (9/5124) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0)
offline
/dev/rrz0a: character special (8/0)
/dev/rrz0b: character special (8/1)
/dev/rrz0c: character special (8/2)
/dev/rrz0d: character special (8/3)
/dev/rrz0e: character special (8/4)
/dev/rrz0f: character special (8/5)
/dev/rrz0g: character special (8/6)
/dev/rrz0h: character special (8/7)
/dev/rrz1a: character special (8/1024)
/dev/rrz1b: character special (8/1025)
/dev/rrz1c: character special (8/1026)
(continued on next page)
Configuring Peripherals 9–5
Device Files
Example 9–1 (Cont.) The /dev Directory
.
.
.
/dev/rrz4g: character special (8/4102)
/dev/rrz4h: character special (8/4103)
/dev/rz0a: block special (8/0)
/dev/rz0b: block special (8/1)
/dev/rz0c: block special (8/2)
/dev/rz0d: block special (8/3)
/dev/rz0e: block special (8/4)
/dev/rz0f: block special (8/5)
/dev/rz0g: block special (8/6)
/dev/rz0h: block special (8/7)
/dev/rz1a: block special (8/1024)
.
.
.
/dev/rz4f: block special (8/4101)
/dev/rz4g: block special (8/4102)
/dev/rz4h: block special (8/4103)
/dev/sad: directory
/dev/snmpinfo: character special (32/49)
/dev/streams: directory
/dev/tty: character special (1/0)
/dev/tty00: character special (24/2) VS_SLU #0 terminal #2 modem_control off
/dev/tty01: character special (24/3) VS_SLU #0 terminal #3 modem_control off
/dev/ttyp0: character special (6/0)
/dev/ttyp1: character special (6/1)
/dev/ttyp2: character special (6/2)
.
.
.
/dev/ttyqd: character special (6/29)
/dev/ttyqe: character special (6/30)
/dev/ttyqf: character special (6/31)
/dev/ws0: character special (33/1) VS_SLU #0 PMAGB-BA terminal #1
/dev/zero: character special (38/0)
9–6 Configuring Peripherals
Configuring Terminals
Configuring Terminals
Configuring
Terminals
This section describes how to configure terminals and
pseudoterminals.
You should log in as root for this procedure. Look at the generic
system configuration file for sample device definition lines.
To add terminals to your system, use the following procedure:
1. If the controller driver is not dynamically loadable, add the
device definition to the system configuration file and rebuild
the kernel. See the Reference Pages for the device for a sample
specification.
2. Connect the controller:
a. Shut down and power off the system.
b. Install the controller.
c. Power up and boot the system.
3. Change to the /dev directory and create the special files using
the MAKEDEV(8) command in the following format:
MAKEDEV device#
device is the device mnemonic name for the terminal
multiplexer you are adding. # is the device unit number.
4. Add the new tty lines to the /etc/inittab(4) file using the
following format:
tty:run-level:action:command
Enable the terminal line for run levels 2 and 3. The respawn
action causes init to restart the command if it does not exist;
the off action causes init to terminate the command if it is
running. The command for terminals is generally the getty(8)
command. For example, the first line enables tty02 for run
levels 2 and 3, and the second line disables logins on tty03.
tty02:23:respawn:/usr/sbin/getty /dev/tty02 9600 vt100
tty03:23:off:/usr/sbin/getty /dev/tty03 9600 vt100
5. To allow root logins on a terminal, add the new tty line to the
/etc/securettys file. For example:
/dev/tty08
/dev/tty09
/dev/tty10
6. Force init to reexamine the inittab file and initialize the tty
lines:
# init q
The MAKEDEV shell script is a front-end to the mknod(8) command; it
provides default values.
Configuring Peripherals 9–7
Configuring Terminals
Configuring
Pseudoterminals
Pseudoterminals, unlike terminals, have no corresponding
physical terminal port on the system. Pseudoterminals use two
files - pty (master) and tty (slave). Pseudoterminals are used
by remote login sessions, window-based software, and shells for
access to a system.
Digital UNIX offers two implementations of pseudoterminals:
BSD STREAMS amd BSD clist. See System Administration,
Chapter 5 for more information.
To add pseudoterminals to your system, use the following
procedure:
1. Use pty and nptys with sysconfigtab to increase the number
of pseudoterminals if needed. By default, the kernel supports
255 pseudoterminals.
2. Boot the new kernel.
3. Change to the /dev directory and create the special files using
the MAKEDEV(8) command in the following format:
MAKEDEV pty#
# represents the set of pseudoterminals you want to create.
For example, if you already have pty sets 0 and 1, create pty2.
MAKEDEV will list the files it creates.
# MAKEDEV pty2
MAKEDEV: special file(s) for pty2:
ptyr0 ttyr0 ptyr1 ttyr1 ptyr2 ttyr2 ptyr3 ttyr3 ptyr4 ttyr4 ptyr5
ttyr5 ptyr6 ttyr6 ptyr7 ttyr7 ptyr8 ttyr8 ptyr9 ttyr9 ptyra ttyra
ptyrb ttyrb ptyrc ttyrc ptyrd ttyrd ptyre ttyre ptyrf ttyrf
4. To allow root logins on all pseudoterminals, add an entry for
ptys to the /etc/securettys file.
9–8 Configuring Peripherals
LAT Terminal Servers
LAT Terminal Servers
Overview Digital UNIX supports the LAT protocol for communicating with
terminal servers. Digital originated the terminal server concept
in the early 1980s using a highly efficient protocol known as Local
Area Transport (LAT). LAT is an Ethernet protocol used in local
area networks that transfers data on a character-by-character
basis.
Terminal and print servers are dedicated, special-purpose systems
that provide resource sharing within a local area network.
Terminal servers provide a cost-effective, flexible way to connect
terminals to hosts. Each terminal connected to a terminal server
can access services running on service nodes connected to the
same local network. Figure 9–1 shows how terminal servers
provide access to the host for terminals and printers.
Figure 9–1 Providing Access for Terminals and Printers
Host
ZKOX−055000111−14−RGS
Terminal
Server
A host on the network may be:
• Load host — maintains LAT software
Used to boot a LAT server
Used for upline dumping from a LAT server
• Service node — provides access for users to log in
For more information, see lat(4), latsetup(8), latcp(8), and
Network Administration.
Configuring Peripherals 9–9
Adding Terminals on a Terminal Server
Adding Terminals on a Terminal Server
Configuring
LAT Devices
Digital UNIX systems support terminal servers using the LAT
protocol.
To configure the LAT devices, use the following procedure:
1. Verify that options LAT is in your system configuration file.
If you use doconfig to build the kernel, the option should be
there as soon as the lat subsets are installed. If not, add it,
rebuild, and boot the new kernel.
2. Use latsetup to create the LAT device special files and start
the LAT.
You should log in as root for this procedure.
The following table summarizes the latsetup versus manual
method.
latsetup Manual Method
Creates sets of 16 LAT
device special files
MAKEDEV latn
Adds the new tty lines to
/etc/inittab
For example, latty0a:234:respawn:
/usr/sbin/getty /dev/tty0a then use
init q to make changes take effect
Creates the STREAMS
special file /dev/streams
/kinfo
strsetup -i
Sets the LAT_SETUP variable
in /etc/rc.config to 1 for
automatic startup
rcmgr set LAT_SETUP 1
Starts the LAT service latcp -s
Running
latsetup
The latsetup command provides an interactive, menu-driven
facility for administering LAT on your system. The following is an
example of a session to set up LAT. User selections are boldface.
Example 9–2 Using the latsetup Utility
# latsetup
LAT Setup Utility
The latsetup program provides assistance in setting up LAT on your system.
If this is the first time running latsetup on this system, it is recommended
to select the Initial LAT Setup option.
(continued on next page)
9–10 Configuring Peripherals
Adding Terminals on a Terminal Server
Example 9–2 (Cont.) Using the latsetup Utility
Exit
Initial LAT Setup
Create Additional Devices
Start/Stop LAT
Enable/Disable
LAT Automatic Startup/Shutdown
Undo LAT Setup
To select an option, use the <UP> or <DOWN> arrow keys and press <RETURN>
to enter the chosen submenu. To select options on a horizontal plane use the
<LEFT> or <RIGHT> arrow keys and press <RETURN>. To enter input,
type it in and then press <RETURN>.
Initial LAT Setup
This menu will allow you to setup LAT on your system by creating LAT
special device files, selecting how many getty entries should be placed
into /etc/inittab and choosing whether or not to execute init q. LAT will
be started to allow interactive connections to be made to this system and
a variable will be set in /etc/rc.config so that LAT automatic startup
and shutdown is enabled which will cause LAT to be started each time
this system reaches run-level 3.
Would you like to continue with this option?
YES NO
There are 16 LAT tty devices created.
There are 8 LAT entries already defined in /etc/inittab.
Select style of ttuys to create
SVR4 style ttys
BSD style ttys
How many LAT ttys do you want to create? (0 - 617) [0] 1
How many gettys would you like added to the /etc/inittab file? (0 - 1) [0] 1
NOTE: Please keep your system’s memory resources
in mind when specifying gettys to be added.
Would you like init q to be executed to spawn the new getty entries in
the /etc/inittab file?
YES NO
You requested: 1 tty and 1 getty and that init q be performed.
Are you satisfied with this input?
YES NO
Working on your request.
LAT tty devices have been created and getty entries defined.
There are now 1 LAT tty devices created.
There are now 1 LAT entries defined in /etc/inittab.
Enter <RETURN> to return to main menu
Return
LAT Setup Utility
(continued on next page)
Configuring Peripherals 9–11
Adding Terminals on a Terminal Server
Example 9–2 (Cont.) Using the latsetup Utility
The latsetup program provides assistance in setting up LAT on your system.
If this is the first time running latsetup on this system, it is recommended
to select the Initial LAT Setup option.
Exit
Initial LAT Setup
Create Additional Devices
Start/Stop LAT
Enable/Disable
LAT Automatic Startup/Shutdown
Undo LAT Setup
#
Controlling the
LAT Service
The latcp command controls and manages the LAT terminal
service. It allows you to start and stop LAT service and modify
and display configuration characteristics. Some latcp options:
-d Displays LAT host name and status information
-s Starts LAT service; enables connections from LAT
terminal servers to host
-h Halts LAT service
-g group,... Adds group codes to the groups enabled for your
host
-P tty,... Sets a list of ttys as being available only for
host-initiated connections
For example, to set up a host-initiated connection for a printer
connected to a terminal server port:
latcp -A -P tty -H node -R port [-Q]
• tty is the tty device to associate with the printer
• node is the name of the terminal server where the printer is
connected
• port is the name of the port on the terminal server
• -Q does not queue requests if the port is busy
The latcp command on Digital UNIX is similar to lcp on ULTRIX.
An alternative to the example is to specify the node and port in
the /etc/printcap file. Do not specify them in both places.
9–12 Configuring Peripherals
Configuring Disk and Tape Drives
Configuring Disk and Tape Drives
Overview Dynamic Device Recognition (DDR) is a framework that
describes the operating parameters and characteristics of SCSI
devices to the SCSI CAM I/O subsystem.
Beginning with Digital UNIX V4.0 it is the preferred method for
recognizing SCSI devices over the static method for recognizing
devices. Using this new method, DDR will modify the SCSI
CAM system to extract as much information as possible from a
device rather than depending on statically compiled tables. This
provides the following benefits:
• Devices are automatically recognized
• Static configuration is not required
• The system does not require a reboot
• Enhanced user system availability occurs
DDR
Operations
The default text database file is initially populated on the
software distribution, and is used when the system is booted at
installation to produce the binary database used by the kernel.
Changes to the database might be required under the following
conditions:
• Devices are not compatible with the SCSI-2 standard, thus
requiring different characteristics to be placed in the database
• Optimization of device defaults
Modification steps:
1. Device characteristic changes are edited into the text database
file /etc/ddr.dbase.
2. The ddr_config utility is invoked to read the text file.
3. Assuming no error in the format, the binary output is placed
into the binary database /etc/ddr.db.
4. The ddr_config utility notifies the kernel of the new
modification.
5. The kernel then synchronizes its in-memory device tables with
the definitions in the binary database file.
Since this mechanism is dynamic, devices may be automatically
configured into the kernel. Special handling with the ddr_config
utility is only required for nonstandard devices.
Modification Procedures
Refer to the System Administration Manual Chapter 5 for
procedural task details to modify the binary database.
Configuring Peripherals 9–13
Configuring a Printer with CDE Printer Configuration
Configuring a Printer with CDE Printer Configuration
Overview Digital UNIX Version 4.0 systems with graphics capability will
load and configure the new Common Desktop Environment (CDE)
automatically at boot time. This enables the user to invoke the
CDE Printer Configuration system administration application.
This application is used primarily to configure printers in the
following ways:
• Add a printer
• Modify a printer
• Select a printer for the system default printer
• Deconfigure a printer
This is the recommended way of configuring a printer in the
Digital UNIX print system.
Note that the CDE Printer Configuration does not have the
ability to control printers other than for the initial configuration.
These controls reside in the traditional utility lpc or CDE Printer
Manager application to manage print jobs and queues.
Using the
CDE Printer
Configuration
The CDE Printer Configuration is invoked in the same manner as
the other applications in the Application Manager - Configuration
window. Double-click the Print icon. At this point, the Get
Password Pop-up window is displayed and you must enter the
root password to continue.
Figure 9–2 Starting Printer Configuration
9–14 Configuring Peripherals
Configuring a Printer with CDE Printer Configuration
CDE Printer
Configuration
Options
Four configuration options are available in the Printer
Configuration window (shown in the next figure):
Figure 9–3 Printer Configuration
• Define Configuration... - adds a new printer to the system
• Modify Configuration... - allows one or more parameters to be
changed
• Set as Default Printer - selects the default printer for the
system; user would see this as a shortcut
• Deconfigure - removes a printer which had been previously
configured
The Printer Configuration window appears initially with the
Available Printer Types: list box showing printer types beginning
with remote.
Configuring a
Remote Printer
Select remote (highlighted in the previous figure) as the printer
type and then click the Define Configuration... button to begin the
configuration procedure. This causes the Remote Printer Settings
window to be displayed. The entry fields are:
• Printer Names: - the application will assign this variable. In
this case it is lp0, since no other printer is yet configured.
• Printer Aliases: - is optional
• Remote machine name (rm): - is required and must be a valid
host whose printer you intend to access.
Configuring Peripherals 9–15
Configuring a Printer with CDE Printer Configuration
• Remote printer name (rp): - must be a valid printer configured
on the remote host.
Figure 9–4 Remote Printer Settings
You must click the Commit button to complete the configuration
even if you did not make changes. The CDE Printer Configuration
will set all required parameters based on the type of printer
selected.
The
Advanced...
Button
The Advanced... button displays the Advanced Remote Printer
Settings window where the user can:
• Enter comments about the printer
• Change one or more default parameters
In this example the comment 2cents werth has already been
entered. The second comment testing is ready to be added by
clicking the Add button.
9–16 Configuring Peripherals
Configuring a Printer with CDE Printer Configuration
Figure 9–5 Advanced Remote Printer Settings Window
There are five variables used for configuring this remote printer.
The Error Log File Name (lf): entry field and the Spooling
directory (sd): entry field are filled in by the application.
The Max file size (mx): entry field is left empty by default. In this
case, 0 was entered to indicate that there is no maximum file size
imposed on any files sent to the remote printer.
Click OK when all option entries are correct. This will dismiss
the Advanced Remote Printer Settings window and bring the user
back to the Remote Printer Settings window. Click the Commit
button to complete the configuration.
The
/etc/printcap
File
When a file is scheduled to be printed the print daemon will scan
the /etc/printcap file to determine printer characteristics. The
entry in this file is created by the CDE Printer Configuration
application when the user clicks on the Commit button of the
Remote Printer Settings window. The contents of this file are
shown below using the more /etc/printcap command.
Configuring Peripherals 9–17
Configuring a Printer with CDE Printer Configuration
$ more /etc/printcap
# 2cents worth
lp0|0|don:
:lf=/usr/adm/lp0err:
:lp=:
:mx#0:
:rm=2cents:
:rp=worth:
:sd=/usr/spool/lpd0:
printcap: END
Configuring a
Local Printer
When the printer type selected is any other than remote (in the
Printer Configuration window), a local printer setup is assumed
and the Local Printing Settings window is displayed. The Printer
Names: entry field is automatically filled with lp1,1; because this
is the second printer to be configured. It is given an alias which
helps to identify it and make life simple for the user.
A new setting (not used when setting remote printer variables) is
the Connection type (ct):. This has a choice of two radio buttons.
First is the Direct connection implying either a serial or parallel
connection directly to this host. The other button is a local area
transport (LAT) connection which is chosen for this example.
Figure 9–6 Local Printer Settings Window
The LAT specification: toggle buttons allow you one of two
choices:
• by Port - this is the selection to use a singularly defined port
on a LAT server.
9–18 Configuring Peripherals
Configuring a Printer with CDE Printer Configuration
• by Service - defines a service where more than one port is
configured. This is used to construct a pool of printers where
a print job would be queued to an idle printer.
In this example the by Port toggle button is chosen and Printer
Configuration assigns a default in the Device pathname (lp):
entry field. The user must enter the LAT server nodename (Ts):
and the Port name (Op):. In this case, 22prnt is the the Port name
which is already defined and the single port on the chosen LAT
server 3cents.
The Advanced... button is used to either examine the printer
characteristic settings or modify them. In the next figure, the
Accounting file name (af): entry field is filled by the Printer
Configuration as well as the Stty baud rate (br): entry field.
Other characteristics are visible using the vertical scroll bar.
Figure 9–7 Advanced Local Printer Settings
Configuring Peripherals 9–19
Configuring a Printer with CDE Printer Configuration
Local Printer
/etc/printcap
As with the remote printer configuration, the /etc/printcap file
needs to be updated. Shown here are all the characteristics for
the printer lp1; an lno3r located at pole 2-2.
# ln03r
# pole 2-2
lp1|1|ln03:
:af=/usr/adm/lp1acct:
:br#9600:
:ct=lat:
:fc#0177777:
:fs$03:
:if=/usr/lbin//n03rof:
:if=/usr/adm/lp1err:
:lp=/dev/lat/636:
:mc#20:
:mx#0:
:of=/usr/1bin/ln03rof:
:pl#66:
:pw#80:
:rw:
:sd=/usr/spool/lpd1:
:xc#0177777:
:xf=/usr/lbin/xf:
:xs#044000:
:Op=22prnt:
:Ts=3cents
printcap: END
The br parameter specifies the baud rate for the printer. The
baud rate is dependent upon the printer hardware. Consult
your printer hardware manual for the correct baud rate. The br
parameter is only applicable for tty devices, that is, serial. This
parameter has no effect on printers connected to the console port
or to printers connected on a parallel port.
9–20 Configuring Peripherals
Managing the Print System
Managing the Print System
How Printing
Works
The print system on Digital UNIX is a combination of the
UNIX System V print system and the BSD UNIX print system.
Some commands from UNIX System V : lp(1), lpstat(1). Some
commands from BSD UNIX: lpr(1), lpq(1), lprm(1), lpc(8).
On Digital UNIX systems, printing is controlled by the lpd(8)
printer daemon.
• lpd manages a printer spooling system, where a file is placed
in a queue or spooling directory until the printer can print it.
• lpd is usually started when the system goes into multiuser
mode.
It prints any files that were not printed before shutdown.
It then waits for print requests.
• When you use lpr(1) to print a file, it activates the lpd
daemon, and it copies the file to the printer’s spooling
directory.
Control (cf) file specifies the name of the user file to be
printed and printing instructions.
Data (df) file contains the formatted text to be printed.
• lpd forks a copy of itself to handle the request.
Even though lpd is running on the system, there is no
daemon present on the queue until a print request is
submitted and lpd forks.
lpd reads the /etc/printcap file to determine printer
characteristics.
If the printer is remote, lpd communicates with the lpd
on the remote system, transfers the data and control files
there, then deletes the local copies.
lpd scans the spooling directory for a lock file.
* Contains the process identification number of the
daemon currently printing a file and the control file
name.
* If there is no lock file, lpd can create the lock file and
print the first file in the queue.
* The lock file prevents two daemons from working on
the same printer queue.
lpd also maintains a status file describing the current
printer status.
After a file has been printed, lpd removes the control and
data files and updates the status file.
Configuring Peripherals 9–21
Managing the Print System
This lpd exists as long as there are files in this queue.
Print System
Control
Commands
The following table lists the main commands to control the print
system.
Table 9–1 Print System Commands
Command Function
lp(1) Creates a print request
lpr(1) Creates a print request
lpq(1) Displays a printer queue
lprm(1) Removes print requests from a queue
lpstat(1) Displays printer status
lpc(8) Enables or disables a printer or printer queue;
rearranges the order of jobs in a queue; checks the
status of a printer, a queue and the printer daemon
lptest(8) Generates a test pattern
CDE Print
Manager
Displays print job status, finds a print job (among
known printers), and allows user to select printers
to be displayed in the Print Manager window
See the Reference Pages for more information.
Note
PrintServer printers require special software.
Using
the lptest
Command
The lptest(8) command generates a ripple test pattern of
printable ASCII characters to standard output. It can be used by
anyone to test terminals and printers.
The format for the lptest command is:
lptest [length [count]]
• length specifies the length of the output line; default is 79
characters.
• count specifies the number of output lines; default is 200 lines.
When count is specified, length must also be specified.
To send the test pattern to a printer, you can redirect standard
output
# lptest > /dev/tty02
# lptest | lpr - -P2
The following is an example of the lptest command.
9–22 Configuring Peripherals
Managing the Print System
Example 9–3 Using the lptest Command
# lptest 45 10
!"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM
"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN
#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO
$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP
%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ
&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR
’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS
()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST
)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU
*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV
#
Using the lpc
Command
lpc(8) is the line printer control program.
Configuring Peripherals 9–23
Managing the Print System
Table 9–2 Line Printer Control Commands
lpc Command Function
abort {all | printer} Terminates an active spooling daemon on the local host,
then disables printing (preventing new daemons from
starting). This is usually used with start to restart a
hung printer daemon (that is, lpq reports daemon present,
but nothing is printing).
disable {all | printer} Turns off the queue(s). (Sets group execute permission on
the lock file.)
enable {all | printer} Allows spooling on the queue(s). (Removes group execute
permission on the lock file.)
stop {all | printer} Stops the daemon after the current job completes and
disables printing. (Sets owner execute permission on the
lock file.)
start {all | printer} Enables printing and starts a daemon for the printer(s).
(Removes owner execute permission on the lock file.)
restart {all | printer} Attempts to start a new daemon. This is useful when the
daemon fails unexpectedly, leaving jobs in the queue (and
lpq reports "No daemon present").
status [printer] Displays the status of daemons and queues.
up [all | printer] Enables queuing and printing and starts a new daemon.
topq printer [job] [user] Moves jobs to the top of the printer queue.
You need queuing enabled and printing enabled in order to print.
The following example shows some typical lpc commands and the
resulting lpc response.
9–24 Configuring Peripherals
Managing the Print System
Example 9–4 Using the lpc Command
# lpc stat
lp:
printer is on device ’/dev/tty00’ speed 4800
queuing is enabled
printing is enabled
no entries
no daemon present
# lpc
lpc> disable lp
lp:
queuing disabled
lpc> stat
lp:
printer is on device ’/dev/tty00’ speed 4800
queuing is disabled
printing is enabled
no entries
no daemon present
lpc> q
#
Configuring Peripherals 9–25
Summary
Summary
Device Files Special files in /dev provide access to devices.
Each device is identified by a device number, which consists of
two parts:
• Major number — identifies the driver or type of device
• Minor number — interpreted by the driver; usually identifies
the particular device; often called the unit number
Configuring
Terminals
To add terminals to your system on a statically configured driver:
• Add the device definition to the system configuration file and
rebuild the kernel.
• Shutdown the system and connect the controller.
• Create the special files using MAKEDEV(8).
• Add the new tty lines to the /etc/inittab(4) file.
• Add the new tty lines to the /etc/ttys(4) file.
To add a set of 16 pseudoterminals to your system:
• Increase the value in the pseudo-device pty entry in the
system configuration file and rebuild the kernel.
• Create the special files using MAKEDEV(8).
• Add the new tty lines to the /etc/ttys(4) file.
LAT Terminal
Servers
Digital UNIX supports the LAT protocol for communicating with
terminal servers.
Adding
Terminals on
a Terminal
Server
To configure the LAT devices, use the following procedure.
1. Verify that options LAT is in your system configuration file. If
not, add it, rebuild and boot the new kernel.
2. Use latsetup to create the LAT device special files and start
the LAT.
The latcp command is used to control and manage the LAT
terminal service. It allows you to start and stop LAT service,
modify and display configuration characteristics.
Configuring
Disks and Tape
Drives
To add a disk or tape drive with a statically configured driver:
• Shut down the system and connect the device.
• Boot the generic kernel /genvmunix.
• Add the device definition to the system configuration file and
rebuild the kernel.
• Create the special files using the MAKEDEV(8) command.
9–26 Configuring Peripherals
Summary
Configuring a
Printer with the
CDE Printer
Configuration
Digital UNIX Version 4.0 systems with graphics capability will
load and configure the new Common Desktop Environment (CDE)
automatically at boot time. This enables the user to invoke the
CDE Print Manager system administration application. This
application is used primarily to configure printers in the following
ways:
• Add a printer
• Modify a printer
• Select a printer for the system default printer
• Deconfigure a printer
Managing the
Print System
On Digital UNIX systems, printing is controlled by the lpd(8)
printer daemon, which manages a spooling system.
There are a number of commands to control the print system:
Command Function
lp(1) Creates a print request
lpr(1) Creates a print request
lpq(1) Displays a printer queue
lprm(1) Removes print requests from a queue
lpstat(1) Displays printer status
lpc(8) Enables or disables a printer or printer queue;
rearranges the order of jobs in a queue; checks
the status of a printer, a queue, and the printer
daemon
lptest(8) Generates a test pattern
Configuring Peripherals 9–27
Exercises
Exercises
Device Files 1. Bring your system to console level and invoke the help
command.
2. Issue the command(s) to show the devices on the system and
boot the system.
Configuring
Terminals
1. Check the ttys(4) man page.
a. What are the possible values for the third field?
b. What would be the entry for ttyq5 allowing root to log in?
2. If your system allows a terminal controller option, use
MAKEDEV(8) to create the device files and add the new entries to
the inittab(4) file.
3. Create the next set of pseudoterminals.
4. Change the status of the following terminal lines:
a. Enable root logins on tty02
b. Disable logins on tty03
Adding
Terminals on
a Terminal
Server
1. Verify that Options LAT is in your system configuration file.
2. Run latsetup and create a set of LAT devices.
Dynamic
Device
Recognition
Disk and tape devices are automatically configured. Check the
drives configured in your system configuration file.
1. Check the drives found in your /etc/ddr.dbase file.
2. Check the drives configured in your system configuration file.
Adding a
Printer with
CDE Printer
Configuration
1. Add a remote printer and remove the size restriction.
2. Add a local printer configured on a LAT server.
Note
Your instructor will give you the host names, print queue
names, and baud rates to use for the available classroom
printers.
9–28 Configuring Peripherals
Exercises
Managing the
Print System
1. Use the lptest(8) command.
a. Try lptest without options.
b. Generate a test pattern 65 characters wide and 25 lines
long.
c. Generate a test pattern 10 lines long.
d. If a printer is available on your system, redirect output
from the test to the printer.
2. Use the lpc(8) command.
a. Check the status.
b. Disable queuing on one printer.
c. Disable printing on that printer.
d. Enable queuing.
e. Enable printing.
f. Enable everything and restart the daemon (up command).
Configuring Peripherals 9–29
Solutions
Solutions
Device Files 1. Power up the system or shut down and halt the system. You
should see the prompt >>>. Type help.
2. On an Alpha AXP system, use the commands:
show config
show device
Configuring
Terminals
1.
a. none for terminal lines and network for pseudoterminal
lines
b.
ttyq5 none network secure
ttyq5 is a pseudoterminal line
2.
# cd /dev
# MAKEDEV mdc0
MAKEDEV: special file(s) for mdc0:
tty02 tty03 tty04 tty05 tty06 tty07 tty08 tty09 tty10 tty11
# vi /etc/inittab
.
.
.
tty02:23:respawn:/usr/sbin/getty /dev/tty02 9600 vt100
tty03:23:respawn:/usr/sbin/getty /dev/tty03 9600 vt100
.
.
.
tty11:23:respawn:/usr/sbin/getty /dev/tty11 9600 vt100
3.
# cd /dev
# MAKEDEV pty2
MAKEDEV: special file(s) for pty2:
ptyr0 ttyr0 ptyr1 ttyr1 ptyr2 ttyr2 ptyr3 ttyr3 ptyr4 ttyr4 ptyr5
ttyr5 ptyr6 ttyr6 ptyr7 ttyr7 ptyr8 ttyr8 ptyr9 ttyr9 ptyra ttyra
ptyrb ptyrb ptyrc ttyrc ptyrd ttyrd ptyre ttyre ptyrf ttyrf
4.
a. Edit /etc/securettys for the entry tty02 none none secure
b. Edit /etc/inittab for the entry tty03:23:off:/usr/sbin
/getty /dev/tty03 9300 vt100
9–30 Configuring Peripherals
Solutions
Adding
Terminals on
a Terminal
Server
1.
# grep LAT /sys/conf/TINKER
options LAT
2. See the example in the text.
Dynamic
Device
Recognition
1. # more /etc/ddr.dbase
2. # grep drive /sys/conf/yourhostname
Adding a
Printer with
CDE Printer
Configuration
1. Similar to the "remote" example in the text.
2. See the local printer example in the text.
Managing the
Print System
1. Use lptest
a.
# lptest
!"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmno
"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnop
#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopq
$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqr
%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrs
&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrst
’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrstu
()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrstuv
)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrstuvw
.
.
.
b.
# lptest 65 25
c.
# lptest 79 10
d.
# lptest 79 10 >/dev/lp0
2. Use lpc
Configuring Peripherals 9–31
Solutions
# lpc
lpc> stat
lp:
printer is on device ’/dev/lp’ speed -1
queuing is enabled
printing is enabled
no entries
no daemon is present
lpc> disable lp
lp:
queuing disabled
lpc> stop lp
lp:
printing disabled
lpc> enable lp
lp:
queuing enabled
lpc> start lp
lp:
printing enabled
daemon started
lpc> up all
lp:
queuing enabled
printing enabled
daemon started
lpc> q
#
9–32 Configuring Peripherals
Index
A
address
Ethernet, 6–6
Internet, 6–6
Advanced File System
See AdvFS
AdvFS, 2–25, 2–34
ARC, 4–2
ARC console, 4–7
ARC Multiboot, 4–7
ARP
Address Resolution Protocol, 6–6
B
backup, 2–19, 2–24
Berkeley fast file system, 2–27
booting, 3–16
initializing the kernel, 3–17
bootstrapping process
See booting
broadcast message, 6–10
Broadcast Message, 3–12
BSD, 1–8
bufcache, 8–5
buffer cache, 2–26
C
CDE, 1–17
CDE License Manager, 7–14
CDE Print Manager, 9–14
CDE Shutdown, 3–11
CDFS, 2–25
client-server model, 6–4
config, 8–6
connection-oriented mode, 6–4
connectionless mode, 6–4
console commands, 4–6
Console firmware services, 4–4
cylinder, 2–5
D
DailyAdmin window, 3–11
DDR, 9–13
device drivers, 9–2
df, 7–3
df(1), 2–21, 2–22
disk drive
Figure, 2–4
disklabel(8), 2–21, 2–22
doconfig(8), 8–10
dynamic configuration, 8–2, 9–2
E
Edit List, 7–16
Edit New, 7–16
/etc/hosts, 6–7, 6–12
/etc/hosts.equiv, 6–12, 6–13
/etc/hosts.lpd, 6–12, 6–13
/etc/inetd.conf, 6–12, 6–14
/etc/inittab, 9–7
/etc/networks, 6–12, 6–15
/etc/printcap, 6–14, 9–21
/etc/protocols, 6–12, 6–15
/etc/securettys, 1–16
/etc/services, 6–12, 6–16
F
fasthalt(8), 3–8
FFM, 2–25
File domain, 2–38
File Open, 7–17
Fileset, 2–39
firmware update, 4–9
fsck(8), 2–21, 2–22
G
gateway, 6–5
getty(8), 9–7
Index–1
H
halt(8), 3–7
head, 2–5
I
init(8), 3–8, 9–7
initdefault, 3–22
initialization files, 3–18
/sbin/rc*.d, 3–24
Initialization files
/sbin/rc*.d, 3–26
Internet Domain Name Service, 6–7
IP
Internet Protocol, 6–6
ISO 9660-1988, 2–25
K
kernel, 1–6, 1–7, 8–2
Mach, 1–8
L
LAT, 9–9
latcp(8), 9–12
latsetup(8), 9–10
example, 9–10
licenses required, 7–15
lmf, 7–11
LMF, 7–9
lmfsetup, 7–12
Logical Storage Manager
See LSM
lp(1), 9–22
lpc(8), 9–22, 9–23
lpd(8), 9–21
lpq(1), 9–22
lpr(1), 9–22
lprm(1), 9–22
lpstat(1), 9–22
lptest(8), 9–22
LSM, 2–38
M
MAKEDEV, 9–8
MAKEDEV(8), 9–7
maxusers, 8–5
MFS, 2–25
N
netmask, 6–10
newfs(8), 2–10, 2–21, 2–22
NFS, 2–25
No Disk Sync, 3–13
O
OSF/1, 1–8
P
PAK, 7–9, 7–14
partition
size change, 2–21
performance
improve by dividing swap space, 2–19,
2–24
improve by separating file systems, 2–19,
2–24
platter, 2–4
Preshutdown Script, 3–12
protocol, 6–4
pseudodevice, 8–6
R
reboot
methods, 3–4
reboot(8), 3–9
rebooting, 3–9
remote installation service, 7–4
.rhosts, 6–13
root login, 1–15
run level, 9–7
S
/sbin/rc*.d, 3–24, 3–26
sector, 2–5
setld(8), 7–3
shutdown
methods, 3–4
Shutdown Manager window, 3–12
shutdown(8), 3–4, 8–10
software subset, 7–3
special files, 9–2
spooling, 9–21
SRM, 4–2
SRM console command list, 4–6
stanza -format, 8–17
static configuration, 8–2, 9–2
su(1), 1–15
subnetwork, 6–9
Index–2
superuser, 1–15
surface, 2–4
Switching from ARC to SRM, 4–8
/sys/conf/GENERIC, 8–4
/sys/conf/NAME, 8–4
LAT, 9–10
/sys/conf/param.c, 8–4
T
timezone, 8–5
track, 2–5
U
UFS, 2–25, 2–27, 2–36
UNIX, 1–6
user ID, 1–15
V
/var/adm/sialog, 1–16
VFS, 2–25
vmunix, 8–10
/vmunix, 1–7
vnode, 2–26
Volume, 2–38
Index–3
Dunix sys operating

Dunix sys operating

  • 1.
    Digital UNIX SystemAdministration Course Guide, Volume 1 Order Number: EY-U659E-S1.0002
  • 2.
    September 1996 Digital EquipmentCorporation makes no representations that the use of its products in the manner described in this publication will not infringe on existing or future patent rights, nor do the descriptions contained in this publication imply the granting of licenses to make, use, or sell equipment or software in accordance with the description. Reproduction or duplication of this courseware in any form, in whole or in part, is prohibited without the prior written permission of Digital Equipment Corporation. Possession, use, or copying of the software described in this publication is authorized only pursuant to a valid written license from Digital or an authorized sublicensor. © Digital Equipment Corporation 1995, 1996. All rights reserved. Printed in U.S.A. The following are trademarks of Digital Equipment Corporation: Alpha AXP, CompacTape, DEC, DECevent, DEC VET, DEC Fortran, DECthreads, DEC Chip, DECnet, DECwindows, Digital, DNA, LAT, POLYCENTER, OpenVMS, TURBOchannel, ULTRIX, and the DIGITAL logo. The following are third-party trademarks used in this course: AIX is a registered trademark of International Business Machines Corp. Futurebus/Plus is a registered trademark of Force Computers GMBH, Federal Republic of Germany. Global Knowledge Network and the Global Knowledge Network logo are trademarks of Global Knowledge Network, Inc. IEEE is a registered trademark of the Institute of Electrical and Electronics Engineers, Inc. Motif, OSF and OSF/1 are registered trademarks of the Open Software Foundation. MS–DOS is a registered trademark of Microsoft Corporation. NFS is a registered trademark of Sun Microsystems, Inc. Open Software Foundation is a trademark of the Open Software Foundation. POSIX is a registered trademark of the Institute of Electrical and Electronics. PostScript is a registered trademark of Adobe Systems, Inc. NFS and Sun Microsystems are registered trademarks of Sun Microsystems, Inc. UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Ltd. X Window System is a trademark of the Massachusetts Institute of Technology. This document was prepared using VAX DOCUMENT Version 2.1.
  • 3.
    Contents About This Course. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii 1 Introducing UNIX System Management About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3 System Manager Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4 UNIX Software Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6 The Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–7 Digital UNIX Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–8 Digital UNIX Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–8 Digital UNIX Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–8 File System Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–9 Digital UNIX System Internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10 User Process Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10 Daemon Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–11 Process Environment: Scheduling and Priority . . . . . . . . . . . . . . . . . . 1–11 Real Time Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–13 Memory Management: Paging and Swapping . . . . . . . . . . . . . . . . . . . 1–13 Block versus Character I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–14 Superuser and the Root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15 Superuser Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15 Root Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15 Root Login Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–15 Root Login Restrictions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–16 Common Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–17 Managing with CDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–17 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–17 Application Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–18 Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–20 Daily Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–21 Selecting System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–22 Monitoring and Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–23 Storage Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–24 Using Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–25 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26 System Manager Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26 UNIX Software Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26 Digital UNIX Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26 iii
  • 4.
    Digital UNIX SystemInternals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–26 Superuser and Root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–27 Common Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–27 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–28 Superuser and the root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–28 CDE and Superuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–28 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–29 Superuser and the root Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–29 CDE and Superuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–29 2 Managing Disks and File Systems About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–2 Disk Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4 Disk Drive Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4 Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4 Heads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5 Tracks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5 Cylinders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5 Sectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5 Disk Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5 Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6 Partitions and File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8 Disk Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8 Partitions on a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8 Hierarchical File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8 File System and Partition Relationships . . . . . . . . . . . . . . . . . . . . . . . 2–9 Partition Tables and Disk Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10 Deriving Disk Parameters with /etc/disktab . . . . . . . . . . . . . . . . . . . . 2–10 Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . . . . 2–12 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–12 Displaying the Current Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . 2–12 Configure Partitions Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14 Disk/Partition Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14 Modifying a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–17 Changing Partition Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–18 Repartitioning a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–19 Viewing and Changing Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–20 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–20 Changing Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–21 Expanding a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–22 Repartitioning a Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–24 Digital UNIX File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25 Virtual File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25 Accessing a File Through VFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–26 UNIX File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–26 UNIX File System Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–28 MFS File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–28 Network File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–29 iv
  • 5.
    Compact Disk FileSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–30 System Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31 Types of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31 Digital UNIX File Directory Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . 2–31 Organizing System Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–32 Advanced File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34 Features and Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–35 UFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–36 AdvFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37 File Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–38 Guidelines for File Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39 Filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39 Guidelines for Filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–40 Creating a UFS File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–41 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–41 Using the newfs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–41 Checking a UNIX File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–43 When to Check File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–43 Using the fsck Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–43 Mounting and Unmounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . 2–45 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–45 Using the mount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–46 Using the fstab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–47 Using the umount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–49 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51 Disk Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51 Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51 Partitions and File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–51 Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . 2–51 Viewing and Changing Partition Sizes . . . . . . . . . . . . . . . . . . . . . . . . 2–51 Digital UNIX File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–52 System Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–52 Advanced File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53 Creating a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53 Checking a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53 Mounting a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–53 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54 Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . 2–54 Viewing and Changing Partition Sizes with disklabel . . . . . . . . . . . . . 2–54 Creating a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54 Checking a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54 Mounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–54 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–56 Viewing and Changing Partition Sizes with CDE . . . . . . . . . . . . . . . . 2–56 Viewing and Changing Partition Sizes with disklabel . . . . . . . . . . . . . 2–56 Creating a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–57 Checking a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–57 Mounting File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–57 v
  • 6.
    3 System Shutdownand Startup About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–2 Shutting Down and Rebooting the System . . . . . . . . . . . . . . . . . . . . . . . . 3–3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–3 Reasons for System Shutdown and Reboot . . . . . . . . . . . . . . . . . . . . . 3–3 Methods for System Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4 Using the shutdown Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–4 Shutting Down to Single User Mode . . . . . . . . . . . . . . . . . . . . . . . . . . 3–5 Complete Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7 Using the halt Command to Stop the Processor . . . . . . . . . . . . . . . . . 3–7 Using the fasthalt Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–8 Shutting Down to Single User Mode with init . . . . . . . . . . . . . . . . . . . 3–8 Stopping the Processor with init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9 Other Methods of Shutting Down the System . . . . . . . . . . . . . . . . . . . 3–9 Rebooting the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9 Using the reboot Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–9 Shutting Down and Rebooting the System with CDE . . . . . . . . . . . . . . . . 3–11 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–11 Invoking Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–11 Shutdown Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–12 Shutdown Message Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–13 Shutdown Reboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–15 Bootstrapping a Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16 Steps in the Bootstrap Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16 Loading the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–16 Initializing the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–17 Hardware Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–17 Creating System Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–17 Single User Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–18 Initialization Script Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–18 Multiuser Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–19 Run Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–19 Digital UNIX Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–20 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–20 Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–20 Changing Run Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–21 The /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–22 Digital UNIX /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–23 Entries in the /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–23 Execution of /sbin/rc*.d Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–24 Selected Contents of the rc*.d Directories . . . . . . . . . . . . . . . . . . . . . . 3–26 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–29 Shutting Down and Rebooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–29 Shutting Down and Rebooting with CDE . . . . . . . . . . . . . . . . . . . . . . 3–29 Bootstrapping a Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . 3–29 Digital UNIX Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–29 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30 System Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30 CDE Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30 Booting the Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–30 vi
  • 7.
    Initialization Files .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–31 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32 System Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32 CDE Shutdown and Startup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32 Booting the Digital UNIX System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32 Initialization Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–32 4 Updating System Firmware About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–2 Firmware Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3 Architectural View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–3 Console Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4 Systems Reference Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4 SRM Commands and Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6 Advanced RISC Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–7 Changing Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–8 Firmware Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9 Update Firmware Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11 Digital Firmware Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11 SRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11 ARC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11 Changing Consoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–11 Firmware Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–12 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13 Validate Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–13 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14 Validate Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–14 5 Installing the System About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–2 Preparing for an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3 Installation Media Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3 Planning Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–3 Planning Swap Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–4 Default Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–4 Custom Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–5 Update Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–5 Hardware Required for Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6 Booting from the Media . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–6 Common Desktop Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7 Common Desktop Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8 vii
  • 8.
    Default Installation .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8 Common Setup Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–9 Custom Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–11 View Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–12 Partition Disks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–13 UNIX Shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–15 Creating the Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–15 Booting the New Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–16 Kernel Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–17 Post Installation Login and Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–18 Performing an Update Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–20 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–20 Update Install File Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–20 Characteristics of an Update Installation . . . . . . . . . . . . . . . . . . . . . . 5–21 Update Installation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–21 Update Administration Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–24 upadmin Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–24 Customized System File Admin Menu . . . . . . . . . . . . . . . . . . . . . . . . . 5–25 Saving Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–25 Deleting Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–26 Viewing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–26 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27 Preparing for an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27 Installation Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27 Performing an Update Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–27 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–28 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–28 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–29 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–29 6 Connecting to the Network About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–2 Introducing UNIX Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–3 UNIX Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–3 Introducing Internet Gateways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–5 Gateway Connects Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–5 Using Internet Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6 Internet Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6 Internet Address Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7 Sample Internet Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7 Ethernet Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–8 Using Subnetwork Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9 Subnetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9 Broadcast Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–10 TCP/IP Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12 Hosts File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12 viii
  • 9.
    Trusted Hosts File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–13 Lineprinter Daemon File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14 Internet Daemon Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . 6–14 Networks File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15 Protocols File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–15 Services File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–16 Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . . . . 6–17 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17 Starting Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–17 Configuring an Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–18 Adding or Modifying Information in /etc/hosts . . . . . . . . . . . . . . . . . . . 6–21 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24 Introducing UNIX Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24 Introducing Internet Gateways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24 Using Internet Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24 Using Subnetwork Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–24 TCP/IP Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–25 Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . 6–25 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–26 Internet Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–26 Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . 6–26 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–27 Internet Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–27 Setting Up and Managing a TCP/IP Network Using CDE . . . . . . . . . 6–27 7 Loading and Licensing Software About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–2 Loading and Unloading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . 7–3 Preparing to Load Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–3 Using the setld Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–3 Displaying Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–4 Software Subset Display Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–4 Loading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–5 Deleting a Software Subset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–8 Licensing Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9 Types of Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9 A Sample PAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–9 Using the lmf Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–11 Using lmf to Register a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–12 Using lmfsetup to Register a License . . . . . . . . . . . . . . . . . . . . . . . . . 7–12 Using the CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14 Starting the CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14 Using the License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–15 Using Edit List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–16 Using Edit New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–16 Using File Open . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–17 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–20 Loading and Unloading Software Subsets . . . . . . . . . . . . . . . . . . . . . . 7–20 ix
  • 10.
    Licensing Your Software. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–20 Using the CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–20 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–21 Loading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–21 Checking Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–21 Deleting Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–22 Licensing Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–22 Using CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–22 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23 Loading Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23 Checking Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23 Deleting Software Subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–23 Licensing Your Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–24 Using CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–25 8 Configuring the Kernel About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–2 Building a New Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–3 System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–4 Global Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–5 Changing Parameters for Performance . . . . . . . . . . . . . . . . . . . . . . . . 8–5 System Definition Keyword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6 Options Keyword Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6 Makeoptions Keyword Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6 Pseudodevice Keyword Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–6 Building a Static Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–10 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–10 Using the doconfig Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–10 Configuring the System Dynamically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12 Loading a Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12 Unloading a Subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–12 Querying Subsystem State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–13 Subsystem Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–14 Automatically Configured Subsystems . . . . . . . . . . . . . . . . . . . . . . . . . 8–14 Modifying System Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–15 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–15 Subsystem Attribute Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–15 Identifying Dynamic Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–16 Modifying Attributes at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–16 Subsystem Attributes Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17 Updating Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17 Removing Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17 List Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17 Deleting Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–17 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18 Building a New Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18 System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18 x
  • 11.
    Building a StaticKernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18 Dynamic System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18 Modifying System Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–18 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 Building a Static Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 Dynamically Configure the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 Modifying a Running Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 Persistent Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–19 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20 System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20 Building a Static Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20 Dynamically Configure the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20 Modifying a Running Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–20 Persistent Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–21 9 Configuring Peripherals About This Chapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–2 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–2 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–3 Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–4 Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–7 Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–7 Configuring Pseudoterminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–8 LAT Terminal Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–9 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–9 Adding Terminals on a Terminal Server . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10 Configuring LAT Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10 Running latsetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10 Controlling the LAT Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–12 Configuring Disk and Tape Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–13 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–13 DDR Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–13 Configuring a Printer with CDE Printer Configuration . . . . . . . . . . . . . . . 9–14 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–14 Using the CDE Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . 9–14 CDE Printer Configuration Options . . . . . . . . . . . . . . . . . . . . . . . . . . 9–15 Configuring a Remote Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–15 The Advanced... Button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–16 The /etc/printcap File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–17 Configuring a Local Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–18 Local Printer /etc/printcap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–20 Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–21 How Printing Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–21 Print System Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–22 Using the lptest Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–22 Using the lpc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–23 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26 Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26 Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26 LAT Terminal Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26 xi
  • 12.
    Adding Terminals ona Terminal Server . . . . . . . . . . . . . . . . . . . . . . . 9–26 Configuring Disks and Tape Drives . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–26 Configuring a Printer with the CDE Printer Configuration . . . . . . . . . 9–27 Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–27 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28 Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28 Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28 Adding Terminals on a Terminal Server . . . . . . . . . . . . . . . . . . . . . . . 9–28 Dynamic Device Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–28 Adding a Printer with CDE Printer Configuration . . . . . . . . . . . . . . . 9–28 Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–29 Solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–30 Device Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–30 Configuring Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–30 Adding Terminals on a Terminal Server . . . . . . . . . . . . . . . . . . . . . . . 9–31 Dynamic Device Recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–31 Adding a Printer with CDE Printer Configuration . . . . . . . . . . . . . . . 9–31 Managing the Print System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–31 Index Examples 2–1 Root Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–10 2–2 An /etc/disktab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–11 2–3 Displaying the Disk Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–20 2–4 Expanding a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–23 2–5 Using the newfs Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–42 2–6 Invoking the fsck Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–44 2–7 Using the mount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–47 2–8 An /etc/fstab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–48 2–9 Using the umount Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–49 2–10 Mounting and Unmounting File Systems . . . . . . . . . . . . . . . . . . . . . . 2–49 3–1 Typical Multiuser Mode ps Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–6 3–2 Typical Single User ps Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7 3–3 Digital UNIX /etc/inittab File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–23 3–4 An /sbin/rc2 File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–25 3–5 Selected Contents of the rc*.d Directories . . . . . . . . . . . . . . . . . . . . . . 3–26 5–1 Creating the Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–16 5–2 Update Installation Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–21 7–1 Listing Software Subsets with setld . . . . . . . . . . . . . . . . . . . . . . . . . . 7–5 7–2 Loading Software Subsets with setld . . . . . . . . . . . . . . . . . . . . . . . . . . 7–6 7–3 Removing a Software Subset with setld . . . . . . . . . . . . . . . . . . . . . . . 7–8 7–4 A Sample PAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–10 7–5 Using the lmfsetup Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–13 8–1 Alpha AXP System Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . 8–8 8–2 Building a Kernel with the doconfig Program . . . . . . . . . . . . . . . . . . . 8–10 9–1 The /dev Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–4 9–2 Using the latsetup Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–10 xii
  • 13.
    9–3 Using thelptest Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–23 9–4 Using the lpc Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–25 Figures 1 Course Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii 1–1 System Manager Responsibilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–4 1–2 UNIX Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–6 1–3 Logging In to a Terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–11 1–4 PID/PPID Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–12 1–5 Front Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–18 1–6 System Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–19 1–7 Configuration Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–20 1–8 DailyAdmin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–21 1–9 System Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–22 1–10 Monitoring and Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–23 1–11 Storage Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–24 1–12 Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–25 2–1 Disk Drive Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–4 2–2 Functional View of Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . 2–7 2–3 Overlapping Disk Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–8 2–4 File System Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–9 2–5 Navigating to the Disk Configuration Window . . . . . . . . . . . . . . . . . . 2–12 2–6 Disk Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–13 2–7 Configure Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–14 2–8 Disk Geometry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–15 2–9 Partition Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–16 2–10 Partition Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–17 2–11 Partition Bar Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–18 2–12 Result of Partition Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–19 2–13 Expanding a Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–22 2–14 File System Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–25 2–15 Accessing a File Through VFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–26 2–16 Small Blocks Require More Overhead . . . . . . . . . . . . . . . . . . . . . . . . . 2–27 2–17 Large Blocks Waste Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–27 2–18 Large Blocks and Small Fragments . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–27 2–19 UNIX File System Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–28 2–20 Remote Mounting with NFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–30 2–21 Digital UNIX System Directory Hierarchy . . . . . . . . . . . . . . . . . . . . . 2–32 2–22 UFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–36 2–23 AdvFS Storage Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–37 2–24 File Migration in AdvFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–38 2–25 File Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–38 2–26 Filesets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–39 2–27 File Systems Before Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–45 2–28 File Systems After Mounting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–46 3–1 Overview of System Shutdown and Reboot . . . . . . . . . . . . . . . . . . . . . 3–4 xiii
  • 14.
    3–2 Shutdown Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–11 3–3 Shutdown Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–12 3–4 Shutdown Options Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–13 3–5 Warning Users of Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–14 3–6 Shutdown Reboot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–15 3–7 Overview of Digital UNIX Initialization Files . . . . . . . . . . . . . . . . . . . 3–21 4–1 Console Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–4 4–2 Console Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–5 5–1 Initiating an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–7 5–2 Status Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–8 5–3 Default Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–9 5–4 Ready, Set, Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–10 5–5 Custom Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–11 5–6 Selecting Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–12 5–7 Disk Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–14 5–8 Configure Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5–15 6–1 Exchanging a Message on a UNIX Network . . . . . . . . . . . . . . . . . . . . 6–4 6–2 Gateway Connecting Two Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–5 6–3 Internet Address Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–7 6–4 Subnet Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–9 6–5 Subnetworks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–10 6–6 Broadcast Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–11 6–7 Invoking the Network Configuration Manager . . . . . . . . . . . . . . . . . . 6–18 6–8 Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–19 6–9 Configuring Ethernet Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–20 6–10 Optional IFCONFIG Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–21 6–11 Host File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–22 6–12 Hosts Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–23 7–1 CDE License Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–14 7–2 Minimum Licenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–15 7–3 List a License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–16 7–4 Edit New Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–17 7–5 File Open option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–18 7–6 PAK in User File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–19 9–1 Providing Access for Terminals and Printers . . . . . . . . . . . . . . . . . . . . 9–9 9–2 Starting Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–14 9–3 Printer Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–15 9–4 Remote Printer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–16 9–5 Advanced Remote Printer Settings Window . . . . . . . . . . . . . . . . . . . . 9–17 9–6 Local Printer Settings Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–18 9–7 Advanced Local Printer Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–19 xiv
  • 15.
    Tables 1 Conventions Usedin This Course . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi 1–1 System Manager Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–5 1–2 Root Login Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–16 2–1 Types of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–31 2–2 UNIX System Directory Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–33 2–3 AdvFS Features and Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–34 3–1 shutdown Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–5 3–2 halt Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–7 3–3 fasthalt Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–8 3–4 reboot Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–10 3–5 The /etc/inittab File Action Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–22 4–1 Administrator Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–6 4–2 ARC Console Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–8 4–3 DEC 2000 AXP Outline Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4–10 6–1 Parts of an Internet Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–6 6–2 TCP/IP Network Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6–12 7–1 Load Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7–6 7–2 CDE License Manager VS LMF Commands . . . . . . . . . . . . . . . . . . . . 7–20 8–1 Global Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8–5 9–1 Print System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–22 9–2 Line Printer Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9–24 xv
  • 17.
  • 18.
    About This Course AboutThis Course Introduction The Digital UNIX System Administration course is designed for those individuals who will be managing and operating a Digital UNIX system. Your Course Guide presents a number of topics on system administration, and provides pointers to documentation and additional references. Textual information is interspersed with lab activities to allow you to practice what you have learned. The Course Guide is divided into chapters designed to cover a single topic or group of related topics. The chapters are divided into smaller units that cover a more limited topic or subtopic. Examples are provided to demonstrate concepts. This preface describes the contents of the course, suggests ways in which you can most effectively use the materials, and sets up the conventions for the use of terms in the course. It includes: • Course description — a brief overview of the course contents • Target audience — who should take this course • Prerequisites — the skills and knowledge needed to ensure your success in this course • Course goals and nongoals — what skills or knowledge the course will and will not provide • Chapter organization — the structure of each chapter • Course map — the sequence in which you should cover each chapter • Chapter descriptions — brief descriptions of each chapter • Course conventions — explanation of symbols and signs used throughout this course • Resources — documentation and books to help you successfully complete this course Course Description This course describes the tasks that a system manager needs to perform to get a UNIX operating system installed and ready for users, including such responsibilities as: • Installing operating system software • Managing and maintaining file systems • Customizing the system kernel • Configuring peripheral devices • Managing user accounts • Performing system backups • Monitoring system activity xviii
  • 19.
    About This Course •Troubleshooting system problems This course is designed to lead you through the tasks you must perform as the manager of a Digital UNIX system. The format of presenting information followed by exercises gives you the practice you need to understand the course material. Target Audience This course is designed for individuals with some experience in a UNIX® environment, who will be managing a Digital UNIX system. Prerequisites To get the most from this course, students should be able to: • Log in to a UNIX system • Use an editor on the system • Manage files and directories • Use the Common Desktop Environment to manage files and programs • Move within the UNIX File System • Use nonprivileged commands • Write and debug simple shell programs These prerequisites can be satisfied by taking the following course: • UNIX Utilities and Commands lecture/lab or self-paced course ® UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Ltd. xix
  • 20.
    About This Course CourseGoals To set up and manage a Digital UNIX system, you should be able to: • Identify system management responsibilities • Identify components of UNIX systems • Install the operating system • Shut down and boot the system • Create and manage file systems • Configure devices: terminals, disk drives, tape drives, printers • Add and remove users on the system • Back up and restore files and file systems • Load and license optional software • Monitor system performance • Join and maintain membership in a local area network • Describe some popular network services This course introduces UNIX networking services and demonstrates how to configure a system on a TCP/IP network. It does not cover network design, troubleshooting, or network services installation. Students needing these skills should take the Network Management course. Nongoals This course does not cover the following topics: • UNIX basic utilities and commands • Hardware installation and configuration • Network services setup • Network design, internals, or troubleshooting • Programming • Multisystem security • Core dump analysis • Cluster software UNIX System Administration Curriculum This course is the first course in the UNIX system administration curriculum. It has the prerequisite of experience using a UNIX system. This course is the prerequisite for several other administration courses: • Digital UNIX Network Administration This course is designed for students who will be managing a UNIX network (which includes a Digital UNIX system), who want to increase their knowledge of Digital UNIX networking. This includes configuration and management of TCP/IP networking, NFS, NIS, BIND, Bootp, DHCP, dataless configurations, LAT, remote installation, SNMP, xx
  • 21.
    About This Course andSLIP/PPP. The course demonstrates how to set up and manage Digital UNIX networks using the Common Desktop Environment (CDE), the new standard graphical user interface for UNIX systems. • Digital UNIX Security Management This course is designed for individuals with experience managing a Digital UNIX operating system, who are interested in learning how to recognize and address security threats in the base security level of the Digital UNIX environment. Course topics include security terms, threats, security holes, installing and configuring a secure base level Digital UNIX system, managing a secure system, and base level and enhanced security auditing. • Digital UNIX Performance Management This course is designed for individuals with experience managing a Digital UNIX operating system, who are interested in maximizing the performance on their systems. Course topics include factors that affect system performance, monitoring and identifying system bottlenecks, and system tuning. • Managing Digital UNIX Using the Advanced File System (AdvFS), Logical Storage Manager (LSM), and Redundant Arrays of Inexpensive Disks (RAID) This courses describes advanced Digital UNIX system management tasks that system administrators need to perform to fully utilize the more sophisticated Digital UNIX functionality, particularly, the Advanced File System (AdvFS), Logical Storage Manager (LSM), and Redundant Arrays of Inexpensive Disks (RAID). • DECsafe Available Server Environment Configuration and Management This course describes in detail how to plan, install, configure, test and troubleshoot a DECsafe Available Server Environment (ASE). • TruCluster Software Configuration and Management This course describes in detail how to install the hardware and software components and how to set up TruCluster Software highly available services. xxi
  • 22.
    About This Course Chapter Organization Thiscourse is divided into 16 chapters. Each chapter covers a skill or related group of skills required to fulfill the course goals. In this course, each chapter consists of: • An introduction to the subject matter of the chapter. • One or more objectives that describe the goals of the chapter. • A list of resources, or materials for further reference. Some of these manuals are included with your course materials. Others may be available for reference in your classroom or lab. • The text of each chapter, which includes outlines, tables, figures, and examples. • The summary includes a brief review of the topics presented in the chapter. • Lab Exercises enable you to practice your skills and to measure your mastery of the information in the chapter. A test is provided for student self-assessment. It allows you to measure whether or not the learning objectives were achieved. Course Map The course map shows how each chapter is related to other chapters and to the course as a whole. Before studying a chapter, you should master all of its prerequisite chapters. The course map shows the current chapters and the order in which they should be presented. The direction of the arrows determine the order in which the chapters should be studied, from bottom to top. xxii
  • 23.
    About This Course Figure1 Course Map SystemShutdown andStartup Archiving Configuring Peripherals ZKOX−055000111−01−RGS Monitoring theSystem InstallingtheSystem ManagingDisksand FileSystems UpdatingSystem Firmware Loadingand LicensingSoftware Kernel Configuringthe UserEnvironment Managingthe UsingDECevent IntroducingUNIX SystemManagement IntroducingSMP, Connectingto aNetwork LSM,andClusters Introducing NetworkServices xxiii
  • 24.
    About This Course Chapter Descriptions Thefollowing list summarizes the contents of each chapter. • Introducing UNIX System Management — provides an overview to system hardware and operating system software, their components and functions; describes the responsibilities of a system manager and the privileges of the superuser or root account. • Managing Disks and File Systems — discusses disk drives and their physical and logical structure, the different file systems, reviews file types and major directories in an OSF/1 system; discusses the steps to add a file system: create, check, and mount, using standard tools. • System Shutdown and Startup — demonstrates the UNIX shutdown, halt and reboot commands, provides instructions on how to boot a Digital UNIX system, and provides background on what happens on the system as it boots. • Updating System Firmware — discusses the underlying principles of the firmware operating system, as well as the consoles required to support multiple operating systems. • Installing the System — describes the planning and procedures necessary to install a Digital UNIX operating system. • Connecting to the Network — discusses UNIX, or Internet networking, including Internet addressing and the files needed to configure the network; demonstrates netconfig to perform the configuration. • Loading and Licensing Software — demonstrates use of the Digital UNIX software loading utility, setld, to manage the software subset inventory, and load and unload software subsets; demonstrates the use of the Digital License Management Facility to control access to software. • Configuring the Kernel — describes the system configuration file, how to modify the system configuration, when to build a new kernel, use of the doconfig shell script to build a kernel automatically, and how to use the make command to build a kernel manually. • Configuring Peripherals — describes how to add terminals, add pseudoterminals, disk and tape drives, and set up and test printers. • Archiving — addresses the issue of protecting user data from accidental loss by backing up the data. A new NetWorker SingleServer Save and Restore application is presented which backs up and recovers files and file systems. • Managing the User Environment — discusses the user account files passwd and group and demonstrates how to create, modify, and remove user accounts on the system; shows how xxiv
  • 25.
    About This Course tomanage processes running on the system and manage user disk space. • Monitoring the System — discusses useful tools and utilities to monitor the system and diagnose system problems. • Using DECevent — describes the replacement utility for UERF on Alpha systems. This new utility has interfaces for command line, online display and a GUI. • Introducing SMP, LSM and Clusters — presents an overview of symmetric multiprocessing, Digital UNIX cluster products and the Logical Storage Manager. • Introducing Network Services — describes network services: DECnet network, NFS service, NIS (YP), the Domain Name Service, and Remote Installation Service. xxv
  • 26.
    About This Course Course Conventions Table1 gives an explanation of the conventions used in this course. Table 1 Conventions Used in This Course Convention Meaning keyword Keywords and new concepts are displayed in this type. examples Examples, commands, options and pathnames appear in this type. command(x) Cross-references to command documentation include the section number in the reference pages. For example, fstab(5) means fstab is referenced in Section 5. $ A dollar sign represents the user prompt. # A number sign represents the superuser prompt. bold Within interactive examples, boldface type indicates user input. key The box symbol indicates that the named key on the keyboard is pressed. . . . In examples, a vertical ellipsis indicates that not all of the lines of the example are shown. [ ] In syntax descriptions, brackets indicate items that are optional. variable In syntax descriptions, this type indicates items that are variable. . . . In syntax descriptions, an ellipsis indicates the item may be repeated. xxvi
  • 27.
    About This Course ResourcesStudents should use the following manuals and books as references for this course: • Your Digital UNIX system management documentation Digital UNIX Operating System, Version 4.0 Software Product Description Release Notes Technical Overview System Administration Digital UNIX Installation Guide Network Administration DEC Verifier and Exerciser Tool User’s Guide • Maurice Bach, (c) 1986, The Design of the UNIX Operating System, Prentice-Hall, ISBN 0-13-201799-7 • Douglas Comer, (c) 1991, Internetworking with TCP/IP, Volume I, Prentice-Hall, ISBN 0-13-468505-9 • Leffler, McKusick, Karels, and Quarterman, (c) 1989, The Design and Implementation of the 4.3BSD UNIX Operating System, Addison-Wesley, ISBN 0-201-06196-1 • Nemeth, Snyder, & Seebass, (c) 1989, UNIX System Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6 • (c) 1991, Guide to OSF/1: A Technical Synopsis, O’Reilly & Associates xxvii
  • 29.
    1 Introducing UNIX SystemManagement Introducing UNIX System Management 1–1
  • 30.
    About This Chapter AboutThis Chapter Introduction The system manager is the person behind-the-scenes of any computer site. Few users are aware of exactly how much the system manager does to make their login sessions easier. This chapter discusses the responsibilities of the system manager, which, though sometimes complicated, are really not so mysterious. Overall, a system manager is responsible for creating a smooth system environment. This includes providing the system tools users need to do their jobs, and keeping system performance at a high level. To accomplish these goals, a system manager must be knowledgeable about the system from both software and hardware aspects. Only in this way can you match the responsiveness of your current system to the needs of the people using it. This chapter is an introduction to managing a UNIX system. It provides an overview to operating system software — their components and functions. It describes the responsibilities of a system manager and the privileges of the superuser or root account. Finally, it demonstrates how to become the root user. Major topics discussed in this chapter are: • System manager responsibilities • Hardware that makes up this system • Software environment of the operating system • Internal functioning of the operating system • Use of the Common Desktop Environment (CDE) Objectives To describe the role of the system administrator and the UNIX system, you should be able to: • Identify system manager responsibilities • Describe the role of the UNIX operating system and its components • Describe the Digital UNIX features • Describe internal operating system functions related to system management • Describe the superuser and the root login procedure • Describe the Common Desktop Environment (CDE) interface 1–2 Introducing UNIX System Management
  • 31.
    About This Chapter ResourcesFor more information on the topics in this chapter, see the following: • Nemeth, Snyder, & Seebass, (c) 1989, UNIX System Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6, Chapters 1 and 3 describe system manager duties and privileges • Leffler, McKusick, Karels, and Quarterman, (c) 1989, The Design and Implementation of the 4.3BSD UNIX Operating System, Addison-Wesley, ISBN 0-201-06196-1, Describes the internal functions of the BSD based UNIX operating system • Maurice Bach, (c) 1986, The Design of the UNIX Operating System, Prentice-Hall, ISBN 0-13-201799-7, Describes the internal functions of the System V based UNIX operating system • Digital UNIX Operating System, Version 4.0 Software Product Description • Guide to OSF/1: A Technical Synopsis, (c) 1991, O’Reilly & Associates • The Design of the OSF/1 Operating System, Open Software Foundation, Prentice-Hall Introducing UNIX System Management 1–3
  • 32.
    System Manager Responsibilities SystemManager Responsibilities Overview Every computer site designates a person to be responsible for the day-to-day operation of the computer system, including both software and hardware. This person is known as the system manager or system administrator. A site following the security guidelines of the US Department of Defense (DoD) Orange Book will divide these responsibilities between a system administrator and a security administrator. A large site may have a number of system operators to assist the system manager with the tasks. Some of these tasks are visible to users and, in fact, directly benefit them, such as creating user logins. Others are less obvious but no less important, such as storing copies of user files on tape for future use. Figure 1–1 System Manager Responsibilities Install and Configure the System Assist Users Shut Down and Start Up System Manage Disk Space Maintain Archives Control User Access Monitor the System Troubleshoot System Manager ZKOX−055000111−02−RGS The system manager needs special privileges to perform specialized tasks that affect the running of a system. The tasks of the system manager are described briefly in the following table. 1–4 Introducing UNIX System Management
  • 33.
    System Manager Responsibilities Table1–1 System Manager Tasks Task Description Install and configure the system Installs distribution kit containing new software or software updates Configures the kernel or devices Shut down and start up the system Shuts down and starts up a system to perform maintenance Control user access Adds new users to the system’s user login and group files; modifies or deletes changed accounts Maintains an appropriate level of security on the system Manage disk space Maintains the file systems, checks disk usage and, if necessary, establishes disk quotas Maintain archives Provides an archive of user files and a continuity of information through the use of system backup and restore facilities Monitor the system Tracks system activity through online accounting procedures to determine how effectively system resources are being used Troubleshoot the system Identifies and resolves routine system problems involving hardware and software; repairs damaged file systems Assist users Much of a system manager’s day can be filled with user application problems and answering user’s questions Introducing UNIX System Management 1–5
  • 34.
    UNIX Software Environment UNIXSoftware Environment Overview An operating system can be viewed as a resource management program. Its primary purpose is to manage hardware and software resources in a way to maximize work capacity and productivity of the system. The UNIX operating system is often depicted as a series of layers, as shown in Figure 1–2. Figure 1–2 UNIX Layers Hardware Device Drivers Kernel Shell Application Programs ZKO−060000135−50−RGS The hardware is at the center. The operating system is the interface between the user process and the hardware. The UNIX kernel is minimized to provide those features that can only be performed within the operating system. If special system privileges are not needed, those operations will be done by auxiliary programs external to the kernel. The Digital UNIX operating system takes this one step further by breaking the kernel into two layers. The inner layer is the Mach operating system kernel; the outer layer adds UNIX services. Theoretically, this outer layer could be replaced by a layer providing some other operating system services. 1–6 Introducing UNIX System Management
  • 35.
    UNIX Software Environment Whenthe system is running, the kernel is in main memory. The kernel is responsible for: • Process control and scheduling • Memory management • Device I/O • System error handling The shell surrounds the kernel and acts as a user interface. It handles: • Foreground and background execution • Pipes and filters • Configurable environment • Flexible command language • I/O redirection The Kernel The UNIX kernel is the central controlling program that provides basic system facilities. • The Digital UNIX kernel is the executable file /vmunix. • It is compiled from source files, object files and configurable parameters. • It is loaded into memory when the system boots. • It runs programs and manages resources. Once kernel initialization is complete and the various system daemons have been created and made runnable, the kernel waits for requests: • User programs requesting services from the kernel through system calls • Hardware devices getting kernel response through interrupts The kernel manages system resources, such as memory, the CPU, and devices for user processes. When you run a program, the UNIX operating system creates a process to handle it. Introducing UNIX System Management 1–7
  • 36.
    Digital UNIX Features DigitalUNIX Features Digital UNIX Components The Digital UNIX operating system is a 64-bit advanced kernel architecture based on Carnegie Mellon University’s Mach V2.5 operating system kernel. It includes components from Berkeley Software Distribution (BSD) 4.3 and 4.4, System V, and other sources. The result is a simple, extensible kernel that was designed for parallel and distributed environments. The STREAMS facility makes it possible to write flexible, modular device drivers and is compatible with SVR4 STREAMS. The extensible run-time loader provides shared library support, support for memory mapped files, and dynamic module loading. Dynamically loading modules into an already running program enables device drivers and other system code to be loaded into a kernel without rebuilding or rebooting the system. The loader can also be extended to support multiple object module formats. The command set comes from the AIX operating system and is based on commands from BSD and System V operating systems. Digital UNIX Features Digital UNIX is based on OSF/1 R1.0, R1.1, and R1.2 technology, and the Motif R1.2.3 graphical user interface and programming environment. It provides numerous features to assist application programmers, including: • Symmetric Multiprocessing (SMP) Enables systems containing two or more processors to execute the same copy of the operating system and access common memory. • Multithread Support DECthreads provides a pthreads interface that complies with both the POSIX and DCE semantics. • Realtime Support Provides a kernel option to enhance the performance of realtime applications conforming to the POSIX standard. • Shared Libraries Provides a full complement of dynamic shared libraries based on System V semantics. • Memory Mapped Files Supports the Berkeley mmap function that allows an application to access data files with memory operations rather than file input and output operations. • Full features of the X Window System, Version 11, Release 6(X11R6). Provides X Window Display, X Window System Application Interface and Terminal Interfaces. 1–8 Introducing UNIX System Management
  • 37.
    Digital UNIX Features •Supports terminal servers using the LAT protocol. • Provides a number of scripts and GUI tools for system management tasks. Digital UNIX complies with numerous standards and industry specifications including: • The X/Open XPG4 and XTI • POSIX, FIPS and System V Interface Definition (SVID) Digital UNIX is compatible with Berkeley 4.3 and System V programming interfaces. It conforms with the OSF Application Environment Specification (ASE) that specifies an interface for developing portable applications that will run on a variety of hardware platforms. File System Support Digital UNIX supports the following file system types: • POLYCENTER Advanced File System (AdvFS) A journaled local file system that provides higher availability and greater flexibility that traditional UNIX file systems. • UNIX File System (UFS) Compatible with Berkeley 4.3 Tahoe release. • Network File System (NFS) Allows transparent file access over TCP/IP networks • Memory File System (MFS) Provides the same file system structure as UFS, but resides in virtual memory. • ISO 9660 Compact Disk File System (CDFS) A standard for volume and file structure for the interchange of information using CD–ROM. • File-on-File Mounting File System (FFM) Allows regular, character, or block-special files to be mounted over regular files (used primarily by SVR4). • /proc File System Allows running processes to be accessed and manipulated as files by ordinary system calls (compatible with SVR4). • /dev/fd File System (FDFS) A pseudo-file system layered beneath the virtual file system (UFS). Introducing UNIX System Management 1–9
  • 38.
    Digital UNIX SystemInternals Digital UNIX System Internals Overview To ensure the smooth operation of your Digital UNIX system, you should have some knowledge of the internal workings of UNIX. The following topics will help you to better understand the functions of your system. • User process creation • Daemons • Scheduling and priority • Paging and swapping • Block versus character I/O User Process Creation A program is an executable file, and a process is an instance of the program in execution. The kernel (/vmunix), the C shell csh and the vi editor are all programs. Two users can run the vi editor simultaneously (that is, two independent processes using one program). A process can create another process using the fork(2) system call. The process that invokes the fork is the parent process and the newly created process is the child process. When the system starts up (boots), the kernel is copied into memory and initialized. The kernel creates the init process. init is the ancestor of all user shells. It creates a process for each terminal port, and calls /etc/getty(8) to put a login message on the terminal. /etc/getty reads in the username and calls login to log in, or verify the user and execute the user shell. Unlike traditional single-threaded UNIX processes, Digital UNIX processes can be multithreaded. Multithreading and other parallelization are integral to the Mach kernel of the Digital UNIX operating system. Multiple threads can share an address space, file descriptors, and so forth. Therefore, threads require very little system overhead and provide improved performance. Note Further information on threads can be found in the Guide to DECthreads. When a user responds to the login prompt by entering his or her user name: 1. getty reads the user name and invokes /bin/login(1), passing the user name. 2. login prompts for the password, verifies the user, and invokes the shell listed in /etc/passwd. 1–10 Introducing UNIX System Management
  • 39.
    Digital UNIX SystemInternals 3. The shell interprets all user commands. When the user logs out, init updates the login history file /var/adm/wtmp and creates a new getty process listening on that port. The following figure illustrates the sequence of events for a user logging in to the Digital UNIX system from a terminal. Figure 1–3 Logging In to a Terminal "program" init init getty login ksh ksh pid 2345pid 2345 exit() exec() wait() => 2345 exit() exec() fork()=2345 fork()=1234 pid 1 wait()=>1234 Terminal Login ZKO−060000135−43−RGS exit()exit()exit() exec() exec()pid 1234pid 1234 pid 1234 Daemon Processes Another type of process is the daemon; daemon processes are not associated with any users but perform system functions, such as printer spooling, network control and time-dependent activities. Many daemons are started when the system boots. Process Environment: Scheduling and Priority UNIX is a timesharing system; it allows many processes to run at the same time. The kernel identifies each process by a process number, or process ID (PID). Process 0 is a special process created when the system boots. init has process ID 1. Executing the ps -f command shows the user processes, their PIDs and their parents’ PIDs, or PPIDs. You can see that each process has a parent, for example tty4 (Korn shell process) is the parent of the telnet process. You can also see by following backwards the PPIDs that tty3 (Korn shell process) is the ancestor of the ftp process. Introducing UNIX System Management 1–11
  • 40.
    Digital UNIX SystemInternals Figure 1–4 PID/PPID Numbers On a time-sharing system, the kernel allocates the CPU to a process for a period of time, called a time slice, and then switches to another process. The switch is called a context switch. The kernel, which is executing in the context or the environment of a process, saves the state of the process and enough information about the process and what it was doing to resume later where it left off. Every process has a scheduling priority. All processes start with some base priority (in the range 0 to 63); lower numbers represent higher priority. System processes have higher priority than user processes. The kernel picks the process with the highest priority to run next. Users can lower the priority of their own processes. The superuser can lower or raise the priority of processes. The system also adjusts priorities internally on a timesharing policy; a process that is using CPU time has its priority lowered, while a process that is waiting to run has its priority raised. This ensures that all waiting processes will get their turn to run. The ps lax command shows the user-adjusted priority (NICE column) and the system priority (PRI column). The timesharing policy has the goal of equitably sharing the processors among the various processes. Digital UNIX also supports a fixed-priority policy, where the goal is to provide preferential treatment to particular processes. For fixed-priority processes, the scheduler priority is equal to the base priority. 1–12 Introducing UNIX System Management
  • 41.
    Digital UNIX SystemInternals Real Time Processing A real-time process reacts to external events within a specified time limit, and reacts in a predictable way. Real-time tasks can vary from process control for manufacturing to simulators for flight training. Digital UNIX provides preemption and fixed-priority scheduling to support real-time processes. Preemption allows a high priority process to take control of the CPU if it becomes runnable while a lower priority process is currently executing. The real-time scheduling interface supports three policies that give the programmer the ability to select which class a process should belong to: • Timesharing - Standard Digital UNIX scheduling policy. Process priority is adjusted periodically by the kernel based on CPU usage and system load average. • FIFO - Fixed priority first-in first-out policy. If no higher priority process preempts, the process runs until it relinquishes the CPU through a blocking call; there is no quantum time limit. • Round-robin - Fixed-priority policy similar to FIFO, but adds a time quantum. A process must relinquish control of the CPU if it has used its quantum and another process of equal priority is ready to run. Memory Management: Paging and Swapping The kernel is in main memory along with the currently executing process. However, physical memory is a limited resource; generally not all active processes can fit into memory. Disk space is used as a secondary memory managed by paging and swapping. The paging/swapping area is set up during system installation and can be resident on a local disk or in the case of diskless workstations, on a disk available over the network. Programs can be written larger than physical memory up to some maximum size virtual memory. The hardware manipulates programs and data in lengths called pages. Special code translates the virtual memory page addresses to physical addresses. When the process tries to access data on a page not in physical memory, the kernel retrieves it from paging space on disk and overwrites a page in memory. The kernel keeps as many processes in physical memory as it can and lets each one execute during its time slice. (UNIX) swapping occurs when a process needs to be loaded into memory to be executed, but there is no room for it. Another process is swapped out, or saved to the swap area on disk to free up memory. Digital UNIX uses a slightly different notion of swapping. A process may consist of multiple threads sharing an address space. Swapping out a thread’s address space would make the other threads in the same process unrunnable. The swapout daemon scans the list of all threads to identify those that have been idle Introducing UNIX System Management 1–13
  • 42.
    Digital UNIX SystemInternals for more than 10 seconds. The pageout daemon can then free the memory pages associated with the thread’s kernel stack. The goal is still to free memory. And a thread must still be swapped in when it is made runnable. Block versus Character I/O When a process wants to access data from a file on a disk drive, the kernel brings the data into memory where the process can examine it, alter it and ask to store or rewrite it. Device drivers, or special code in the kernel controls the operation of peripheral devices. Mass storage devices such as disk drives are treated as block or character devices. A block device is a random-access storage device. A memory buffer, called the buffer cache, is used to read a block of bytes to the device at one time. This technique can reduce the amount of disk traffic and improve response time if processes tend to manipulate data within the same block. One disadvantage is that if the system halts suddenly, the updated buffer cache may not be written out to disk. A character device, also called a raw device, does not use the buffer. A disk device can be treated as both a block and a raw device and has a separate logical name for each. 1–14 Introducing UNIX System Management
  • 43.
    Superuser and theRoot Login Superuser and the Root Login Superuser Privileges A UNIX system manager has special system privileges that exceed those of ordinary users. For this reason, the system manager is called the superuser. UNIX systems reserve the login name root (user ID 0) for the superuser. Root owns and controls many important system files and directories. As root, the superuser’s special system privileges include complete access to any file or directory as well as privilege to: • Override all file mode permissions • Bypass all normal security checks • Kill any existing process • Shut down the system Root Security Root is a very powerful user, so powerful that a system manager who carelessly uses its privileges can accidentally destroy an entire file system. Consequently, you should keep the root password a secret, known only to you and one (or more) experienced backup person at your site. This person should have the knowledge to perform system management responsibilities. To protect against potential superuser abuse, you should change the root password regularly with the passwd command. • Always log in as root using su because the system logs every set user to root attempt in /var/adm/sialog. • Perform nonprivileged commands as a nonprivileged user to prevent accidental system damage. • You can log in directly as root only on terminals set up as secure in /etc/securettys. Network terminals or LAT terminals should not be set up as secure for security reasons. Root Login Procedure While you can log in directly as root, the following is the suggested login procedure: 1. Log in under your personal login name. 2. Use the su command to set user ID to root. 3. When you have successfully entered the root password, the system returns the superuser prompt (#). 4. Change to the root or other directory. Press Ctrl/D to exit the root shell and return to your original shell. Introducing UNIX System Management 1–15
  • 44.
    Superuser and theRoot Login Root Login Restrictions Digital UNIX and many other UNIX systems restrict the direct login as root to terminals flagged as secure in /etc/securettys (Base Level). Some UNIX systems restrict the use of the su command (to set user to root) to terminals flagged as su in /etc/securettys . Digital UNIX systems restrict the use of the su command (to set user to root) to members of group 0 (system group). When someone uses the su command to set user to root, it is logged in the /var/adm/sialog file. If the file does not exist, the user must create it, for example using the command touch /var/adm/sialog. Table 1–2 shows the logged messages for three different root login attempts. Table 1–2 Root Login Comparisons Terminal Session Log Messages Description Preferred Method login: joe Password: $ su Password: # Successful authentication for su from joe to root User uses the su command to log in as root. The system records the successful set UID. su Failure login: joe Password: $ su Password: Sorry $ Failure on authentication for su from joe to root User fails to enter the correct password. System refuses access as root. Record of unsuccessful set UID. Less Secure Method login: root Password: # The system does not log a message. Consequently, it is difficult to determine who it is. Check the log file /var/adm/sialog for authorized and unauthorized su attempts. 1–16 Introducing UNIX System Management
  • 45.
    Common Desktop Environment CommonDesktop Environment Managing with CDE UNIX system management is made easier with the introduction of the Common Desktop Environment (CDE). CDE does not change the basics of system management in terms of responsibility or tasks to be performed. Rather it presents a window-like environment to the system manager for performing management tasks. Special system privileges that exceed those of ordinary users are still required (superuser). CDE can perform many management tasks such as: • Account management • Print management • Network management • Disk management • Archiving • File system sharing • Host management • License management • BIND • Mail • NFS • NIS setup • System startup and shutdown Front Panel CDE is entered automatically when the user logs in to a workstation. Figure 1–5 shows the front panel, which provides the window controls. The major controls (left to right): • File Manager - provides different views of system files • Personal Applications - can be used to start up a terminal window or a text editor • Workspace - virtual desktop; four are set up by default • Exit - log out • Style Manager - allows the user to select colors, fonts, screen saver and so forth • Application Manager - contains the system management applications Introducing UNIX System Management 1–17
  • 46.
    Common Desktop Environment Figure1–5 Front Panel Clock Calendar PersonalApplications FileManager Mailer Printer StyleManager ApplicationManager HelpManager TrashCan Exit Lock Workspaceswitch Busylight Blankcontrol ZKOX−5256−202−RGS Note For a more thorough explanation of the features of CDE, refer to the Common Desktop Environment: Users Guide Application Manager This icon is used (MB1) to invoke the various system management tasks which may be performed with or through the common desktop environment. The figure shows the path used to get to the System_Admin application. 1–18 Introducing UNIX System Management
  • 47.
    Common Desktop Environment Figure1–6 System Management Five main groups of tools are displayed: • Configuration • DailyAdmin • MonitoringTuning • Storage_Management • Tools Introducing UNIX System Management 1–19
  • 48.
    Common Desktop Environment Configuration Manager Whenthe user or administrator selects the Configuration icon, the Application Manager - Configuration window is displayed. Each icon in the window represents a major configuration tool, which when selected brings the user to the actual management options available. Figure 1–7 Configuration Manager 1–20 Introducing UNIX System Management
  • 49.
    Common Desktop Environment Daily Administration Illustratedin the next figure are the tasks which may require daily attention such as adding or modifying a user account (Account Manager). File management is performed with the Archiver and File System Sharing tools. The License Manager is used to load software licenses. Shutdown allows the administrator to issue shutdown notices to users as well as select the shutdown and reboot characteristics. Hosts may be selected for remote access to X Windows using the Host Manager. Figure 1–8 DailyAdmin Introducing UNIX System Management 1–21
  • 50.
    Common Desktop Environment Selecting System Information SelectingSystem Information yields status on system resources such as CPU, Memory and so forth, as shown in the next figure. Figure 1–9 System Information 1–22 Introducing UNIX System Management
  • 51.
    Common Desktop Environment Monitoringand Tuning These tools allow the administrator to view the status of the system and also fine tune the operation for either the kernel or the processes on the system. Figure 1–10 Monitoring and Tuning Introducing UNIX System Management 1–23
  • 52.
    Common Desktop Environment Storage Management Thismanagement option provides controls for Digital added value storage system solutions. Figure 1–11 Storage Management The Bootable_Tape icon invokes the btcreate utility to build a standalone bootable kernel on UFS and AdvFS file systems. The Logical Storage Manager icon starts the dxlsm utility to create and manage logical volumes (its use requires a license). The Prestoserve I/O Accelerator can be used to display the dxpresto window to monitor the effectiveness of the cache. Cache statistics such as: • Writes/second • Hits/second may be observed. User controls are provided to vary the display. 1–24 Introducing UNIX System Management
  • 53.
    Common Desktop Environment UsingTools Here the administrator may select and display statistical information on these topics. • I/O • Network • Virtual Memory • Who? Figure 1–12 Tools Introducing UNIX System Management 1–25
  • 54.
    Summary Summary System Manager Responsibilities The system manageris responsible for providing a working computing environment for his users. This may include the following tasks: • Install and configure the system • Shut down and start up the system • Control user access • Manage disk space • Maintain archives of user and system files • Monitor the system • Troubleshoot the system • Assist users UNIX Software Environment An operating system is a dedicated computer program whose primary purpose is to execute other programs, managing the hardware and system resources for those programs. The UNIX operating system consists of: • Device drivers, special software to communicate with peripheral devices • Kernel, the main part of the operating system, responsible for controlling system resources • Other utilities and programs Digital UNIX Features The Digital UNIX operating system consists of: • Symmetric Multiprocessing (SMP) • Multithread Support • Realtime Support • Shared Libraries • Memory Mapped Files Digital UNIX System Internals Some of the Digital UNIX system internal functions: • A process is a program executing in memory. • When the system boots, the kernel is copied into memory, and it starts init, which creates processes for all terminal ports. • Daemons are system processes. • Every process has a process ID and a priority. • The kernel gives CPU time to the process with the highest priority. 1–26 Introducing UNIX System Management
  • 55.
    Summary • Memory isdivided into pages. The kernel uses a paging technique to let a process use more memory than is physically present. • Managing more processes than fits into memory requires swapping to free process memory to bring another process into memory. • Block I/O uses a buffer to read and write entire disk blocks at a time. Character or raw I/O does not use the buffer. Superuser and Root Login UNIX system managers use the root login name (UID 0). • root has special system privileges. • To log in as root, first log in to your own account, then use the su command. Common Desktop Environment UNIX system management is made easier with the introduction of the Common Desktop Environment (CDE). CDE does not change the basics of system management in terms of responsibility or tasks to be performed. Rather it presents a window-like environment to the system manager for performing management tasks. Introducing UNIX System Management 1–27
  • 56.
    Exercises Exercises Superuser and the rootLogin 1. Try the su command: a. Find out the root password from your instructor. b. If your system has the PAKs installed, and user account created, log in under your personal login name and use the whoami command. c. Use the su command to switch to the root login. Be sure to type the root password correctly. d. Try the whoami and who am i commands. Why is there a difference in the result? e. Check the /var/adm/sialog file for the message that describes your successful root login. f. Log out as root. 2. Try the su command again, but this time type the root password incorrectly. Find the message that describes your unsuccessful root login. CDE and Superuser 1. Get the root password for your system from your instructor. 2. Log in as Root. 3. Create a user account for your lab team (SAxx - where xx is your team number) using the CDE Account Manager. 4. Log out. 5. Log in as SAxx. 6. Invoke the Disk Manager. Note You need the root password. This is consistent with the superuser module for system management. 7. Record the number and type of disks on your system. 1–28 Introducing UNIX System Management
  • 57.
    Solutions Solutions Superuser and the rootLogin 1. Try the su command: a. No solution required. b. login: sue $ whoami sue $ c. $ su Password: # d. whoami prints your current login name; while who am i prints your login name from /var/adm/utmp. # whoami root # who am i tinker!sue ttyp1 May 26 08:18 (:0.0) # e. # grep root /var/adm/sialog Successful authentication for su from sue to root f. # Ctrl/D $ 2. Unsuccessful root login: $ su Password: Sorry $ # grep root /var/adm/sialog Successful authentication for su from sue to root Failure on authentication for su from sue to root CDE and Superuser 1. Get the root password for your system from your instructor. 2. Log in as Root. 3. Create a user account for your lab team (SAxx - where xx is your team number) using the CDE Account Manager. You may use the ADD icon or choose New Local User from the Account pull-down menu. 4. Log out. 5. Log in as SAxx. 6. Invoke the Disk Manager. Select the Disk icon from the Application Manager - Configuration window. Introducing UNIX System Management 1–29
  • 58.
    Solutions 7. Record thenumber and type of disks on your system. Select a disk from the Disk Configuration window. Click the Configure... button. Click the Cancel button to exit without making changes to the running system disks. 1–30 Introducing UNIX System Management
  • 59.
    2 Managing Disks andFile Systems Managing Disks and File Systems 2–1
  • 60.
    About This Chapter AboutThis Chapter Introduction This chapter is an introduction to UNIX file systems. It illustrates the parts of a physical disk and how the disk is organized logically to hold separate file systems. It describes the different types of file systems supported by Digital UNIX and the generic interface, the Virtual File System (VFS). It reviews the types of files and overviews the organization of system files. It demonstrates how to change partition sizes, create a file system, check the file system, and mount and dismount the file system. Lab exercises provide practice using the disklabel, newfs, fsck, mount, and umount commands. The term sector means the fixed-size, hardware-oriented unit (generally 512 bytes) and block to represent the unit defined by the file system (typically 1024, 4096 or 8192 bytes). Objectives To manage UNIX file systems, you should be able to: • Identify the various components of a disk drive • Explain the concepts of logical volumes • Explain the purpose and contents of the logical disk partitions • View and change partition sizes using CDE • View and change partition sizes • Explain the organization and advantages of the various file systems • Describe the organization of system files • Describe the Advanced File System • Create a new file system • Check a file system’s consistency • Mount and unmount a file system Resources For more information on the topics in this chapter, see the following: • Nemeth, Snyder, & Seebass, (c) 1989, UNIX System Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6, Chapters 4 and 12 • Digital UNIX System Administration, Chapter 7 • Leffler, McKusick, Karels, and Quarterman, (c) 1989, The Design and Implementation of the 4.3BSD UNIX Operating System, Addison-Wesley, ISBN 0-201-06196-1, Chapter 7 describes the UNIX file system 2–2 Managing Disks and File Systems
  • 61.
    About This Chapter •POLYCENTER Advanced File System Technical Summary • ULTRIX to DEC OSF/1 Migration Guide, describes the file systems and directory structure • Marshall Kirk McKusick, "Fsck - The UNIX File System Check Program" in UNIX Supplementary Documents Managing Disks and File Systems 2–3
  • 62.
    Disk Drives Disk Drives DiskDrive Structure Each circular plate is called a platter. The top and bottom surfaces in the stack are not generally used. Disk capacity can be enlarged by increasing the: • Size of the platter (this increases seek time and reduces performance) • Number of platters in the stack • Density at which information is written Figure 2–1 Disk Drive Structure SECTOR TRACK SURFACE CYLINDER HEADS G S F _ 0 6 9 8 _ 8 9 . D G Surfaces • Top and bottom of a disk platter • Coated with a magnetic material 2–4 Managing Disks and File Systems
  • 63.
    Disk Drives Heads •Perform read and write on disk surface • One head per surface • Mounted inline vertically on a movable arm Tracks • Concentric circles as traced by a head on a continuously rotating surface. • Many tracks can be formed on a single surface. Cylinders Cylinders are imaginary figures formed by dropping a top surface track down through the tracks directly below on all surfaces. All sectors on all recording surfaces are located at the same distance from the center spindle of the disk. Cylinder zero (0) includes: • Track 0, surface 0 • Track 0, surface 1 • Track 0, surface 2 • Track 0, surface 3 • And so forth A cylinder group is a set of contiguous cylinders. Sectors A sector is the smallest contiguous region on a disk that may be accessed with a single I/O operation. A sector is addressed by its logical block number (LBN). • All surfaces are divided into pie slices. • Each portion of a single track inside one pie slice is a sector. • There are 512 bytes of information per sector. Disk Operation The disk rotates at a high rate of speed. The heads are mounted on arms that move in and out from the center. The heads hover very close to the surface without touching it. If a head does touch the surface, this is a head crash and can destroy the surface of the platter. To read or write a block of data, the head seeks, or moves to the correct track, and the driver waits until the correct sector rotates underneath the head. Managing Disks and File Systems 2–5
  • 64.
    Logical Volumes Logical Volumes OverviewLogical volumes add a level of abstraction between the physical disk devices and the file system. Logical volumes can be implemented at several different layers: • Hardware RAID devices (HSZ10/15, HSZ20/40) - several physical disks are seen as one unit • Device driver Partition - a group of contiguous cylinders on one physical disk is seen as one unit Logical Storage Manager (LSM) - several physical disks or partitions from several disks are seen as one unit Note The hardware and driver implementations are file system independent; you can put any file system on a logical unit. • File system POLYCENTER Advanced File System (AdvFS) - several physical disks or partitions are seen as one unit The following figure shows the functional layering of components. A configuration can use any combination of the logical volume implementations. 2–6 Managing Disks and File Systems
  • 65.
    Logical Volumes Figure 2–2Functional View of Logical Volumes Disk Disk RAID Device File Systems Disk Device Drivers Logical Volume Driver UFS AdvFS ZKOX−2037−20−RGS Managing Disks and File Systems 2–7
  • 66.
    Partitions and FileSystems Partitions and File Systems Disk Partitions For better performance for access, UNIX systems divide disks into chunks called partitions, known by letters a through h. Some disks have fewer than eight partitions. Partitions are groups of sectors, which means they are sized in multiples of 512 bytes. One possible configuration of our example disk is: • Partition a - Root file system • Partition b - Swapping/paging area Swapping/paging space is used when there is not enough room in physical memory for user programs or data. Some information is copied from memory to the swap area, to free up memory for other information. • Partition g - /usr directory Every UNIX file system is located within a logical volume, such as a partition. Disks can have more than one file system, but only one UNIX file system can exist on a partition. You should not use overlapping partitions for a file system. Remember, a partition is a logical division of a disk. Partitions on a Disk The following figure shows overlapping partitions on a disk. Figure 2–3 Overlapping Disk Partitions Physical Disk c a b g d e f ZKO−060000135−11−RGS Hierarchical File Systems A file system is a hierarchical structure consisting of directories and files. For example, partition a on the system disk contains: • Root file system (/) • Such directories as /dev and /etc 2–8 Managing Disks and File Systems
  • 67.
    Partitions and FileSystems A file system has inode and superblock file structures for storing files. Partitions do not have these file structures. UNIX file systems are separate: • Each file system has its own partition or logical disk. • A file system does not extend across the partition boundary unless the Advanced File System (AdvFS), or the Logical Storage Manager (LSM) is used. • File systems must not overlap like partitions. For example, if a file system is created in partition c, none of the other partitions on that disk can be used. This helps maintain data integrity and security and also allows for expansion. When you run out of disk space, buy another disk and mount it into the hierarchy as another file system. • Makes backups easier: separates active files from less-active files in different file systems and backs up active file systems more often. The following figure shows a file system hierarchy. Figure 2–4 File System Hierarchy / usr vmunix staff lib bin joe sue ls vi ZKO−060000135−51−RGS File System and Partition Relationships There is a one-to-one correspondence between file systems and partitions. For example, partition a on the system disk contains the root file system (/) consisting of all its files. Managing Disks and File Systems 2–9
  • 68.
    Partitions and FileSystems Example 2–1 Root Directory $ ls -F / bin@ genvmunix* lost+found/ osf_boot* tmp/ vmunix* dev/ home/ mnt/ sbin/ usr/ etc/ lib@ opt/ sys@ var@ • File systems are separate and distinct. • A file system does not extend across a partition boundary, unless the system uses logical volumes to create logical volumes. • File systems must not overlap. • File systems are created with the newfs(8) command. • To make a file system on a partition visible in the directory hierarchy and available to users, mount the file system. Partition Tables and Disk Labels The disk device driver needs to know the partition sizes for each disk. It treats each partition as though it were a separate disk drive. Early versions of UNIX had tables defining partition locations and sizes compiled into the driver. More recent versions of BSD UNIX moved the partition table information into a text file, /etc/disktab. ULTRIX /etc/disktab includes the disk geometry and default partition sizes, but not the partition offsets. Digital UNIX puts partition information into a disk label in sector number LABELSECTOR of the disk, usually sector 0. The label is used by the disk device driver and boot program to recognize the drive and partitions. If a disk is not labeled, partition information is obtained from /etc/disktab. Example 2–2 shows a sample /etc/disktab file. Digital UNIX recognizes partition tables created by earlier Digital UNIX and DEC OSF/1 releases and ULTRIX systems. Deriving Disk Parameters with /etc/disktab The /etc/disktab file is a simple database that describes disk geometries and disk partition characteristics (patterned after the termcap terminal database). Fields are separated by a colon (:) and disk names (first field) are separated by a vertical line ( | ). The following table shows the layout of the partitions for an RZ23 Winchester disk. Partition Offset Size (sectors) Block Size (bytes) Fragment Size (bytes) a 0 131072 8192 1024 b 131072 262144 8192 1024 c 0 1299174 8192 1024 2–10 Managing Disks and File Systems
  • 69.
    Partitions and FileSystems Partition Offset Size (sectors) Block Size (bytes) Fragment Size (bytes) d 393216 301986 8192 1024 e 695202 301986 8192 1024 f 997188 301986 8192 1024 g 393216 819200 8192 1024 h 1212416 86758 8192 1024 For more information on any type of disk, see that type in the Reference Pages; for example, rz(7). The following example shows a section of an /etc/disktab file. Example 2–2 An /etc/disktab File # Disk geometry and partition layout tables. # Key: # ty type of disk # dt drive type (SCSI MSCP etc.) # ns #sectors/track # nt #tracks/cylinder # nc #cylinders/disk # o[a-h] partition offset # P[a-h] partition sizes in sectors # b[a-h] partition block sizes in bytes # f[a-h] partition fragment sizes in bytes rz56|RZ56|DEC RZ56 Winchester: :ty=Winchester:dt=SCSI:ns#54:nt#15:nc#1632: :oa#0:pa#131072:ba#8192:fa#1024: :ob#131072:pb#262144:bb#8192:fb#1024: :oc#0:pc#1299174:bc#8192:fc#1024: :od#393216:pd#301986:bd#8192:fd#1024: :oe#695202:pe#301986:be#8192:fe#1024: :of#997188:pf#301986:bf#8192:ff#1024: :og#393216:pg#819200:bg#8192:fg#1024: :oh#1212416:ph#86758:bh#8192:fh#1024: Managing Disks and File Systems 2–11
  • 70.
    Viewing and ChangingPartition Sizes with CDE Viewing and Changing Partition Sizes with CDE Overview In general, you change the partitions during the initial installation or when your file system is running out of space. The CDE Disk Manager is available during system installation. Note The disklabel command is available in the Digital UNIX standalone environment. Displaying the Current Partition Sizes To display the current partition sizes, begin at the CDE Front Panel and select the Application Manager icon. Figure 2–5 Navigating to the Disk Configuration Window 2–12 Managing Disks and File Systems
  • 71.
    Viewing and ChangingPartition Sizes with CDE The three Pop-up windows shown will be individually displayed as the user selects (double-clicks MB1) each of the options. • System_Management_Utilities • Configuration • Disk The Disk Configuration Pop-up window is displayed with the list of available disk devices on the system. Click the desired disk and then the Configure... button. Figure 2–6 Disk Configuration Managing Disks and File Systems 2–13
  • 72.
    Viewing and ChangingPartition Sizes with CDE Configure Partitions Window The Configure Partitions window is now displayed, which shows the current partitions of the selected disk. Figure 2–7 Configure Partitions A number of major features are displayed which should be noted: • rz2 is an RZ26 with 1050 megabytes. • The bar at the top of the window shows the default partitions of the disk. • The selected partition is shown as h. • The handles on the bar graph are used to change the beginning and end points of the selected partition. Disk/Partition Information Disk and partition information can be displayed in other forms by using the: • Disk Attributes... button • Partition Table button Disk Attributes presents the user with an overall view of the disk geometry. 2–14 Managing Disks and File Systems
  • 73.
    Viewing and ChangingPartition Sizes with CDE Figure 2–8 Disk Geometry Clicking the Partition Table button will display the following window, which presents all the allowable partitions on the disk. Managing Disks and File Systems 2–15
  • 74.
    Viewing and ChangingPartition Sizes with CDE Figure 2–9 Partition Table The full partition table displayed from two points of view. Partitions a, b, and h are highlighted by the bold box which indicates these partitions are in use. All other partitions are displayed without highlighting, which signifies they are allowable based on the defaults for the type of disk. Note Appendix F of the Digital UNIX Installation Guide contains extensive information on the default partitions supported for Digital Storage Architecture (DSA) and Small Computer System Interface (SCSI) disks. In this case the table is based on the disk type we selected, an RZ26. Based on the table information, we see that no other partition can be configured since all the disk space is in use. These two displays allow the user to easily determine the characteristics of the device prior to implementing a change in the organization of the device. 2–16 Managing Disks and File Systems
  • 75.
    Viewing and ChangingPartition Sizes with CDE Modifying a Partition Assume that we make a command decision to alter the partitions on the disk to accommodate another file system which is to support a specific application. Furthermore, the application requires 365M bytes of longterm storage which we will allocate to partition g. From a procedural point of view, we first select the default partitions labeled a,b,g,h to set up the table, as seen in the following figure. Figure 2–10 Partition Size The partition bar now shows that partitions g and h appear to be similar in size. In fact, a quick check of the Selected Partition: h shows that its size is 429. But what is the unit of measure? An examination of the Units: field shows the unit of measure is Megabytes - , therefore it is a 429M byte partition. The size of the g partition may be examined by simply clicking the appropriate area on the partition bar. You can determine that this partition is also a 429M byte partition. Note Up until this point, nothing on the disk has been changed. Verify that the changes are accurate and then click the Commit button. This action will write the new changes onto the disk label. Managing Disks and File Systems 2–17
  • 76.
    Viewing and ChangingPartition Sizes with CDE The last action remaining is to choose the file system type for the new partition using the File System selection button. Changing Partition Size If a custom size partition is required, the user can resize the partitions by using the bar graph. Figure 2–11 Partition Bar Graph Note that there are 10 flags on the bar graph beginning on the top left of partition a. These are the handles used to grab and resize each partition. • Top handles are for the left boundary. • Middle handles move both boundaries of adjoining partitions. • Bottom handles are for the right boundary. The circular objects between the handles denote that two partitions are adjacent to each other. Also note the gap (no circular object) between partition g and h; indicating a gap on the disk between partitions. Use the following actions to customize any partition: • Click and drag MB1 on top handles to move the left boundary. • Click and drag MB1 on bottom handles to move the right boundary. 2–18 Managing Disks and File Systems
  • 77.
    Viewing and ChangingPartition Sizes with CDE Figure 2–12 Result of Partition Changes This figure shows the size of the g partition as 365M bytes, which is the size required for our application. Note that the gap poses no problem; it only leaves unusable space on the disk. Partition h could be expanded if needed. Note Since the partitions are being changed, remember that any file system using those partitions must now be restored. Repartitioning a Disk The following are suggestions for repartitioning a disk. • Increase a partition if a file system or swap area is running out of space. • For easier backups, size partitions based on your backup device’s storage capacity. • Create separate file systems on separate disks for /, /usr, var, and users’ home directories to improve performance and make backups easier. • Divide swap space between two partitions on different disks to improve performance. Managing Disks and File Systems 2–19
  • 78.
    Viewing and ChangingPartition Sizes Viewing and Changing Partition Sizes Overview In general, you change the partitions during the initial installation or when your file system is running out of space. The disklabel command is available in the Digital UNIX standalone environment. You must have superuser privileges to use the disklabel command. The partition size and offset are in 512-byte sectors. The offset is the starting sector number for the partition. To display the current partition sizes, use disklabel -r with the raw device name for partition a or c. The example shows how to display a disk label. Example 2–3 Displaying the Disk Label # disklabel -r /dev/rrz0a # /dev/rrz0a: type: SCSI 1 disk: rz55 2 label: 3 flags: 4 bytes/sector: 512 5 sectors/track: 36 tracks/cylinder: 15 sectors/cylinder: 540 cylinders: 1224 rpm: 3600 6 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 7 7 partitions: 8 # size offset fstype [fsize bsize cpg] a: 40960 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 75*) b: 122880 40960 4.2BSD 1024 8192 16 # (Cyl. 75*- 303*) c: 649040 0 unused 1024 8192 # (Cyl. 0 - 1201*) d: 152446 163840 unused 1024 8192 # (Cyl. 303*- 585*) e: 152446 316286 unused 1024 8192 # (Cyl. 585*- 868*) f: 180308 468732 unused 1024 8192 # (Cyl. 868*- 1201*) g: 485200 163840 4.2BSD 1024 8192 16 # (Cyl. 303*- 1201*) # 1 Controller type; for example, SCSI, ESDI, SMD, MSCP 2 Disk type name 3 Optional label 4 Flags; for example, removable, RAMDISK, ECC 5 Disk geometry section 2–20 Managing Disks and File Systems
  • 79.
    Viewing and ChangingPartition Sizes 6 Hardware characteristics section • Rotational speed in revolutions per minute. • Sector interleave compensates for a slow controller; specified as the denominator of the ratio (sectors read /sectors passed over). Therefore an interleave of 1 (ratio 1/1) implies contiguous layout, while 2 (ratio 1/2) implies logical sector numbering is every other sector. • Other skew techniques compensate for a slow controller; 0 implies no skew. • trackskew is the offset of sector 0 on track N relative to sector 0 on track N+1. • cylinderskew is the offset of sector 0 on cylinder N relative to sector 0 on cylinder N+1. 7 Drive type specific data (if any) 8 Partition table • Partition name • Partition size in sectors • Starting sector number • File system type; for example, unused, swap, 4.2BSD, ufs, raw, AdvFS, LSMpubl, database • Fragment size in bytes • Block size in bytes • Cylinders per group • Cylinder numbers If your disk does not have a label, you will get a message such as: # disklabel -r /dev/rrz2a Bad pack magic number (label is damaged, or pack is unlabeled) Changing Partition Sizes You might change your partition sizes when: • A file system is running out of space • Before doing a software installation, when your planning indicates you need more space To change partition sizes: 1. Use df to determine if a partition is too large or too small and which other partitions on that disk are being used. 2. Back up all affected file systems. 3. Unmount the file systems on the disk whose label you want to change. 4. Display the current partition sizes and calculate the new sizes and offsets. Managing Disks and File Systems 2–21
  • 80.
    Viewing and ChangingPartition Sizes 5. Use disklabel -e -r to edit the disk label. Display the new partition sizes. 6. Use newfs to create a file system on the partition and fsck to check it. 7. Mount the file system, restore files to it, and use it. 8. Backup the disk label information to a file using a command similar to the following: disklabel -r rz0 > /usr/label_rz0 If necessary, you can restore the disk label using this file. If the disk does not have any file systems on it (that is, a new disk), write a default label using disklabel -w -r disk disktype and start with Step 4. To expand partition a from 40960 to 49152 sectors, for example, we must increase the offset and decrease the size of partition b by 49152-40960=8192 sectors. The disklabel -e command invokes the editor specified by the EDITOR environment variable or the vi editor. The -r option affects the disk label on the disk, rather than the copy in memory. Be aware that the vi editor is not available when you boot to single user mode or work in the Digital UNIX standalone environment. Expanding a Partition For example, we want to increase partition a on an RZ23 disk to include all of partition b so we can divide the disk into partitions a and g. Note: in the following example, partition b is not being used. Figure 2–13 Expanding a Partition Before 0 40960 99458 a b g After 0 99458 a g ZKOX−055000111−04−RGS The following example shows how to change partition sizes. 2–22 Managing Disks and File Systems
  • 81.
    Viewing and ChangingPartition Sizes Example 2–4 Expanding a Partition # /sbin/disklabel -r /dev/rrz2a # /dev/rrz2a: type: SCSI disk: rz23 label: . . . 8 partitions: # size offset fstype [fsize bsize cpg] a: 40960 0 unused 1024 8192 # (Cyl. 0 - 155*) b: 58498 40960 unused 1024 8192 # (Cyl. 155*- 376*) c: 204864 0 unused 1024 8192 # (Cyl. 0 - 775) d: 35135 99458 unused 1024 8192 # (Cyl. 376*- 509*) e: 35135 134593 unused 1024 8192 # (Cyl. 509*- 642*) f: 35136 169728 unused 1024 8192 # (Cyl. 642*- 775*) g: 105406 99458 unused 1024 8192 # (Cyl. 376*- 775*) h: 70271 134593 unused 1024 8192 # (Cyl. 509*- 775*) # /sbin/disklabel -e -r /dev/rrz2a (invokes an editor; we change partition a size from 40960 to 99458) type: SCSI disk: rz23 label: flags: bytes/sector: 512 sectors/track: 33 tracks/cylinder: 8 sectors/cylinder: 264 cylinders: 776 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize cpg] a: 99458 0 unused 1024 8192 # (Cyl. 0 - 155*) b: 58498 40960 unused 1024 8192 # (Cyl. 155*- 376*) c: 204864 0 unused 1024 8192 # (Cyl. 0 - 775) d: 35135 99458 unused 1024 8192 # (Cyl. 376*- 509*) e: 35135 134593 unused 1024 8192 # (Cyl. 509*- 642*) f: 35136 169728 unused 1024 8192 # (Cyl. 642*- 775*) g: 105406 99458 unused 1024 8192 # (Cyl. 376*- 775*) h: 70271 134593 unused 1024 8192 # (Cyl. 509*- 775*) ~ (when you exit the editor, you will be prompted) write new label? [y]: Return (continued on next page) Managing Disks and File Systems 2–23
  • 82.
    Viewing and ChangingPartition Sizes Example 2–4 (Cont.) Expanding a Partition # /sbin/disklabel -r /dev/rrz2a # /dev/rrz2a: type: SCSI disk: rz23 label: . . . 8 partitions: # size offset fstype [fsize bsize cpg] a: 99458 0 unused 1024 8192 # (Cyl. 0 - 376*) b: 58498 40960 unused 1024 8192 # (Cyl. 155*- 376*) c: 204864 0 unused 1024 8192 # (Cyl. 0 - 775) d: 35135 99458 unused 1024 8192 # (Cyl. 376*- 509*) e: 35135 134593 unused 1024 8192 # (Cyl. 509*- 642*) f: 35136 169728 unused 1024 8192 # (Cyl. 642*- 775*) g: 105406 99458 unused 1024 8192 # (Cyl. 376*- 775*) h: 70271 134593 unused 1024 8192 # (Cyl. 509*- 775*) We can display the disk label again, showing the changes we have made. Notice the cylinder numbers for partition a have been automatically updated. Repartitioning a Disk The following are suggestions for repartitioning a disk. • Increase a partition if a file system or swap area is running out of space. • To make backups easier, size partitions based on your backup device’s storage capacity. • Create separate file systems on separate disks for /, /usr, var, and users’ home directories to improve performance and make backups easier. • Divide swap space between two partitions on different disks to improve performance. 2–24 Managing Disks and File Systems
  • 83.
    Digital UNIX FileSystems Digital UNIX File Systems Overview The Digital UNIX operating system supports the following types of file systems: • UNIX file system (UFS) • Network File System (NFS) • Memory File System (MFS) • Compact disk file system (CDFS) (ISO 9660) • POLYCENTER Advanced File System (AdvFS) • File on File Mounting File System (FFM) • /proc File System • /dev/fd File System (FDFS) The CDFS file system also supports CD–ROMs recorded using Rock Ridge Interchange Protocol R1.09. The AdvFS is a local file system that uses journaling to recover from unplanned system restarts. The FFM file system allows regular, character, or block-special files to be mounted over regular file systems, and is primarily used on the SVR4-compatible system. These operating systems support multiple types of file systems by using a Virtual File System: • VFS provides file system independent support for system calls. • Different file system types are not apparent to the general user. The following figure illustrates the virtual file system interface providing access to other file systems. Figure 2–14 File System Interface ZKO−055−000147−124−RGS VFS UFS AdvFS NFS CDFS Virtual File System To support different file system types, Digital UNIX includes a generalized set of file system data structures as an interface called the virtual file system (VFS). The VFS layer provides support for system calls and dispatches the calls to the appropriate file system. Managing Disks and File Systems 2–25
  • 84.
    Digital UNIX FileSystems VFS is similar in concept to the ULTRIX operating system generic file system (GFS) or the Sun Microsystem virtual file system (VFS). VFS sits logically on top of the other file systems. A file system call goes to a VFS routine that determines the file system type it applies to, then calls a specific file system routine. Accessing a File Through VFS Accessing a file through the virtual file system: • Each open file is represented by a vnode in the system vnode table. • A process accesses a file through a file descriptor in its file descriptor table. • This descriptor points to an entry in the system file table. • The system file table includes a pointer to the vnode table. • The vnode table points to the disk blocks. • A memory buffer cache holds currently used disk blocks, for faster access. The following figure shows the process of accessing a file through VFS. Figure 2–15 Accessing a File Through VFS ZKOX−055000111−05−RGS Process Descriptor Table System Open File Table Vnode Table Buffer Cache Disk descriptor file structure vnode descriptor descriptor vnode vnode file structure file structure file structure UNIX File System The UNIX File System (UFS) uses a large block size to maximize the amount of data transferred with each I/O request. UFS is 2–26 Managing Disks and File Systems
  • 85.
    Digital UNIX FileSystems also known as the Berkeley fast file system, developed by the University of California at Berkeley. • File names can contain up to 255 characters. • The goal is to lay out files for fast access and minimal waste of space. Uses a large block size (4096 or 8192 bytes) to maximize data transfer Allows blocks to be split into fragments to reduce wasted space There are two differences between UFS and System V: • Use of blocks and fragments • Changed file system layout using cylinder groups Figure 2–16 Small Blocks Require More Overhead FILE 1 FILE 2 X X X X X X X X X ZKO−RA0188−11−RGS Figure 2–17 Large Blocks Waste Space FILE 1 FILE 2 X X X X X X X X X ZKO−RA0188−12−RGS Figure 2–18 Large Blocks and Small Fragments FILE 1 FILE 2 X X X X X X X X X ZKO−RA0188−13−RGS In the first two figures, we see file systems with only one block size, no fragment size. A small block size requires more overhead and more time to handle large files. A large block size wastes space when files are small. Managing Disks and File Systems 2–27
  • 86.
    Digital UNIX FileSystems 4.3BSD, ULTRIX, and Digital UNIX file systems allow a block to be divided into smaller pieces called fragments. The default fragment size is typically 1K byte. When disk space is needed, either a block or a fragment can be allocated. Note If a file is > 96K bytes, the system does not bother to allocate a fragment; it assumes the file will grow larger, so it allocates a full block. Block and fragment sizes are specified when the file system is created. The defaults can be seen in the disk label or /etc /disktab. Many units in the file system are measured in fragments rather than blocks. For the layout policies to be effective, the file system cannot be kept completely full. Each file system maintains a parameter (minfree) for the minimum percentage of file system blocks that can be free. Below this threshold, only the superuser can allocate blocks. Reducing this percentage may hurt performance in a file system that is actively allocating and freeing blocks. UNIX File System Layout Cylinder groups require more overhead for storing extra structure, but the gain in performance is worth it. The superblock is replicated in a different position in each cylinder group to prevent loss of critical data in case an entire cylinder or surface is damaged. The following figure illustrates the UNIX file system layout. Figure 2–19 UNIX File System Layout Partition Cylinder Group 0 Cylinder Group N ZKO−060000135−13−RGS Boot Block Super Block Alternate Super Block Alternate Super Block Cylinder Group Block Cylinder Group Block Inode Table Inode Table Data DataData MFS File System The mfs command builds a Memory File System (MFS), which is a UFS file system in virtual memory, and mounts it on the specified mount-node. When the file system is unmounted, MFS exits and the contents of the file system are lost. If MFS is sent a signal 2–28 Managing Disks and File Systems
  • 87.
    Digital UNIX FileSystems while running, for example during system shutdown, it attempts to unmount its corresponding file system. For a memory file system, the special-device file provides only a set of configuration parameters, including the size of the virtual memory segment to allocate. If the special-device file is omitted, you must specify the segment size. The special-device file is usually the primary swap area, because that is where the file system is backed up when free memory gets low and the memory supporting the file system has to be paged. You can enable /tmp as a memory file system by adding an entry in the /etc/fstab file. For example, the following line creates a 10 Megabyte memory file system, mounted on /tmp: -s20480 /tmp mfs rw 1 0 Note that the contents of a memory file system are lost whenever a reboot or unmount is performed. You must be superuser to use this command. Note Refer to the man page on MFS for further information. Network File System Network File System (NFS) is a service that allows you to mount directories across the network and treat those directories as if they were local. NFS is a facility for sharing files in a heterogeneous environment of processors, operating systems and networks. Sharing is accomplished by mounting a remote file system or directory on a local system and then reading or writing files as though they were local. Exporting file systems consists of creating an /etc/exports(5nfs) file that lists directories that other systems have permission to access. The exporting system, or server, plays a passive role in file sharing. The system that imports a file system, the client, can mount that file system at any point within its local file system. Imported file systems are not copied to the client’s own file system but are accessed transparently using remote procedure calls. Imported file systems appear to a client system user as local files. The following figure shows system Cabala importing two directories from system Cherub. Managing Disks and File Systems 2–29
  • 88.
    Digital UNIX FileSystems Figure 2–20 Remote Mounting with NFS / bin usr etc cherub man man1 ... man8 file1 file2 cabala (Client) / bin usr etc project man man1 ... man8 file1 file2 cherub (Server) ZKOX−055000111−19−RGS share share A system that acts as a server can also act as a client. A server that exports file systems can also mount remote file systems exported by other systems, therefore becoming a client. Compact Disk File System Digital UNIX systems support the compact disk, read-only memory file system, CDFS, based on the international standard ISO 9660-1988. Volumes recorded in the ISO 9660-1988 (interchange level 2) or High Sierra Group (HSG) format can be mounted for reading. CDFS is a configurable kernel option. See cdfs(4) and mount(8cdfs) for more information. Mount options for CDFS: defperm Ignores permission bits specified on the disk and uses value 0666 with root owner nodefperm Uses on-disk permissions, if present noversion Ignores ’;#’ on file names; useful for mounting a CD containing MS–DOS applications Default mount options are ro,defperm CDFS is based on the international standard ISO 9660-1988 and allows read-only access. 2–30 Managing Disks and File Systems
  • 89.
    System Organization System Organization Typesof Files A file in the UNIX system is a sequence, or stream of bytes. The Digital UNIX operating system supports the following file types. Table 2–1 Types of Files File Type Symbol Function Regular file - Contains executable program, shell script, ASCII text, or source code Directory d Contains the names of files or other directories Character device file c References a device driver that does its own input and output buffering, such as a terminal Block device file b References a device driver that performs I/O in large chunks (1024 or more bytes) and the kernel provides buffering support, such as a disk UNIX domain socket s Provides a communication connection between processes Named pipe p Provides a communication connection between processes Symbolic link l Contains the name of another file (or directory) to which it points The symbol column shows the file type symbol that appears in a long directory listing. UNIX systems provide access to devices through special device files. For example, you can use the character or block disk device file name in several commands. Digital UNIX File Directory Hierarchy System files are organized by function and use. The following figure highlights the main system directories. Managing Disks and File Systems 2–31
  • 90.
    System Organization Figure 2–21Digital UNIX System Directory Hierarchy dev etc sbin tmp usr var vmunix man runnls init.d rc0.d rc2.d rc3.d bin ccs include sbin share adm spool ZKOX−055000111−16−RGS sys / A goal in the Digital UNIX system directory hierarchy is efficient organization. Files are separated by function and intended use. Commonly used command files should be in the normal search path in users’ .profile or .login files. var may be a separate file system or a directory under /usr. Organizing System Files The following table highlights the main system directories. 2–32 Managing Disks and File Systems
  • 91.
    System Organization Table 2–2UNIX System Directory Hierarchy Directory Description / The root directory of the hierarchy; includes files and directories used to boot and initialize the operating system dev Files and directories for input and output operations to physical and pseudodevices etc System administration files and databases nls National language support databases sbin Commands to boot and initialize the system in single-user mode init.d Application specific scripts for startup and shutdown rcn.d The rc files executed for system state n tmp Temporary files usr Local commands, reference pages, libraries, spooling directories, and so forth bin Common utilities and applications ccs C compilation system; tools and libraries used to generate C programs include Program header files sbin System administration utilities and other system utilities share Architecture-independent ASCII files man Online reference pages shlib Binary loadable shared libraries var Multipurpose log, temporary, varying, and spool files adm Common administration files and databases crash For saving kernel crash dumps cron Files used by cron sendmail Configuration and database files for sendmail syslog Files generated by syslog spool Miscellaneous printer and mail system spooling directories Managing Disks and File Systems 2–33
  • 92.
    Advanced File System AdvancedFile System Overview The POLYCENTER Advanced File System (AdvFS) is a local file system that uses journaling to recover from unplanned system restarts significantly faster than UFS. AdvFS provides a flexible structure, decoupling file systems from physical disks, and allowing a growth path. The separately licensed Advanced File System utilities product provides multidisk capabilities and management utilities. AdvFS is transparent to users and programmers. It maintains compatibility with the standard file system interface. AdvFS provides a number of utility programs for system administrators to manage the system. Features and Benefits AdvFS and Utilities provide a number of features over traditional file systems, as shown in the following table. Table 2–3 AdvFS Features and Benefits Feature Benefit Rapid crash recovery Write-ahead logging eliminates the need to use the fsck utility to check and repair file systems and reduces the time needed to mount file systems. Extended capacity Extends the size of both files and file systems, supporting distributed systems, databases, and office-automation systems. Disk spanning A file or file system can span multiple disks within a shared storage pool. Online resizing The size of the file system can be dynamically changed by adding or removing disks while the system is in use. Online backup You can back up the contents of your file system without interrupting the work flow of system users. Online defrag- mentation Improves system performance by making files more contiguous, while the system remains in use. Online domain balancing Improves system performance by spreading files among the disks in the storage pool, while the system remains in use. (continued on next page) 2–34 Managing Disks and File Systems
  • 93.
    Advanced File System Table2–3 (Cont.) AdvFS Features and Benefits Feature Benefit File-level striping Improves file transfer rates by spreading segments of individual files across several disks. File undelete Improves data availability by allowing system users to recover deleted files. Enhanced performance File operations, such as creating, renaming, reading and writing, are faster than with traditional file systems, making AdvFS ideal as the local file system on an NFS server. Components The POLYCENTER Advanced File System consists of two components: • Advanced File System (AdvFS) is a file system option on the Digital UNIX operating system. If you registered the Digital UNIX operating system license PAKs, you can install and use the file system. The basic file system provides: Recoverability Fast restart One partition or volume per domain Multiple filesets per domain Fileset quotas vdump, vrestore, and other commands to manage the file system • Advanced File System Utilities is a separately licensed, optional layered product. It enhances the file system capabilities and system management. The Utilities product provides: Multivolume capabilities Online reconfiguration Cloning File undelete Defragmenter Domain balancer File striping Managing Disks and File Systems 2–35
  • 94.
    Advanced File System UFSStorage Model The UNIX file system (UFS) is a good example of a traditional file system. Each disk (or disk partition) contains one separate file system. You mount the file system into the directory hierarchy using mount points. The directory hierarchy layer is tightly bound to the physical storage layer. When a file system becomes full, it is impossible to move selected files without changing the pathnames of those files. The following figure shows the tight binding between the directory hierarchy and physical storage. Figure 2–22 UFS Storage Model root file system ZKOX−2037−21−RGS file system file system This is why many people consider the terms file system and partition to be equivalent. 2–36 Managing Disks and File Systems
  • 95.
    Advanced File System AdvFSStorage Model Unlike UFS, AdvFS separates the two layers. The directory hierarchy layer handles file naming and the file system interface — opening and reading files. The physical storage layer handles write-ahead logging, file allocation, and physical disk I/O functions. The following figure shows the separation of directory and storage layers in AdvFS. Figure 2–23 AdvFS Storage Model ZKOX−2037−22−RGS Directory Hierarchy Layer Storage Layer This separation allows you to manage the physical storage of files separately from the directory hierarchy. For example, you can move a file from one disk to another within a storage domain without changing its pathname. The following figure shows how to move a file’s physical location without changing its pathname. Managing Disks and File Systems 2–37
  • 96.
    Advanced File System Figure2–24 File Migration in AdvFS ZKOX−2037−23−RGS Directory Hierarchy Layer Storage Layer Two new concepts in the AdvFS design are file domain and fileset. File Domains A file domain is a named set of one or more volumes that provides a shared pool of physical storage. A volume is any mechanism that behaves like a UNIX block device, for example: • An entire disk • A disk partition • A logical volume configured with the Logical Storage Manager (LSM) The following figure shows a file domain with two volumes. Figure 2–25 File Domain ZKOX−2037−24−RGS The first step in setting up an Advanced File System is creating a file domain. When created, a file domain consists of a single volume. If you have the Advanced File System Utilities product installed and licensed, you can add more volumes. 2–38 Managing Disks and File Systems
  • 97.
    Advanced File System Guidelinesfor File Domains Follow these guidelines for creating file domains: • Avoid I/O scheduling contention and enhance system performance by dedicating the entire disk (partition c) to a file domain. • You can have 100 active file domains per system. A file domain is active when at least one of its filesets is mounted. • Although the risk of media failure is slight, a single failure within a file domain renders the entire domain useless. In the case of media failure, you must recreate the file domain and restore all the files. To reduce the risk of domain failure, limit the number of volumes per file domain to three. You should also store a copy of your configuration information — domain and fileset names and associated volumes. • To maintain high performance, avoid splitting a disk between two file domains. Filesets A fileset represents a portion of the directory hierarchy. Each fileset is a uniquely named set of directories and files that form a subtree structure. The following figure shows three filesets. Figure 2–26 Filesets ZKOX−2037−25−RGS A fileset is similar to a file system in many ways: • You mount filesets like you mount file systems. • Filesets are units on which you enable quotas. • Filesets are units that you back up. Filesets offer features not provided by file systems: • You can clone a fileset and back it up while users are still accessing the original. • A fileset can span several disks in a file domain. Managing Disks and File Systems 2–39
  • 98.
    Advanced File System Guidelinesfor Filesets Follow these guidelines for creating filesets: • You can create an unlimited number of filesets per system; however, the number of filesets you can simultaneously mount is limited to 512. • The more filesets that you establish, the greater your flexibility. On the other hand, a greater number of filesets increases your management overhead. 2–40 Managing Disks and File Systems
  • 99.
    Creating a UFSFile System Creating a UFS File System Overview You do not need to create the root and /usr file systems before installing the system; these are created as part of the installation. If you want separate file systems for users’ home directories, layered products, or other files, you must create these file systems after the installation. Using the newfs Command When you have a new partition or logical volume, you must prepare it to hold files by creating a file system. To create a new file system, use the newfs(8) command. newfs [ -N ] [ options ] device type -N Displays file system parameters without creating a file system. options Options depend on the type of file system; for example, for UFS you can specify the size in sectors or the number of bytes per inode. See newfs(8) for more options. device The unmounted, raw device name; for example, /dev /rrz1a. type The disk type from /etc/disktab. You must be root to use newfs. The newfs command destroys all data on an existing file system. The following example shows how to create a UFS file system with a block size of 8192 bytes and fragment size of 1024 bytes on partition c of an RZ28 disk, which is drive 1. Managing Disks and File Systems 2–41
  • 100.
    Creating a UFSFile System Example 2–5 Using the newfs Command # /usr/sbin/newfs -b 8192 -f 1024 /dev/rrz1c rz28 Warning: calculated sectors per cylinder (1584) disagrees with disk label (1376) /dev/rrz1c: 4110480 sectors in 2595 cylinders of 16 tracks, 99 sectors 1 2007.1MB in 163 cyl groups (16 c/g, 12.38MB/g, 3008 i/g) super-block backups (for fsck -b #) at: 2 32, 25488, 50944, 76400, 101856, 127312, 152768, 178224, 203680, 229136, 254592, 280048, 305504, 330960, 356416, 381872, 405536, 430992, 456448, 481904, 507360, 532816, 558272, 583728, 609184, 634640, 660096, 685552, 711008, 736464, 761920, 787376, 811040, 836496, 861952, 887408, 912864, 938320, 963776, 989232, 1014688, 1040144, 1065600, 1091056, 1116512, 1141968, 1167424, 1192880, 1216544, 1242000, 1267456, 1292912, 1318368, 1343824, 1369280, 1394736, 1420192, 1445648, 1471104, 1496560, 1522016, 1547472, 1572928, 1598384, 1622048, 1647504, 1672960, 1698416, 1723872, 1749328, 1774784, 1800240, 1825696, 1851152, 1876608, 1902064, 1927520, 1952976, 1978432, 2003888, 2027552, 2053008, 2078464, 2103920, 2129376, 2154832, 2180288, 2205744, 2231200, 2256656, 2282112, 2307568, 2333024, 2358480, 2383936, 2409392, 2433056, 2458512, 2483968, 2509424, 2534880, 2560336, 2585792, 2611248, 2636704, 2662160, 2687616, 2713072, 2738528, 2763984, 2789440, 2814896, 2838560, 2864016, 2889472, 2914928, 2940384, 2965840, 2991296, 3016752, 3042208, 3067664, 3093120, 3118576, 3144032, 3169488, 3194944, 3220400, 3244064, 3269520, 3294976, 3320432, 3345888, 3371344, 3396800, 3422256, 3447712, 3473168, 3498624, 3524080, 3549536, 3574992, 3600448, 3625904, 3649568, 3675024, 3700480, 3725936, 3751392, 3776848, 3802304, 3827760, 3853216, 3878672, 3904128, 3929584, 3955040, 3980496, 4005952, 4031408, 4055072, 4080528, 4105984, # 1 Partition size, tracks/cylinder, sectors/track from the disk label. 2 The superblock contains critical data about the file system, so it is duplicated in each cylinder group. 2–42 Managing Disks and File Systems
  • 101.
    Checking a UNIXFile System Checking a UNIX File System When to Check File Systems File systems are checked automatically when the system starts. You should check a file system before mounting it manually or backing it up. Using the fsck Command Use the fsck(8) command to check a UNIX file system. Advanced file systems and network file systems do not need to be checked. The fsck command looks for and corrects inconsistencies such as: • Unreferenced inodes • Link count number in inode is too large • Missing blocks in the free list • Blocks in the free list that are also in files, or blocks that are in two files • Incorrect counts in the superblock fsck [ options ] [ filesystem ] options Some options for UFS file systems: -p Checks and corrects a set of inconsistencies. If it encounters other errors, it exits. Without the -p option, fsck works interactively, prompting before each correction. -b block Specifies the block to use as the superblock. (Block 32 is usually used as alternate superblock.) -y Assumes a yes response to all prompts. -n Assumes a no response to all prompts. filesystem The raw device name for the file system you want checked; for example, /dev/rrz1a. If you do not specify a file system, all file systems in /etc/fstab are checked. Orphaned files are put in the lost+found directory, using the inode as a name. If the lost+found directory does not exist, you can create it with the mklost+found(8) command. If you choose not to create it, it will be created automatically if orphaned files are found. You must be root to use fsck. Check file systems when they are unmounted. Since the root file system cannot be unmounted, check it in single-user mode. This will prevent fsck reporting and attempting to fix inconsistencies due to normal system operations. Example 2–6 shows how to invoke the fsck command. Managing Disks and File Systems 2–43
  • 102.
    Checking a UNIXFile System Example 2–6 Invoking the fsck Command # /usr/sbin/fsck /dev/rrz1c ** /dev/rrz1c ** Last Mounted on /usr/local ** Phase 1 - Check Blocks and Sizes 1 ** Phase 2 - Check Pathnames 2 ** Phase 3 - Check Connectivity 3 ** Phase 4 - Check Reference Counts 4 ** Phase 5 - Check Cyl groups 5 699 files, 92155 used, 3596 free (204 frags, 424 blocks, 0.2% fragmentation) 6 # fsck /dev/rrz3g ** /dev/rrz3g File system unmounted cleanly - no fsck needed 7 # fsck /dev/rrz3b 8 ** /dev/rrz3b BAD SUPER BLOCK: MAGIC NUMBER WRONG 9 USE -b OPTION TO FSCK TO SPECIFY LOCATION OF AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8). # fsck -b 32 /dev/rrz3b 1 0 1 Phase 1 checks for consistency of inodes. 2 Phase 2 checks for directories that point to incorrect inodes. 3 Phase 3 checks for unreferenced directories. 4 Phase 4 checks link counts in files and directories. 5 Phase 5 checks bad, duplicated or unreferenced blocks and total free block count. 6 fsck displays the number of files in the file system, the number of used and free blocks, and the percentage of fragmentation. 7 fsck recognizes when a file system has been unmounted cleanly. 8 Here we attempt to check the swap area, which does not contain a file system. 9 The superblock has been corrupted (or in this case does not exist). The command can be repeated, specifying an alternate superblock with the -b option. 1 0 We can specify an alternate superblock block number to the fsck command. 2–44 Managing Disks and File Systems
  • 103.
    Mounting and UnmountingFile Systems Mounting and Unmounting File Systems Overview Visualize the root directory and its files as a tree. By grafting a branch (or file system) to the tree, you can create a larger tree. However, you need a point at which to attach the file system. In UNIX this grafting point is a directory. When created, the directory /usr is an ordinary directory, but when a file system is grafted to this directory, /usr becomes an entry point to the new file system. This act of grafting is called mounting. The result is that a user can move easily from file system to file system as if moving from directory to directory. To make the files in a file system available to users, mount the file system into the directory hierarchy. The following figures illustrate this concept. Figure 2–27 File Systems Before Mounting / dev etc sbin tmp usr file1 file2 file3 bin lib sbin share sys ZKOX−055000111−07−RGS 1 2 Managing Disks and File Systems 2–45
  • 104.
    Mounting and UnmountingFile Systems Figure 2–28 File Systems After Mounting / dev etc sbin tmp usr file1 file2 file3 bin lib sbin share sys ZKOX−055000111−08−RGS 1 2 Disk 1 is the system disk containing the root file system. Disk 2 is another disk containing a file system. Before it is mounted, the files on it are not accessible. Once it is mounted, the files are accessible through the directory mount point, in this case /usr. This figure illustrates another important point. Usually you will not mount a file system on a directory that contains files. However, you can do so without deleting or damaging the files. The files will be invisible and inaccessible until the file system is unmounted. The mount command is available in the Digital UNIX standalone environment. The root file system is mounted automatically when the system is booted, and cannot be unmounted. Using the mount Command To mount a file system under an existing directory, use mount. mount [ options ] [ device ] [ mountpoint ] options Some options include: -a Mounts all file systems listed in /etc /fstab -t Specifies a type of file system to mount; for example # mount -a -t ufs -r Specifies mount with read-only access -o Specifies file system specific options device The special device name mountpoint The existing directory to mount the file system under 2–46 Managing Disks and File Systems
  • 105.
    Mounting and UnmountingFile Systems To display the currently mounted file systems, use mount without arguments. Example 2–7 Using the mount Command # mount -t ufs /dev/rz0h /usr/users # mount -t ufs -o ro,nosuid /dev/rz1c /usr/local # mount /dev/rz0a on / type ufs (rw) /dev/rz0g on /usr type ufs (rw) /dev/rz0h on /usr/users type ufs (rw) /dev/rz1c on /usr/local type ufs (ro,nosuid) For file system specific options, see mount(8). If you are mounting a remote file system (using NFS), use one of the following formats in place of the device: host:remote_directory remote_directory@host When the system is booted to single-user mode, the root file system is mounted read-only. If you have to write to the root file system, you must change the permissions to read-write. mount -u / If the device and mount point are listed in /etc/fstab, you can shorten the command to mount mountpoint. The system will find the device in /etc/fstab. Many Digital CD–ROM disks are UFS rather than ISO 9660 (CDFS) format and are mounted with the -r option: mount -r /dev/rz4c /mnt Using the fstab File Some file systems such as /usr and /usr/users are used frequently. To save yourself the trouble of mounting file systems each time the system starts up, you can maintain a file system table called /etc/fstab. The /etc/fstab file contains the names of file systems which are frequently used. The /etc/fstab file is read and the file systems mounted when the system goes into multiuser mode. If you boot to single-user mode, the root file system is mounted read-only. The file /etc/fstab provides the system with information about the mounting procedure: • Disk partitions to mount - for UFS file systems, this is the block special file name • Directories to mount them on • Order to mount - they are mounted in the order listed Managing Disks and File Systems 2–47
  • 106.
    Mounting and UnmountingFile Systems So root directory (/) should be listed first, and any file system should be listed above a file system which will be mounted under it. Example 2–8 shows a sample /etc/fstab file. Example 2–8 An /etc/fstab File # cat /etc/fstab 1 2 3 4 5 6 /dev/rz0a / ufs rw 1 1 /dev/rz0g /usr ufs rw 1 2 /dev/rz0b swap1 ufs sw 0 0 /dev/rz0h /usr/users ufs rw 1 2 /usr/share/man@tinker /usr/share/man nfs ro,bg,soft,nosuid 0 0 /dev/rz1c /usr/lib/dxbook cdfs ro 0 0 1 Special device name or remote file system to be mounted 2 Directory where the file system is mounted 3 Type of file system: ufs, nfs, swap, or cdfs 4 Mount options for the type of file system (a comma-separated list) Common options: ro Read-only access rw Read-write access rq Read-write access with quotas sw Swap/paging space xx Ignore this file system entry 5 Backup frequency for dump: 0 indicates the file system is not backed up 6 fsck pass order (root is 1): 0 indicates the file system is not checked You must be superuser to edit the /etc/fstab file. For file system specific options, see mount(8), mount(8), mount(8). The fsck command can check file systems on different drives simultaneously, improving its performance. However, file systems on the same drive are checked sequentially. Caution for CDFS Compact disks are read-only, so they should not be checked by fsck (passnum should be 0). Do not create an entry in /etc/fstab for a compact disk unless you leave the disk in the drive. If you boot your system without a compact disk in the drive indicated in fstab, mount will hang trying to mount it. 2–48 Managing Disks and File Systems
  • 107.
    Mounting and UnmountingFile Systems Using the umount Command Use the umount command to unmount a file system. The format for umount is: umount [ options ] [ mountpoint ] options Some options include: -A Attempts to unmount all file systems currently mounted -a Unmounts all file systems listed in /etc /fstab -t Specifies a type of file system to unmount; for example # umount -a -t ufs -h Specifies a host for unmounting all file systems remotely mounted in /etc/fstab. mountpoint The existing directory where the file system is mounted You must unmount a file system if you want to check it with fsck or change its partition size with disklabel. You cannot unmount a file system if one of the files or directories is in use. You cannot unmount the root file system. Example 2–9 shows how to use the umount command. Example 2–9 Using the umount Command # mount /dev/rz0a on / type ufs (rw) /dev/rz0g on /usr type ufs (rw) /dev/rz0h on /usr/users type ufs (rw) /dev/rz1c on /usr/local type ufs (ro) /usr/share/man@tinker on /usr/share/man type nfs (ro,bg,soft,nosuid) # umount /usr/local # umount /usr umount /dev/rz0g: Mount device busy # umount -h tinker The following example shows the mount and umount commands. Example 2–10 Mounting and Unmounting File Systems # who 1 superman tty00 Apr 29 13:57 # ls /mnt 2 # pwd 3 / (continued on next page) Managing Disks and File Systems 2–49
  • 108.
    Mounting and UnmountingFile Systems Example 2–10 (Cont.) Mounting and Unmounting File Systems # mount 4 /dev/rz0a on / type ufs (rw) /dev/rz0g on /usr type ufs (rw) # mount /dev/rz2a /mnt 5 # mount 6 /dev/rz0a on / type ufs (rw) /dev/rz0g on /usr type ufs (rw) /dev/rz2a on /mnt type ufs (rw) # ls /mnt 7 .#clipboard.clp .@today’s_test.doc System.cab .@System.cab .DesktopState clipboard.clp .@clipboard.clp .deskprint today’s_test.doc # umount /dev/rz2a 8 # mount 9 /dev/rz0a on / type ufs (rw) /dev/rz0g on /usr type ufs (rw) # ls /mnt 1 0 # 1 Superuser ensures that no one is logged in and using the directory /mnt. 2 Directory /mnt is empty. 3 Superuser ensures that working directory is not the directory /mnt. 4 Superuser wants to mount /dev/rz2a and displays the list of currently mounted file systems. The file system /dev/rz2a is not mounted. 5 Superuser mounts the file system /dev/rz2a under the directory /mnt. 6 The mount table shows that /dev/rz2a is now mounted under /mnt. 7 The directory /mnt was empty before the mount. Now it is an access point to the files contained in the file system on /dev/rz2a. 8 Superuser unmounts /dev/rz2a. 9 The mount table shows that /dev/rz2a is no longer mounted. 1 0 The directory /mnt is empty and is no longer an access point to a mounted file system. 2–50 Managing Disks and File Systems
  • 109.
    Summary Summary Disk Drives Ina disk: • A disk surface is the top or bottom of a disk platter. • The drive head, one per surface, is mounted on a movable arm to read and write on the disk surface. • A disk track is a circle as traced by a head on a rotating surface. • A disk cylinder is an imaginary figure formed by dropping a top surface track down through the tracks directly below on all surfaces. • A disk sector is the surface pie slice on a single track. Logical Volumes Logical Volumes add a level of abstraction between the physical disk devices and the file system. Partitions and File Systems Partitions: • Are logical divisions of a disk drive. • Have default sizes, by drive type, but can be altered by the superuser. Default partition sizes are in /etc/disktab. • Each partition can hold one file system. File systems: • Are a hierarchical structure consisting of directories and files. • Each file system is contained in a partition unless the Logical Storage Manager is used. • File systems must not overlap. • Separate file systems can be mounted together to form one visible hierarchy. Viewing and Changing Partition Sizes with CDE Partition size information is stored in the disk label. • To display the current partition sizes, use the CDE Disk Manager to view current disk label settings. • Use the CDE Disk Manager to change the disk label. Viewing and Changing Partition Sizes Partition size information is stored in the disk label. • To display the current partition sizes, use disklabel -r with the raw device name for partition a or c. • Use disklabel -e -r to change the disk label. Managing Disks and File Systems 2–51
  • 110.
    Summary Digital UNIX File Systems DigitalUNIX supports the following file systems: • Virtual file system (VFS) — a generic file system interface allowing transparent access to other file system types • UNIX file system (UFS) — the Berkeley fast file system • NFS (Network File System) — mount directories across the network and treat them as local • Memory File System (MFS) • Compact disk file system (CDFS) (ISO 9660) — mount compact disks, read-only • POLYCENTER Advanced File System (AdvFS) • File on File Mounting File System (FFM) • /proc File System System Organization The Digital UNIX operating system supports the following file types. File Type Symbol Description Regular file - Executable program, text, or source code Directory d Contains the names of files or other directories Character device file c References a device driver that does its own input and output buffering, such as a terminal Block device file b References a device driver that performs I/O in large chunks and the kernel provides buffering support, such as a disk UNIX domain socket s Provides a communication connection between processes Named pipe p Provides a communication connection between processes Symbolic link l Contains the name of another file System files are organized by function and use. The major system directories are as follows: 2–52 Managing Disks and File Systems
  • 111.
    Summary Directory Description / Theroot directory of the hierarchy; includes files and directories used to boot and initialize the operating system /dev Character and block device files /etc System administration files and databases /sbin Commands to boot and initialize the system in single-user mode /tmp Temporary files /usr Local commands, reference pages, libraries, spooling directories, and so forth /var Multipurpose log, temporary, varying, and spool files Advanced File System The POLYCENTER Advanced File System (AdvFS) is a local file system that offers rapid crash recovery, extended capacity, online management, and enhanced performance. The Advanced File System consists of two components: • Advanced File System is a file system option with the Digital UNIX operating system • Advanced File System utilities is a separately licensed, optional layered product The key concept in the AdvFS design is the separation of physical storage layer and directory hierarchy layer. Two new concepts in the AdvFS design are file domain and fileset. • A file domain is a named set of one or more volumes that provides a shared pool of physical storage. • A fileset is a uniquely named set of directories and files that form a subtree structure. Creating a File System To create a new file system, use the newfs(8) command. Checking a File System To check a file system, use the fsck(8) command. Mounting a File System To make the files in a file system available to users, mount the file system into the directory hierarchy. • To mount a file system under an existing directory, use mount. • File systems mounted regularly can be listed in /etc/fstab(4) and will be mounted automatically when the system boots to multiuser mode. • To unmount a file system, use umount. Managing Disks and File Systems 2–53
  • 112.
    Exercises Exercises Viewing and Changing Partition Sizes withCDE The director of finance will be implementing a new application which requires (for security purposes) its own file system with a storage requirement of 100M bytes. Create a file system on your system that will support the new application. 1. Use the CDE Disk Manager to apply the changes to the appropriate disk. 2. Create a new d partition suitable for use with UFS. Note Do not commit the changes on disk unless directed to do so by your instructor! Viewing and Changing Partition Sizes with disklabel 1. Display the disk label of a disk on your system. 2. Your instructor will tell you if a disk is available to be repartitioned. If so, use disklabel -e to edit the disk label. Do not use the -r option. If your instructor does not specify which partitions to change, increase partition d by 1000 sectors and make other appropriate changes. What happens when you display the disk label? 3. Do the above exercise again, this time using the -r option on edit. Add a name (label) to your disk. Creating a File System 1. Check the Reference Pages for newfs(8) options. 2. Your instructor will tell you if a disk partition is available for creating a file system. If so, use newfs to create a UFS file system. Checking a File System 1. Check the Reference Pages for fsck(8) options. 2. Use fsck without options to check a file system. 3. Use fsck with the -y option to check a file system. Mounting File Systems 1. Check the Reference Pages for mount(8), mount(8cdfs), mount(8nfs), and mount(8ufs) options. 2. Use mount without arguments to display currently mounted file systems. 3. Display the /etc/fstab file. What is the purpose of this file? Name two programs that use this file. 2–54 Managing Disks and File Systems
  • 113.
    Exercises 4. Your instructorwill tell you if a file system is available to practice mounting and unmounting. a. In your home directory, create a subdirectory named test. b. In that subdirectory, create a file named file1. c. Be sure you are in your home directory (not the new subdirectory). d. Become root user. e. Mount the file system (get the device name from your instructor) under your test directory. f. List the test directory. What happened to the file file1? g. Create a new file newfile1 in the test directory. h. Unmount the file system. i. List the test directory. Was the file file1 deleted? j. Create a subdirectory test2 and mount the file system there. k. Where is the file newfile1? Managing Disks and File Systems 2–55
  • 114.
    Solutions Solutions Viewing and Changing Partition Sizes withCDE 1. Use the Application Manager and select: a. System_Management_Utilities b. Configuration c. Disk 2. Choose the disk to be modified and select the Configure... option. The figure below shows partition d with a size of 100 Mb. Viewing and Changing Partition Sizes with disklabel 1. Sample solution: 2–56 Managing Disks and File Systems
  • 115.
    Solutions # disklabel -r/dev/rrz0a # /dev/rrz0a: type: SCSI disk: rz55 label: flags: bytes/sector: 512 sectors/track: 36 tracks/cylinder: 15 sectors/cylinder: 540 cylinders: 1224 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 7 partitions: # size offset fstype [fsize bsize cpg] a: 40960 0 unused 1024 8192 # (Cyl. 0 - 75*) b: 122880 40960 unused 1024 8192 # (Cyl. 75*- 303*) c: 649040 0 unused 1024 8192 # (Cyl. 0 - 1201*) d: 152446 163840 unused 1024 8192 # (Cyl. 303*- 585*) e: 152446 316286 unused 1024 8192 # (Cyl. 585*- 868*) f: 180308 468732 unused 1024 8192 # (Cyl. 868*- 1201*) g: 485200 163840 4.2BSD 1024 8192 16 # (Cyl. 303*- 1201*) # 2. Editing the disk label without the -r option affects only the copy in memory, not the label on the disk. 3. Displaying the disk label should show your changes: for partition d, increase the size by 1000 but not the offset; if partition e is adjacent to d, increase e’s offset by 1000 and decrease its size by 1000. Add the disk name after the label: field. Creating a File System 1. No solution required. 2. # newfs /dev/rrz1g RZ56 Checking a File System 1. No solution required. 2. # fsck /dev/rrz1g 3. # fsck -y /dev/rrz1g Mounting File Systems 1. No solution required. 2. Solution varies. # mount /dev/rz0a on / type ufs (rw) /dev/rz0g on /usr type ufs (rw) /dev/rz0h on /usr/users type ufs (rw) /dev/rz1c on /usr/local type ufs (ro) Managing Disks and File Systems 2–57
  • 116.
    Solutions 3. The fstabfile contains descriptive information about the file systems usually mounted. fstab is used by dump, fsck, mount, and umount. 4. a.$ mkdir test b.$ touch test/file1 c.$ pwd /usr/users/me d.$ su e.# mount /dev/rz1d /usr/users/me/test f.# ls test lost+found g.# touch test/newfile1 h.# umount /dev/rz1d i.# ls test file1 j.$ mkdir test2 # mount /dev/rz1d /usr/users/me/test2 k.# ls test2 lost+found newfile1 # The file system was temporarily mounted over the contents of the test directory. No file was deleted. 2–58 Managing Disks and File Systems
  • 117.
    3 System Shutdown andStartup System Shutdown and Startup 3–1
  • 118.
    About This Chapter AboutThis Chapter Introduction As system manager, you may have to add system resources or monitor system resources in single user mode. In these cases you must shut down and reboot your system or shut down to single user mode. You may even have to modify the system startup procedures. This chapter discusses the shutdown, halt, reboot, and init commands to shutdown, reboot and change run levels on a Digital UNIX system. The chapter also discusses booting Digital UNIX systems. Appendix A shows commands, environment variables and examples for booting a number of systems. Refer to Appendix A and to the section in the System Administration guide that explains booting for your hardware. The chapter provides background information on what happens on a UNIX system as it boots. Finally, it provides information about, and examples of, the initialization files. Lab exercises provide practice shutting down and booting the system to single user and multiuser mode, and examining the initialization files. Objectives To effectively control system startup and shutdown, you should be able to: • Shut down a UNIX system to single user mode or the halt state using the command line interface • Shut down a UNIX system to single user mode or the halt state using the CDE Shutdown application • Bootstrap a powered down or halted Digital UNIX system and describe how the init command changes system run levels • Describe the need for, and uses of, the Digital UNIX initialization files Resources For more information on the topics in this chapter, see the following: • Digital UNIX System Administration, Chapters 2, 3 and 4 • Nemeth, Snyder, & Seebass, UNIX System Administration Handbook, Chapter 2 • Leffler, McKusick, Karels, and Quarterman, The Design and Implementation of the 4.3BSD UNIX Operating System, Chapter 13 • Digital Services Advisory for Digital UNIX, Chapter 12 Note that this is Digital Confidential 3–2 System Shutdown and Startup
  • 119.
    Shutting Down andRebooting the System Shutting Down and Rebooting the System Overview Shutting down, or rebooting the system is not usually a scheduled event, but it is something you, as system administrator, will perform periodically. Most of the time you will shut down the system in a manner to cause the least disruption to the users. However, you will occasionally have to shut down the system rapidly, causing some disruption for the users. There will also be cases when the system shuts itself down suddenly, causing substantial disruption to the users. This section describes various methods for shutting down and rebooting the system. Reasons for System Shutdown and Reboot When adding new hardware, the system must be powered down prior to adding the new hardware. The system must first be shut down. After the system has been shut down and the hardware installed, you must modify the kernel configuration file and rebuild the kernel. To install a new version of system software, you must shut the system down and boot from the distribution media. To upgrade system software, you may have to shut down. To install a layered product, you may need to shut the system down to single user mode, install the software, make some changes to the configuration file, then build a new kernel and reboot the system. Note that not all layered products require changes to the configuration file and building a new kernel. If you modify the system by altering option values in the configuration file to enhance system performance, a new kernel must be built, then the system rebooted. File systems can become corrupted by improper shutdown procedures, hardware failures, or by power outages and surges. If file system corruption is suspected, you will want to shut down and reboot to run a file system consistency check, fsck. If fsck detects an unexpected inconsistency, it leaves the system in single user mode, allowing you to run the program manually. After noticing several errors of the same type in the event log, you may suspect an impending hardware failure. You may want to shut down the system to more closely examine the suspect hardware. System Shutdown and Startup 3–3
  • 120.
    Shutting Down andRebooting the System Methods for System Shutdown There are a number of ways you can shut down and reboot your UNIX system. • Use the: CDE Shutdown manager shutdown command halt or fasthalt command init command • Send a signal to the init process. • Turn off the power. Figure 3–1 provides an overview of various commands used to shut down or reboot a UNIX system. Figure 3–1 Overview of System Shutdown and Reboot # >>> >>> halt, fasthalt ZKOX−055000111−09−RGS reboot shutdown −r, reboot shutdown −h, init 0 shutdown, init s Halt Mode Single User Mode Multiuser Mode Using the shutdown Command Use the shutdown command to halt, reboot, or return to single user mode. The command provides the most consideration for other users. You must be logged in as root to execute this command. The format for the shutdown command is: shutdown [-fhknr] time [warning-message] The shutdown options are shown in Table 3–1. 3–4 System Shutdown and Startup
  • 121.
    Shutting Down andRebooting the System Table 3–1 shutdown Command Options Option Causes A shutdown to single user mode. -f A fast shutdown, bypassing the messages to other users and bringing the system down as quickly as possible. -h The system is to shut down and halt at console level. -k A shutdown message to be sent to all users, warning them of an impending shutdown. The system does not actually shut down. -n A shutdown without synchronizing the disks or logging the shutdown. -r The system is to shut down and automatically reboot. The time argument specifies when shutdown will bring the system down. You can use now for an immediate shutdown or specify a future time with one of two formats: Format Description +number Brings the system down in number minutes. yymmddhhmm Shuts the system down at the absolute time specified. The hours and minutes may be separated by a colon (:). The other argument is the message you want send to all users currently logged in to the system. This optional message is sent along with the shutdown notification message at increasingly shorter intervals as the time for shutdown approaches. Shutting Down to Single User Mode When used without any options, the shutdown command brings the system to single user mode. The system notifies all users of the impending shutdown. An example shutdown command might look like the following: shutdown +10 System coming down for routine maintenance Besides notifying the users of the impending shutdown, the system also: • Disables logins • Logs the shutdown in the event log file and /var/adm/wtmp • Stops accounting and event logging • Stops all remaining processes • Sends the TERM signal to the init process, which brings the system to single user mode System Shutdown and Startup 3–5
  • 122.
    Shutting Down andRebooting the System Shutdown is complete when the system console displays single user mode. INIT: SINGLE USER MODE # You have superuser access to the system through the console, using the Bourne shell to perform administrative tasks. Prior to the transition from multiuser to single user mode, the output from the process status (ps -aef) command might look like the one shown in Example 3–1. Example 3–1 Typical Multiuser Mode ps Output UID PID PPID C STIME TTY TIME CMD root 0 0 1.5 Aug 19 ?? 04:51:51 [kernel idle] root 1 0 0.0 Aug 19 ?? 0:00.39 /sbin/init -sa root 3 1 0.0 Aug 19 ?? 0:00.42 /sbin/kloadsrv root 40 1 0.0 Aug 19 ?? 1:54.21 /sbin/update root 113 1 0.0 Aug 19 ?? 0:01.15 /usr/sbin/syslogd root 115 1 0.0 Aug 19 ?? 0:00.01 /usr/sbin/binlogd root 177 1 0.0 Aug 19 ?? 0:53.15 /usr/sbin/routed -q root 309 1 0.0 Aug 19 ?? 0:00.55 /usr/sbin/portmap root 311 1 0.0 Aug 19 ?? 0:00.11 /usr/sbin/mountd -i root 313 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/nfsd -t8 -u8 root 315 1 0.0 Aug 19 ?? 0:00.01 /usr/sbin/nfsiod 7 root 318 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/rpc.statd root 320 1 0.0 Aug 19 ?? 0:00.05 /usr/sbin/rpc.lockd root 346 1 0.0 Aug 19 ?? 0:00.03 /usr/sbin/dnalimd root 349 346 0.0 Aug 19 ?? 0:05.28 /usr/sbin/dnaevld root 381 346 0.0 Aug 19 ?? 3:01.33 /usr/sbin/dnascd root 382 381 0.0 Aug 19 ?? 0:00.10 /usr/sbin/dnansd root 383 381 0.0 Aug 19 ?? 0:00.37 /usr/sbin/dnaksd root 387 346 0.0 Aug 19 ?? 0:10.55 /usr/sbin/dnsadv root 429 1 0.0 Aug 19 ?? 0:03.10 /usr/sbin/dtssd root 433 387 0.0 Aug 19 ?? 0:00.21 /usr/sbin/dnsclerk -U r root 435 346 0.0 Aug 19 ?? 0:00.07 /usr/sbin/dnanoded root 482 1 0.0 Aug 19 ?? 0:00.37 /usr/sbin/osaknmd root 522 1 0.0 Aug 19 ?? 0:14.64 -accepting connections root 542 1 0.0 Aug 19 ?? 0:03.79 /usr/sbin/xntpd -g -x - root 576 1 0.0 Aug 19 ?? 0:04.26 /usr/sbin/os_mibs root 579 1 0.0 Aug 19 ?? 1:37.92 /usr/sbin/snmpd root 581 1 0.0 Aug 19 ?? 28:48.23 /usr/sbin/advfsd root 592 1 0.0 Aug 19 ?? 0:00.17 /usr/sbin/inetd root 625 1 0.0 Aug 19 ?? 0:00.60 /usr/sbin/cron root 657 1 0.0 Aug 19 ?? 0:00.20 /usr/lbin/lpd root 676 1 0.0 Aug 19 ?? 0:00.12 /usr/bin/mmeserver -con root 690 1 0.0 Aug 19 ?? 0:00.49 /usr/dt/bin/dtlogin -da root 702 1 0.0 Aug 19 ?? 0:00.84 lpsbootd -F /etc/lpsodb root 705 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la root 706 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la root 707 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la root 708 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la root 709 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la root 710 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la root 711 1 0.0 Aug 19 ?? 0:00.02 /usr/sbin/getty /dev/la root 712 690 0.0 Aug 19 ?? 38:37.93 /usr/bin/X11/X :0 -auth root 781 592 0.0 Aug 19 ?? 0:00.10 rpc.ttdbserverd 3–6 System Shutdown and Startup
  • 123.
    Shutting Down andRebooting the System The ps -aef command output after transition to single user mode might look like the one shown in Example 3–2. Notice how few processes are running. Example 3–2 Typical Single User ps Output UID PID PPID C STIME TTY TIME CMD root 0 0 1.5 Aug 19 ?? 04:51:51 [kernel idle] root 1 0 0.0 Aug 19 ?? 0:00.39 /sbin/init -sa root 4921 4744 0.0 Aug 26 ttyp1 0:01.27 ksh root 20911 20901 0.0 15:47:22 ttypb 0:00.06 ps -aef Complete Shutdown When used with the -h or -r options, the shutdown command typically performs the following functions in addition to the functions performed by the shutdown command when used with no options: • Runs the sync command to synchronize the disks • Unmounts the file systems • Halts the processor If the command was shutdown -r, the shutdown command automatically starts a reboot operation to return the system to multiuser mode. Using the halt Command to Stop the Processor Use the halt command to cause a transition from single user mode to the halt state. Use it only if you are not going to restart immediately. You can turn off the system power when the system displays the console prompt. The halt command: • Logs the system halt in the event log and /var/adm/wtmp • Kills running processes • Synchronizes the disks • Halts the processors • Can be run only by root Descriptions for the various options to the halt command are shown in Table 3–2. Table 3–2 halt Command Options Option Function -l Does not log the halt -n Prevents the use of sync to write data to the disks and does not log the halt -q Causes a quick halt; does not log the halt and makes no attempt to kill the system processes System Shutdown and Startup 3–7
  • 124.
    Shutting Down andRebooting the System For example: # halt syncing disks... done halting.... (transferring to monitor) The halt is logged in /usr/adm/syslog.dated/date/auth.log. Using the fasthalt Command The fasthalt command halts the system and flags a subsequent reboot not to carry out a file system consistency check (fsck). The fasthalt command: • Creates the file /fastboot, used by startup scripts to prevent the execution of fsck • Invokes the halt command to halt the processors Note Use the fasthalt command with extreme caution and never use it unless you are certain that the file systems are in excellent shape. The format for the fasthalt command is: fasthalt [-l -n -q] The options for the fasthalt command are described in Table 3–3. Table 3–3 fasthalt Command Options Option Function -l Does not log the halt -n Prevents the use of sync to write data to the disks and does not log the halt -q Causes a quick halt; does not log the halt and makes no attempt to kill the system processes Shutting Down to Single User Mode with init Use the init command to shut down the system from multiuser mode to single user mode. The format for the command is: init s The init command scans the /etc/inittab file to determine which commands and scripts must be run to bring the system to single user mode. 3–8 System Shutdown and Startup
  • 125.
    Shutting Down andRebooting the System Stopping the Processor with init A Digital UNIX system may be halted with the init command. The format for the command is: init 0 The init command scans the /etc/inittab file to determine which commands and scripts must be run to bring the system to halt mode. The init command may be executed in either multiuser or single user mode. You would not normally use init to shut down the system or halt the system unless you have provided ample warning to the users with the wall command. Other Methods of Shutting Down the System Other methods for shutting down the system include: • Sending the TERM signal (15) to the init process brings the system to single user mode. • Sending the KILL signal (9) to the init process may bring the system to console level. • Turning off the power. Note These methods are not recommended for shutting down a system because the results are unpredictable. The best way to shut down the system is with the shutdown command. Rebooting the System If you make changes to system software or configuration files that are executed only when the system is booted, you must reboot for these changes to take effect. Also some devices, such as printers, can become unusable for unknown reasons and require resetting, which may not be possible without reinitializing the system. Under these circumstances, you may have to reboot the system. Using the reboot Command The reboot command normally stops all processes, synchronizes the disks, logs the reboot, and writes a shutdown entry into the login accounting file. The reboot command does not provide a time delay, nor does it inform users of an impending shutdown and reboot. Do not use the reboot command if users are logged in; use the shutdown -r command instead. You must have root privileges to use the reboot command. The format for the reboot command is: reboot [-lnq] The descriptions of the various reboot options are shown in Table 3–4. System Shutdown and Startup 3–9
  • 126.
    Shutting Down andRebooting the System Table 3–4 reboot Command Options Option Function -l Does not log the reboot -n Prevents the use of sync to write data to the disks and does not log the reboot -q Causes a quick reboot; does not log the reboot and makes no attempt to kill the system processes Caution Using the reboot -n command can result in file system damage and should only be used with extreme caution. Do not use this command unless fsck has just been used to repair the root file system. If you are in the single user mode, you can reboot with the reboot command. In this case, reboot synchronizes the disks, then reboots to the default run level. 3–10 System Shutdown and Startup
  • 127.
    Shutting Down andRebooting the System with CDE Shutting Down and Rebooting the System with CDE Overview Using the CDE Shutdown application applies the same underlying mechanics of the system shutdown as the command line interface command shutdown. The Common Desktop Environment merely makes the task easier to perform through the use of the window-like interface. Invoking Shutdown This application is invoked in the standard manner, beginning with the selection of the Application Manager icon in the Front Panel. • Application Manager • System_Admin • DailyAdmin • Shutdown The following figure shows the Application Manager - DailyAdmin window, and the Get Password Pop-up window. Figure 3–2 Shutdown Selection System Shutdown and Startup 3–11
  • 128.
    Shutting Down andRebooting the System with CDE Note that the shutdown application will prompt the user for the proper root password. No further activity is permitted until the password is supplied. After the correct password is entered, the Shutdown Manager window is displayed, as shown in the following figure. Figure 3–3 Shutdown Window Shutdown Options The selections include: • Halt • Reboot • Single User • Message Only Each option gives the administrator the same functionality as the command line interface command shutdown. Click the arrows in the time scroll bar to change the time to shutdown. You can display more options by clicking MB1 on the dark downward arrow. The three additional controls are: • Broadcast Message to NFS Clients - used where users on another host may be accessing file remotely from this host • Preshutdown Script - may be defined to shut down with a particular methodology 3–12 System Shutdown and Startup
  • 129.
    Shutting Down andRebooting the System with CDE • Other Options a. Fast - used to bypass fsck on the next boot b. No Disk Sync - do not write contents of memory to disk prior to shutdown Figure 3–4 Shutdown Options Selection Shutdown Message Only The Message Only radio button gives advance warning to users that the system will be shut down at a predetermined time for system maintenance. Since no shutdown will actually occur and only a message is sent to users, the time displayed has no impact. System Shutdown and Startup 3–13
  • 130.
    Shutting Down andRebooting the System with CDE Figure 3–5 Warning Users of Shutdown 3–14 System Shutdown and Startup
  • 131.
    Shutting Down andRebooting the System with CDE Shutdown Reboot Selecting this shutdown option will cause a shutdown based on the time selected, followed by an automatic reboot. Figure 3–6 Shutdown Reboot System Shutdown and Startup 3–15
  • 132.
    Bootstrapping a DigitalUNIX System Bootstrapping a Digital UNIX System Overview Bootstrapping, more commonly called booting, is the process of starting up a computer from a powered-down or halted condition. During the boot process, the operating system kernel is loaded into memory and started. Many tasks must be performed during this process to initialize the system before it can be used. Several problems can prevent a system from booting including: • Corrupt kernel file • Configuration does not match kernel configuration • Hardware problems • Damaged file systems • Corrupt initialization files The booting process: • Is hardware dependent • Differs from system type to system type Steps in the Bootstrap Process The bootstrapping process can be divided into seven steps: 1. Load the kernel of the operating system into memory. 2. Initialize the kernel. 3. Check hardware configuration. 4. Create system processes. 5. Superuser intervention for manual boot. 6. Execute the initialization script files. 7. Multiuser operation. Loading the Kernel The kernel of the operating system is a program, and the first step in the bootstrap process is to load this program into memory so that it can be executed. The default kernel path for Digital UNIX is /vmunix. Loading the operating system is generally a multistage process: 1. The console software reads and loads the contents of logical block number (LBN) 0 (bootblock). 2. The code from block 0 has a few bytes of code which reads the primary bootstrap code from LBN 1-15. 3. This code then loads the secondary bootstrap program /osfboot. 3–16 System Shutdown and Startup
  • 133.
    Bootstrapping a DigitalUNIX System 4. The secondary bootstrap program is a more intelligent loader program. It takes information about the boot mode, the boot device type, how to boot, and what to boot, and loads the specified kernel. The boot loader is generally capable of communicating with the operator by issuing general and error messages, and accepting input. Initializing the Kernel Without sufficient memory, system initialization will fail. If memory initialization succeeds, most systems display a message indicating the amount of total memory, and the amount of memory available (total memory minus the memory allocated to the kernel). Once the kernel has been loaded, it starts executing and initializing itself. During kernel initialization, the kernel: • Determines how much memory is left after loading the kernel • Reserves memory for the buffer cache and for internal static tables • Sets up page tables and enables memory management • Creates the environment for process 0 and several system server threads • Initializes the buffer cache Hardware Configuration During startup, the Digital UNIX operating system initializes hardware that has been configured into the kernel. During hardware initialization, problems may be caused by hardware devices that do not interrupt, or the presence of unsupported hardware devices or controllers. Digital UNIX V4.0 automatically configures devices with dynamic device recognition (DDR). The hardware configuration is generally displayed on the console. If a device is missing or does not respond, it is marked as nonexistent, and the driver is disabled. If the device is later reconnected, it will not be usable until the system is rebooted. Creating System Processes Process 0 is the kernel idle task, but is in fact multithreaded. It consists of many threads to perform such things as paging in and out, scheduling, swapping in and out, device interrupt service, and kernel idle. The init Process 1 is the first process to execute a program in user mode, and is the parent process to all subsequent processes. The init process (/sbin/init) is started with the -a flag, which causes it to run as a daemon, and differentiates it from the init command that root can execute. System Shutdown and Startup 3–17
  • 134.
    Bootstrapping a DigitalUNIX System The init command provides a means to shut down a Digital UNIX system from multiuser mode to single user mode or to halt the system. Single User Mode If the system is booted to single user mode, only the root file system is mounted. If a program not in the root partition is required, you must mount the required file system. In addition, the root file system is mounted for read-only access. If you need to write to the root file system, you must change the access using the mount -u command. Because the daemons are not running at this time, many commands that depend upon server processes will not function properly (like mailx). Normally you would boot to single user mode to perform administrative tasks that are best accomplished with no other users on the system. For instance, you might be checking out new hardware, mounting and monitoring file systems, or changing disk partitions. When you exit single user mode with Ctrl/D or exit, init continues with the startup tasks to transition to multiuser mode. Initialization Script Execution The init process executes the rc (run command) script files. The names of these files vary among the various UNIX implementations. In Digital UNIX and System V, the init process determines which script files should be run based upon entries in the /etc/inittab file. init spawns a copy of the Bourne shell to run the script files. Some of the tasks performed by the rc* scripts are: • Setting the name of the system • Checking the disks with fsck • Mounting the file systems listed in /etc/fstab • Removing files from the /tmp directory • Notifying the kernel of additional swap partitions • Starting up daemons and network services • Turning on system accounting and disk quotas • Configuring network interfaces • Enabling logins 3–18 System Shutdown and Startup
  • 135.
    Bootstrapping a DigitalUNIX System Multiuser Mode Depending upon the system, a /usr/sbin/getty process may be started for the console, or for a workstation, a CDE process is started. Remote logins are not accepted unless the network has been started. If a getty process terminates, the init process restarts it. Run Levels A Digital UNIX system is considered to be in a run level at any given time. Each run level has a specific group of processes that run at that level. Digital UNIX run levels include: 0 Shut down and halt the system s Single user mode 2 Multiuser mode with no network 3 Multiuser mode with network services During a system boot, the init program scans each line in the /etc/init file and carries out the command on all lines containing the number of the run level that the system is changing to. On a Digital UNIX system, the root user can use the init command to change run levels. For instance, for a Digital UNIX system at run level three, the command init 2 would cause a change in run levels to run level two. The command, init s would cause a change in run levels to "s", the single user mode. The command, init 0 would halt the system. During a change in run levels, init scans the /etc/inittab file to determine which commands and scripts to execute. Use the who -r command to show the current run level. System Shutdown and Startup 3–19
  • 136.
    Digital UNIX InitializationFiles Digital UNIX Initialization Files Overview When the Digital UNIX system boots, the kernel starts the init process (/sbin/init -a), which examines the /etc/inittab file to determine the default run level. The init process executes the commands on any line in the /etc/inittab file with a run level entry that corresponds to the default run level. The superuser may execute the init command to cause a change in run levels. In this case, the desired run level is provided as an argument to the init command (for example, init 2). In this case, the init command signals the init process, process 1, which scans the /etc/inittab and executes entries which contain the specified new run level. Entries containing the boot or bootwait action field are not executed. Of course, if the system is going to be shut down, or the run level changed to a run level that would exclude the normal user from system use, the root user should use the wall command to notify the users the system is going to be shut down. Initialization Files The following files and directories are used to boot or change run levels for Digital UNIX: • /etc/inittab: The first file looked at by init. It designates the scripts or programs to run for a change in run level. • /sbin/rc0, /sbin/rc2, or /sbin/rc3: Master script files used to control the change to run level 0, S, 2, or 3. • /sbin/rc0.d, /sbin/rc2.d, or /sbin/rc3.d: Directories containing links to the scripts or programs to be run to change to run level 0, S, 2, or 3. The script /sbin/rc0 uses the directory /sbin/rc0.d, while /sbin/rc2 uses the directory /sbin/rc2.d, and /sbin/rc3 uses the directory /sbin/rc3.d. • /sbin/init.d: The directory containing all of the scripts or programs that can be executed during any change in run level. Figure 3–7 provides an overview of the use of the initialization files for Digital UNIX. 3–20 System Shutdown and Startup
  • 137.
    Digital UNIX InitializationFiles Figure 3–7 Overview of Digital UNIX Initialization Files inet s2:23:wait:/sbin/rc2 < /dev/console > /dev/console 2>&1 /etc/inittab /sbin/rc2.d /sbin/init.d enlogin ZKOX−055000111−17−RGS K05inet ../init.d/inet /sbin rc2 is:3:initdefault: S25enlogin ../init.d/enlogin . . . . . . . . . rc0 rc3 For a boot, the init process searches the /etc/inittab file for the line containing the action entry of initdefault. For other changes in run levels, init searches for any entries, starting at the top of the file, which contain the desired new run level. Changing Run Levels Assume that you are booting run level is 2, or that we are changing run level from 3 to 2. From the figure, the command "/sbin/rc2 < /dev/console > /dev/console 2>&1" will be executed. Note that there are other commands in the /etc/inittab file that are not shown that would be executed prior to this command. Standard input, standard output, and standard error are all directed to/from the console. Those entries with the boot or bootwait action fields are executed first, than the remaining entries for the pertinent run level are executed. The Bourne shell script file, rc2 in /sbin (/sbin/rc2) is executed. This script file checks to see if it is a boot (previous run level was single user) or if it is a change in run level. In either case, the link files in /sbin/rc2.d will cause execution of files in /sbin/init.d. If we are booting, all files linked to files with an "S" as the first letter in the file name are executed. The "S" indicates "start". If it is a change from run level 3 to run level 2, all files linked to files with a "K" as the first letter in the file name will be executed. The "K" indicates "kill". Then, all files linked to files with an "S" as the first letter in the file name are executed. If there is a change from run level 3 to run level 2, there are daemons that have to be stopped (no network services in run level 2). Also, if we are changing from run level 3 to run level 2, once the files with names beginning with "K" have been run, all /sbin /rc2.d files with names beginning with "S" are then executed. It is the responsibility of the individual scripts to decide what to do when the system is coming up and going down. In the figure, the link, K05inet --> ../init.d/inet, causes the execution of /sbin/init.d/inet, which is just one of the commands used to stop the network processes. System Shutdown and Startup 3–21
  • 138.
    Digital UNIX InitializationFiles The link, S25enlogin --> ../init.d/enlogin, causes the execution of /sbin/init.d/enlogin, which will enable logins if we are booting. The /etc/inittab File The format for the entries in the etc/inittab file is: ID:run-levels:action:process ID A 14-character string used to identify the entry. run-levels Contains the number of one or more run levels. action Indicates how to handle the process field. process Script file or command to execute. Definitions for the action field are shown in Table 3–5. Table 3–5 The /etc/inittab File Action Field Action Description boot 1 Run when the system transfers to the specified run level from a lower level for the first time (that is, during booting). init starts the process but does not wait for its termination. bootwait 1 Run when /etc/inittab is read for the first time. init starts the process and waits for its termination. If the process terminates, it is not restarted. initdefault Specifies the default run level. If more than one number is present in the run level field, the highest run level is used. off If the process is currently running, init sends SIGTERM, waits 20 seconds, then sends the kill signal, SIGKILL. If the process does not exist, init ignores the entry. once init starts the process but does not wait for its termination. When the process stops, it is not restarted. powerfail If init receives the SIGPWR powerfail signal, the process is executed. powerwait If init receives the SIGPWR powerfail signal, it executes the process and waits for the process to terminate before resuming processing of the /etc /inittab file. respawn If the process does not exist or if the process terminates, init restarts the process. sysinit Executed before init tries to access the console. wait init starts the process and waits for it to terminate. init will not process any further /etc/inittab entries until the process terminates. 1During booting, init processes the entries with action fields of boot or bootwait for the defined run level before processing other entries for the run level. The fields in each entry of the /etc/inittab file are separated by colons (:). The ID field in the entry may be null. If the run-level field is null, the entry is valid for all run levels. 3–22 System Shutdown and Startup
  • 139.
    Digital UNIX InitializationFiles If the field is null, the colon must still be present. Digital UNIX /etc/inittab File A sample Digital UNIX /etc/inittab file is shown in Example 3–3. Example 3–3 Digital UNIX /etc/inittab File # cat /etc/inittab is:3:initdefault: ss:Ss:wait:/sbin/rc0 shutdown < /dev/console > /dev/console 2>&1 s0:0:wait:/sbin/rc0 off < /dev/console > /dev/console 2>&1 fs:23:wait:/sbin/bcheckrc < /dev/console > /dev/console 2>&1 kls:Ss:sysinit:/sbin/kloadsrv < /dev/console > /dev/console 2>&1 sysconfig:23:wait:/sbin/init.d/autosysconfig start < /dev/console > /dev/console 2>&1 update:23:wait:/sbin/update > /dev/console 2>&1 it:23:wait:/sbin/it < /dev/console > /dev/console 2>&1 kmk:3:wait:/sbin/kmknod > /dev/console 2>&1 s2:23:wait:/sbin/rc2 < /dev/console > /dev/console 2>&1 s3:3:wait:/sbin/rc3 < /dev/console > /dev/console 2>&1 cons:1234:respawn:/usr/sbin/getty console console vt100 # The following table describes some of the processes started in the inittab file. Process Function bcheckrc Checks and mounts file systems listed in /etc/fstab kloadsrv Starts the kernel load server daemon for dynamically loading object modules update Starts the update daemon to synchronize disks it Makes sure the system is configured kmknod Creates device special files for kernel layered products Entries in the /etc/inittab File is:3:initdefault — If we are not booting to single user mode, the init process uses this entry to determine the default run level; in this case, 3. All entries that have a 3 in the run level field will be executed. ss:Ss:wait:/sbin/rc0 shutdown — Execute the /sbin/rc0 script file with "shutdown" as the input argument. The init process waits until the rc0 script completes execution before executing any other commands (there are no other commands with a run level of "S" or "s", in /etc/inittab) s0:0:wait:/sbin/rc0 off — Execute the /sbin/rc0 script file with "off" as the input argument. Note that this is the same as the previous entry, except that in this case the rc0 script has "off" as an input argument instead of "shutdown". System Shutdown and Startup 3–23
  • 140.
    Digital UNIX InitializationFiles fs:23:bootwait:/sbin/bcheckrc — When booting to run level 2 or 3, the file systems are checked (fsck) and mounted. Note that /sbin/bcheckrc first checks for the existence of the file /fastboot. If /fastboot exists, the file system check is bypassed. init waits for the script to terminate, but does not restart it. s2:23:wait:/sbin/rc2 — When booting to run level 2 or 3, init starts /sbin/rc2, waits for /sbin/rc2 to terminate, and does not continue until the script has completed. s3:3:wait:/sbin/rc3 — When booting to run level 3, init starts /sbin/rc3 after /sbin/rc2 completes. Again, init waits for /sbin/rc3 to terminate before it continues. Execution of /sbin/rc*.d Files When shutting the system down to single user mode or halting the system with the init command, the /sbin/rc0 script file is invoked. When booting to run level 2 or 3, /sbin/rc2 is invoked. When booting to run level 3, /sbin/rc3 is executed after /sbin/rc2 has completed. Also, if the init command is used to change the run level from 3 to 2, /sbin/rc2 is executed. When one of the rc0, rc2, or rc3 scripts executes, files in the corresponding /sbin/rc*.d directory are executed. These files are links to files in the /sbin/init.d directory. A sample /sbin/rc2 is shown in Example 3–4. This script is used when the system is booting to run level 2 or 3, or changing from run level 3 to run level 2. 3–24 System Shutdown and Startup
  • 141.
    Digital UNIX InitializationFiles Example 3–4 An /sbin/rc2 File trap "echo" 2 1 PATH=/sbin:/usr/sbin:/usr/bin export PATH # Just exit if /usr not mounted. if [ ! -d "/usr/sbin" ] 2 then exit fi # Determine action from runlevel information set ‘who -r‘ 3 if [ $9 = "S" ]; then 4 stty sane tab3 2>/dev/null echo "The system is coming up. Please wait..." BOOT=yes elif [ $7 = "2" ]; then 5 echo "Changing to system level 2." if [ -d /sbin/rc2.d ]; then for f in /sbin/rc2.d/K* do if [ -s $f ]; then /sbin/sh $f stop fi done fi fi if [ -d /sbin/rc2.d ]; then 6 for f in /sbin/rc2.d/S* do if [ -s $f ]; then /sbin/sh $f start fi done fi if [ "$BOOT" = "yes" -a $7 = "2" ]; then 7 echo "The system is ready." elif [ $7 = "2" ]; then 8 echo "Change to state 2 has been completed." fi An explanation of the /sbin/rc2 script file follows: 1 The trap prevents an interrupt from killing the script. 2 If the /usr/sbin directory is not mounted, terminate execution of this script. The /usr/sbin directory contains commands executed by the script files in /sbin/init.d. 3 Use the who -r command to determine the current system run level. 4 If the change is from single user mode (parameter 9 is "S") we must be booting to run level 2 or 3. Reset the console terminal to a reasonable value and redirect error output to the bit bucket. Echo the message that the system is coming up to the console terminal. System Shutdown and Startup 3–25
  • 142.
    Digital UNIX InitializationFiles Set the BOOT variable to "yes". 5 If the present run level (the run level we are changing from) is not single user mode, and we are changing to run level 2, then we must be in run level 3 (for present Digital UNIX systems). If the directory /sbin/rc2.d exists, fork a Bourne shell to execute every file in /sbin/rc2.d that begins with a K (kill). Pass "stop" as the argument. Keep in mind that the files in /sbin/rc2.d are just soft links to files in /sbin/init.d. 6 If we are changing from run level 3 to run level 2, or if we are booting to run level 2 or 3: If the directory /sbin/rc2.d exists, fork a Bourne shell to execute every file in /sbin/rec2.d that begins with an "S" (start). Pass "start" as an argument. The files in /sbin/rc2.d are soft links to files in /sbin/init.d. 7 If the BOOT variable is "yes" (we were booting) and parameter 7 from the who -r command is 2 (we are booting to run level 2), echo the message that the system is ready. If we are booting to run level 3, we still have to execute the files in /sbin/rc3.d. When they are complete, echo the "system ready" message. 8 If we were not booting, but just changed run level from 3 to 2, echo the message "Change to state 2 has been completed". Selected Contents of the rc*.d Directories Portions of ls -o outputs are shown for the /sbin/rc*.d directories in Example 3–5. Example 3–5 Selected Contents of the rc*.d Directories # ls -o /sbin/rc0.d lrwxr-xr-x 1 root bin 17 Mar 28 1995 K00enlogin -> ../init.d/enlogin lrwxrwxrwx 1 root bin 13 Mar 28 1995 K05lpd -> ../init.d/lpd lrwxrwxrwx 1 root bin 13 Apr 18 12:21 K07lat -> ../init.d/lat lrwxrwxrwx 1 root bin 15 Mar 28 1995 K08audit -> ../init.d/audit lrwxrwxrwx 1 root bin 14 Apr 1 08:35 K09dhcp -> ../init.d/dhcp . . . lrwxrwxrwx 1 root bin 16 Mar 28 1995 K45syslog -> ../init.d/syslog lrwxrwxrwx 1 root bin 15 Mar 28 1995 K47write -> ../init.d/write lrwxrwxrwx 1 root bin 14 Mar 28 1995 K50inet -> ../init.d/inet lrwxrwxrwx 1 root bin 15 Mar 28 1995 K52quota -> ../init.d/quota lrwxrwxrwx 1 root bin 17 Apr 9 12:24 K99nsrd -> /sbin/init.d/nsrd # ls -o /sbin/rc2.d (continued on next page) 3–26 System Shutdown and Startup
  • 143.
    Digital UNIX InitializationFiles Example 3–5 (Cont.) Selected Contents of the rc*.d Directories lrwxrwxrwx 1 root bin 13 Mar 28 1995 K00lpd -> ../init.d/lpd lrwxrwxrwx 1 root bin 13 Apr 18 12:21 K03lat -> ../init.d/lat lrwxrwxrwx 1 root bin 14 Apr 1 08:35 K04dhcp -> ../init.d/dhcp lrwxrwxrwx 1 root bin 15 Mar 28 1995 K05inetd -> ../init.d/inetd . . . lrwxrwxrwx 1 root bin 18 Mar 28 1995 S00savecore -> ../init.d/savecore lrwxrwxrwx 1 root bin 16 Mar 28 1995 S05paging -> ../init.d/paging lrwxrwxrwx 1 root bin 18 Mar 28 1995 S06mfsmount -> ../init.d/mfsmount lrwxrwxrwx 1 root bin 19 Mar 28 1995 S10recpasswd -> ../init.d/recpasswd lrwxrwxrwx 1 root bin 17 Mar 28 1995 S25enlogin -> ../init.d/enlogin lrwxrwxrwx 1 root bin 17 Mar 28 1995 S35streams -> ../init.d/streams # ls -o /sbin/rc3.d lrwxrwxrwx 1 root bin 14 Mar 28 1995 S00inet -> ../init.d/inet lrwxr-xr-x 1 root bin 15 Mar 28 1995 S01quota -> ../init.d/quota lrwxrwxrwx 1 root bin 18 Mar 28 1995 S08startlmf -> ../init.d/startlmf lrwxrwxrwx 1 root bin 16 Mar 28 1995 S10syslog -> ../init.d/syslog lrwxrwxrwx 1 root bin 17 Mar 28 1995 S11gateway -> ../init.d/gateway . . . lrwxrwxrwx 1 root bin 15 Mar 28 1995 S63write -> ../init.d/write lrwxrwxrwx 1 root bin 13 Mar 28 1995 S65lpd -> ../init.d/lpd lrwxrwxrwx 1 root bin 17 Mar 28 1995 S80crashdc -> ../init.d/crashdc lrwxrwxrwx 1 root system 16 Mar 28 1995 S95xlogin -> ../init.d/xlogin lrwxrwxrwx 1 root bin 17 Apr 9 12:24 S99nsrd -> /sbin/init.d/nsrd • All file names in /sbin/rc0.d start with a K. The script, /sbin/rc0 is only executed when the run level is being changed to single user (init s) or the system halted (init 0). Therefore, all the scripts called by sbin/rc0 are used to stop processes or daemons. • All file names in /sbin/rc2.d starting with a K are executed when called by /sbin/rc2 when the run level is changing from 3 to 2. These scripts also stop processes or daemons. Those file names that start with an S are used to start processes or scripts when the system is booting to run level 2 or 3. Remember that /sbin/rc2 is executed when booting to run level 2 or 3. • There are no file names in /sbin/rc3.d that start with a K. The script, /sbin/rc3, is only executed when the system is booting to run level 3, and all processes and daemons are being started; none are being stopped. • Notice the following three files: /sbin/rc0.d/K30nfs --> ../init.d/nfs /sbin/rc2.d/K35nfs --> ../init.d/nfs /sbin/rc3.d/S35nfs --> ../init.d/nfs System Shutdown and Startup 3–27
  • 144.
    Digital UNIX InitializationFiles Note that each file is a link to the same file, /sbin/init.d/nfs. • Notice the following three files: /sbin/rc0.d/K60cron --> ../init.d/cron /sbin/rc2.d/K20cron --> ../init.d/cron /sbin/rc3.d/S57cron --> ../init.d/cron Again, each file is a link to the same file, /sbin/init.d/cron. • When the script in /sbin/init.d is called, it is passed an argument: start: Start the process or daemon stop: Stop the process or daemon • The files in each of the /sbin.rc*.d directories are numbered to ensure that they are executed in the correct order. The numbers are spread out to allow the insertion of other files between existing files. • As system administrator, you can customize your system by adding scripts to /sbin/init.d and the appropriate links in the /sbin/rc*.d directories. 3–28 System Shutdown and Startup
  • 145.
    Summary Summary Shutting Down and Rebooting Shuttingdown and rebooting the system is a task often performed by a system administrator. You should shut down the system in a manner that causes as little disruption as possible to the users. Methods of shutting down the system include: • Invoking the CDE Shutdown application • Using the shutdown command • Using the halt or fasthalt command • Using the init command • Sending the TERM signal to the init process • Killing the init process • Turning off the power The shutdown command is the safest and most thorough way to initiate a halt, reboot, or to return to single user mode. File systems are not unmounted during the transition to single user mode. File systems are unmounted during the transition to the halt state. The sync command is used during the transition to the halt state to synchronize the disks. Both the halt and fasthalt commands cause a transition to the halt state. The fasthalt command flags a subsequent reboot not to carry out a file system consistency check. Do not use the reboot command from multiuser mode; use the shutdown -r command instead. Shutting Down and Rebooting with CDE Use the CDE Shutdown application to shut down the system. It has all the facilities of the command line interface command. Bootstrapping a Digital UNIX System During a system boot, the kernel starts the init process. The superuser may execute init with an argument of the run level to change to. The init process and the init command search the /etc/inittab. Digital UNIX Initialization Files There are specific commands in /etc/inittab and commands to execute rc* scripts. The rc* scripts direct the execution of other files in the appropriate /sbin/rc*.d directory. The files in the /sbin/rc*.d directories are links to files in the /sbin/init.d directory. The /sbin/rc scripts pass an argument of start or stop, which determines if processes or daemons are to be stopped or started. System Shutdown and Startup 3–29
  • 146.
    Exercises Exercises System Shutdown and Startup 1. Shutdown the system to single user mode. a. Log in as root. b. Execute the mount command (with no arguments) to determine which file systems are mounted. Make a list of mounted file systems for future reference. c. Use the ps command to display the process status. Ensure that you get both the process and parent process IDs. If you have access to a printer, redirect the command output to a file and print the file. If not, make a list of all processes for which the init process is the parent process. d. Shut the system down to single user mode with the command: # shutdown now Shutting down, back up soon # e. When the system indicates that it has reached single user mode, execute the mount command. Compare the mounted file systems with the list you made of mounted file systems when the system was in multiuser mode. f. Execute the ps command and compare the display to the printed file or list you made above. Look for processes started by the init process that no longer exist. 2. Halt the system. Execute the halt command to change from single user mode to the halt mode (>>> prompt). CDE Shutdown and Startup An important application has erred and must be restarted. The only way to do so is to restart the entire system. It is now 11:59 a.m. and since most users will be taking lunch at 12 noon, shut down the system in 2 minutes. Since no other maintenance action is required, immediately reboot the system after shutdown. Booting the Digital UNIX System 1. Check the manual for your system and find the boot instructions. 2. Boot to single user mode. 3. Boot to multiuser mode. 3–30 System Shutdown and Startup
  • 147.
    Exercises Initialization Files Modify the initializationfiles/directories to cause a distinct message to be displayed on the console each time the cron daemon started or stopped when the system boots, or when the init command changes run levels from run level 3 to 2, s or 0, or from s to 2 or 3. Hint You do not have to change any of the existing initialization files. You only have to create one file that echoes the message and the links to this file. Use case to check for the input arguments of "start" or "stop". Place the links after the original links to the file that starts or stops the cron daemon. System Shutdown and Startup 3–31
  • 148.
    Solutions Solutions System Shutdown and Startup 1. Shutdown the system to single user mode. No solution required. 2. Halt the system. Ensure everyone is logged out, halt the system and log the shutdown. # who # halt . . . >>> CDE Shutdown and Startup Choose the following options from the Shutdown Manager: • Reboot • Time to Shutdown = 2 minutes • Shutdown message = Shutting down system in 2 minutes to restart application ... please log off now! System will reboot at 12:01 ...thanks Don • Send message to NFS clients • Press the Shutdown button Booting the Digital UNIX System 1. No solution required. 2. Sample solution for DEC 3000 Model 400: >>> boot -fl s 3. Sample solution for DEC 3000 Model 400. The solution assumes the boot default device is DKA100. >>> boot -fl a -fi "vmunix" DKA100 If you always want to boot to multiuser mode, set the auto_action to auto or boot and the boot_osflags to a. If you do not provide a device and file name, the system uses the default variables bootdef_dev and boot_file. Initialization Files Create the file /sbin/init.d/sysman_lab. This script checks for the input argument of "start" or "stop" and echoes the appropriate message to the console. 3–32 System Shutdown and Startup
  • 149.
    Solutions # cat /sbin/init.d/sysman_lab #!/sbin/sh # #/sbin/init.d/sysman_lab # # Written for UNIX System Management lab exercise # # This file is an additional script executed # when the init command is used to change run levels # or the system is booted. # # It is called after the cron daemon is started or stopped # and echoes a message on the console which indicates whether # the cron daemon was started or stopped PATH=/sbin:/usr/sbin:/usr/bin: export PATH case "$1" in ’start’) echo "" echo "CRON SERVICE REALLY STARTED" echo "" echo "This message was brought" echo "to you by the acting" echo "system administrator!" echo "" echo "Good Day" echo "" ;; ’stop’) echo "" echo "CRON SERVICE REALLY STOPPED" echo "" echo "This message was brought" echo "to you by the acting" echo "system administrator!" echo "" echo "Good Day" echo "" ;; *) echo "usage: $0 {start|stop}" ;; esac # In the /sbin/rc0.d, sbin/rc2.d, and /sbin/rc3.d directories, create the links to the file /sbin/init.d/sysman_lab. The link has to be after the link which starts or stops the cron daemon in each of the directories. # cd /sbin/rc0.d # ln -s ../init.d/sysman_lab K65sysman_lab # cd ../rc2.d # ln -s ../init.d/sysman_lab K25sysman_lab # cd ../rc3.d # ln -s ../init.d/sysman_lab S57gsysman_lab # System Shutdown and Startup 3–33
  • 151.
  • 152.
    About This Chapter AboutThis Chapter Introduction This lesson is an introduction to the system firmware used by Alpha systems. It illustrates the parts of a system and how they interact. It describes the different types of firmware systems supported by Digital and the generic interfaces used. It demonstrates how to determine firmware correctness and take appropriate action. Lab exercises provide practice to evaluate and plan for the correct firmware version. We will use the term ARC or SRM to denote the firmware system console type. Objectives To manage Digital UNIX systems, you should be able to: • Explain the organization and advantages of the various firmware systems Resources For more information on the topics in this chapter, see the following: • Digital UNIX Installation Guide, Chapter 1 Note Each platform will have specific documentation for reference information. For example AlphaServer 2000 /2100, or DEC3000 M500. • Hardware Reference Guide • Firmware Reference Guide • Firmware Update Procedures 4–2 Updating System Firmware
  • 153.
    Firmware Systems Firmware Systems OverviewThe firmware system is the layer which interfaces between the hardware and the operating system. It also provides the console functions to support the operating system and the low-level operator functions such as: • Initialize, test, and prepare the system platform • Provide boot options • System control and monitoring The Digital firmware systems support the following types of operating systems: • Digital OpenVMS • Digital UNIX • Microsoft Windows NT Architectural View On Alpha systems, the console firmware system is loaded by default when the platform is powered on. This system defines three general areas of functionality for a given system: • Hardware configuration and test • User control • Software bootstrap These functions can also be described in terms of the nature of their interface between subsystems, as well as the system operator or administrator. Figure 4-1 shows these relationships. Updating System Firmware 4–3
  • 154.
    Firmware Systems Figure 4–1Console Interfaces Hardware Platform Hardware Interface Operating System User Interface System Firmware sdi−dw−fw.eps Console Systems There are two console subsystems; SRM and ARC, with the latter supporting only the Windows NT operating system. Note also that some utilities may only be called with certain firmware systems. • Systems Reference Manual • Advanced RISC Computing Systems Reference Manual This is the architectural standard defined to support Digital UNIX, OpenVMS, and ELX (VMS realtime system) operating systems. It is used by the operating system to communicate with the hardware control functions. SRM specifies the requirements of procedural tasks and the format of critical data structures. Console firmware services provide initialization and configuration when the system is powered on or reset. The firmware system indicates successful completion with the SRM console prompt >>> 4–4 Updating System Firmware
  • 155.
    Firmware Systems Figure 4-2shows a brief overview of the initialization tasks. Figure 4–2 Console Initialization sdi−dw−fw−init.ps Power On Hardware Test Hardware Configuration Cache Initialization Reset I/O Subsystem Start Drivers SRM Prompt >>> Display Reset The console is now ready to support the command line interface (CLI) environment. Note The console terminal used as the operator interface may be either a serial terminal (VTxxx or equivalent) or a VGA-compatible graphics terminal. While at the console prompt the operator or administrator may use any of the commands in the following format. Updating System Firmware 4–5
  • 156.
    Firmware Systems >>> command[-flags] [parameters ...] Examples of console commands are: >>> sh auto AUTO_ACTION = HALT >>> sh bootdef_dev BOOTDEF_DEV = DKA300 >>> sh boot_osflags BOOT_OSFLAGS = A SRM Commands and Tasks System management task support is provided through the SRM console allowing the operator or user to customize the environment or take special actions. Table 4-1 briefly lists some of these tasks with the command used. Table 4–1 Administrator Tasks Task Command Boot the operating system software boot Change the default startup action set auto_action Initialize the system init Set the default operating system set os_type Display the system configuration show config Invoke the ARC console firmware arc There are certain system management tasks that can only be performed using the SRM console. • The test command to test the system • The show fru command (field replaceable unit) to examine system bus options for errors • To set or change certain environment variables such as enable multiple CPUs or fast SCSI devices as an example Note For a complete SRM console command list with explanatory information consult your Firmware Reference Guide for the hardware platform required. For example, AlphaServer 2000/2100, or DEC3000 M500. 4–6 Updating System Firmware
  • 157.
    Firmware Systems Advanced RISC Computing Thisconsole supports the architectural standard subscribed to and required for the Windows NT operating system. Included in the standards are requirements for system components, subsystem interfaces, and the hardware abstraction layer. Note that the ARC console provides the same basic services defined in Figure 4-2 when the system is powered on or reset. However the interface presented to the operating system and the user interface is quite different. • Operating system hooks are defined by the ARC standard. • The console device must be a VGA graphics-compatible terminal to support Windows NT. • The user interface is menu based. For example the boot menu ... ARC Multiboot Alpha AXP Version n.nn Copyright (c) 1993 Microsoft Corporation Copyright (c) 1993 Digital Equipment Corporation Boot menu: Boot Windows NT Boot an alternate operating system Run a program Supplementary menu ... Use the arrow keys to select, then press Enter. Table 4-2 illustrates the menu choices. Updating System Firmware 4–7
  • 158.
    Firmware Systems Table 4–2ARC Console Menu Menu Selections Boot Menu Functions Boot the default boot selection Boot an alternative boot selection Run a program Access the supplementary menu Supplementary Menu Functions Install new firmware Install Microsoft Windows NT from a compact disc Set up the system... Display the hardware configuration Return to the boot menu Setup Menu Functions Set the system time Set the default system partition Configure the system floppy drives and keyboard Manage the ARC boot selections Set the system to boot automatically Run the EISA configuration utility Edit the system environment variables Reset the system to factory defaults Help Switch to OpenVMS or UNIX console Go to Supplementary menu, do not save changes... Go to Supplementary menu, save changes... Changing Consoles Since it is not possible to use one console for all combinations of operating system and utility commands, it is necessary to change from one console to another. • Several commands, including the test command, are run from the SRM console. • The configuration utilities for the EISA (ECU) and RAID (RCU) are run using the ARC menu interface. Switching from SRM to ARC >>> arc Switching from ARC to SRM 1. From the Boot menu, select Supplementary menu 4–8 Updating System Firmware
  • 159.
    Firmware Systems 2. Fromthe Supplementary menu, select Set up the System ... 3. From the Setup menu, select Switch to OpenVMS or Digital UNIX console. 4. Select your operating system console, then select the Setup menu and press Enter 5. When the "Power-cycle the system to implement the change" message is displayed, press the Reset button. When the console system is loaded and the system is initialized, the SRM console prompt >>> is displayed. Firmware Version The operating system is dependent on the console system for its interface to the hardware, and subsequent correct behavior. Therefore it is critical to use the console system at the defined revision level for the version of the operating system being used. Actually there are three factors to consider when determining the firmware version to use: • Operating system type and version • Firmware revision • Hardware platform So one starting point is found in the installation manual for the operating system under consideration. For Digital UNIX V4.0, consult the Digital UNIX Installation Guide Chapter 1, Installation Overview and Preinstallation Tasks. Find the table which lists the minimum firmware level for each Alpha system type. An alternative method is to use the Firmware Update Procedures document associated with the hardware platform. This document is on the firmware CD ROM and lists the firmware revision for the platform with corresponding operating system versions which it will support. If your system is not at the minimum firmware level, you must update the firmware prior to building the new operating system. Update Firmware Process Digital distributes console firmware whenever the operating system is updated or as is required. To run Digital UNIX V4.0 your system might require a firmware update. Firmware updates are found on the Alpha Systems Firmware CD–ROM compact disc that is included with your Digital UNIX media kit. The first step of the upgrade is to read the documentation provided: Updating System Firmware 4–9
  • 160.
    Firmware Systems 1. TheAlpha AXP Systems Firmware Update Release Notes Overview describes how to mount the firmware CD–ROM and print processor-specific firmware update instructions. 2. The xxxxx Systems Firmware Update Procedures document specifies the detailed task required to perform the update. Note Replace "xxxxx" with the product name of your system. A generic outline of the detailed tasks is presented in the following table. Table 4–3 DEC 2000 AXP Outline Example Step Action Performed Power on System If operating system is running, perform a shutdown -h, then power cycle the platform Update Operating System Type Set the flash write mode Power Cycle the System Enable the flash part to receive the firmware load Determine the CD–ROM Drive Find the device ID ... look for RRD in the device name field Load the Firmware Disc Inset the CD into the device Boot from the CD–ROM Select Update from the menu Update the System Enter the update command to write the new code to the flash part Verify the Checksum Enter the verify command to perform the checksum Exit from the Firmware Update Utility Enter the exit command Set up the Keyboard Use the set keyboard command Power Cycle the System A new configuration is required since the old EISA information was overwritten by the update procedure; run the EISA Configuration utility 4–10 Updating System Firmware
  • 161.
    Summary Summary Digital Firmware Systems The firmware systemis the layer that interfaces between the hardware and the operating system. It also provides the console functions to support the operating system and the low level operator functions such as: • Initialize, test, and prepare the system platform • Provide boot options • System control and monitoring Digital firmware supports the following operating systems: • Digital OpenVMS • Digital UNIX • Microsoft Windows NT Architecture On Alpha systems, the console firmware system is loaded by default when the platform is powered on. This system defines three general areas of functionality for a given system: • Hardware configuration and test • User control • Software bootstrap SRM This is the architectural standard defined to support Digital UNIX, OpenVMS, and ELX (VMS realtime system) operating systems. It is used by the operating system to communicate with the hardware control functions. SRM specifies the requirements procedural tasks and the format of critical data structures. ARC This console supports the architectural standard subscribed to and required for the Windows NT operating system. Included in the standards are requirements for system components, subsystem interfaces, and the hardware abstraction layer. Changing Consoles Since it is not possible to use one console for all combinations of operating system and utility commands, it is necessary to change from one console to another. • Several commands, including the test command, are run from the SRM console. • The configuration utilities for the EISA (ECU) and RAID (RCU) are run using the ARC menu interface. Updating System Firmware 4–11
  • 162.
    Summary Firmware Version The operating systemis dependent on the console system for its interface to the hardware, and subsequent correct behavior. Therefore it is critical to use the console system at the defined revision level for the version of the operating system being used. Actually there are three factors to be considered when determining the firmware version to be used: • Operating system type and version • Firmware revision • Hardware platform 4–12 Updating System Firmware
  • 163.
    Exercises Exercises Validate Version 1. Determine thefirmware version currently running on your system. Is it valid for use with Digital UNIX Version 4.0? 2. Planning and implementation of the next operating system release requires a detailed configuration of the EISA devices on your system. You must interrupt a normal multiuser operating system to get the information. Updating System Firmware 4–13
  • 164.
    Solutions Solutions Validate Version 1. These arethe steps to determine the firmware version: a. At the console prompt, type the command show version b. Verify firmware version against Chapter 1 of the Digital UNIX Installation Guide 2. These are the steps to obtain the configuration information: a. shutdown -h +60 shutting down for 10 minutes b. arc c. Access the supplementary menu d. Access the setup menu e. Run the EISA configuration utility f. Return to the supplementary menu without saving changes g. Return to the boot menu h. Boot the default selection 4–14 Updating System Firmware
  • 165.
  • 166.
    About This Chapter AboutThis Chapter Introduction This chapter discusses the decision making, planning, and procedures that must be accomplished prior to actually initiating installation of the operating system. This chapter shows you how to invoke the new Common Desktop Environment (CDE) installation process using the CDE GUI tool. This chapter also describes the characteristics of both the default and custom installation types and discusses how these installations are performed. Finally, this chapter describes how to perform an update installation and how to make adjustments to files after completing the update installation process. Objectives To install the Digital UNIX operating system, you should be able to: • Plan and prepare for an installation • Invoke the CDE windows setup procedure and demonstrate an awareness of the tools and utilities offered under this option • Perform an update installation Resources For more information on the topics in this chapter, see the following: • Digital UNIX Installation Guide • Digital UNIX Release Notes • Digital UNIX Operating System Version 4.0 SPD 5–2 Installing the System
  • 167.
    Preparing for anInstallation Preparing for an Installation Overview This section discusses the characteristics of the default, custom, and update installation procedures. Depending on your needs, you can perform a default, a custom, or an update installation. See the installation decision tree in Chapter 1 of the Digital UNIX Installation Guide. In addition to deciding on the installation type, you must complete the following steps before starting any operating system installation: 1. Always review the Release Notes. The Release Notes identify any last-minute changes to the software. 2. See the Digital UNIX Operating System Version 4.0 to verify that you have the hardware required for installation. 3. If you are installing on a working system, back up the system. 4. Inventory the contents of the software distribution kit. 5. Review your system hardware and the Digital UNIX Installation Guide Chapter 1 documentation to determine if a firmware upgrade is required. 6. If you are doing a custom installation of Digital UNIX, plan your disk space. A complete list of all subset(s) and corresponding space required can be found in Appendix E of the Digital UNIX Installation Guide. Installation Media Types Use the following distribution media for any of the installation types. • A CD–ROM optical disc • Remote Installation Services (RIS) Planning Disk Space Deciding between a Default and Custom installation is really a matter of assessing your system assets (available memory and disk space) and your installation requirements. A major part of this process involves planning your disk space requirements. This is thoroughly discussed in the Planning Disk Space chapter of the Digital UNIX Installation Guide. This chapter provides worksheets that help you: • Identify available disks • Plan the swap space • Plan the /var area • Plan the /usr file system Installing the System 5–3
  • 168.
    Preparing for anInstallation • Decide whether to use the default disk partition layout or the existing disk partition layout, and change the partition layout, if necessary. Planning Swap Space The Digital UNIX Installation Guide suggests that the swap space should be at least the size of the processor’s physical memory. In practice, this is just not enough swap space. If you have more that a few processes running, you will quickly run out of swap space. You should allocate two to three times the size of the processor’s physical memory for swap space. Since partition sizes are specified in blocks, and there are 2048 blocks to 1 Mbyte, if you have 32 Mbytes of physical memory, you would allocate: 32 x 2048= 65,536 x 2 ------ 131,072 Blocks allocated for swap space Default Installation The default installation will automatically size the default disk for the correct storage required and then performs the installation in this manner: • Provides by default the UFS file system layout • Allocates 64 MB of disk space for the root file system on partition a • Allocates the b partition for dumps and swap space • Allocates the g partition of the disk for the /usr and /var file system • Loads the mandatory software subsets Select the default installation if you do not need to: • Preserve custom partition tables or disklabels. Custom partition tables are partition tables that have been changed to sizes other that the default values. • Allocate the /usr file system on a separate disk. • Allocate a separate /var file system. • Allocate a second swap space. • Install optional software at this time. If necessary, you can install additional software subsets after the initial installation, by using the setld utility. See System Administration for information on installing software subsets after the installation. 5–4 Installing the System
  • 169.
    Preparing for anInstallation Custom Installation With the custom installation, you can: • Select the default disk partitions and the default file system layout, or you can decide on which disks you want the file systems to reside. • Allocate disk space for the root file system. • Choose to install some or all of the optional subsets. Make sure there is enough disk space to install all optional subsets in the /usr file system. The mandatory subsets are automatically installed. Choose the custom installation only if you need to perform any of the following tasks: • Preserve custom partition tables or disk labels • Select file system layouts other than the defaults • Allocate the /usr file system to a specific disk partition • Allocate more than one swap area • Allocate the /var area to the same disk partition as /usr or to a different disk partition • Add optional supported software subsets Update Installation The update installation has the following characteristics: • Preserves disk partitions • Preserves file systems • Leaves user files added to the system intact • Merges user-customizations into protected system files • Detects, logs, and saves unprotected user-customized system files • Detects and logs obsolete files The update installation updates: • All Version 3.2C mandatory and optional subsets installed on the system. • New Digital UNIX Version 4.0 mandatory subsets Caution Once you start an update installation, you cannot stop it. If you do, you are likely to lose system files. New Digital UNIX optional subsets must be added with the setld utility after the installation update completes. The old subset information in /usr/.smdb. gets deleted. Installing the System 5–5
  • 170.
    Preparing for anInstallation The update installation installs from either a CD–ROM or a RIS server. Hardware Required for Installation Installation of the Digital UNIX operating system requires some or all of the following hardware: • Software distribution device corresponding with the software distribution media. If you are installing from the RIS area, see your server administrator for instructions. • Ethernet for RIS installation • System disk (required) • Data disks (optional). In some cases, you do not need data disks to install the Digital UNIX operating system. Note, however, that if you perform a custom installation, you can allocate certain file systems to a disk other than the system disk. • Console terminal (required): Use the console terminal to communicate with the system during the installation. Depending on the system configuration, you can perform the installation at either a serial hardcopy terminal, a serial video terminal, or at the console display if the system is a graphics workstation. Booting from the Media The initial boot to build the new system from the CD–ROM distribution media requires you to use the CD–ROM disk. The following command may be issued on the running system to determine the correct device. # file /dev/rrz*c There is more than one type of device depending on the platform type, but all devices will have a common component (RRD) and device type component (xx). RRDxx Alternately you may identify the CD–ROM device when the system is halted at the console prompt with the command >>> sh device The booting procedure varies according to the platform. Consult the Digital UNIX Installation Guide Chapter 4 for the exact procedure. Appendix A of the same guide provides the procedure for mounting and unmounting the media. You may also boot over the network from the Remote Installation Server (RIS), again refer to Chapter 4 for instructions. 5–6 Installing the System
  • 171.
    Common Desktop Installation CommonDesktop Installation Overview This environment provides a windows-based graphical user interface for the initial phases of an installation as well as system management activities such as changing the root disk partition layout prior to performing a custom installation. Note that a graphic capable console is required. A character cell interface is provided for character cell based consoles. Figure 5–1 Initiating an Installation Root: Partition Device Name FileSystem Type Disk Type Disk Number Controller Type Controller Number SetupDone ViewSoftware UNIXShell Help Device,Partition,andFileSystemSelection: PartitionDisks InstallType: Date: − − (mm−dd−yy)Default (hh:mm:24hrFormat) SDI−DW−01−RGS InstallationSetup <Ret> <Ret> : HostName: RootPassword: VerifyPassword: Time: Location: TimeZone: This installation setup window is automatically invoked after booting from the installation media. Instructions are found in Chapter 4 of the Installation Guide - Booting Your Processor or Single-Board Computer. Hint Two pieces of information are needed to get started with the boot: system type and the disk configuration. These console commands can be used: • show device displays disk info Installing the System 5–7
  • 172.
    Common Desktop Installation •show config displays the system type Common Desktop Environment The common desktop environment is a new graphical user based interface which also has an installation component. This component is automatically invoked when the system is booted from the distribution media in either of two methods: • Using the CD–ROM media disk 1 of 3 • Using the remote installation (RIS) technique When the system boots, the user first sees a Pop-up window display as evidence of a successful boot. Figure 5–2 Status Window LoadingKeyboardMap. . . ScanningSystemHardware Pleasewait... sdi−dw−04−rgs Default Installation The next display is the installation setup window which sets the desired installation parameters. The default type of installation is automatically selected as the Default, as shown in the setup window illustration. The user is required to enter only the common setup parameters as noted previously. At this point the installation manager will check that the default disk has the required capacity to continue the default configuration process. Next, the calculated values are displayed for the device, partition, and file system selection parameters. 5–8 Installing the System
  • 173.
    Common Desktop Installation Figure5–3 Default Parameters Root: Partition Device Name FileSystem Type Disk Type Disk Controller Number Type Controller Number SetupDone ViewSoftware UNIXShell Help Device,Partition,andFileSystemSelection: PartitionDisks InstallType: Date: − − (mm−dd−yy)Default (hh:mm:24hrFormat) sdi−dw−02−rgs InstallationSetup <Ret> <Ret> : HostName: RootPassword: VerifyPassword: Time: Location: TimeZone: rz0 UFS rz25 0 SCSI 0a Common Setup Features Regardless of the type of installation selected, a common set of parameters are required: • Host Name • Root Password • Verify Password • Date • Time • Location • Time Zone Since all parameters are now defined by the user and the default configuration process, the user may now click the Setup Done button to continue the automatic configuration of the system. A Pop-up window appears where the user is prompted to start the installation by clicking OK. Installing the System 5–9
  • 174.
    Common Desktop Installation Figure5–4 Ready, Set, Go ReadyToBeginInstallation OK sdi−dw−03−rgs Installation now begins and the following tasks are performed: 1. File System Creation Note The file systems are created for root, usr, var and swap1. 2. Loading Software Subsets Note The mandatory software subsets are loaded onto the new file systems. You will see "Loading 1 of x subset(s)". This task may take from 45 to 120 minutes depending on distribution media and processor type; completion is signaled by the message "x of x subset(s) installed successfully". 3. Rebooting the System When the system halts, enter the displayed variables at the console prompt to reboot from the newly installed disk. Note The system displays the new boot information on the console. >>> set boot osflags A >>> set bootdef_dev DKA0 (the disk just installed) >>> boot At this point the automatic system build begins: • System Configuration - This task begins the process of tailoring the software subsets for use by the operating system 5–10 Installing the System
  • 175.
    Common Desktop Installation andthe hardware. Console messages are displayed as each subset is processed. • Kernel Build - The kernel is now built automatically and the user is then prompted to boot the new operating system. Custom Installation A custom installation is warranted when the disks, partitions, file systems, and software to be loaded require tailoring. Note that the common parameters described in the previous Default Installation section, also apply in this case. So we will begin discussion with the parameters needed to provide the desired customizations. First we consider the setup of the disks. Figure 5–5 Custom Installation Root: Partition Device Name FileSystem Disk TypeType Disk Controller Number Controller NumberType Device,Partition,andFileSystemSelection: InstallType: Date: − − (mm−dd−yy)Custom (hh:mm:24hrFormat) sdi−dw−05−rgs InstallationSetup <Ret> <Ret> : Usr: Var: Swap1: Swap2: HostName: RootPassword: VerifyPassword: Time: Location: TimeZone: SetupDone ViewSoftware UNIXShell HelpPartitionDisks rz0 rz0 In/Usr rz0 rz1 a g b b UFS UFS UFS UFS rz25 rz25 rz25 rz25 0 0 0 1 SCSI SCSI SCSI SCSI 0 0 0 0 To enable the custom menus, click Custom in the Install Type: entry field. This causes the display to change so that all variables are displayed. Installing the System 5–11
  • 176.
    Common Desktop Installation •Root • Usr • Var • Swap1 • Swap2 Simply key in the desired parameters for each category. For information on planning considerations, see Chapter 3 of the Installation Guide. View Software Click the View Software button to display the Software Selection window. The user can examine the mandatory and optional software subsets, and also select the optional subsets to be loaded. Figure 5–6 Selecting Software sdi−dw−swsel.eps Software Selection Help Remove All OK Cancel Add All Remove Add Available Software: Selected Software:: File System Status: General Applications Additional Terminfo Databases root: 28.1 MB free usr: 298 MB free Computer Aided System Tutor var: DOS Tools free GNU Emacs − Required − (MANDATORY) Base System (MANDATORY) Base System − Hardware Support General Applications Local Area Transport (LAT) (MANDATORY) Tcl Commands 5–12 Installing the System
  • 177.
    Common Desktop Installation Installationis enhanced by using this new graphic technique to display the software subsets which are mandatory as well as optional. Note the (MANDATORY) subset indicator in the Selected Software list box. Optional software is shown in the Available Software list box. To select optional software: 1. Select the software subset from the Available Software list box. 2. Click the Add button. Optionally you may add all of the optional software. Note that the Remove All button will remove all the optional software, but not the mandatory software. Particularly useful is the File System Status area. Root and usr file system available space is automatically recalculated for each software subset when it is added. If the file system free space is consumed, you may remove specific subsets or cancel the selection entirely. The Cancel button will place you back at the Installation Setup window where you may change the disk and partition parameters to store the required software. Partition Disks Clicking the Partition Disks button displays a window in which the partitions of a disk can be viewed or altered. Note that this is a CDE version of the disklabel program to manage disks. The CDE interface allows you to navigate, view and alter disk partitions using the mouse versus the disklabel program where you enter commands and options. Installing the System 5–13
  • 178.
    Common Desktop Installation Figure5–7 Disk Parameters Root: Partition Device Name FileSystem Disk TypeType Disk Controller Number Controller NumberType Device,Partition,andFileSystemSelection: InstallType: Date: − − (mm−dd−yy)Custom (hh:mm:24hrFormat) sdi−dw−05−rgs InstallationSetup <Ret> <Ret> : Usr: Var: Swap1: Swap2: HostName: RootPassword: VerifyPassword: Time: Location: TimeZone: SetupDone ViewSoftware UNIXShell HelpPartitionDisks rz0 rz0 In/Usr rz0 rz1 a g b b UFS UFS UFS UFS rz25 rz25 rz25 rz25 0 0 0 1 SCSI SCSI SCSI SCSI 0 0 0 0 Partitions may be modified using the GUI-based window shown here. All the necessary parameters are displayed for the user. 5–14 Installing the System
  • 179.
    Common Desktop Installation Figure5–8 Configure Partitions UNIX Shell Clicking the UNIX Shell button in the Installation Setup window places the system in single user mode with superuser privileges. This option is provided for experienced UNIX system administrators who want to perform file system or disk maintenance tasks prior to the installation. The capabilities of the shell are: • Edit a file using ed or vi text editors. • Create new file systems. • Restore file systems. • Modify partition tables. • Mount other disks and file systems. • Repair UFS file systems. Refer to Chapter 7 of the Installation Guide for commands and operational procedures for maintenance tasks. Creating the Operating System When you have configured the disks, partitions, and file systems, as well as the section of optional software to load, you are now ready to begin the installation by clicking Setup Done. The following example continues the custom installation, loading only the mandatory software subsets and illustrates the console output. Installing the System 5–15
  • 180.
    Common Desktop Installation Example5–1 Creating the Operating System *** Creating the root file system on device rz3a *** *** Creating the usr file system on device rz3g *** *** Creating the var file system on device rz3h *** *** Creating the swap1 file system on device rz2b *** *** Loading the operating system software subsets *** The installation procedure will now load the software on your disk partitions. This process will take from 45 to 120 minutes to complete depending on your distribution media and processor type. Checking file system space required to install specified subsets: Working....Tue Mar 28 17:08:46 EST 1995 File system space checked OK. 29 subset(s) will be installed. Loading 1 of 29 subset(s).... Base System Copying from /ALPHA/BASE (disk) Working....Tue Mar 28 17:09:02 EST 1995 Working....Tue Mar 28 17:11:04 EST 1995 Working....Tue Mar 28 17:13:06 EST 1995 Working....Tue Mar 28 17:15:08 EST 1995 Working....Tue Mar 28 17:17:09 EST 1995 Verifying Working....Tue Mar 28 17:18:46 EST 1995 Loading 2 of 29 subset(s).... Base System - Hardware Support Copying from /ALPHA/BASE (disk) Working....Tue Mar 28 17:19:44 EST 1995 Verifying . . . Loading 29 of 29 subset(s).... Graphical Print Configuration Application Copying from /ALPHA/BASE (disk) Verifying 29 of 29 subset(s) installed successfully. Install start: Tue Mar 28 17:04:10 EST 1995 Install finish: Tue Mar 28 18:08:09 EST 1995 Issue the following console commands to set your default bootpath variable and to boot your system disk to multiuser: >>> set boot_osflags A >>> set bootdef_dev "DKA300" >>> boot Booting the New Operating System At this point the new operating system has been built with the parameters listed on the console output in the previous example. You must enter the boot parameters and boot the new system. 5–16 Installing the System
  • 181.
    Common Desktop Installation Kernel Configuration Afterthe new system is booted, the kernel configuration and build procedure begins. You will be prompted to select kernel options. ------------------------------------------------------------------------- %IT START% Thu Feb 29 12:55:40 EST 1996 ------------------------------------------------------------------------- swapon: /dev/rz3b: already a swap device swapon: adding /dev/rz3b as swap device. *** SYSTEM CONFIGURATION *** Configuring "Base System " (OSFBASE400) Configuring "Base System - Hardware Support " (OSFHWBASE400) Configuring "Compiler Back End " (OSFCMPLRS400) Configuring "Kernel Header and Common Files " (OSFBINCOM400) Configuring "Standard Kernel Modules " (OSFBIN400) Configuring "Hardware Kernel Header and Common Files" (OSFHWBINCOM400) Configuring "Hardware Kernel Modules " (OSFHWBIN400) Configuring "Basic Networking Services " (OSFCLINET400) . . . Configuring "Graphical System Administration Utilities" (OSFXADMIN400) Configuring "Graphical Print Configuration Application" (OSFXPRINT400) Configuring "Ref Pages: Admin/User " (OSFMANOS400) Configuring "Ref Pages: Windows Admin/User " (OSFMANWOS400) Configuring "Ref Pages: Realtime " (OSFMANRT400) Configuring "Ref Pages: Programming " (OSFMANOP400) Configuring "Ref Pages: Windows Programming " (OSFMANWOP400) Configuring "Ref Pages: CDE Development " (OSFCDEMANOP400) Configuring "Ref Pages: CDE Admin/User " (OSFCDEMANOS400) The system name assigned to your machine is ’vrroom’. *** KERNEL CONFIGURATION AND BUILD PROCEDURE *** *** KERNEL OPTION SELECTION *** Installing the System 5–17
  • 182.
    Common Desktop Installation SelectionKernel Option -------------------------------------------------------------- 1 System V Devices 2 Logical Volume Manager (LVM) 3 NTP V3 Kernel Phase Lock Loop (NTP_TIME) 4 Kernel Breakpoint Debugger (KDEBUG) 5 Packetfilter driver (PACKETFILTER) 6 Point-to-Point Protocol (PPP) 7 STREAMS pckt module (PCKT) 8 X/Open Transport Interface (XTISO, TIMOD, TIRDWR) 9 File on File File System (FFM) 10 ISO 9660 Compact Disc File System (CDFS) 11 Audit Subsystem 12 ACL Subsystem 13 All of the above 14 None of the above 15 Help -------------------------------------------------------------- Enter the selection number for each kernel option you want. For example, 1 3 [14]: 6 You selected the following kernel options: Point-to-Point Protocol (PPP) Is that correct? (y/n) [y]: y Do you want to edit the configuration file? (y/n) [n]: The system will now automatically build a kernel and then reboot. This will take approximately 15 minutes, depending on the processor type. When the login prompt appears after the system has rebooted, use ’root’ as the login name and the SUPERUSER password that was entered during this procedure, to log into the system. *** PERFORMING KERNEL BUILD *** Working....Thu Feb 29 13:01:10 EST 1996 Working....Thu Feb 29 13:03:11 EST 1996 Error opening license database /var/adm/lmf/ldb lmf: No such file or directory ------------------------------------------------------------------------- %IT STOP% Thu Feb 29 12:55:40 EST 1996 ------------------------------------------------------------------------- Post Installation Login and Setup When you log in to the system (with graphics capability) for the first time, the CDE login window is displayed. Enter root as the username and then enter the root password specified at the beginning of the installation. The display window created has four components: • A Help Viewer window, Introducing the Desktop • A Pop-up window labeled: Action Required 5–18 Installing the System
  • 183.
    Common Desktop Installation •A post-install Configuration Checklist window • The CDE Front Panel appears at the bottom of your screen Note These components are explained in Chapter 6 of the Digital UNIX Installation Guide. The catman command creates formatted versions of the online reference pages and creates the source files for the whatis database. By invoking the catman command, you will improve the performance of viewing reference pages and will keep the whatis database up-to-date. The apropos command also uses the whatis database to display appropriate commands. See the catman(8) for more information on how to use the command. Installing the System 5–19
  • 184.
    Performing an UpdateInstallation Performing an Update Installation Overview The update installation is for Alpha systems running Digital UNIX Version V3.2C or later. This upgrade installation process will also be used in future releases of the operating system. You can initiate an update installation by running the installupdate utility. Before you run this utility, there are a number of conditions and restrictions you need to be aware of: • Your current system must be running Digital UNIX Version 3.2C or later. • You have upgraded your firmware appropriately. • There can be no changes of symbolic links to directories or conversely, no location changes of directories that have symbolic links. • Certain layered products will cause the update installation to quit. You need to remove these layered products before doing an update installation: DECnet Internationalization Open 3D • You must have enough disk space. Update Install File Types You need to be aware of the file types that the update installation utility works with during and after the software is installed. The file types are: • Protected Customized System Files • Version 3.2C system files that are automatically merged with Version 4.0 • File prefix is .new..filename. The .mrg..filename is used to perform protected system file merges. • Any customizations you have made to V3.2C versions of protected system files are merged with Version 4.0. • Unprotected Customized System Files Version 3.2C files that are not merged with Version 4.0 files. These files are saved with the extension .PreUPD. File names get stored in /var/adm/smlogs /upd_custom_files. 5–20 Installing the System
  • 185.
    Performing an UpdateInstallation You must manually merge file customizations. To perform administrative tasks on these files, use the updadmin utility. • Obsolete System Files System files no longer shipped with operating system. File names stored in /var/adm/smlogs/upd_obsolete_files. Characteristics of an Update Installation The update installation has the following characteristics: • Preserves disk partitions • Preserves file systems • Leaves user files added to the system intact • Merges user-customizations into protected system files • Detects, logs, and saves unprotected user-customized system files • Detects and logs obsolete files The update installation updates: • All Version 3.2C mandatory and optional subsets installed on the system. • New Digital UNIX Version 4.0 mandatory subsets Caution Once you start an update installation, you cannot stop it. If you do, you are likely to lose system files. New Digital UNIX optional subsets must be added with the setld utility after the installation update completes. The old subset information in /usr/.smdb. gets deleted. The update installation installs from either a CD–ROM or a RIS server. Update Installation Procedure An update installation creates the log file: /var/adm/smlogs/update.log The example shows a /var/adm/smlogs/update.log. Example 5–2 Update Installation Log #shutdown +5 Performing Update Installation 1 #swapon -e 2 #bcheckrc 3 #/sbin/installupdate /dev/rz4c or 4 #/sbin/installupdate /cdmnt (continued on next page) Installing the System 5–21
  • 186.
    Performing an UpdateInstallation Example 5–2 (Cont.) Update Installation Log Working....Mon Feb 28 15:01:22 EST 1994 The Digital UNIX 4.0 Update Installation will update the following Digital UNIX products: Digital UNIX V3.2C Digital Equipment Corporation recommends that you perform complete system software backups before proceeding. Press RETURN to review message again. Do you want to continue the update installation? (y/n) []:y 5 ****** Checking current state of system Depending on the system configuration, this may take up to 20 minutes... Working....Mon Feb 28 15:04:02 EST 1994 Working....Mon Feb 28 15:06:02 EST 1994 Working....Mon Feb 28 15:08:02 EST 1994 Working....Mon Feb 28 15:12:02 EST 1994 Working....Mon Feb 28 15:15:02 EST 1994 Working....Mon Feb 28 15:18:02 EST 1994 Unprotected customized system files have been found on this system and have been saved to ’filename.PreUPD’. A listing of the files has been logged in /var/adm/smlogs/upd_custom_files. 6 After the update installation has completed, use the Update Administration Utility (/usr/sbin/updadmin) to perform system administration tasks on these files. ****** Updating system to Digital UNIX V4.0 Working....Mon Feb 28 15:23:02 EST 1994 Base System Copying from /dev/rz4c Working....Mon Feb 28 15:26:11 EST 1994 Verifying Working....Mon Feb 28 15:28:02 EST 1994 Base System - Hardware Support Copying from /dev/rz4c Working....Mon Feb 28 15:33:19 EST 1994 Verifying Working....Mon Feb 28 15:35:02 EST 1994 Compiler Backend Copying from /dev/rz4c Working....Mon Feb 28 15:36:19 EST 1994 Verifying Working....Mon Feb 28 15:37:02 EST 1994 Kernel Header and Common Files Copying from /dev/rz4c Working....Mon Feb 28 15:38:19 EST 1994 Verifying Working....Mon Feb 28 15:38:59 EST 1994 (continued on next page) 5–22 Installing the System
  • 187.
    Performing an UpdateInstallation Example 5–2 (Cont.) Update Installation Log Standard Kernel Objects Copying from /dev/rz4c Working....Mon Feb 28 15:40:09 EST 1994 Verifying Working....Mon Feb 28 15:41:12 EST 1994 Hardware Kernel Objects Copying from /dev/rz4c Working....Mon Feb 28 15:42:29 EST 1994 Verifying Working....Mon Feb 28 15:43:22 EST 1994 Basic Networking Services Copying from /dev/rz4c Working....Mon Feb 28 15:44:23 EST 1994 Verifying Working....Mon Feb 28 15:46:11 EST 1994 X Servers Copying from /dev/rz4c Working....Mon Feb 28 15:47:17 EST 1994 Verifying Working....Mon Feb 28 15:49:19 EST 1994 Basic X Environment Copying from /dev/rz4c Working....Mon Feb 28 15:51:33 EST 1994 Verifying Working....Mon Feb 28 15:55:24 EST 1994 . . 7 . CDA(tm) for X/Motif Development Copying from /dev/rz4c Verifying *** Merging new file ./.new..DXsession into existing ./.proto..DXsession Merge completed successfully *** Merging new file ./etc/.new..gettydefs into existing ./etc/.proto..gettydefs *** Merging new file ./etc/.new..securettys into existing ./etc/.proto..securettys Merge completed successfully *** Merging new file ./usr/share/lib/.new..termcap into existing ./usr/share/lib/.proto..termcap . . . Merge completed successfully. Update Installation complete. rebooting system... 8 1 Shut the system down to single user mode. Installing the System 5–23
  • 188.
    Performing an UpdateInstallation 2 Start system swapping. 3 Mount the local file systems. If you already have a mount instruction in your /etc/fstab file, you can skip this step. 4 Invoke the installupdate utility. Two ways are shown in the procedure; one using the CD–ROM device, and another using a CD–ROM mount point. See the Digital UNIX Installation Guide for additional instructions to install from a RIS server. 5 The utility displays a reminder to back up your system and asks you if you want to continue. 6 The utility notes unprotected customized system files (*.PreUPD files) and logs their names in the /var/adm/smlogs /upd_custom_files. 7 Partial listing to save paper. 8 The utility sends an Update Installation complete message and reboots the system. The installupdate program next runs the IT utility to upgrade the configuration as described in the /var/adm/smlogs/it.log. Review the /var/adm/smlogs/it.log sample in the Digital UNIX Installation Guide. Because the system name, date and time have been specified in a previous installation, the IT utility skips these configuration questions and begins configuring the software immediately. Update Administration Utility The Update Administration utility enables you to manage: • Protected system files • Unprotected system files • Obsolete files You can save, delete, or view any of these file types. If you choose to save files, the updadmin utility lets you save files to a directory on disk, to a tar image on disk, or to a tape media device. Review the updadmin utility in the Performing and Update Installation chapter of the Digital UNIX Installation Guide. Run the Update Administration utility after the update installation configuration event has occurred. The command you enter is: #/usr/sbin/updadmin upadmin Main Menu The utility displays a main menu: Update Administration Utility Main Menu --------------------------------------- c) Update Customized File Administration o) Obsolete System File Administration P) PreMRG File Administration x) Exit this utility: 5–24 Installing the System
  • 189.
    Performing an UpdateInstallation You can save, delete, or view any of these three file types. If you decide to save files, the utility lets you save files to a directory on a disk, to a tar image on a disk, or to a tape media device. If you decide to delete files, the utility checks to see if you have saved the files. If you have not saved the files, the utility gives you the option to save the files before deleting them. The view option displays information on each file based on the type of file administration you are performing. Customized System File Admin Menu If you choose to manage Unprotected Customized System files, updadmin displays a short message and the menu: Unprotected Customized System File Admin Menu --------------------------------------------- s) Save files d) Delete files v) View list of files x) Return to previous menu Enter your choice: The other file type choices yield a different message, but similar menu items. Saving, deleting, and viewing the various file types is discussed further. Saving Files If you choose the Save Files menu option (s), updadmin displays the menu: Select a method of archiving your files: --------------------------------------- d) Save files to directory on disk i) Save files to tar image on disk t) Save files to tape media device Enter your choice from the menu above, or press RETURN to go back to the previous menu: If you choose d, the updadmin utility prompts: Enter the directory that you want to use to back up customized files, or press RETURN to go back to the previous menu: If you choose i, the updadmin utility prompts: Enter the name of the tar file that you want to use to back up customized files, or press RETURN to go back to the previous menu: Installing the System 5–25
  • 190.
    Performing an UpdateInstallation If you choose t, the updadmin utility prompts: Enter the name of the tape backup device (for example: /dev/nrmt0h) that you want to use to back up customized files, or press RETURN to go back to the previous menu: Deleting Files If you choose d from the File Admin menu to delete files, updadmin looks to see if the files were backed up. If they were not, it displays a message similar to: ================================================================== Back up customized files not detected. If you have not backed up the customized files yet, please do so at this time by answering ’no’ to the question below and selecting the ’s’ option from the previous menu: =================================================================== Please confirm your intent to delete customized system files from the system. [y/n]: Viewing Files The view option displays a list of files based on your updadmin main menu selection. If you choose to display Unprotected Customized files, updadmin lists files by Digital UNIX subset name similar to: ============================================ == Unprotected Customized OSFBASE Files ============================================ ./usr/sbin/setup.PreUPD (DELETED FROM SYSTEM) ./etc/zoneinfo/Australia/South.PreUPD (DELETED FROM SYSTEM) ============================================= == Unprotected Customized OSFINET Files ============================================= ./usr/sbin/screend.PreUPD (DELETED FROM SYSTEM) ./usr/named.PreUPD (DELETED FROM SYSTEM) Enter ’r’ to review files again, or press RETURN to go back to the previous menu: 5–26 Installing the System
  • 191.
    Summary Summary Preparing for an Installation Dependingupon your needs, you can perform a default, custom, or an update installation. Digital UNIX Installation Guide, Planning Your Disk Space chapter provides worksheets that help you: • Identify available disks • Plan the swap space • Plan the var area • Plan the /usr file system • Decide whether to use the default disk partition layout or the existing disk partition layout, and change the partition layout if necessary The default installation provides a default file system layout and loads the mandatory software subsets. With the custom installation you can select the disk partitions and you can choose to install some or all of the optional subsets. The update installation updates a previous version of the operating system without having to restore system files. Installation Setup A new installation environment (CDE) supports the initial phases of an installation as well as system management activities such as changing the disk partition layout prior to performing a custom installation. Performing an Update Installation With the update installation: • You can update a Digital UNIX Version 3.2C or later system to a V4.0 system without having to restore system files using the updateinstall utility. • You can save, delete, and view system files using the updadmin utility. Installing the System 5–27
  • 192.
    Exercises Exercises Installation Perform acustom installation with the following requirements: 1. Calculate the storage required for the mandatory subsets plus 10% for optional subsets that may be required in the future. 2. Configure the root disk and partition and an alternate swap area. 3. Place the /var and /usr file systems on different disks. All file systems are to be UFS. 4. Install the reference pages. 5–28 Installing the System
  • 193.
    Solutions Solutions Installation 1. Calculatethe storage required for the mandatory subsets and optional subsets that may be required in the future. Appendix E in the Installation Guide lists the storage requirements. Note Refer to the Custom Installation section for the next three requirements. 2. Configure the root disk and partition and an alternate swap area. 3. Place the /var and /usr file systems on different disks. 4. All file systems are to be UFS. Installing the System 5–29
  • 195.
    6 Connecting to theNetwork Connecting to the Network 6–1
  • 196.
    About This Chapter AboutThis Chapter Introduction This chapter shows how to connect your system to a local area TCP/IP network using CDE Network Configuration Manager. Objectives To start a UNIX system network, you should be able to: • Describe UNIX networking • Describe how a gateway connects two networks • Describe Internet addressing • Describe subnetwork addresses • Identify the purpose of the main files used by the TCP/IP network • Set up a TCP/IP network using CDE Resources For more information on the topics in this chapter, see the following: • Request for Comment (RFCs) available by anonymous FTP from ftp.nisc.sri.com rfc/rfc####.txt or by electronic mail to mail-server@nisc.sri.com RFC 1118, E. Krol, "The Hitchhikers Guide to the Internet," September 1989 RFC 1011, J. Reynolds and J. Postel, "Official Internet Protocols," May 1987 RFC 1206, G. Malkin and A. Marine, "FYI on Questions and Answers: Answers to Commonly Asked New Internet User Questions," February 1991 RFC 1208, O. Jacobsen and D. Lynch, "Glossary of Networking Terms," March 1991 • Digital UNIX Network Administration • Internetworking with TCP/IP, Volume I • UNIX System Administration Handbook, Chapter 14 • Digital UNIX Reference Pages 6–2 Connecting to the Network
  • 197.
    Introducing UNIX Networking IntroducingUNIX Networking Overview A network is a group of computer systems connected by hardware and software to exchange information and share resources. The communication is governed by a set of rules, or protocol. Different sets of protocols define different types of networks. The first UNIX network application was UUCP, the UNIX to UNIX copy program, developed in the mid 1970s. UUCP, a batch-processing/spooling system, is typically used between systems with dial-up telephone lines or direct serial lines. UUCP is still in widespread use today. The TCP/IP suite of network protocols was developed on BSD UNIX in the early 1980s. Provided with 4.2 BSD, this networking system became very popular. The TCP/IP protocol suite has been ported to some other operating systems. Extensive research has been done, not only on communicating in local networks, but also across internetworks, connecting separate networks. The DECnet network offers an alternative to the TCP/IP network for systems with DECnet software. It offers the same basic functionality as the TCP/IP network, that is, remote login, file transfer, electronic mail, and task-to-task communication. There are a number of network services for sharing resources or data around a network. Some of these include: • NFS — A network file system allowing transparent file access over TCP/IP networks • NIS — A distributed database lookup service for a local TCP/IP network • Internet Domain Name Service — A host name and address lookup service for the Internet network • DMS — Dataless Management Services utility on Digital UNIX server systems provides software for workstations to share • RIS — Remote Installation Services utility on Digital UNIX systems provides software installation over the network UNIX Networking A common way for processes to communicate with each other is to use a client-server model. One process, the client, requests services from the other process, the server. Figure 6–1 illustrates how messages get exchanged from a client to a server. Connecting to the Network 6–3
  • 198.
    Introducing UNIX Networking Figure6–1 Exchanging a Message on a UNIX Network Client Program Server Program Message Protocol ZKOX−055000098−02−RGS Host Host Network Each computer system on the network is called a host. Every host has a unique name and network address. Each host has an interface, or controller, connecting it to the network. There are two types of communication: • Connection-oriented—Uses virtual circuits for transmission. Virtual circuits provide an apparent direct communication line between two processes. Connection-oriented services include automatic sequencing, error control, and flow control. • Connectionless—Uses datagrams for transmission. Each datagram is an independent message. Connectionless service is transaction-oriented, and delivery and duplication protection are not usually guaranteed. For two processes to communicate there have to be rules covering how processes are supposed to interact, to send messages to each other. A protocol is a set of rules defining how data is sent over a network. Some of the tasks performed by protocols: • Error detection—implemented by checksums, sequence numbers, acknowledgments, and timers • Error elimination (reliability)—implemented by retransmission of packets or correction methods, for example, Hamming code • Flow control—implemented by receive windows, acknowledgments • Addressing—implemented by address fields, passed with the data Popular technologies for connecting computers include Ethernet, token ring, and Fiber Distributed Data Interface (FDDI). 6–4 Connecting to the Network
  • 199.
    Introducing Internet Gateways IntroducingInternet Gateways Gateway Connects Networks Two distinct networks are connected by a gateway that is attached to both networks. The gateway passes information from one network to the other. The gateway may be a simple device to copy data from one side to the other, such as a repeater or bridge. A repeater is a hardware device that connects Ethernet cable sections to extend the local area network. It passes all data packets to the other side. A bridge is a device that connects Ethernet cable sections to extend the local area network. It scans each data packet to see if it should be forwarded to the other side. Bridges and repeaters extend a local network, rather than connecting separate networks. A bridge is an intelligent repeater; a bridge can decide whether to pass packets to the other side. The gateway may be more sophisticated and examine the data to decide if it should be forwarded, such as a router. A router connects two logical networks; a router can decide how to pass packets to a nonadjacent network. A router is what we usually mean by a gateway on a UNIX network. Note that if a computer system is a gateway, it must have more than one network interface. The gateway may perform data format conversions if the two networks it connects use different protocols. The figure shows host 3 as a gateway connecting two networks. Figure 6–2 Gateway Connecting Two Networks Host 1 Host 2 Host 4 Host 3 Host 5 Network 1 Network 2 Gateway ZKOX−060000065−04−RGS Connecting to the Network 6–5
  • 200.
    Using Internet Addressing UsingInternet Addressing Overview Every network interface must have a unique address. For one process to contact another, it must know, or be able to find out, the other’s address. There are several layers of addresses. Lower layer protocols may use an address. For example, Ethernet uses a 48-bit address fixed in the hardware of each network interface. The IEEE assigns ranges of numbers to manufacturers of Ethernet controllers to control the uniqueness of the addresses. The IP protocol layer uses ARP to convert an Internet address to an Ethernet address. Internet Addresses The IP protocol defines a 32-bit address. This is normally written as four numbers separated by periods, with each representing 8 bits of the address, for example, 128.30.0.99. The address is divided logically in two parts, as shown in the following table. Table 6–1 Parts of an Internet Address Part Description Network number Must be the same for all hosts connected to the same network. No two networks can have the same number if they are connected in any way, for example, by a gateway or cable. Host number No two hosts on the same network can have the same number. Network numbers are assigned by the Network Information Center (NIC) to control uniqueness. Host numbers are assigned by the local network manager. To contact the NIC: • Toll-free telephone number in the US: (800) 235-3155 • Electronic mail: hostmaster@nic.ddn.mil The designers of the Internet wanted to limit the length of the address while allowing a maximum number of users. Therefore, the address space is partitioned for different types of networks: • Class A networks use the first 8 bits for the network number and the remaining 24 bits for the host number. This allows a few networks with a lot of hosts. • Class B networks use the first 16 bits for the network number and the remaining 16 bits for the host number. 6–6 Connecting to the Network
  • 201.
    Using Internet Addressing •Class C networks use the first 24 bits for the network number and the remaining 8 bits host number. This allows a lot of networks with up to 254 hosts. • Class D is a special set of addresses used for multicasting. Host numbers of all zeros or all ones are reserved for broadcast addresses. The IP header will contain the source and destination Internet addresses. Very few networks are large enough to require Class A addresses. Digital Equipment Corp. has a Class A address, and uses subnetworks to manage groups of hosts. Internet Address Classes The following figure shows the Internet address classes. Figure 6–3 Internet Address Classes Type X . X . X . X Reserved Class A Reserved Class D Class B Class C 0 1−126 127 128−191 . 1−254 192−223 . 1−254 . 1−254 224−239 Host Host Host Reserved 240−255 ZKOX−060000065−06−RGS Network number 127 is reserved for the local loopback address. Address 255.255.255.255 is a global broadcast address Sample Internet Addresses The following table shows some sample addresses. Internet Address Class Network Number Host Number 16.126.16.250 A 16 126.16.250 130.180.23.45 B 130.180 23.45 195.100.78.50 C 195.100.78 50 Users prefer to use a host name, such as tinker, rather than remember the Internet address. Each host on the network has access to a hosts database to convert host names to Internet addresses. It may be a file, such as /etc/hosts, or a name service, such as the Internet Domain Name Service. Connecting to the Network 6–7
  • 202.
    Using Internet Addressing Ethernet Addresses AnEthernet address can be determined on a local network by using the ARP protocol. This checks an internal table or broadcasts the Internet address to the local network and waits for the host with that address or a local ARP server to reply with the Ethernet address. 6–8 Connecting to the Network
  • 203.
    Using Subnetwork Addresses UsingSubnetwork Addresses Overview Subnetworks allow you to divide a large network into smaller logical groups. Part of the host address is designated as the subnet number. Figure 6–4 shows how an address is divided up. Figure 6–4 Subnet Address Network Address Subnet Address Host Address Internet Network address Internet Host Address ZKOX−060000065−07−RGS The subnet number is usually the first octet of the host number. Class C networks do not usually use subnets; they have only 8 bits for the host number. Routing from outside your network does not change; you are still viewed as one network. It is only within your network that you see separate networks. Subnetworks Figure 6–5 shows the Class B network 128.12 with two subnets. Note in the figure that Host 3 is a gateway; it has one interface on each subnetwork. Connecting to the Network 6–9
  • 204.
    Using Subnetwork Addresses Figure6–5 Subnetworks Host 1 Host 2 Host 4 Host 3 Host 5 ZKOX−060000065−08−RGS Subnet 128.12.5 Subnet 128.12.7 128.12.5.1 128.12.7.1 128.12.5.2 128.12.5.3 128.12.7.2 128.12.7.3 A netmask is used to indicate the network and subnetwork address parts of the Internet address. The netmask is 32 bits, the same as the Internet address. Each bit in the netmask with a value 1 indicates the corresponding bit in the Internet address is part of the network or subnetwork address; each 0 bit indicates the corresponding bit in the address is part of the host number. Address 128.12.5.2 with netmask 255.255.255.0 indicates host number 2 has a Class B address and an 8-bit subnet. Broadcast Addresses The Internet Protocol broadcast address allows messages to be sent to all hosts on the network at the same time. This is called a broadcast. All hosts on a network must have the same broadcast address. The default format for a broadcast address is network address (or network and subnet address) followed by all bits set to one. • A Class B network with an 8-bit subnet 128.12.7 would have a broadcast address 128.12.7.255 • A Class B network (without subnetworks) 128.12 would have a broadcast address 128.12.255.255 6–10 Connecting to the Network
  • 205.
    Using Subnetwork Addresses Figure6–6 Broadcast Addresses ZKOX−060000065−09−RGS Network Address 1111 . . . 1111 Network Address Subnet Address 1111 . . . 1111 Broadcast to all Hosts on the Network Broadcast to all Hosts on the Subnetwork Some older versions of UNIX used a broadcast address of the network address followed by all 0 bits. Connecting to the Network 6–11
  • 206.
    TCP/IP Files TCP/IP Files OverviewThe Internet, or TCP/IP network, is configured using a number of files, as described in the table. Table 6–2 TCP/IP Network Files File Function /etc/hosts Lists known hosts and their addresses. /etc/hosts.equiv Lists trusted hosts for login purposes. (Optional) /etc/hosts.lpd Lists trusted hosts for remote printer use. (Optional) /etc/inetd.conf Lists Internet services managed by the inetd(8) daemon. /etc/networks Lists network and subnetwork names. /etc/protocols Lists known Internet protocols. /etc/services Lists known Internet services and port numbers. There are also a number of daemons used in TCP/IP networking: inetd Internet service daemon. When it receives a service request, it invokes a process to service the request. rwhod Daemon maintains the database used by rwho(1) and ruptime(1). It periodically queries the state of the system and broadcasts it to other systems; it receives status broadcasts and stores status in the /var/rwho directory. routed Daemon manages network routing tables. Hosts File The /etc/hosts file contains a list of the known hosts on the network. Each host is listed on a separate line with fields separated by blanks. The format is: address hostname [alias . . . ] # # Host Database # 127.0.0.1 localhost 128.12.5.2 tinker 128.12.5.1 TAILOR tailor taylor 128.12.5.3 SOLDIER soldier 128.12.7.2 SPY007 spy 6–12 Connecting to the Network
  • 207.
    TCP/IP Files The hostfile allows the system to look up the Internet address, given a host name. The system administrator can edit this file and add or remove entries to add or remove a host system on the network. A system on a busy network might have an /etc/hosts file hundreds of lines long. It is not practical to keep this type of list up to date. Many systems now use the Internet Domain Name Service (implemented by BIND), where a name server dynamically provides the host name to address lookups. The UNIX term host is equivalent to node in DECnet terminology. Trusted Hosts File The /etc/hosts.equiv file specifies which hosts are trusted on your system. This is a systemwide file maintained by the root user. This file: • Has impact on only the local host. • Allows a user from a remote system to: Log in to the same account on your system without a password (using rlogin) Copy a file from your system (using rcp) Execute a command on your system (using rsh) Enter one system name and optional user names per line. # Trusted hosts tailor joe sam spy The ~/.rhosts file allows an individual user to specify which hosts and accounts are trusted on your system in his account. This file: • Can exist in each user’s home directory • Allows a user from a remote system to: Log in to the same account on your system without a password (using rlogin) Copy a file from your system (using rcp) Execute a command on your system (using rsh) The file format is: hostname [username] Connecting to the Network 6–13
  • 208.
    TCP/IP Files Lineprinter Daemon File The/etc/hosts.lpd file specifies which hosts may send print jobs to your local printers. • Enter one system name per line. # Remote printer access tailor • A line starting with an asterisk (*) allows print jobs from all hosts to be accepted. • The rs symbol in the /etc/printcap file will restrict use of a printer to users on the local system. The syntax ~/file means the file is in a user’s home directory. Internet Daemon Configuration File The /etc/inetd.conf file specifies the network services the inetd(8) daemon manages. # Internet server configuration database # Syntax: ServiceName SocketType ProtocolName Wait/NoWait UserName # ServerPath ServerArgs ftp stream tcp nowait root /usr/sbin/ftpd ftpd telnet stream tcp nowait root /usr/sbin/telnetd telnetd shell stream tcp nowait root /usr/sbin/rshd rshd login stream tcp nowait root /usr/sbin/rlogind rlogind exec stream tcp nowait root /usr/sbin/rexecd rexecd #tftp dgram udp wait root /usr/sbin/tftpd tftpd /tmp . . . • inetd waits for service requests, then activates the appropriate program to provide the service. • Modify this file to add a nonstandard service or remove a service from the system. • Begin a line with a number sign (#) to comment it out and remove the service. Remove the comment and restart inetd to enable a service. In earlier versions of UNIX, each of these network services had a daemon running all the time, consuming a lot of system resources. The 4.3 BSD version of UNIX introduced a manager daemon inetd(8) to wait for service requests and start the appropriate daemon. The configuration file is installed properly when set up for the standard network services. However, you may add user-written services or remove a service from your system. 6–14 Connecting to the Network
  • 209.
    TCP/IP Files Networks FileThe /etc/networks file allows file hosts on the same network or subnetwork to be referred to as a group. • Enter each network on a single line with fields separated by blanks. • Format is: netname netnumber [alias . . . ] The first field is the network name. The second field is the network number (just the network part of the Internet address). Any remaining fields are aliases. • Example # Internet networks # loop 127 loopback engineering 128.12.5 eng accounting 128.12.7 act Some commands, such as route(8) will accept a network name as an argument. The netstat(1) command can display network names defined in /etc/networks. The /etc/networks file is installed with the loop network name. Other entries are optional. Protocols File The /etc/protocols file lists the known Internet protocols and their numbers. • List each protocol on a separate line along with its protocol number and any aliases. # Internet (IP) protocols # ip 0 IP # internet protocol, pseudo protocol number icmp 1 ICMP # internet control message protocol ggp 3 GGP # gateway-gateway protocol tcp 6 TCP # transmission control protocol pup 12 PUP # PARC universal packet protocol udp 17 UDP # user datagram protocol • Modify this file to add a protocol to the network. The protocols file is installed properly when set up for standard protocols. If a programmer writes his or her own protocol, it should be added to /etc/protocols for inetd to manage daemons using it. Connecting to the Network 6–15
  • 210.
    TCP/IP Files Services FileThe /etc/services file lists the Internet service programs and their well-known port numbers. • Enter each service on a separate line along with its port number, protocol name, and any aliases. . . . ftp 21/tcp telnet 23/tcp whois 43/tcp nicname bootps 67/udp bootpc 68/udp tftp 69/udp finger 79/tcp hostnames 101/tcp hostname exec 512/tcp login 513/tcp who 513/udp whod shell 514/tcp cmd # no passwords used syslog 514/udp printer 515/tcp spooler # line printer spooler ntalk 517/udp talk 518/udp • Modify this file to add a service to the network. If two processes on different systems want to communicate, they may agree on a predetermined or well-known port number. For example, the sendmail program uses port 25. When sendmail on one system wants to contact sendmail on another system, it connects to port 25 on the remote system. 6–16 Connecting to the Network
  • 211.
    Setting Up andManaging a TCP/IP Network Using CDE Setting Up and Managing a TCP/IP Network Using CDE Overview The Network Configuration Manager or netconfig can be used to configure network interfaces, enable and disable daemons, configure the system as an IP router, and modify and delete entries in certain files. • Use Network Configuration Manager to configure the following network interfaces: Ethernet FDDI SLIP Token Ring • Enable or disable the following daemons: gated routed rwhod • Configure the system as an IP router • Add, modify and delete entries in /etc/routes /etc/gateways /etc/hosts /etc/hosts.equiv /etc/networks Starting Network Configuration To start the Network Configuration application: 1. Click the Application Manager icon in the Front Panel. 2. Double-click the System_Admin icon. 3. Double-click the Configuration icon. 4. Double-click the Network icon. In the first example, we will start the Network Configuration Manager by double-clicking the Network Application icon in the Configuration group shown in Figure 6–7. Connecting to the Network 6–17
  • 212.
    Setting Up andManaging a TCP/IP Network Using CDE Figure 6–7 Invoking the Network Configuration Manager SDI3-1A Configuring an Interface To configure an interface, in the Network Configuration main window, select the interface from the Available Network Components list box. To modify an interface, select the interface from the Configured Network Components list box. In this example, we will modify the Ethernet interface. 1. We select Ethernet Interface-ln0 under Configured Network Components, then click Modify Configuration... 6–18 Connecting to the Network
  • 213.
    Setting Up andManaging a TCP/IP Network Using CDE Figure 6–8 Network Configuration SDI3-1B 2. The Configuring Ethernet Interface dialog box is displayed. • The interface status in the example indicates that the primary Ethernet is UP. • The Interface Configuration indicates whether or not the interface will be started on the next configuration reboot. • The host name specifies the name for the interface which in the example is vrroom. • The IP address in the example is user supplied and the network mask in the example is a class C mask 255.255.255.0. Connecting to the Network 6–19
  • 214.
    Setting Up andManaging a TCP/IP Network Using CDE Figure 6–9 Configuring Ethernet Interface SDI3-2A 3. To expand the dialog box, click the bold face arrow on the bottom left of the box. The dialog box expands to display additional parameters. Optional IFCONFIG flags: • Under optional IFCONFIG flags, ARP is selected. This means that the Address Resolution Protocol (ARP) is enabled. When this is the case, links between IP address and MAC address are placed in the ARP cache by the protocol. The default is ARP enabled. 6–20 Connecting to the Network
  • 215.
    Setting Up andManaging a TCP/IP Network Using CDE Figure 6–10 Optional IFCONFIG Flags SDI3-2B • Promiscuous directs the interface to receive all packets rather than just those directed to the host. This feature is normally disabled. • The multicast feature allows the detection of multicast MAC packets such as ones with the LSB of the first byte equal to 1. Note, a broadcast address is one with all MAC bits equal to 1. In special cases, special debug driver code can be used. If this is the case, the Debug button is selected. • Under optional IFCONFIG arguments in the example is the standard MTU size for Ethernet of 1500 bytes (octets). • Hop count is zero since the Ethernet card is zero hops from anybody (if RIP happens to be on). 4. Click Commit to save any changes, then click Close after the changes have been committed. Adding or Modifying Information in /etc/hosts You can view and change entries in the /etc/hosts file through this application. 1. In the Network Configuration main window, click Host File from the Configured Network Components list box. Connecting to the Network 6–21
  • 216.
    Setting Up andManaging a TCP/IP Network Using CDE Figure 6–11 Host File SDI3-3A 2. Click Modify Configuration. The Hosts dialog box is displayed. In the example, the contents of the /etc/hosts file is displayed in the text window. Five entries are displayed. 3. To modify an existing entry, select the entry (as in the example), and the details are loaded into the four fields: Host Name, Host Address, Aliases, and Comment. Any of these fields can be edited. The four fields can be cleared by clicking on the clear button. After making the desired changes, click Commit and then Close. 6–22 Connecting to the Network
  • 217.
    Setting Up andManaging a TCP/IP Network Using CDE Figure 6–12 Hosts Dialog Box SDI3-3C Connecting to the Network 6–23
  • 218.
    Summary Summary Introducing UNIX Networking A network consistsof two or more computer systems linked together for the purpose of exchanging information and sharing resources. Each computer system on the network is called a host. Every host has a unique name and address. For two processes to communicate, they have to agree on a protocol, a set of rules covering how processes are supposed to interact, to send messages to each other. Introducing Internet Gateways Two distinct physical networks are connected by a gateway that is attached to both networks. The gateway passes information from one network to the other. Using Internet Addressing Every network interface must have a unique address. For one process to contact another, it must know, or be able to find out the other’s address. The IP protocol defines a 32-bit address, normally written as four numbers separated by periods, with each representing 8 bits of the address, for example, 128.30.0.99. The Internet address is logically divided in two parts: network number and host number. There are different classes of addresses, depending on the length of the parts. Each host on the network has access to a hosts database to convert host names to Internet addresses. Using Subnetwork Addresses Subnetworks allow you to divide a large network into smaller logical groups. • Part of the host address is designated as the subnet number. • A netmask is used to indicate the network and subnetwork address parts of the Internet address. The Internet Protocol broadcast address allows messages to be sent to all hosts on the network at the same time. 6–24 Connecting to the Network
  • 219.
    Summary TCP/IP Files TheInternet, or TCP/IP network is configured using a number of files, described in the following table. File Function /etc/hosts Lists known hosts and their addresses. /etc/hosts.equiv Lists trusted hosts for login purposes. (Optional) /etc/hosts.lpd Lists trusted hosts for remote printer use. (Optional) /etc/inetd.conf Lists Internet services managed by the inetd(8) daemon. /etc/networks Lists network and subnetwork names. /etc/protocols Lists known Internet protocols. /etc/services Lists known Internet services and port numbers. Setting Up and Managing a TCP/IP Network Using CDE The Network Configuration Manager or netconfig can be used to configure network interfaces, enable and disable daemons, configure the system as an IP router, and modify and delete entries in certain files. Connecting to the Network 6–25
  • 220.
    Exercises Exercises Internet Files 1.Display each of the following files on your system. a. /etc/hosts b. /etc/hosts.equiv c. /etc/inetd.conf d. /etc/networks e. /etc/protocols f. /etc/services 2. Check the Reference Pages for more information on each of these files. Setting Up and Managing a TCP/IP Network Using CDE 1. Use the Network Configuration Manager to configure your network interface. You must get your system IP address from your instructor or system administrator. 2. Use the Network Configuration Manager to add an entry to the hosts files. You must get the name and address of another system in the classroom or Lab area. 6–26 Connecting to the Network
  • 221.
    Solutions Solutions Internet Files 1.All the files should be similar to the examples in the text. /etc/hosts.equiv will probably be blank; use of this file in a secure environment is not recommended. 2. No solution necessary. Setting Up and Managing a TCP/IP Network Using CDE See the examples in the text. Connecting to the Network 6–27
  • 223.
    7 Loading and LicensingSoftware Loading and Licensing Software 7–1
  • 224.
    About This Chapter AboutThis Chapter Introduction Some system and optional software is organized into software subsets, collections of executable and data files needed to perform a specific function or provide a particular class of services. Digital UNIX systems provide the setld(8) utility to manage these subsets: • Load subsets onto the system • Delete subsets from the system • Inventory the subsets • Verify the integrity of the subsets • Configure subsets with node-specific information Many software packages including the operating system are licensed. Digital uses the License Management Facility and the new CDE License Manager to manage software licenses online. This chapter demonstrates the Digital UNIX software loading utility setld to view the software subset inventory and load and unload software subsets. It also overviews the Digital License Management Facility (lmf) utility and the CDE License Manager. Lab exercises provide practice with setld options and the CDE License Manager. Objectives To install optional software on a Digital UNIX system, you should be able to: • Add and remove software subsets • Use the License Management Facility to manage online licenses • Describe the CDE environment Resources • Digital UNIX Installation Guide, Chapter 8 shows the options to the setld command. • Digital UNIX Software License Management • Digital UNIX System Administration 7–2 Loading and Licensing Software
  • 225.
    Loading and UnloadingSoftware Subsets Loading and Unloading Software Subsets Preparing to Load Software Digital UNIX software is organized into subsets. Use the setld(8) command to load and manage software subsets from a distribution media after installation. Before loading subsets, you may wish to check for sufficient disk space: • Use df to determine disk space. • Consult the Release Notes for subset sizes and file systems affected. Note setld will automatically check that there is adequate file space for the subset(s) requested to be installed. Using the setld Command The format for the setld command is: /usr/sbin/setld [-D dir] -option [location] [subset...] • dir is an optional path specifying the destination. • option includes: l loads subset from distribution on location and updates the internal inventory. d deletes subset from the system and updates the internal inventory. i gives an inventory of all subsets known to the system, or all files for subset. c configures subset by passing a message to the subset control program. x extracts subset from distribution on dev into current working directory or dir (does not update internal inventory). v verifies subset by checking its existence and by running its installation verification procedure. Except for the -i option, you must be superuser to run setld. • location specifies the distribution location. location can be: A device special file name: /dev/rz4c—CD–ROM The name of a directory: /mnt/ALPHA — disk distribution directory Loading and Licensing Software 7–3
  • 226.
    Loading and UnloadingSoftware Subsets The name of a remote installation server: tinker: — remote host • subset specifies the name of the subset (see the Release Notes.) To load software from a CD–ROM disk, mount the disk at a convenient mount point and specify that mount point as the location for example: # mount -r /dev/rz4c /mnt # setld -l /mnt/ALPHA The setld utility should not load or extract software if it would cause the percentage of free space on the file system to fall below 10 percent (or minfree). Displaying Software Subsets Use the setld -i command to display an inventory of software subsets. This shows the status of each subset (installed, not installed, and so forth). The status of a subset is determined by the existence of a lock file or by the condition of its installation control file. If one of these two files does not exist, or if the control file is incomplete, the subset is considered to be incorrectly installed. Lock file, control file and inventory file for each subset are located in the /usr/.smdb. directory. The inventory (-i) option has two variations: • List software subsets and their status setld -i Status field may be: * blank - if the subset is not installed * installed - if the subset is installed * corrupt - if the subset failed to install correctly * incomplete - if information in the subset control file is not complete • List files included in a particular subset setld -i subset Software Subset Display Examples Example 7–1 shows how to display software subsets with and without specifying a software subset name. When you invoke setld without a subset name, it lists all available subsets and identifies which ones are currently installed. When you specify a subset name, setld lists all of the files for that subset. 7–4 Loading and Licensing Software
  • 227.
    Loading and UnloadingSoftware Subsets Example 7–1 Listing Software Subsets with setld $ /usr/sbin/setld -i Subset Status Description ------ ------ ----------- BRXCKIT320 NetWorker Digital Client Kit BRXSMAN320 NetWorker Server Reference Pages BRXSOAKIT320 installed NetWorker Server for Digital UNIX DIABASE210 installed DECevent Base kit (Translation / Analysis) EDXAXP200 installed Edex Alpha AXP Digital UNIX Outpost EDXHQ200 installed Edex Alpha AXP Digital UNIX Headquarters EDXMAN200 installed Edex man pages OSFACCT400 System Accounting Utilities (System Administration) OSFADVFS400 POLYCTR advfs (System Administration) OSFADVFSBIN400 POLYCTR advfs Kernel Modules (Kernel Build Environment) . . . OSFXEXAMPLES400 X Window and X/Motif Programming Examples(Software Development) OSFXINCLUDE400 X Window and X/Motif Header Files (Software Development) OSFXLIBA400 X Window and X/Motif Static Libraries(Software Development) OSFXMAIL400 DECwindows Mail Interface (Mail Applications) OSFXMIT400 Additional X Applications (Windows Applications) OSFXNEST400 Nested X Server (Windows Applications) OSFXOEM400 X Customizations for OEM (Windowing Environment) OSFXPRINT400 installed Graphical Print Configuration Application(System Administration) OSFXSYSMAN400 installed Graphical Base System Management Utilities(System Administration) OSFXVFB400 Virtual X Frame Buffer (Windows Applications) $ /usr/sbin/setld -i OSFPRINT400 ./etc/.new..lprsetup.dat ./sbin/init.d/lpd ./sbin/rc0.d/K05lpd ./sbin/rc2.d/K00lpd ./sbin/rc3.d/S65lpd ./usr/bin/cancel ./usr/bin/lp ./usr/bin/lpq ./usr/bin/lpr ./usr/bin/lprm ./usr/bin/lpstat ./usr/lbin/ansi_2of . . . ./usr/lbin/vpsf ./usr/lbin/vsort ./usr/lbin/xf ./usr/lib/nls/msg/en_US.ISO8859-1/lprsetup.cat ./usr/lib/nls/msg/en_US.ISO8859-1/printer.cat ./usr/sbin/lpc ./usr/sbin/lprsetup ./usr/sbin/lptest ./usr/var/spool/lpd Loading Software Subsets Use the setld -l command to load a software subset. The following table shows some of the possible source and destination combinations. Loading and Licensing Software 7–5
  • 228.
    Loading and UnloadingSoftware Subsets Table 7–1 Load Commands Load Command Explanation setld -l /dev/rmt2h Load software subsets from tape unit 2 setld -l /dev/rmt2h OSFUUCP400 Load OSFUUCP400 subset from tape setld -D /mnt -l /dev/rmt2h OSFUUCP400 Load OSFUUCP400 to directory /mnt from tape setld -D /mnt -l mars: OSFUUCP400 Load OSFUUCP400 to directory /mnt from installation server mars setld -l /mnt/ALPHA OSFUUCP400 Load OSFUUCP400 from disk distribution in /mnt/ALPHA If you use the load option and do not specify a subset, a list of subsets will be provided. Software subsets previously installed will not be listed. The following example shows loading subsets from a CD–ROM drive to a distribution directory. Example 7–2 Loading Software Subsets with setld # /usr/sbin/setld -l /dev/rz4c Please make sure your installation drive is mounted and on-line. Are you ready? (y/n): y The subsets listed below are optional: 1) X11/DECwindows 100dpi Fonts 10) Doc. Preparation for Ref. Pages 2) System Accounting Utilities 11) Doc. Preparation Extensions 3) System Exercisers 12) UNIX(tm) SVID2 Compatibility 4) Serviceability Tools 13) Network Mgmt. Common Agent 5) Additional DECwindows Applications 14) Local Area Transport (LAT) 6) CDA(tm) Worksystem Base Services 15) Communications Utilities 7) CAD(tm) Base Services 16) Remote Installation Service 8) RAND Corp. Mail Handler (MH) 17) Revision Control System 9) DECwindows Mail 18) UNIX(tm) to UNIX(tm) Copy Facility 19) All of the above 20) Exit without installing any subsets Enter one or more choices, for example, 1 2 4-6, or press RETURN to redisplay menu: 2 17 You are installing the following subsets: System Accounting Utilities Revision Control System Is this correct? (y/n): y System Accounting Utilities (OSFACCT400) Copying from /dev/rz4c Verifying Revision Control System (OSFRCS400) Copying from /dev/rz4c Verifying (continued on next page) 7–6 Loading and Licensing Software
  • 229.
    Loading and UnloadingSoftware Subsets Example 7–2 (Cont.) Loading Software Subsets with setld # # /usr/sbin/setld -D /usr/local -l /dev/rz4c OSFPRINT400 Please make sure your installation drive is mounted and on-line. Are you ready (y/n)? y Printer Support Environment (OSFPRINT400) Copying from /dev/rz4c Verifying # Loading and Licensing Software 7–7
  • 230.
    Loading and UnloadingSoftware Subsets Deleting a Software Subset Use the setld -d command to remove a software subset. Do not remove software subsets by any command other than setld because the system keeps a record of the software that is installed. The setld utility checks and warns: • If a subset has been marked during manufacture so it cannot be deleted • If a subset being deleted is required by other subsets installed on the system Example 7–3 shows how to remove a software subset. Example 7–3 Removing a Software Subset with setld # /usr/sbin/setld -d OSFRCS400 Deleting Revision Control System (OSFRCS400). # setld -d OSFBASE400 setld: Sorry, You may not delete the Base System (OSFBASE400) subset # 7–8 Loading and Licensing Software
  • 231.
    Licensing Your Software LicensingYour Software Overview Digital UNIX systems use the Digital License Management Facility (LMF) to control access to software. • Each licensed software package comes with a Product Authorization Key (PAK), a set of license information that may be hardcopy or an online file. • The PAK is loaded into a system database. • Software can query the database to see if it is licensed, or for how much capacity. One possible use of licensing is to allow vendors to provide a full working copy of software for a limited time demonstration. After 60 days, the license can expire and the program will not run. Types of Licenses There are several types of licenses: • Availability or capacity licenses — Grants license units based on the power of the hardware without restrictions for particular processors. Once a product has been licensed on a processor, users have unlimited access to the product. • Activity or per-user licenses — Restricts the number of simultaneous users of a product. The number of licensed users can be increased by purchasing additional license units. The licenses for DEC OSF/1 Version 4.0 are: • osf-usr A two-user license (basic license) • osf-svr A license for a RIS server • osf-dev A developer’s license (required to use dbx) dbx -k for kernel debugging does not require the developer’s license; all other uses of dbx do. A Sample PAK The following example shows a sample PAK for the Remote Installation Service. Loading and Licensing Software 7–9
  • 232.
    Licensing Your Software Example7–4 A Sample PAK LICENSE PAK (PRODUCT AUTHORIZATION KEY) ************************************************* PAK ID: Issuer: DEC 1 Authorization Number: SQM021856 2 PRODUCT ID: Product Name: OSF-SVR 3 Producer: DEC 4 NUMBER OF UNITS: Number of units: 100 5 KEY LEVEL: Version: 1.0 6 Product Release Date: 1-MAR-1996 7 KEY TERMINATION DATE: Key Termination Date: 1-APR-1996 8 RATING: Availability Table Code: CONSTANT=100 9 Activity Table Code: 1 0 MISCELLANEOUS: Key Options: NO_SHARE 1 1 Product Token: 1 2 Hardware-Id: 1 3 Checksum: 1-POFE-IHOI-FHNH-KHDK 1 4 ************************************************* 1 Issuer is the LMF name for the supplier of the PAK; usually DEC, may be DEC_EUROPE or other vendor 2 Authorization number uniquely identifies license 3 Product name is the LMF name for product - may be slightly different than that in Software Product Description due to LMF internal restrictions 4 Producer is name of company producing the software product 5 Number of units is number of license units supplied with this PAK; zero (0) means unlimited size (See also table code fields) 6 Version is software product version (optional); if present, LMF restricts product use to versions up to and including that version 7 Product release date (optional); if present, LMF restricts product use to versions released on or before that date 8 Key termination date (optional) is termination date of PAK. After this date the PAK is no longer valid. (Useful for providing a demonstration version of product.) 9 Availability table code (for availability license) the number of units required to give unlimited use on a processor 7–10 Loading and Licensing Software
  • 233.
    Licensing Your Software 10 Activity table code (for activity license) the number of units required for each simultaneous user of the product 1 1 Key options: (optional) • MOD_UNITS indicates you may modify the Number of units field using lmf modify rather than enter a new license • NO_SHARE indicates you cannot combine two or more licenses for the product on the same processor 1 2 Product token field is not currently used by LMF 1 3 Hardware-id field is not currently used by LMF 1 4 Checksum is a checksum for all data on PAK; it ensures that you entered the PAK data correctly and completely Using the lmf Command The lmf utility maintains a file of registered software licenses called the License Database. The lmf utility creates the License Database from information on the PAK that is supplied with software products. By default, the License Database is in /usr/var/adm/lmf. The lmf utility also updates the kernel cache. The kernel cache contains the active license information that is read by license-checking functions in products that provide full LMF support. The license-checking functions check that a product has a valid license before making the product available for use. Use the lmf command list cache to list all products loaded in the kernel cache. You can use the lmf utility to do the following: Activity lmf command Monitor changes to the license database history Display registered products on the system list Cancel a license on a specified date cancel Delete a license from the database delete Prevent a license being loaded into the kernel cache; temporarily disable a license disable Enable a license to be loaded into the kernel cache enable Issue a reconstructed PAK for the product and remove the license from the database issue Register data from a PAK in the database register Load enough license units into the kernel cache to enable use of the product load Copy license details for all enabled products from the database to the kernel cache reset Loading and Licensing Software 7–11
  • 234.
    Licensing Your Software Activitylmf command Unload enough license units from the kernel cache to reduce the use of the product by the number of users specified unload You can enter lmf commands on the command line. # lmf register Alternatively, you can enter the lmf utility and type the commands after the prompt. # lmf lmf> register You should register and load any license for your operating system. For example: # /usr/sbin/lmf register # /usr/sbin/lmf load 0 osf-svr Using lmf to Register a License Use lmf register to edit an empty template and register the license details from the PAK. The editor used is defined by the EDITOR environment variable, or defaults to vi. When you type in lmf register, the system invokes the editor and displays an empty template. You should use the editor commands to type in the PAK data. You can type the data in uppercase or lowercase letters; LMF converts it to uppercase. Any fields which are blank on the PAK should be left blank; any fields filled in on the PAK should be typed exactly as you see them. LMF may return a checksum error if you omit or incorrectly enter any license data. You can bypass the editor by registering a PAK from a file that contains valid license data by using the following command # lmf register - < PAK_file When you leave the editor, LMF scans the completed template to make sure you entered the license data correctly. If the license data is correct, LMF registers the license in the license database. Using lmfsetup to Register a License You can use the /usr/sbin/lmfsetup shell script to register data supplied by a PAK. • lmfsetup prompts you for the data associated with each field on a PAK. • Once you enter all the data, LMF makes sure you have supplied entries for all mandatory fields and that the value in the Checksum field validates the license data. If the data is correct, LMF registers the PAK in the license database. 7–12 Loading and Licensing Software
  • 235.
    Licensing Your Software Ifany data is incorrect, LMF displays the appropriate error message and gives you an opportunity to reenter the data. Example 7–5 shows how to use the lmfsetup command. Example 7–5 Using the lmfsetup Command # lmfsetup Register PAK (type q or quit to exit) [template] Return Issuer : DEC Authorization Number : SQM021856 Product Name : OSF-SVR Producer : DEC Number of units : 100 Version : 1.0 Product Release Date : 1-MAR-1996 Key Termination Date : 1-APR-1996 Availability Table Code : CONSTANT=100 Activity Table Code : Key Options : NO_SHARE Product Token : Hardware-Id : Checksum : 1-POFE-IHOI-FHNH-KHDK Loading and Licensing Software 7–13
  • 236.
    Using the CDELicense Manager Using the CDE License Manager Overview Digital UNIX Version 4.0 workstations or graphic systems use the CDE License Manager to control access to software. This CDE application presents a new user interface as part of the DailyAdmin tools for system administration. Note that the license architecture and strategy remains consistent with that described earlier for the lmf utility. The license actions with the CDE License Manager are: • File Open - to add a license from a file • Edit New - to add a license with an editor • Edit List - to list a specific license • Edit Issue - to write a PAK to a file • Edit Delete - to delete a license Starting the CDE License Manager As with the other system administration tools, the CDE License Manager is invoked through System_Management_Utilities. The next figure shows the CDE License Manager being selected from the DailyAdmin window. Figure 7–1 CDE License Manager Note that the system is protected from casual user input through the use of this Pop-up window which requires the root password to continue. 7–14 Loading and Licensing Software
  • 237.
    Using the CDELicense Manager Using the License Manager The License Manager window shows the current licenses loaded into the system. This figure displays two licenses. • OSF-BASE • OSF-USR Both are required for Digital UNIX Version 4.0. The base license grants the right to use the various services of the Digital UNIX operating system on a single processor. This license also authorizes two concurrent interactive users of the system. The usr license allows multiple users on the system and requires the base license. The actual number of users allowed is a functional piece of the license PAK as noted earlier. The menu options for license operations are: • File Open - to add a license from a file • Edit New - to add a license with an editor • Edit List - to list a specific license • Edit Issue - to write a PAK to a file • Edit Delete - to delete a license Figure 7–2 Minimum Licenses Note that the OSF-BASE license is highlighted, meaning that it has been selected (MB1) by the user. Loading and Licensing Software 7–15
  • 238.
    Using the CDELicense Manager Using Edit List To view the details of a currently loaded license on the system: 1. Select Edit from the menu bar. 2. Choose List from the pull-down menu. The List License window is displayed. Figure 7–3 List a License Using Edit New During the course of a system installation, the system administrator is required to enter a new license on the platform. From the License Manager window, select Edit and choose New from the pull-down menu if you have a hardcopy of the license information and want to manually enter it into the system. The New License window is displayed and shown in the next figure. 7–16 Loading and Licensing Software
  • 239.
    Using the CDELicense Manager Figure 7–4 Edit New Option Enter the license details for the PAK using this window. When all information is complete, click OK to load the license into the license database. Alternately you could click Apply, which also loads the new license but does not exit the New License window, allowing you to enter another license after pressing the Clear button. Using File Open You can enter a new license from a file located on the system rather than using the editing method. The default file location is shown in the next figure. Loading and Licensing Software 7–17
  • 240.
    Using the CDELicense Manager Figure 7–5 File Open option Optionally you may select another folder which contains the license information as shown in the following figure. 7–18 Loading and Licensing Software
  • 241.
    Using the CDELicense Manager Figure 7–6 PAK in User File Loading and Licensing Software 7–19
  • 242.
    Summary Summary Loading and Unloading Software Subsets Digital UNIXsoftware is organized into subsets. Use the setld command to load and manage software subsets from a distribution media after installation. setld -i Displays inventory of software subsets setld -l Loads software subsets setld -d Deletes software subsets Licensing Your Software Digital UNIX systems use the Digital License Management Facility (LMF) to control access to software. • Each licensed software package comes with a Product Authorization Key (PAK), a set of license information which may be on paper or an online file. • The PAK is loaded into a system database. • You can use the /usr/sbin/lmf utility to register a license and manage the license database. • You can use the /usr/sbin/lmfsetup shell script to register a license. Using the CDE License Manager You can use the CDE License Manager to administer licenses. Table 7–2 CDE License Manager VS LMF Commands CDE License Manager LMF Edit List list Edit Delete delete Edit Issue issue Edit New register Edit New lmfsetup File Open register - < file 7–20 Loading and Licensing Software
  • 243.
    Exercises Exercises Instructor Note The followingexercises are designed to be both instructional and practical in that they support other lab exercises to follow. Give priority to the CDE licensing exercise over the LMF setup exercise. • Licensing - each platform must have at a minimum a base and a usr license. Have these available for the student team on each platform. a. OSF-BASE on hardcopy - students use EDIT NEW option b. OSF_USR in a file - students use FILE OPEN • SW loading notes a. DECevent is used in Chapter 13 (DIABASE210) b. NetWorker Save and Restore in Chapter 10 (BRXCKIT320, BRXMAN320, BRXSOAKIT320) c. DEC_Fortran_RTL (DFARTL364) is used only to practice deleting a subset loaded in error *** The installation guide incorrectly lists some of the software subsets. If CD–ROMs are not available in the classroom, and subsets are available on a RIS server, students will have to set up the network. Also, the RIS server needs to have the appropriate subsets loaded. Loading Software Subsets 1. Determine the subsets required for these applications. DEC_EVENT NetWorker_SingleServer DEC_Fortran_RTL 2. Display the inventory of software subsets. 3. Load the subsets required for class exercises. Checking Software Subsets 1. Determine if the Printer Support Environment subset is loaded. 2. List the contents of the Printer Support Environment subset. Loading and Licensing Software 7–21
  • 244.
    Exercises Deleting Software Subsets Oops ... wereally do not need the DEC Fortran subset. Delete it from the system. Licensing Your Software 1. Use the lmf list command to display registered products. 2. Use lmf register and enter the fields from the sample PAK in the text. When you leave the editor, the checksum will not validate (this is not a valid PAK). Abort the operation. 3. Use lmfsetup to enter the PAK data. If your instructor has a valid PAK, use that data. Using CDE License Manager 1. Check the system for existing licenses. 2. Enter the OSF-BASE license and the OSF-USR license. 7–22 Loading and Licensing Software
  • 245.
    Solutions Solutions Loading Software Subsets 1. Consult theInstallation Guide, Appendix C and record the subset names below. DEC_EVENT _______________________________ NetWorker_SingleServer _______________________________ DEC_Fortran_RTL _______________________________ 2. Display the inventory of software subsets. # /usr/sbin/setld -i 3. Load the subsets required for class exercises. # /usr/sbin/setld -l DIABASE210 # /usr/sbin/setld -l BRXCKIT320 BRXMAN320 BRXSOAKIT320 # /usr/sbin/setld -l DFARTL364 Checking Software Subsets 1. Determine if the Printer Support Environment subset is loaded. # setld -i | grep rint OSFPRINT400 Printer Support Environment 2. List the contents of the Printer Support Environment subset. # setld -i OSFPRINT400 ./sbin/init.d/lpd ./sbin/rc0.d/K05lpd ./sbin/rc2.d/K00lpd ./sbin/rc3.d/S65lpd ./usr/bin/lp ./usr/bin/lpq ./usr/bin/lpr ./usr/bin/lprm ./usr/bin/lpstat . . . Deleting Software Subsets # /usr/sbin/setld -d DFARTL364 Loading and Licensing Software 7–23
  • 246.
    Solutions Licensing Your Software 1. # lmflist No entries in license database 2. # lmf register (displays template using editor) Licensed Software Product Product Authorization Key Enter data on lines terminated with: Issuer : DEC Authorization Number : SQM021856 Product Name : OSF-SVR Producer : DEC Number of units : 100 Version : 1.0 Product Release Date : 1-MAR-1996 Key Termination Date : 1-APR-1996 Availability Table Code : CONSTANT=100 Activity Table Code : Key Options : NO_SHARE Product Token : Hardware-Id : Checksum : 1-POFE-IHOI-FHNH-KHDK Comment: Checksum does not validate Abort (a), Retry with new template (n), Retry with old template (o) ? a # 3. # lmfsetup (prompts each line) Register PAK (type q or quit to exit) [template] Return Issuer : DEC Authorization Number : SQM021856 Product Name : OSF-SVR Producer : DEC Number of units : 100 Version : 1.0 Product Release Date : 1-MAR-1996 Key Termination Date : 1-APR-1996 Availability Table Code : CONSTANT=100 Activity Table Code : Key Options : NO_SHARE Product Token : Hardware-Id : Checksum : 1-POFE-IHOI-FHNH-KHDK Checksum does not validate Do you wish to retry? [Yes] N PAK registration for template canceled Register PAK (type q or quit to exit) [template] q # 7–24 Loading and Licensing Software
  • 247.
    Solutions Using CDE License Manager 1. Selectthe CDE License Manager from the DailyAdmin window. In the CDE License Manager window, select Edit and choose List from the pull-down menu. No entries in license database 2. Select the CDE License Manager from the DailyAdmin window. In the CDE License Manager window, select Edit and choose New from the pull-down menu. using the license PAK information supplied by your instructor Loading and Licensing Software 7–25
  • 249.
  • 250.
    About This Chapter AboutThis Chapter Introduction The kernel is the central program that manages the computer system. It controls system scheduling, memory management, input and output services, device management, and organization of the file systems. The kernel is set up, or configured, and built for each system at every site. The system configuration file allows the system administrator to specify the devices and some system parameters that define the system. The configuration software uses this file to build the kernel. Performing a system installation builds a static kernel configured for that system. Digital UNIX 4.0 systems provide the capability to configure the system statically (as in past system releases) or use the new dynamic technique. In a static configuration, you edit a configuration file, search build a new kernel, and reboot the system. Dynamic configuration allows you to configure and load kernel subsystems without rebooting. You update the subsystem configuration database and the kernel will automatically configure the subsystem. Dynamic configuration is available only for drivers and subsystems that are set up to be dynamically loadable. You can use dynamic configuration to change certain system parameters, for example. Objectives To configure the kernel for a Digital UNIX system, you should be able to: • Identify when to build a new kernel • Describe the system configuration file • Use doconfig to build a kernel automatically • Dynamically configure a kernel with sysconfig and sysconfigdb • Reconfigure kernel attributes Resources • System Tuning and Performance Management • Digital UNIX System Administration, Chapters 4 and 5 • Nemeth, Snyder, & Seebass, UNIX System Administration Handbook, Chapter 8 describes BSD configuration file and building a kernel 8–2 Configuring the Kernel
  • 251.
    Building a NewKernel Building a New Kernel Overview You may need to build a new kernel to: • Add a new device and its static driver to your configuration • Remove a device and its static driver from your configuration • Tune the operating system • Add layered products You can configure a kernel: • Automatically with doconfig(8) for a static kernel • Dynamically modify kernel attributes and subsets with sysconfig and sysconfigdb With either method, the system configuration file is modified and kernel is reconfigured. Some drivers can be dynamically loaded. To add one of these, you do not have to change the configuration file and rebuild the kernel. If you remove a device and its driver from your configuration, it is not necessary to change the configuration file and rebuild the kernel, but doing so will reduce the size of the kernel. An example of a system tuning operation is changing from one swap area to two separate swap areas on two disks, to improve performance. (This can be done using the /etc/fstab file, rather than building a new kernel.) Another example of system tuning is increasing the percentage of memory allocated to the I/O buffer cache. Some layered products require building a new kernel; some do not. For example, Pathworks and LSM require changing system parameters and building a new kernel. A kernel can be modified using the sysconfig command to load/unload dynamic subsystems; as well as change system attributes. You must be logged in as root to perform either procedure. Building a kernel using doconfig -c can be done in multiuser mode. But you must shut down and reboot the new kernel for the changes to take effect. Configuring the Kernel 8–3
  • 252.
    System Configuration File SystemConfiguration File Overview The system configuration file is a text file. It can be modified by using an editor, such as vi, or the new CDE Personal Applications Editor. In general, this file does not need to be edited. The configuration file defines extensions to the kernel. File systems, network protocol families, physical and pseudodevice drivers, and STREAMS drivers and modules are supported as subsystems, or extensions. If you have enough disk space, you can build more than one kernel, and boot selectively among them, to turn various devices or features on or off. Many of the parameters in /sys/conf/param.c have equivalent configuration file keywords which would override the default value in param.c. Whenever possible, use /usr/bin/X11/dxkerneltuner to alter the value of tunable system parameters. The system configuration file and other files used to build the kernel are located in subdirectories of /sys: /usr/sys/conf/NAME The system configuration file. (NAME is the system name in uppercase letters.) /usr/sys/conf/GENERIC A generic configuration file used as a template; contains all possible software and hardware options. /usr/sys/conf/param.c Contains default values for a number of system parameters. /usr/sys/conf/files List of common files used to build the system. /usr/sys/conf/files.NAME List of files specific to this system. The system configuration file uses a number of keywords described in the following sections. See Digital UNIX System Administration, Chapter 4, for a list of configuration keywords and their values. System Administration also describes an extension for static kernel configuration for layered products, using the /sys/conf /NAME.list and config.file files. The next several pages describe entries in the system configuration file. 8–4 Configuring the Kernel
  • 253.
    System Configuration File Global Keywords Globalkeyword values describe the system. The following table provides some examples. Table 8–1 Global Keywords Keyword Function Example ident Identifies the kernel; generally the system name in uppercase letters ident TINKER maxdsiz Defines the maximum process data segment size maxdsiz 33554432 maxssiz Defines the maximum process stack size maxssiz 33554432 maxusers Sizes several system data structures, including the system process table maxusers 32 maxthreads Defines the maximum number of threads per task maxthreads 256 bufcache Defines the percentage of physical memory allocated for I/O buffer cache bufcache 20 cpu Defines the specific architectural machine type cpu "DEC3000_500" Guidelines for setting maxusers: System Description maxusers Value Limited memory and a small number of users 8 or 16 Moderate hardware and moderate number of users 32 Large system with heavy work load 64 If you are not sure 32 Default 32 Changing Parameters for Performance Changing any of the tunable parameters has tradeoffs; you gain in one area and lose in another. Use the maxusers parameter to restrict system usage. It controls the sizes of several important system resources including the total number of files and processes that can be open/active at any one time. This indirectly controls the number of simultaneous users the system can support providing no license restrictions apply. You can increase the number of entries in the block and character device switch tables to accommodate loadable drivers. If you receive a message from the config command or from the loadable driver configuration manager cfgmgr indicating a table is too small, edit the configuration file and specify values for the options MAX_BDEVSW or MAX_CDEVSW. For example: Configuring the Kernel 8–5
  • 254.
    System Configuration File optionsMAX_BDEVSW=80 options MAX_CDEVSW=130 System Definition Keyword The system definition identifies the name of the kernel, the location of the root file system and dump and swap areas. It uses the keyword configuration. The recommended configuration entry is as follows: config vmunix swap generic This selects the a partition of the disk from which the kernel was booted as the root file system and the swap areas from the /etc/fstab file. The crash dump area is the same as the first swap area. You can also specify the disk and partition for the root file system and the swap and dump areas. config vmunix root on rz4a swap on rz1b and rz2b dumps on rz1b Options Keyword Definitions Options keyword definitions specify software to be compiled into the system, including subsystems and additional functionality. Many are mandatory, not optional. Some examples of options definitions: options Mach options OSF options CDFS options NFS options UFS options RT Makeoptions Keyword Definitions Makeoptions keyword definitions are passed to the compiler, assembler, and linker when building the kernel. This example turns on debugging: makeoptions CDEBUGOPTS="-g3" Pseudodevice Keyword Definitions Pseudodevice definitions identify pseudodevice drivers for terminal services, the Logical Storage Manager, network services, and so forth. Some examples of pseudodevice definitions: pseudo-device rpty pseudo-device xcons pseudo-device ether pseudo-device lsm1 Pseudodevice definitions identify components for which there is no associated hardware; for example, a pseudoterminal. Pseudoterminals are used for incoming network logins and for interactive windows. The pty entry defines the maximum number of pseudoterminals; it can be any value less than or equal to 3162. For example: 8–6 Configuring the Kernel
  • 255.
    System Configuration File pseudo-devicerpty For pseudoterminals, the system configuration file can include either options RPTY, or pseudo-device pty or pseudo-device rpty, but not both. Configuring the Kernel 8–7
  • 256.
    System Configuration File Example8–1 Alpha AXP System Configuration File ident "GERTIE" options UERF options OSF options _LMF_ options BIN_COMPAT options COMPAT_43 options MACH options MACH_IPC_TCACHE options MACH_IPC_WWA options MACH_IPC_XXXHACK options BUFCACHE_STATS options INOCACHE_STATS options STAT_TIME . . . # # Standard options. # options UNIX_LOCKS options SER_COMPAT options RT_PREEMPT options RT_SCHED options RT_SCHED_RQ options RT_PML options RT_TIMER options RT_SEM options RT_SEM options RT_IPC # makeoptions CDEBUGOPTS="-g3" makeoptions COMPRESS="-compress" makeoptions PROFOPTS="-DPROFILING -DPROFTYPE=4" # # Max number of processors in the system (DO NOT CHANGE) # processors 16 # # Special options (see configuring the kernel chapter # in the Guide to System Administration) # dfldsiz 134217728 maxdsiz 1073741824 dfldsiz 2097152 maxssiz 33554432 cpu "DEC3000_500" maxusers 32 config vmunix swap generic (continued on next page) 8–8 Configuring the Kernel
  • 257.
    System Configuration File Example8–1 (Cont.) Alpha AXP System Configuration File bus tc0 at nexus? callout after_c "../bin/mkdata tc" bus tcds0 at tc0 slot 6 vector tcdsintr controller scsi0 at tcds0 slot 0 controller scsi1 at tcds0 slot 1 bus tcds1 at tc0 slot 1 vector tcdsintr controller scsi2 at tcds1 slot 0 controller scsi3 at tcds1 slot 1 bus tza0 at tc0 slot 4 vector tzaintr controller scsi4 at tza0 slot 0 controller scc0 at tc0 slot 7 vector sccintr controller fb0 at tc0 slot 8 vector faint controller bba0 at tc0 slot 7 vector banter controller ln0 at tc0 slot 7 pseudo-device sysv_hab pseudo-device svid_three_hab pseudo-device svr_four_hab pseudo-device soe_two_hab pseudo-device rt_hab pseudo-device ether pseudo-device loop pseudo-device prf 6 pseudo-device lv 2 pseudo-device lsm_ted 0 pseudo-device lsm 1 pseudo-device ws Configuring the Kernel 8–9
  • 258.
    Building a StaticKernel Building a Static Kernel Overview The doconfig program creates a new (or modifies an existing) system configuration file, creates the special device files for statically configured drivers, and builds a new Digital UNIX system kernel. You need the following Digital UNIX software subsets installed to rebuild your kernel: • OSFBINnnn • OSFBINCOMnnn nnn corresponds to the operating system version. Use setld -i to verify that these subsets are installed. Using the doconfig Program The following example shows how to automatically build a kernel. Example 8–2 Building a Kernel with the doconfig Program 1 $ su 2 # cp /vmunix /vmunix.old 3 # cp /genvmunix /vmunix 4 # /usr/sbin/shutdown -r now Boot generic kernel 5 # /usr/sbin/shutdown now To single-user mode 6 # /usr/sbin/doconfig *** KERNEL CONFIGURATION AND BUILD PROCEDURE *** *** FILE NAME SPECIFICATION *** Enter a name for the kernel configuration file. [TINKER] Return A configuration file with the name ’TINKER’ already exists. Do you want to replace it? (y/n) [n]: y . . . *** KERNEL OPTION SELECTION *** Selection Kernel Option --------------------------------------------------------------- 1 Streams Socket Coexistence (DLPI & STRIFNET) 2 Data Link Interface (DLI) 3 X/Open Transport Interface (XTISO) 4 ISO 9660 Compact Disc File System (CDFS) 5 All of the above 6 None of the above --------------------------------------------------------------- Enter the selection number for each kernel option you want. For example, 1 3 : 4 . . . (continued on next page) 8–10 Configuring the Kernel
  • 259.
    Building a StaticKernel Example 8–2 (Cont.) Building a Kernel with the doconfig Program Configuration file complete. Do you want to edit the configuration file? (y/n) [n]: Return *** CREATING SPECIAL FILES FOR DEVICES *** A log file listing special device files is located in /dev/MAKEDEV.log *** PERFORMING KERNEL BUILD *** . . . The new kernel is /sys/TINKER/vmunix. 7 # mv /sys/TINKER/vmunix /vmunix 8 # /usr/sbin/shutdown -r now Boot new kernel 1 You must be the root user to run doconfig and shut down the system. 2 Optionally, save a copy of the running kernel. If there is not sufficient space in the root file system, save it elsewhere. 3 When creating a new configuration file or adding new hardware with doconfig, the system must be running the generic kernel so that it can recognize all devices. 4 Reboot the system using the generic kernel. 5 Log in as root and shut down the system to single-user mode. 6 Run the doconfig program. • The script will ask questions about the configuration file (system) name and time zone and give you the option to edit the configuration file. (The prompts will be familiar to anyone who has run the installation script.) • doconfig builds a new kernel and displays its pathname. 7 Move the new kernel to the root directory. 8 Reboot the system. Note If there are problems booting the new kernel, there may be errors in the configuration file. You can boot the generic kernel to single-user mode and copy the original kernel back to /vmunix. You can build a new kernel from an existing configuration file by using doconfig with the -c option and the name of the configuration file to bypass the questions, for example: doconfig -c TINKER You do not need to be running the generic kernel, and you need to reboot only once after moving the new kernel to /vmunix. You should still save the original kernel before creating a new one. Configuring the Kernel 8–11
  • 260.
    Configuring the SystemDynamically Configuring the System Dynamically Overview Digital UNIX 4.0 supports a dynamic technique to configure a kernel which differs significantly from the static method. • Static method - edit configuration files, rebuild and reboot the kernel • Dynamic technique - uses commands which modify a special database to configure the kernel A related technique is bootstrap linking which is a method to defer the actual linking of a kernel until boot time. A bootstrap linked kernel is actually a set of directives in a sysconfig file that tell the bootstrap program how to build the kernel in memory. Some kernel subsystems such as the decnet subsystem are dynamically loadable, meaning that you can add the subsystem to or remove the subsystem from the kernel without rebuilding the kernel. The following subsystems provided by Digital are dynamically loadable: • decnet for DECnet network software • lat for Local Area Terminal When you need to load, unload, or modify a dynamic subsystem, use the /sbin/sysconfig command. Note that you must have superuser privileges and also know the name of the subsystem you want to manage. Subsystems are installed in either the /subsys directory or the /var/subsys directory. Once a subset is installed, a file named subsystem-name.mod appears in one of the two directories. This name is used as input to the /etc/sbin /sysconfigtab command. Loading a Subsystem To load a subsystem use the following command # /sbin/sysconfig -c decnet This command would configure the kernel with DECnet network software. Unloading a Subsystem To unload a subsystem use the following command # /sbin/sysconfig -u decnet This command would unconfigure and unload the subsystem from the kernel. 8–12 Configuring the Kernel
  • 261.
    Configuring the SystemDynamically Querying Subsystem State Subsystems may be in three different states: • Loaded and configured (available for use) • Loaded and unconfigured (not available for use but still loaded) • Unloaded (not available) To query the state of subsystems use the following command # /sbin/sysconfig -s This command would list all subsystems, for example: cm: loaded and configured generic: loaded and configured io: loaded and configured ipc: loaded and configured proc: loaded and configured sec: loaded and configured rt: loaded and configured bsd_tty: loaded and configured xpr: loaded and configured dli: loaded and configured atm: loaded and configured atmip: loaded and configured lane: loaded and configured uni3x: loaded and configured advfs: loaded and configured net: loaded and configured ppp: loaded and configured snmpinfo: loaded and configured bufcall: loaded and configured streams: loaded and configured dlb: loaded and configured kinfo: loaded and configured strstd: loaded and configured timod: loaded and configured tirdwr: loaded and configured ldtty: loaded and configured xtiso: loaded and configured pts: loaded and configured ufs: loaded and configured vfs: loaded and configured vm: loaded and configured cma_dd: loaded and configured cam_disk: loaded and configured cam_tape: loaded and configured cam: loaded and configured tc: loaded and configured bba: loaded and configured ws: loaded and configured sfbp: loaded and configured lsm: loaded and configured ddr: loaded and configured kio: loaded and configured kds: loaded and configured lat: loaded and configured Configuring the Kernel 8–13
  • 262.
    Configuring the SystemDynamically If the user wants to check the state of only one subsystem, simply list the subsystem name. # /sbin/sysconfig -s ufs Subsystem Type Prior to deciding on the method to use when a subset needs to be managed, the administrator must understand if the subset is of the static or dynamic type. The -m parameter yields the following: # /sbin/sysconfig -m kinfo decnet kinfo: static decnet: dynamic Automatically Configured Subsystems Up to this point the kernel has been modified with dynamically loaded subsets which are only valid until the next boot. This is OK for a test environment but what if the subset is to be used permanently and should be loaded on every system boot? The system determines which subsystems to configure into the kernel at system boot time by checking the list of automatically configured subsystems. This list is maintained using the sbin/init.d/autosysconfig command. This command has three options: list, add, and delete. List provides the list of loadable subsystems that the system automatically configures at each reboot. Examples are: # /sbin/init.d/autosysconfig list # /sbin/init.d/autosysconfig add lat # /sbin/init.d/autosysconfig delete lat 8–14 Configuring the Kernel
  • 263.
    Modifying System Attributes ModifyingSystem Attributes Overview Subsystem attributes may be modified for various reasons with system performance and general tuning being the most probable. There are two methods used: • The sysconfig command allows attributes to be changed in the current running system. Changes are not valid over a reboot. • The sysconfigtab database stores modifications so that they remain in effect or survive a system reboot. This is the prefered method for modifying system parameters. Note Refer to System Administration manual Chapter 4 for the list of subsystems provided by Digital which support this type of boot-time modification. Note that the attributes stored in the database or those changed with the sysconfig command will override those found in the system configuration file and the param.c file. The latter two files should be viewed as definitions of the default values for the kernel. These commands can be accessed through the CDE interface /usr/bin/X11/dxkernelturner. Subsystem Attribute Values Actual values for the parameter or attribute in question are identified as the first step. Use the command parameter -q option and specify the name of the subsystem. # /sbin/sysconfig -q generic generic: clock-frequency = 1024 booted_kernel = vmunix booted_args = vmunix lockmode = 0 lockdebug = 0 locktimeout = 15 max-lock-per-thread = 16 lockmaxcycles = 0 rt_preempt_opt = 0 rt-preempt-opt = 0 cpu_enable_mask = 18446744073709551615 cpu-enable-mask = 18446744073709551615 msgbuf_size = 4096 message-buffer-size = 4096 dump-sp-threshold = 4096 lite-system = 0 physio_max_coalescing = 65536 kmem-debug = 0 old-obreak = 1 user_cfg_pt = 40100 Configuring the Kernel 8–15
  • 264.
    Modifying System Attributes Identifying Dynamic Values Attributesthat can be modified in the running system can be identified by using the -Q option. # /sbin/sysconfig -Q generic generic: clock-frequency - type=INT op=CQ min_val=0 max_val=524288 booted_kernel - type=STRING op=Q min_len=0 max_len=0 booted_args - type=STRING op=Q min_len=0 max_len=0 lockmode - type=LONG op=CQ min_val=0 max_val=4 lockdebug - type=LONG op=CQ min_val=0 max_val=1 locktimeout - type=LONG op=C min_val=0 max_val=9223372036854775807 max-lock-per-thread - type=INT op=CQ min_val=0 max_val=1024 lockmaxcycles - type=LONG op=CRQ min_val=0 max_val=9223372036854775807 rt_preempt_opt - type=LONG op=CQ min_val=0 max_val=1 rt-preempt-opt - type=LONG op=CQ min_val=0 max_val=1 cpu_enable_mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615 cpu-enable-mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615 msgbuf_size - type=LONG op=CQ min_val=0 max_val=1048576 message-buffer-size - type=LONG op=CQ min_val=0 max_val=1048576 dump-sp-threshold - type=INT op=CRQ min_val=0 max_val=4096 lite-system - type=INT op=CQ min_val=0 max_val=1 physio_max_coalescing - type=INT op=CRQ min_val=0 max_val=262144 kmem-debug - type=LONG op=CQ min_val=0 max_val=1 old-obreak - type=LONG op=CQ min_val=0 max_val=1 user_cfg_pt - type=INT op=RQ min_val=40000 max_val=50000 Minimum and maximum values are displayed along with the field op=CRQ. • C - attribute may be modified when the subsystem is initially loaded • R - attribute may be modified when the subsystem is running • Q - attribute may be queried Modifying Attributes at Run Time This option is particularly useful when the superuser wishes to experiment with modifications or test the system. You can use the /sbin/sysconfig -r command specifying the attribute, the new value, and subsystem name. For example to change the lockmaxcycles value in the generic subsystem: sysconfig -r generic lockmaxcycles=100 Note that this new attribute value will be applied to the running kernel, but will not be retained over the next reboot. 8–16 Configuring the Kernel
  • 265.
    Modifying System Attributes Subsystem Attributes Database Assumingthe previous experiment results in improved system behavior, the system administrator must make the attribute value change persistent, that is the new value is to be used with every reboot. This is accomplished by using the /etc/sysconfigtab database to store the changes. Note however that placing a change in the database will not cause the attribute to be modified in the running kernel. You must use the /sbin/sysconfig -r command or reboot. To add, update or remove entries in the database, you must create a stanza -format file which contains the desired information. generic: lockmaxcycles=100 Next issue the command to add the new attribute value. # /sbin/sysconfigdb -a -f filename where filename is the name of the stanza-format file. Updating Attributes Use the -u option to update the entire definition of a subsystem that is already in the /etc/sysconfigtab database. # /sbin/sysconfigdb -u -f filename generic This command would update the generic subsystem based on the parameters in the filename file. Removing Attributes Use the -r option to remove one or attributes as defined in the stanza file. # /sbin/sysconfigdb -r -f filename List Attributes Use the -l option to list the entries in the /etc/sysconfigtab database. Specify the subset name on the command line, otherwise all entries in the database are listed. # /sbin/sysconfigdb -l ufs Deleting Attributes This command is used to delete the definition of a subsystem entry from the database. In other words, the subsystem receives default values the next time it is configured. In this example, the generic subsystem will be set to default values. # /sbin/sysconfigdb -d generic Configuring the Kernel 8–17
  • 266.
    Summary Summary Building a New Kernel Youneed to build a new kernel to: • Add a new device and its static driver to your configuration • Remove a device and its static driver from your configuration • Tune the operating system • Add layered products System Configuration File The system configuration file describes how you want the configuration software to build the kernel. It identifies some some system parameters that affect how the kernel operates. Kernel subsystems are: • File systems • Network protocol families • Physical and pseudodevice drivers • STREAMS drivers and modules Building a Static Kernel The doconfig(8) program creates a new or modifies an existing system configuration file, creates the special device files for statically configured drivers, and builds a new Digital UNIX system kernel. Dynamic System Configuration Digital UNIX Version 4.0 supports a dynamic technique to configure a kernel that differs significantly from the static method. • Static method - edit configuration files, rebuild and reboot the kernel • Dynamic technique - uses commands that modify a special database to configure the kernel Modifying System Attributes Subsystem attributes that are dynamic in nature may be modified with the sysconfig command. Persistent modifications (those that remain across reboots) are handled in the sysconfigtab database. 8–18 Configuring the Kernel
  • 267.
    Exercises Exercises System Configuration File 1. Locate anddisplay the generic configuration file. 2. Locate and display the current configuration file. 3. Change the system configuration file to increase the ubc buffer cache to 70%. Make a copy of the configuration file before you change it. (Hint: Add the bufcache line with the other global keywords.) 4. Determine the maximum number of users (maxusers) in your configuration file. 5. Determine which file systems are configured in your kernel. (Hint: See the options.) Building a Static Kernel 1. Use doconfig(8) to build a new kernel. Follow the steps in Example 8–2. 2. Edit the system configuration file to increase the buffer cache by 5%. Use doconfig -c to build a new kernel. Dynamically Configure the Kernel 1. Dynamically configure the lat subsystem into the running kernel. 2. Verify that it is successfully configured. Modifying a Running Kernel 1. Determine the value of the dynamic attribute lockmaxcycles in the generic subset. 2. Is it possible to change the attribute value in the running kernel? 3. If yes, change the value to 100. Persistent Changes Modify the value of the dynamic attribute lockmaxcycles in the generic subset so that it configures correctly across multiple reboots of the system. Configuring the Kernel 8–19
  • 268.
    Solutions Solutions System Configuration File 1. # more/sys/conf/GENERIC 2. For a system named tinker, # more /sys/conf/TINKER 3. Add or change the line ubc_maxpercent 70 4. # grep maxusers /sys/conf/TINKER maxusers 32 5. # grep FS /sys/conf/TINKER options NFS options CDFS options SYSV_FS options UFS Building a Static Kernel 1. See Example 8–2. 2. # doconfig -c TINKER *** KERNEL CONFIGURATION AND BUILD PROCEDURE *** . . . The new kernel is /sys/TINKER/vmunix. Dynamically Configure the Kernel 1. To add the subsystem: # /sbin/sysconfig -c lat 2. Verify the subsystem: # /sbin/sysconfig -s lat lat: loaded and configured Modifying a Running Kernel 1. Determine the value: # /sbin/sysconfig -q generic lockmaxcycles Record value here ___________ 2. Change value possible: 8–20 Configuring the Kernel
  • 269.
    Solutions # /sbin/sysconfig -Qgeneric generic: clock-frequency - type=INT op=CQ min_val=0 max_val=524288 booted_kernel - type=STRING op=Q min_len=0 max_len=0 booted_args - type=STRING op=Q min_len=0 max_len=0 lockmode - type=LONG op=CQ min_val=0 max_val=4 lockdebug - type=LONG op=CQ min_val=0 max_val=1 locktimeout - type=LONG op=C min_val=0 max_val=9223372036854775807 max-lock-per-thread - type=INT op=CQ min_val=0 max_val=1024 YES -----------------+ V lockmaxcycles - type=LONG op=CRQ min_val=0 max_val=9223372036854775807 rt_preempt_opt - type=LONG op=CQ min_val=0 max_val=1 rt-preempt-opt - type=LONG op=CQ min_val=0 max_val=1 cpu_enable_mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615 cpu-enable-mask - type=ULONG op=CQ min_val=0 max_val=18446744073709551615 msgbuf_size - type=LONG op=CQ min_val=0 max_val=1048576 message-buffer-size - type=LONG op=CQ min_val=0 max_val=1048576 dump-sp-threshold - type=INT op=CRQ min_val=0 max_val=4096 lite-system - type=INT op=CQ min_val=0 max_val=1 physio_max_coalescing - type=INT op=CRQ min_val=0 max_val=262144 kmem-debug - type=LONG op=CQ min_val=0 max_val=1 old-obreak - type=LONG op=CQ min_val=0 max_val=1 user_cfg_pt - type=INT op=RQ min_val=40000 max_val=50000 3. Modify running kernel: # /sbin/sysconfig -r generic lockmaxcycles=100 Shutdown -r now checking lockmaxcycles # /sbin/sysconfig -q generic lockmaxcycles Record value here ___________ Persistent Changes Edit a change file in the stanza-format change_lockmaxcycles. (change_lockmaxcycles) generic: lockmaxcycles=100 Check the database for existing entries. # /sbin/sysconfigdb -l No entries should be found. Apply the change. # /sbin/sysconfigdb -a -f change_lockmaxcycles Shutdown -r now testing database change. Recheck the value of lockmaxcycles. # /sbin/sysconfig -q generic lockmaxcycles Configuring the Kernel 8–21
  • 271.
  • 272.
    About This Chapter AboutThis Chapter Introduction The system communicates with peripheral devices, such as terminals, printers, and disk drives through device drivers. These device drivers are accessed through special files. Special files provide two interfaces: • Block interface — all access is through the buffer cache • Character interface — no kernel buffering The Digital UNIX operating system supports two types of configurable drivers: • Traditional static drivers — configured into the system and compiled into the kernel • Dynamically loadable drivers — may be loaded or unloaded from a running system Most devices are set up by the installation procedure. At boot time, autoconfiguration code determines which of the traditional devices are actually present. To add a device to your system: • Devices must be physically connected after the operating system is shut down and the computer system is powered down. • When the operating system is running, you must make some changes to system files so that the kernel will recognize these new devices. A driver must be specifically designed to be dynamically loadable; it must link its interrupt handler into the interrupt table and it must create entries in the device switch tables for it to be accessible. As vendors gain more experience with Digital UNIX, more dynamic drivers will be available. This chapter concentrates on the traditional drivers. This chapter demonstrates how to add various peripheral devices to the system using the MAKEDEV script. This chapter assumes you know how to build the kernel. Objectives To configure peripheral devices into the system, you should be able to: • Describe device files • Configure terminals and pseudoterminals • Describe the Digital UNIX LAT service • Configure the LAT devices for a terminal server • Describe dynamic device configuration for disk and tape drives 9–2 Configuring Peripherals
  • 273.
    About This Chapter •Configure printers on a Digital UNIX system using the CDE Printer Configuration. • Manage the print system Resources For more information on the topics in this chapter, see the following list of resources: • Nemeth, Snyder, & Seebass, (c) 1989, UNIX System Administration Handbook, Prentice-Hall, ISBN 0-13-933441-6, Chapters 7, 9, 10, 11 and 12 • Digital UNIX System Administration, Appendix A • Digital UNIX Reference Pages, Section 7: Special Files • Digital UNIX Network Administration, Chapters 4 and 13 Configuring Peripherals 9–3
  • 274.
    Device Files Device Files OverviewThe special files in /dev provide access to the device drivers in the kernel. Some devices, such as disks, have both character and block device files; they prefix the character device name with an "r" for raw. Each device is identified by a device number, which consists of two parts: • Major number — identifies the driver or type of device • Minor number — interpreted by the driver; usually identifies the particular device; often called the unit number The major number is used as an index into the cdevsw table for character devices or bdevsw table for block devices. Each entry in these tables contains entry points for the associated driver code. The minor number may set a particular characteristic of the device. For example, a tape drive may use minor numbers to represent various recording densities. Special files in /dev provide access to devices. Example 9–1 shows some special files in the /dev directory. Example 9–1 The /dev Directory # file /dev/* /dev/MAKEDEV: /sbin/sh shell script -- commands text /dev/MAKEDEV.log: ascii text /dev/SYSV_PTY: /sbin/sh shell script -- commands text /dev/atm_cmm: character special (47/0) /dev/audit: character special (17/0) /dev/binlogdmb: socket /dev/cam: character special (30/0) /dev/console: character special (0/0) VS_SLU #0 GRAPHICS terminal #0 /dev/kbinlog: character special (31/0) /dev/kcon: character special (3/1) /dev/keyboard0: character special (25/1) VS_SLU #0 LK401 terminal #1 /dev/klog: character special (3/0) /dev/kmem: character special (2/1) /dev/lat: directory /dev/log: socket /dev/mem: character special (2/0) /dev/mouse0: character special (23/1) VS_SLU #0 VSXXXAA terminal #1 /dev/nrmt0a: character special (9/5127) SCSI #0 TLZ06 tape #5 (SCSI ID #5) /dev/nrmt0h: character special (9/5123) SCSI #0 TLZ06 tape #5 (SCSI ID #5) /dev/nrmt0l: character special (9/5121) SCSI #0 TLZ06 tape #5 (SCSI ID #5) /dev/nrmt0m: character special (9/5125) SCSI #0 TLZ06 tape #5 (SCSI ID #5) /dev/null: character special (2/2) /dev/pfcntr: character special (26/0) /dev/pipe: character special (32/58) (continued on next page) 9–4 Configuring Peripherals
  • 275.
    Device Files Example 9–1(Cont.) The /dev Directory /dev/prf: character special (37/0) /dev/printer: socket /dev/ptm: character special (32/7) /dev/ptmx: character special (32/63) /dev/ptmx_bsd: character special (32/7) /dev/pts: directory /dev/ptyp0: character special (7/0) /dev/ptyp1: character special (7/1) /dev/ptyp2: character special (7/2) /dev/ptyp3: character special (7/3) . . . /dev/ptyqf: character special (7/31) /dev/rmt0a: character special (9/5126) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0) offline /dev/rmt0h: character special (9/5122) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0) offline /dev/rmt0l: character special (9/5120) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0) offline /dev/rmt0m: character special (9/5124) SCSI #0 TLZ06 tape #5 (SCSI ID #5) (SCSI LUN #0) offline /dev/rrz0a: character special (8/0) /dev/rrz0b: character special (8/1) /dev/rrz0c: character special (8/2) /dev/rrz0d: character special (8/3) /dev/rrz0e: character special (8/4) /dev/rrz0f: character special (8/5) /dev/rrz0g: character special (8/6) /dev/rrz0h: character special (8/7) /dev/rrz1a: character special (8/1024) /dev/rrz1b: character special (8/1025) /dev/rrz1c: character special (8/1026) (continued on next page) Configuring Peripherals 9–5
  • 276.
    Device Files Example 9–1(Cont.) The /dev Directory . . . /dev/rrz4g: character special (8/4102) /dev/rrz4h: character special (8/4103) /dev/rz0a: block special (8/0) /dev/rz0b: block special (8/1) /dev/rz0c: block special (8/2) /dev/rz0d: block special (8/3) /dev/rz0e: block special (8/4) /dev/rz0f: block special (8/5) /dev/rz0g: block special (8/6) /dev/rz0h: block special (8/7) /dev/rz1a: block special (8/1024) . . . /dev/rz4f: block special (8/4101) /dev/rz4g: block special (8/4102) /dev/rz4h: block special (8/4103) /dev/sad: directory /dev/snmpinfo: character special (32/49) /dev/streams: directory /dev/tty: character special (1/0) /dev/tty00: character special (24/2) VS_SLU #0 terminal #2 modem_control off /dev/tty01: character special (24/3) VS_SLU #0 terminal #3 modem_control off /dev/ttyp0: character special (6/0) /dev/ttyp1: character special (6/1) /dev/ttyp2: character special (6/2) . . . /dev/ttyqd: character special (6/29) /dev/ttyqe: character special (6/30) /dev/ttyqf: character special (6/31) /dev/ws0: character special (33/1) VS_SLU #0 PMAGB-BA terminal #1 /dev/zero: character special (38/0) 9–6 Configuring Peripherals
  • 277.
    Configuring Terminals Configuring Terminals Configuring Terminals Thissection describes how to configure terminals and pseudoterminals. You should log in as root for this procedure. Look at the generic system configuration file for sample device definition lines. To add terminals to your system, use the following procedure: 1. If the controller driver is not dynamically loadable, add the device definition to the system configuration file and rebuild the kernel. See the Reference Pages for the device for a sample specification. 2. Connect the controller: a. Shut down and power off the system. b. Install the controller. c. Power up and boot the system. 3. Change to the /dev directory and create the special files using the MAKEDEV(8) command in the following format: MAKEDEV device# device is the device mnemonic name for the terminal multiplexer you are adding. # is the device unit number. 4. Add the new tty lines to the /etc/inittab(4) file using the following format: tty:run-level:action:command Enable the terminal line for run levels 2 and 3. The respawn action causes init to restart the command if it does not exist; the off action causes init to terminate the command if it is running. The command for terminals is generally the getty(8) command. For example, the first line enables tty02 for run levels 2 and 3, and the second line disables logins on tty03. tty02:23:respawn:/usr/sbin/getty /dev/tty02 9600 vt100 tty03:23:off:/usr/sbin/getty /dev/tty03 9600 vt100 5. To allow root logins on a terminal, add the new tty line to the /etc/securettys file. For example: /dev/tty08 /dev/tty09 /dev/tty10 6. Force init to reexamine the inittab file and initialize the tty lines: # init q The MAKEDEV shell script is a front-end to the mknod(8) command; it provides default values. Configuring Peripherals 9–7
  • 278.
    Configuring Terminals Configuring Pseudoterminals Pseudoterminals, unliketerminals, have no corresponding physical terminal port on the system. Pseudoterminals use two files - pty (master) and tty (slave). Pseudoterminals are used by remote login sessions, window-based software, and shells for access to a system. Digital UNIX offers two implementations of pseudoterminals: BSD STREAMS amd BSD clist. See System Administration, Chapter 5 for more information. To add pseudoterminals to your system, use the following procedure: 1. Use pty and nptys with sysconfigtab to increase the number of pseudoterminals if needed. By default, the kernel supports 255 pseudoterminals. 2. Boot the new kernel. 3. Change to the /dev directory and create the special files using the MAKEDEV(8) command in the following format: MAKEDEV pty# # represents the set of pseudoterminals you want to create. For example, if you already have pty sets 0 and 1, create pty2. MAKEDEV will list the files it creates. # MAKEDEV pty2 MAKEDEV: special file(s) for pty2: ptyr0 ttyr0 ptyr1 ttyr1 ptyr2 ttyr2 ptyr3 ttyr3 ptyr4 ttyr4 ptyr5 ttyr5 ptyr6 ttyr6 ptyr7 ttyr7 ptyr8 ttyr8 ptyr9 ttyr9 ptyra ttyra ptyrb ttyrb ptyrc ttyrc ptyrd ttyrd ptyre ttyre ptyrf ttyrf 4. To allow root logins on all pseudoterminals, add an entry for ptys to the /etc/securettys file. 9–8 Configuring Peripherals
  • 279.
    LAT Terminal Servers LATTerminal Servers Overview Digital UNIX supports the LAT protocol for communicating with terminal servers. Digital originated the terminal server concept in the early 1980s using a highly efficient protocol known as Local Area Transport (LAT). LAT is an Ethernet protocol used in local area networks that transfers data on a character-by-character basis. Terminal and print servers are dedicated, special-purpose systems that provide resource sharing within a local area network. Terminal servers provide a cost-effective, flexible way to connect terminals to hosts. Each terminal connected to a terminal server can access services running on service nodes connected to the same local network. Figure 9–1 shows how terminal servers provide access to the host for terminals and printers. Figure 9–1 Providing Access for Terminals and Printers Host ZKOX−055000111−14−RGS Terminal Server A host on the network may be: • Load host — maintains LAT software Used to boot a LAT server Used for upline dumping from a LAT server • Service node — provides access for users to log in For more information, see lat(4), latsetup(8), latcp(8), and Network Administration. Configuring Peripherals 9–9
  • 280.
    Adding Terminals ona Terminal Server Adding Terminals on a Terminal Server Configuring LAT Devices Digital UNIX systems support terminal servers using the LAT protocol. To configure the LAT devices, use the following procedure: 1. Verify that options LAT is in your system configuration file. If you use doconfig to build the kernel, the option should be there as soon as the lat subsets are installed. If not, add it, rebuild, and boot the new kernel. 2. Use latsetup to create the LAT device special files and start the LAT. You should log in as root for this procedure. The following table summarizes the latsetup versus manual method. latsetup Manual Method Creates sets of 16 LAT device special files MAKEDEV latn Adds the new tty lines to /etc/inittab For example, latty0a:234:respawn: /usr/sbin/getty /dev/tty0a then use init q to make changes take effect Creates the STREAMS special file /dev/streams /kinfo strsetup -i Sets the LAT_SETUP variable in /etc/rc.config to 1 for automatic startup rcmgr set LAT_SETUP 1 Starts the LAT service latcp -s Running latsetup The latsetup command provides an interactive, menu-driven facility for administering LAT on your system. The following is an example of a session to set up LAT. User selections are boldface. Example 9–2 Using the latsetup Utility # latsetup LAT Setup Utility The latsetup program provides assistance in setting up LAT on your system. If this is the first time running latsetup on this system, it is recommended to select the Initial LAT Setup option. (continued on next page) 9–10 Configuring Peripherals
  • 281.
    Adding Terminals ona Terminal Server Example 9–2 (Cont.) Using the latsetup Utility Exit Initial LAT Setup Create Additional Devices Start/Stop LAT Enable/Disable LAT Automatic Startup/Shutdown Undo LAT Setup To select an option, use the <UP> or <DOWN> arrow keys and press <RETURN> to enter the chosen submenu. To select options on a horizontal plane use the <LEFT> or <RIGHT> arrow keys and press <RETURN>. To enter input, type it in and then press <RETURN>. Initial LAT Setup This menu will allow you to setup LAT on your system by creating LAT special device files, selecting how many getty entries should be placed into /etc/inittab and choosing whether or not to execute init q. LAT will be started to allow interactive connections to be made to this system and a variable will be set in /etc/rc.config so that LAT automatic startup and shutdown is enabled which will cause LAT to be started each time this system reaches run-level 3. Would you like to continue with this option? YES NO There are 16 LAT tty devices created. There are 8 LAT entries already defined in /etc/inittab. Select style of ttuys to create SVR4 style ttys BSD style ttys How many LAT ttys do you want to create? (0 - 617) [0] 1 How many gettys would you like added to the /etc/inittab file? (0 - 1) [0] 1 NOTE: Please keep your system’s memory resources in mind when specifying gettys to be added. Would you like init q to be executed to spawn the new getty entries in the /etc/inittab file? YES NO You requested: 1 tty and 1 getty and that init q be performed. Are you satisfied with this input? YES NO Working on your request. LAT tty devices have been created and getty entries defined. There are now 1 LAT tty devices created. There are now 1 LAT entries defined in /etc/inittab. Enter <RETURN> to return to main menu Return LAT Setup Utility (continued on next page) Configuring Peripherals 9–11
  • 282.
    Adding Terminals ona Terminal Server Example 9–2 (Cont.) Using the latsetup Utility The latsetup program provides assistance in setting up LAT on your system. If this is the first time running latsetup on this system, it is recommended to select the Initial LAT Setup option. Exit Initial LAT Setup Create Additional Devices Start/Stop LAT Enable/Disable LAT Automatic Startup/Shutdown Undo LAT Setup # Controlling the LAT Service The latcp command controls and manages the LAT terminal service. It allows you to start and stop LAT service and modify and display configuration characteristics. Some latcp options: -d Displays LAT host name and status information -s Starts LAT service; enables connections from LAT terminal servers to host -h Halts LAT service -g group,... Adds group codes to the groups enabled for your host -P tty,... Sets a list of ttys as being available only for host-initiated connections For example, to set up a host-initiated connection for a printer connected to a terminal server port: latcp -A -P tty -H node -R port [-Q] • tty is the tty device to associate with the printer • node is the name of the terminal server where the printer is connected • port is the name of the port on the terminal server • -Q does not queue requests if the port is busy The latcp command on Digital UNIX is similar to lcp on ULTRIX. An alternative to the example is to specify the node and port in the /etc/printcap file. Do not specify them in both places. 9–12 Configuring Peripherals
  • 283.
    Configuring Disk andTape Drives Configuring Disk and Tape Drives Overview Dynamic Device Recognition (DDR) is a framework that describes the operating parameters and characteristics of SCSI devices to the SCSI CAM I/O subsystem. Beginning with Digital UNIX V4.0 it is the preferred method for recognizing SCSI devices over the static method for recognizing devices. Using this new method, DDR will modify the SCSI CAM system to extract as much information as possible from a device rather than depending on statically compiled tables. This provides the following benefits: • Devices are automatically recognized • Static configuration is not required • The system does not require a reboot • Enhanced user system availability occurs DDR Operations The default text database file is initially populated on the software distribution, and is used when the system is booted at installation to produce the binary database used by the kernel. Changes to the database might be required under the following conditions: • Devices are not compatible with the SCSI-2 standard, thus requiring different characteristics to be placed in the database • Optimization of device defaults Modification steps: 1. Device characteristic changes are edited into the text database file /etc/ddr.dbase. 2. The ddr_config utility is invoked to read the text file. 3. Assuming no error in the format, the binary output is placed into the binary database /etc/ddr.db. 4. The ddr_config utility notifies the kernel of the new modification. 5. The kernel then synchronizes its in-memory device tables with the definitions in the binary database file. Since this mechanism is dynamic, devices may be automatically configured into the kernel. Special handling with the ddr_config utility is only required for nonstandard devices. Modification Procedures Refer to the System Administration Manual Chapter 5 for procedural task details to modify the binary database. Configuring Peripherals 9–13
  • 284.
    Configuring a Printerwith CDE Printer Configuration Configuring a Printer with CDE Printer Configuration Overview Digital UNIX Version 4.0 systems with graphics capability will load and configure the new Common Desktop Environment (CDE) automatically at boot time. This enables the user to invoke the CDE Printer Configuration system administration application. This application is used primarily to configure printers in the following ways: • Add a printer • Modify a printer • Select a printer for the system default printer • Deconfigure a printer This is the recommended way of configuring a printer in the Digital UNIX print system. Note that the CDE Printer Configuration does not have the ability to control printers other than for the initial configuration. These controls reside in the traditional utility lpc or CDE Printer Manager application to manage print jobs and queues. Using the CDE Printer Configuration The CDE Printer Configuration is invoked in the same manner as the other applications in the Application Manager - Configuration window. Double-click the Print icon. At this point, the Get Password Pop-up window is displayed and you must enter the root password to continue. Figure 9–2 Starting Printer Configuration 9–14 Configuring Peripherals
  • 285.
    Configuring a Printerwith CDE Printer Configuration CDE Printer Configuration Options Four configuration options are available in the Printer Configuration window (shown in the next figure): Figure 9–3 Printer Configuration • Define Configuration... - adds a new printer to the system • Modify Configuration... - allows one or more parameters to be changed • Set as Default Printer - selects the default printer for the system; user would see this as a shortcut • Deconfigure - removes a printer which had been previously configured The Printer Configuration window appears initially with the Available Printer Types: list box showing printer types beginning with remote. Configuring a Remote Printer Select remote (highlighted in the previous figure) as the printer type and then click the Define Configuration... button to begin the configuration procedure. This causes the Remote Printer Settings window to be displayed. The entry fields are: • Printer Names: - the application will assign this variable. In this case it is lp0, since no other printer is yet configured. • Printer Aliases: - is optional • Remote machine name (rm): - is required and must be a valid host whose printer you intend to access. Configuring Peripherals 9–15
  • 286.
    Configuring a Printerwith CDE Printer Configuration • Remote printer name (rp): - must be a valid printer configured on the remote host. Figure 9–4 Remote Printer Settings You must click the Commit button to complete the configuration even if you did not make changes. The CDE Printer Configuration will set all required parameters based on the type of printer selected. The Advanced... Button The Advanced... button displays the Advanced Remote Printer Settings window where the user can: • Enter comments about the printer • Change one or more default parameters In this example the comment 2cents werth has already been entered. The second comment testing is ready to be added by clicking the Add button. 9–16 Configuring Peripherals
  • 287.
    Configuring a Printerwith CDE Printer Configuration Figure 9–5 Advanced Remote Printer Settings Window There are five variables used for configuring this remote printer. The Error Log File Name (lf): entry field and the Spooling directory (sd): entry field are filled in by the application. The Max file size (mx): entry field is left empty by default. In this case, 0 was entered to indicate that there is no maximum file size imposed on any files sent to the remote printer. Click OK when all option entries are correct. This will dismiss the Advanced Remote Printer Settings window and bring the user back to the Remote Printer Settings window. Click the Commit button to complete the configuration. The /etc/printcap File When a file is scheduled to be printed the print daemon will scan the /etc/printcap file to determine printer characteristics. The entry in this file is created by the CDE Printer Configuration application when the user clicks on the Commit button of the Remote Printer Settings window. The contents of this file are shown below using the more /etc/printcap command. Configuring Peripherals 9–17
  • 288.
    Configuring a Printerwith CDE Printer Configuration $ more /etc/printcap # 2cents worth lp0|0|don: :lf=/usr/adm/lp0err: :lp=: :mx#0: :rm=2cents: :rp=worth: :sd=/usr/spool/lpd0: printcap: END Configuring a Local Printer When the printer type selected is any other than remote (in the Printer Configuration window), a local printer setup is assumed and the Local Printing Settings window is displayed. The Printer Names: entry field is automatically filled with lp1,1; because this is the second printer to be configured. It is given an alias which helps to identify it and make life simple for the user. A new setting (not used when setting remote printer variables) is the Connection type (ct):. This has a choice of two radio buttons. First is the Direct connection implying either a serial or parallel connection directly to this host. The other button is a local area transport (LAT) connection which is chosen for this example. Figure 9–6 Local Printer Settings Window The LAT specification: toggle buttons allow you one of two choices: • by Port - this is the selection to use a singularly defined port on a LAT server. 9–18 Configuring Peripherals
  • 289.
    Configuring a Printerwith CDE Printer Configuration • by Service - defines a service where more than one port is configured. This is used to construct a pool of printers where a print job would be queued to an idle printer. In this example the by Port toggle button is chosen and Printer Configuration assigns a default in the Device pathname (lp): entry field. The user must enter the LAT server nodename (Ts): and the Port name (Op):. In this case, 22prnt is the the Port name which is already defined and the single port on the chosen LAT server 3cents. The Advanced... button is used to either examine the printer characteristic settings or modify them. In the next figure, the Accounting file name (af): entry field is filled by the Printer Configuration as well as the Stty baud rate (br): entry field. Other characteristics are visible using the vertical scroll bar. Figure 9–7 Advanced Local Printer Settings Configuring Peripherals 9–19
  • 290.
    Configuring a Printerwith CDE Printer Configuration Local Printer /etc/printcap As with the remote printer configuration, the /etc/printcap file needs to be updated. Shown here are all the characteristics for the printer lp1; an lno3r located at pole 2-2. # ln03r # pole 2-2 lp1|1|ln03: :af=/usr/adm/lp1acct: :br#9600: :ct=lat: :fc#0177777: :fs$03: :if=/usr/lbin//n03rof: :if=/usr/adm/lp1err: :lp=/dev/lat/636: :mc#20: :mx#0: :of=/usr/1bin/ln03rof: :pl#66: :pw#80: :rw: :sd=/usr/spool/lpd1: :xc#0177777: :xf=/usr/lbin/xf: :xs#044000: :Op=22prnt: :Ts=3cents printcap: END The br parameter specifies the baud rate for the printer. The baud rate is dependent upon the printer hardware. Consult your printer hardware manual for the correct baud rate. The br parameter is only applicable for tty devices, that is, serial. This parameter has no effect on printers connected to the console port or to printers connected on a parallel port. 9–20 Configuring Peripherals
  • 291.
    Managing the PrintSystem Managing the Print System How Printing Works The print system on Digital UNIX is a combination of the UNIX System V print system and the BSD UNIX print system. Some commands from UNIX System V : lp(1), lpstat(1). Some commands from BSD UNIX: lpr(1), lpq(1), lprm(1), lpc(8). On Digital UNIX systems, printing is controlled by the lpd(8) printer daemon. • lpd manages a printer spooling system, where a file is placed in a queue or spooling directory until the printer can print it. • lpd is usually started when the system goes into multiuser mode. It prints any files that were not printed before shutdown. It then waits for print requests. • When you use lpr(1) to print a file, it activates the lpd daemon, and it copies the file to the printer’s spooling directory. Control (cf) file specifies the name of the user file to be printed and printing instructions. Data (df) file contains the formatted text to be printed. • lpd forks a copy of itself to handle the request. Even though lpd is running on the system, there is no daemon present on the queue until a print request is submitted and lpd forks. lpd reads the /etc/printcap file to determine printer characteristics. If the printer is remote, lpd communicates with the lpd on the remote system, transfers the data and control files there, then deletes the local copies. lpd scans the spooling directory for a lock file. * Contains the process identification number of the daemon currently printing a file and the control file name. * If there is no lock file, lpd can create the lock file and print the first file in the queue. * The lock file prevents two daemons from working on the same printer queue. lpd also maintains a status file describing the current printer status. After a file has been printed, lpd removes the control and data files and updates the status file. Configuring Peripherals 9–21
  • 292.
    Managing the PrintSystem This lpd exists as long as there are files in this queue. Print System Control Commands The following table lists the main commands to control the print system. Table 9–1 Print System Commands Command Function lp(1) Creates a print request lpr(1) Creates a print request lpq(1) Displays a printer queue lprm(1) Removes print requests from a queue lpstat(1) Displays printer status lpc(8) Enables or disables a printer or printer queue; rearranges the order of jobs in a queue; checks the status of a printer, a queue and the printer daemon lptest(8) Generates a test pattern CDE Print Manager Displays print job status, finds a print job (among known printers), and allows user to select printers to be displayed in the Print Manager window See the Reference Pages for more information. Note PrintServer printers require special software. Using the lptest Command The lptest(8) command generates a ripple test pattern of printable ASCII characters to standard output. It can be used by anyone to test terminals and printers. The format for the lptest command is: lptest [length [count]] • length specifies the length of the output line; default is 79 characters. • count specifies the number of output lines; default is 200 lines. When count is specified, length must also be specified. To send the test pattern to a printer, you can redirect standard output # lptest > /dev/tty02 # lptest | lpr - -P2 The following is an example of the lptest command. 9–22 Configuring Peripherals
  • 293.
    Managing the PrintSystem Example 9–3 Using the lptest Command # lptest 45 10 !"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLM "#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN #$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO $%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOP %&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQ &’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR ’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRS ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU *+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUV # Using the lpc Command lpc(8) is the line printer control program. Configuring Peripherals 9–23
  • 294.
    Managing the PrintSystem Table 9–2 Line Printer Control Commands lpc Command Function abort {all | printer} Terminates an active spooling daemon on the local host, then disables printing (preventing new daemons from starting). This is usually used with start to restart a hung printer daemon (that is, lpq reports daemon present, but nothing is printing). disable {all | printer} Turns off the queue(s). (Sets group execute permission on the lock file.) enable {all | printer} Allows spooling on the queue(s). (Removes group execute permission on the lock file.) stop {all | printer} Stops the daemon after the current job completes and disables printing. (Sets owner execute permission on the lock file.) start {all | printer} Enables printing and starts a daemon for the printer(s). (Removes owner execute permission on the lock file.) restart {all | printer} Attempts to start a new daemon. This is useful when the daemon fails unexpectedly, leaving jobs in the queue (and lpq reports "No daemon present"). status [printer] Displays the status of daemons and queues. up [all | printer] Enables queuing and printing and starts a new daemon. topq printer [job] [user] Moves jobs to the top of the printer queue. You need queuing enabled and printing enabled in order to print. The following example shows some typical lpc commands and the resulting lpc response. 9–24 Configuring Peripherals
  • 295.
    Managing the PrintSystem Example 9–4 Using the lpc Command # lpc stat lp: printer is on device ’/dev/tty00’ speed 4800 queuing is enabled printing is enabled no entries no daemon present # lpc lpc> disable lp lp: queuing disabled lpc> stat lp: printer is on device ’/dev/tty00’ speed 4800 queuing is disabled printing is enabled no entries no daemon present lpc> q # Configuring Peripherals 9–25
  • 296.
    Summary Summary Device Files Specialfiles in /dev provide access to devices. Each device is identified by a device number, which consists of two parts: • Major number — identifies the driver or type of device • Minor number — interpreted by the driver; usually identifies the particular device; often called the unit number Configuring Terminals To add terminals to your system on a statically configured driver: • Add the device definition to the system configuration file and rebuild the kernel. • Shutdown the system and connect the controller. • Create the special files using MAKEDEV(8). • Add the new tty lines to the /etc/inittab(4) file. • Add the new tty lines to the /etc/ttys(4) file. To add a set of 16 pseudoterminals to your system: • Increase the value in the pseudo-device pty entry in the system configuration file and rebuild the kernel. • Create the special files using MAKEDEV(8). • Add the new tty lines to the /etc/ttys(4) file. LAT Terminal Servers Digital UNIX supports the LAT protocol for communicating with terminal servers. Adding Terminals on a Terminal Server To configure the LAT devices, use the following procedure. 1. Verify that options LAT is in your system configuration file. If not, add it, rebuild and boot the new kernel. 2. Use latsetup to create the LAT device special files and start the LAT. The latcp command is used to control and manage the LAT terminal service. It allows you to start and stop LAT service, modify and display configuration characteristics. Configuring Disks and Tape Drives To add a disk or tape drive with a statically configured driver: • Shut down the system and connect the device. • Boot the generic kernel /genvmunix. • Add the device definition to the system configuration file and rebuild the kernel. • Create the special files using the MAKEDEV(8) command. 9–26 Configuring Peripherals
  • 297.
    Summary Configuring a Printer withthe CDE Printer Configuration Digital UNIX Version 4.0 systems with graphics capability will load and configure the new Common Desktop Environment (CDE) automatically at boot time. This enables the user to invoke the CDE Print Manager system administration application. This application is used primarily to configure printers in the following ways: • Add a printer • Modify a printer • Select a printer for the system default printer • Deconfigure a printer Managing the Print System On Digital UNIX systems, printing is controlled by the lpd(8) printer daemon, which manages a spooling system. There are a number of commands to control the print system: Command Function lp(1) Creates a print request lpr(1) Creates a print request lpq(1) Displays a printer queue lprm(1) Removes print requests from a queue lpstat(1) Displays printer status lpc(8) Enables or disables a printer or printer queue; rearranges the order of jobs in a queue; checks the status of a printer, a queue, and the printer daemon lptest(8) Generates a test pattern Configuring Peripherals 9–27
  • 298.
    Exercises Exercises Device Files 1.Bring your system to console level and invoke the help command. 2. Issue the command(s) to show the devices on the system and boot the system. Configuring Terminals 1. Check the ttys(4) man page. a. What are the possible values for the third field? b. What would be the entry for ttyq5 allowing root to log in? 2. If your system allows a terminal controller option, use MAKEDEV(8) to create the device files and add the new entries to the inittab(4) file. 3. Create the next set of pseudoterminals. 4. Change the status of the following terminal lines: a. Enable root logins on tty02 b. Disable logins on tty03 Adding Terminals on a Terminal Server 1. Verify that Options LAT is in your system configuration file. 2. Run latsetup and create a set of LAT devices. Dynamic Device Recognition Disk and tape devices are automatically configured. Check the drives configured in your system configuration file. 1. Check the drives found in your /etc/ddr.dbase file. 2. Check the drives configured in your system configuration file. Adding a Printer with CDE Printer Configuration 1. Add a remote printer and remove the size restriction. 2. Add a local printer configured on a LAT server. Note Your instructor will give you the host names, print queue names, and baud rates to use for the available classroom printers. 9–28 Configuring Peripherals
  • 299.
    Exercises Managing the Print System 1.Use the lptest(8) command. a. Try lptest without options. b. Generate a test pattern 65 characters wide and 25 lines long. c. Generate a test pattern 10 lines long. d. If a printer is available on your system, redirect output from the test to the printer. 2. Use the lpc(8) command. a. Check the status. b. Disable queuing on one printer. c. Disable printing on that printer. d. Enable queuing. e. Enable printing. f. Enable everything and restart the daemon (up command). Configuring Peripherals 9–29
  • 300.
    Solutions Solutions Device Files 1.Power up the system or shut down and halt the system. You should see the prompt >>>. Type help. 2. On an Alpha AXP system, use the commands: show config show device Configuring Terminals 1. a. none for terminal lines and network for pseudoterminal lines b. ttyq5 none network secure ttyq5 is a pseudoterminal line 2. # cd /dev # MAKEDEV mdc0 MAKEDEV: special file(s) for mdc0: tty02 tty03 tty04 tty05 tty06 tty07 tty08 tty09 tty10 tty11 # vi /etc/inittab . . . tty02:23:respawn:/usr/sbin/getty /dev/tty02 9600 vt100 tty03:23:respawn:/usr/sbin/getty /dev/tty03 9600 vt100 . . . tty11:23:respawn:/usr/sbin/getty /dev/tty11 9600 vt100 3. # cd /dev # MAKEDEV pty2 MAKEDEV: special file(s) for pty2: ptyr0 ttyr0 ptyr1 ttyr1 ptyr2 ttyr2 ptyr3 ttyr3 ptyr4 ttyr4 ptyr5 ttyr5 ptyr6 ttyr6 ptyr7 ttyr7 ptyr8 ttyr8 ptyr9 ttyr9 ptyra ttyra ptyrb ptyrb ptyrc ttyrc ptyrd ttyrd ptyre ttyre ptyrf ttyrf 4. a. Edit /etc/securettys for the entry tty02 none none secure b. Edit /etc/inittab for the entry tty03:23:off:/usr/sbin /getty /dev/tty03 9300 vt100 9–30 Configuring Peripherals
  • 301.
    Solutions Adding Terminals on a Terminal Server 1. #grep LAT /sys/conf/TINKER options LAT 2. See the example in the text. Dynamic Device Recognition 1. # more /etc/ddr.dbase 2. # grep drive /sys/conf/yourhostname Adding a Printer with CDE Printer Configuration 1. Similar to the "remote" example in the text. 2. See the local printer example in the text. Managing the Print System 1. Use lptest a. # lptest !"#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmno "#$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnop #$%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopq $%&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqr %&’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrs &’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrst ’()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrstu ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrstuv )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_‘abcdefghijklmnopqrstuvw . . . b. # lptest 65 25 c. # lptest 79 10 d. # lptest 79 10 >/dev/lp0 2. Use lpc Configuring Peripherals 9–31
  • 302.
    Solutions # lpc lpc> stat lp: printeris on device ’/dev/lp’ speed -1 queuing is enabled printing is enabled no entries no daemon is present lpc> disable lp lp: queuing disabled lpc> stop lp lp: printing disabled lpc> enable lp lp: queuing enabled lpc> start lp lp: printing enabled daemon started lpc> up all lp: queuing enabled printing enabled daemon started lpc> q # 9–32 Configuring Peripherals
  • 303.
    Index A address Ethernet, 6–6 Internet, 6–6 AdvancedFile System See AdvFS AdvFS, 2–25, 2–34 ARC, 4–2 ARC console, 4–7 ARC Multiboot, 4–7 ARP Address Resolution Protocol, 6–6 B backup, 2–19, 2–24 Berkeley fast file system, 2–27 booting, 3–16 initializing the kernel, 3–17 bootstrapping process See booting broadcast message, 6–10 Broadcast Message, 3–12 BSD, 1–8 bufcache, 8–5 buffer cache, 2–26 C CDE, 1–17 CDE License Manager, 7–14 CDE Print Manager, 9–14 CDE Shutdown, 3–11 CDFS, 2–25 client-server model, 6–4 config, 8–6 connection-oriented mode, 6–4 connectionless mode, 6–4 console commands, 4–6 Console firmware services, 4–4 cylinder, 2–5 D DailyAdmin window, 3–11 DDR, 9–13 device drivers, 9–2 df, 7–3 df(1), 2–21, 2–22 disk drive Figure, 2–4 disklabel(8), 2–21, 2–22 doconfig(8), 8–10 dynamic configuration, 8–2, 9–2 E Edit List, 7–16 Edit New, 7–16 /etc/hosts, 6–7, 6–12 /etc/hosts.equiv, 6–12, 6–13 /etc/hosts.lpd, 6–12, 6–13 /etc/inetd.conf, 6–12, 6–14 /etc/inittab, 9–7 /etc/networks, 6–12, 6–15 /etc/printcap, 6–14, 9–21 /etc/protocols, 6–12, 6–15 /etc/securettys, 1–16 /etc/services, 6–12, 6–16 F fasthalt(8), 3–8 FFM, 2–25 File domain, 2–38 File Open, 7–17 Fileset, 2–39 firmware update, 4–9 fsck(8), 2–21, 2–22 G gateway, 6–5 getty(8), 9–7 Index–1
  • 304.
    H halt(8), 3–7 head, 2–5 I init(8),3–8, 9–7 initdefault, 3–22 initialization files, 3–18 /sbin/rc*.d, 3–24 Initialization files /sbin/rc*.d, 3–26 Internet Domain Name Service, 6–7 IP Internet Protocol, 6–6 ISO 9660-1988, 2–25 K kernel, 1–6, 1–7, 8–2 Mach, 1–8 L LAT, 9–9 latcp(8), 9–12 latsetup(8), 9–10 example, 9–10 licenses required, 7–15 lmf, 7–11 LMF, 7–9 lmfsetup, 7–12 Logical Storage Manager See LSM lp(1), 9–22 lpc(8), 9–22, 9–23 lpd(8), 9–21 lpq(1), 9–22 lpr(1), 9–22 lprm(1), 9–22 lpstat(1), 9–22 lptest(8), 9–22 LSM, 2–38 M MAKEDEV, 9–8 MAKEDEV(8), 9–7 maxusers, 8–5 MFS, 2–25 N netmask, 6–10 newfs(8), 2–10, 2–21, 2–22 NFS, 2–25 No Disk Sync, 3–13 O OSF/1, 1–8 P PAK, 7–9, 7–14 partition size change, 2–21 performance improve by dividing swap space, 2–19, 2–24 improve by separating file systems, 2–19, 2–24 platter, 2–4 Preshutdown Script, 3–12 protocol, 6–4 pseudodevice, 8–6 R reboot methods, 3–4 reboot(8), 3–9 rebooting, 3–9 remote installation service, 7–4 .rhosts, 6–13 root login, 1–15 run level, 9–7 S /sbin/rc*.d, 3–24, 3–26 sector, 2–5 setld(8), 7–3 shutdown methods, 3–4 Shutdown Manager window, 3–12 shutdown(8), 3–4, 8–10 software subset, 7–3 special files, 9–2 spooling, 9–21 SRM, 4–2 SRM console command list, 4–6 stanza -format, 8–17 static configuration, 8–2, 9–2 su(1), 1–15 subnetwork, 6–9 Index–2
  • 305.
    superuser, 1–15 surface, 2–4 Switchingfrom ARC to SRM, 4–8 /sys/conf/GENERIC, 8–4 /sys/conf/NAME, 8–4 LAT, 9–10 /sys/conf/param.c, 8–4 T timezone, 8–5 track, 2–5 U UFS, 2–25, 2–27, 2–36 UNIX, 1–6 user ID, 1–15 V /var/adm/sialog, 1–16 VFS, 2–25 vmunix, 8–10 /vmunix, 1–7 vnode, 2–26 Volume, 2–38 Index–3