SUN - System Administration Guide
SUN - System Administration Guide
SUN - System Administration Guide
Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A.
Part No: 817198518 September 2008
Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries. U.S. Government Rights Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. This distribution may include materials developed by third parties. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, Java, JavaHelp, J2EE, JumpStart, Solstice, Sun Blade, SunSolve, SunSpectrum, ZFS, , Java, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. or its subsidiaries in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. DLT is claimed as a trademark of Quantum Corporation in the United States and other countries. Netscape and Mozilla are trademarks or registered trademarks of Netscape Communications Corporation in the United States and other countries. The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license agreements. Products covered by and information contained in this publication are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical or biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited. DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright 2008 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Tous droits rservs.
Sun Microsystems, Inc. dtient les droits de proprit intellectuelle relatifs la technologie incorpore dans le produit qui est dcrit dans ce document. En particulier, et ce sans limitation, ces droits de proprit intellectuelle peuvent inclure un ou plusieurs brevets amricains ou des applications de brevet en attente aux Etats-Unis et dans d'autres pays. Cette distribution peut comprendre des composants dvelopps par des tierces personnes. Certaines composants de ce produit peuvent tre drives du logiciel Berkeley BSD, licencis par l'Universit de Californie. UNIX est une marque dpose aux Etats-Unis et dans d'autres pays; elle est licencie exclusivement par X/Open Company, Ltd. Sun, Sun Microsystems, le logo Sun, le logo Solaris, le logo Java Coffee Cup, docs.sun.com, Java, JavaHelp, J2EE, JumpStart, Solstice, Sun Blade, SunSolve, SunSpectrum, ZFS, , Java et Solaris sont des marques de fabrique ou des marques dposes de Sun Microsystems, Inc., ou ses filiales, aux Etats-Unis et dans d'autres pays. Toutes les marques SPARC sont utilises sous licence et sont des marques de fabrique ou des marques dposes de SPARC International, Inc. aux Etats-Unis et dans d'autres pays. Les produits portant les marques SPARC sont bass sur une architecture dveloppe par Sun Microsystems, Inc. Quantum Corporation riclame DLT comme sa marque de fabrique aux Etats-Unis et dans d'autres pays. Netscape et Mozilla sont des marques de Netscape Communications Corporation aux Etats-Unis et dans d'autres pays. L'interface d'utilisation graphique OPEN LOOK et Sun a t dveloppe par Sun Microsystems, Inc. pour ses utilisateurs et licencis. Sun reconnat les efforts de pionniers de Xerox pour la recherche et le dveloppement du concept des interfaces d'utilisation visuelle ou graphique pour l'industrie de l'informatique. Sun dtient une licence non exclusive de Xerox sur l'interface d'utilisation graphique Xerox, cette licence couvrant galement les licencis de Sun qui mettent en place l'interface d'utilisation graphique OPEN LOOK et qui, en outre, se conforment aux licences crites de Sun. Les produits qui font l'objet de cette publication et les informations qu'il contient sont rgis par la legislation amricaine en matire de contrle des exportations et peuvent tre soumis au droit d'autres pays dans le domaine des exportations et importations. Les utilisations finales, ou utilisateurs finaux, pour des armes nuclaires, des missiles, des armes chimiques ou biologiques ou pour le nuclaire maritime, directement ou indirectement, sont strictement interdites. Les exportations ou rexportations vers des pays sous embargo des Etats-Unis, ou vers des entits figurant sur les listes d'exclusion d'exportation amricaines, y compris, mais de manire non exclusive, la liste de personnes qui font objet d'un ordre de ne pas participer, d'une faon directe ou indirecte, aux exportations des produits ou des services qui sont rgis par la legislation amricaine en matire de contrle des exportations et la liste de ressortissants spcifiquement designs, sont rigoureusement interdites. LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
080925@20795
Contents
Preface ...................................................................................................................................................17
Solaris Management Tools (Road Map) ........................................................................................... 23 What's New in Solaris Management Tools? ..................................................................................... 23 Matrix of Solaris Management Tools and Supported Releases ...................................................... 25 Feature Descriptions for Solaris Management Tools ...................................................................... 25 Feature Descriptions for Solaris 9 Management Tools ................................................................... 26 Availability of Solaris Management Commands ............................................................................. 27 Solaris 10 System Management Commands ............................................................................ 27 For More Information About Solaris Management Tools ............................................................. 29
Working With the Solaris Management Console (Tasks) .............................................................. 31 Solaris Management Console (Overview) ........................................................................................ 31 What Is the Solaris Management Console? ............................................................................... 31 Solaris Management Console Tools .......................................................................................... 32 Why Use the Solaris Management Console? ............................................................................ 34 Organization of the Solaris Management Console .................................................................. 34 Changing the Solaris Management Console Window ............................................................ 36 Solaris Management Console Documentation ........................................................................ 36 How Much Role-Based Access Control? ................................................................................... 36 Becoming Superuser (root) or Assuming a Role ............................................................................ 38 How to Become Superuser (root) or Assume a Role ................................................................ 38 Using the Solaris Management Tools With RBAC (Task Map) ..................................................... 40 If You Are the First to Log in to the Console ............................................................................ 41 Creating the Primary Administrator Role ................................................................................ 41 How to Create the First Role (Primary Administrator) ........................................................... 42 How to Assume the Primary Administrator Role .................................................................... 43
3
Contents
Starting the Solaris Management Console ....................................................................................... 44 How to Start the Console as Superuser or as a Role ................................................................. 44 Using the Solaris Management Tools in a Name Service Environment (Task Map) .................. 45 RBAC Security Files ..................................................................................................................... 46 Prerequisites for Using the Solaris Management Console in a Name Service Environment ................................................................................................................................ 47 Management Scope ...................................................................................................................... 48 /etc/nsswitch.conf File ........................................................................................................... 48 How to Create a Toolbox for a Specific Environment ............................................................. 48 How to Add a Tool to a Toolbox ................................................................................................ 50 How to Start the Solaris Management Console in a Name Service Environment ................ 51 Adding Tools to the Solaris Management Console ......................................................................... 51 How to Add a Legacy Tool to a Toolbox ................................................................................... 51 How to Install an Unbundled Tool ............................................................................................ 52 Troubleshooting the Solaris Management Console ........................................................................ 53 How to Troubleshoot the Solaris Management Console ........................................................ 53
Working With the Sun Java Web Console (Tasks) ........................................................................... 55 What's New in Administering the Java Web Console? ................................................................... 55 Java Web Console Server Management ..................................................................................... 55 Applications That Are Available to the Java Web Console ..................................................... 56 Java Web Console (Overview) ........................................................................................................... 56 What Is the Java Web Console? .................................................................................................. 57 Java Web Console Management Commands ........................................................................... 58 Supported Web Browsers ............................................................................................................ 58 Getting Started With the Java Web Console (Task Map) ............................................................... 58 Getting Started With the Java Web Console .................................................................................... 59 How to Start Applications From the Java Web Console's Launch Page ................................ 60 Managing the Console Service ........................................................................................................... 62 How to Start the Console Service ............................................................................................... 62 How to Enable the Console Service to Run at System Start .................................................... 62 How to Stop the Console Service ................................................................................................ 63 How to Disable the Console Service .......................................................................................... 63 Configuring the Java Web Console ................................................................................................... 64 How to Change Java Web Console Properties .......................................................................... 66
Contents
Java Web Console User Identity ................................................................................................. 68 Using the Console Debug Trace Log ......................................................................................... 69 Troubleshooting the Java Web Console Software (Task Map) ...................................................... 70 Troubleshooting the Java Web Console Software ........................................................................... 72 Checking Console Status and Properties .................................................................................. 72 Problems Accessing the Console ................................................................................................ 74 Problems with Application Registration ................................................................................... 75 Java Web Console Reference Information ....................................................................................... 79 Java Web Console Security Considerations .............................................................................. 79 Specifying Authorizations With the authTypes Tag ............................................................... 81 Enabling Remote Access to the Java Web Console .................................................................. 83 Disabling Remote Access to the Java Web Console ................................................................. 83 Changing Internal Passwords for Java Web Console .............................................................. 84
Managing User Accounts and Groups (Overview) ......................................................................... 85 What's New in Managing Users and Groups? .................................................................................. 85 Tools for User Account and Group Account Management ........................................................... 86 What Are User Accounts and Groups? ............................................................................................. 86 User Account Components ........................................................................................................ 87 Guidelines for Using User Names, User IDs, and Group IDs ................................................. 93 Where User Account and Group Information Is Stored ................................................................ 94 Fields in the passwd File .............................................................................................................. 94 Default passwd File ...................................................................................................................... 95 Fields in the shadow File .............................................................................................................. 96 Fields in the group File ................................................................................................................ 96 Default group File ........................................................................................................................ 96 Tools for Managing User Accounts and Groups ............................................................................. 98 Tasks for Solaris User and Group Management Tools ............................................................ 99 Managing Users and Resources With Projects ....................................................................... 101 Customizing a User's Work Environment ..................................................................................... 102 Using Site Initialization Files .................................................................................................... 103 Avoiding Local System References .......................................................................................... 104 Shell Features .............................................................................................................................. 104 Shell Environment ..................................................................................................................... 105 The PATH Variable ...................................................................................................................... 107
5
Contents
Locale Variables ......................................................................................................................... 108 Default File Permissions (umask) ............................................................................................. 109 User and Site Initialization Files Examples ............................................................................. 110
Managing User Accounts and Groups (Tasks) ............................................................................... 113 Setting Up User Accounts (Task Map) ........................................................................................... 113 Gathering User Information ..................................................................................................... 114 How to Customize User Initialization Files ............................................................................ 115 How to Add a Group With the Solaris Management Console's Groups Tool .................... 116 How to Add a User With the Solaris Management Console's Users Tool ........................... 117 Adding Groups and Users With Command-Line Tools ....................................................... 119 Setting Up Home Directories With the Solaris Management Console ............................... 120 How to Share a User's Home Directory ................................................................................... 120 How to Mount a User's Home Directory ................................................................................. 122 Maintaining User Accounts (Task Map) ........................................................................................ 123 Modifying User Accounts ......................................................................................................... 124 How to Modify a Group ............................................................................................................ 125 How to Delete a Group .............................................................................................................. 125 Administering Passwords ......................................................................................................... 126 Using Password Aging ............................................................................................................... 127 How to Disable a User Account ................................................................................................ 127 How to Change a User's Password ........................................................................................... 128 How to Set Password Aging on a User Account ..................................................................... 129 How to Delete a User Account ................................................................................................. 129
Managing Client-Server Support (Overview) ...............................................................................131 What's New in Managing Client-Server Support? ......................................................................... 131 Support for Specifying Platform by Using bootadm -p Command ..................................... 132 nfs4_domain Keyword Impacts Diskless Client Boot ........................................................... 132 x86: Diskless Client Changes in the GRUB Boot Environment ........................................... 132 x86: Changes to the smdiskless Command .......................................................................... 133 Where to Find Client-Server Tasks ................................................................................................. 133 What Are Servers, Clients, and Appliances? .................................................................................. 134 What Does Client Support Mean? ................................................................................................... 135 Overview of System Types ................................................................................................................ 135
System Administration Guide: Basic Administration September 2008
Contents
Description of a Server .............................................................................................................. 136 Stand-Alone Systems ................................................................................................................. 136 Diskless Clients .......................................................................................................................... 136 Description of an Appliance ..................................................................................................... 137 Guidelines for Choosing System Types ................................................................................... 137 Diskless Client Management Overview .......................................................................................... 138 OS Server and Diskless Client Support Information ............................................................. 138 Diskless Client Management Features .................................................................................... 139 Disk Space Requirements for OS Servers ................................................................................ 141
Managing Diskless Clients (Tasks) ..................................................................................................143 Managing Diskless Clients (Task Map) .......................................................................................... 143 Preparing for Managing Diskless Clients ....................................................................................... 145 x86: How to Prepare for Adding Diskless Clients in a GRUB Based Boot Environment .. 146 How to Prepare for Adding Diskless Clients in the Solaris 10 OS ........................................ 149 How to Add OS Services for Diskless Client Support ............................................................ 150 x86: How to Add a Diskless Client in the GRUB Based Boot Environment ....................... 153 How to Add a Diskless Client in the Solaris 10 OS ................................................................. 156 x86: How to Boot a Diskless Client With GRUB .................................................................... 158 SPARC: How to Boot a Diskless Client in the Solaris 10 OS ................................................. 159 How to Remove Diskless Client Support ................................................................................ 159 How to Remove OS Services for Diskless Clients ................................................................... 160 Patching Diskless Client OS Services .............................................................................................. 161 Displaying OS Patches for Diskless Clients ............................................................................ 161 How to Add an OS Patch for a Diskless Client ....................................................................... 162 Troubleshooting Diskless Client Problems .................................................................................... 164 Troubleshooting Diskless Client Installation Problems ....................................................... 164 Troubleshooting General Diskless Client Problems ............................................................. 168
Introduction to Shutting Down and Booting a System .............................................................. 173 What's New in Shutting Down and Booting a System .................................................................. 173 ZFS Boot Support ....................................................................................................................... 173 x86: New findroot Command ................................................................................................ 174 Support for Specifying Platform by Using bootadm Command ........................................... 174 Solaris SPARC Bootstrap Process Redesigned ....................................................................... 174
7
Contents
x86: Support for Using Power Button to Initiate System Shutdown .................................... 175 Where to Find Shut Down and Boot Tasks .................................................................................... 176 Shut Down and Boot Terminology ................................................................................................. 176 Guidelines for Shutting Down a System ......................................................................................... 177 Guidelines for Booting a System ...................................................................................................... 178 When to Shut Down a System .......................................................................................................... 179 When to Boot a System ..................................................................................................................... 180
Shutting Down and Booting a System (Overview) ...................................................................... 181 Fundamentals of the Solaris Boot Design ....................................................................................... 182 Understanding the New Solaris SPARC Boot Architecture ......................................................... 183 Packing and Unpacking the Miniroot ..................................................................................... 184 Software Installation and Upgrades ......................................................................................... 184 Installation Memory Requirements ......................................................................................... 184 Changes to the Network Boot Server Setup Process .............................................................. 185 Support for Booting Multiple Solaris Kernels ........................................................................ 185 Implementation of the Boot Archives on Solaris SPARC ............................................................. 185 x86: Administering the GRUB Bootloader ..................................................................................... 186 How GRUB Based Booting Works .......................................................................................... 186 GRUB Support for New findroot Command ....................................................................... 187 Booting From a ZFS Root File System ............................................................................................ 188 Solaris Installation Requirements for ZFS .............................................................................. 188 How Booting From a ZFS Root File System Works ............................................................... 188 SPARC: Boot Options That Support Booting From a ZFS Root File System ...................... 189 x86: Boot Options That Support Booting From a ZFS Root File System ............................ 190
10
Shutting Down a System (Tasks) ..................................................................................................... 191 Shutting Down the System (Task Map) .......................................................................................... 191 Shutting Down the System ............................................................................................................... 192 System Shutdown Commands ................................................................................................. 192 User Notification of System Down Time ................................................................................ 193 How to Determine Who Is Logged in to a System ................................................................. 194 How to Shut Down a Server ...................................................................................................... 194 How to Shut Down a Stand-Alone System ............................................................................. 198 Turning Off Power to All Devices ................................................................................................... 200
System Administration Guide: Basic Administration September 2008
Contents
11
Modifying Solaris Boot Behavior (Tasks) ....................................................................................... 201 Modifying Boot Behavior on SPARC Based Systems (Task Map) ............................................... 201 SPARC: Using the Boot PROM ................................................................................................ 202 SPARC: How to Find the PROM Revision Number for a System ......................................... 202 SPARC: How to Identify Devices on a System ........................................................................ 203 SPARC: How to Determine the Default Boot Device ............................................................ 205 SPARC: How to Change the Default Boot Device by Using the Boot PROM ..................... 205 SPARC: How to Change the Default Boot Device by Using the eeprom Command .......... 207 SPARC: Resetting the System ................................................................................................... 207 SPARC: How to Change the Default Kernel by Using the Boot PROM .............................. 208 SPARC: How to Change the Default Kernel by Using the eeprom Command ................... 208 Modifying Solaris Boot Behavior on x86 Based Systems (Task Map) ......................................... 209 Modifying Boot Behavior on x86 Based Systems ................................................................... 209 x86: Modifying Boot Behavior by Editing the GRUB Menu at Boot Time ......................... 211 Description of the GRUB Edit Menu ....................................................................................... 212 Boot Arguments You Can Specify When Editing the GRUB Menu at Boot Time ............ 212 x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time ................. 213 x86: Modifying Boot Behavior by Editing the menu.lst File ............................................... 215 x86: How to Modify Boot Behavior by Editing the menu.lst File ....................................... 216 x86: Locating the Active GRUB menu.lst File ....................................................................... 219 x86: Implementation of the findroot Command ................................................................. 219 x86: How to Add GRUB Menu Entries That Use the findroot Command ....................... 221
12
Booting a Solaris System (Tasks) .................................................................................................... 223 Booting a SPARC Based System (Task Map) ................................................................................. 223 Booting a SPARC Based System ....................................................................................................... 224 SPARC: How to Boot a System to Run Level 3 (Multiuser Level) ......................................... 225 SPARC: How to Boot a System to Run Level S (Single-User Level) ..................................... 226 SPARC: How to Boot a System Interactively .......................................................................... 227 SPARC: How to Boot a Solaris Kernel Other Than the Default Kernel ............................... 228 Booting From a ZFS Root File System on a SPARC Based System .............................................. 231 SPARC: How to List Available Bootable Datasets Within a ZFS Root Pool ........................ 231 SPARC: How to Boot From a ZFS Root File System .............................................................. 232
9
Contents
Booting the Failsafe Archive on a SPARC Based System .............................................................. 235 How to Boot the Failsafe Archive on a SPARC Based System ............................................... 236 Booting a SPARC Based System From the Network ...................................................................... 239 SPARC: How to Boot a System From the Network ................................................................ 240 Booting an x86 Based System by Using GRUB (Task Map) ......................................................... 241 x86: How to Boot a System to Run Level 3 (Multiuser) ......................................................... 242 x86: How to Boot a System to Run Level S (Single-User Level) ............................................ 244 x86: How to Boot a System Interactively ................................................................................. 246 Booting From a ZFS Root File System on an x86 Based System .................................................. 249 How to Display a List of the Available ZFS Bootable Environments on an x86 Based System .......................................................................................................................................... 249 How to Boot From a ZFS Root File System on an x86 Based System ................................... 250 Booting the Failsafe Archive on an x86 Based System .................................................................. 253 How to Boot the Failsafe Archive on an x86 Based System by Using GRUB ...................... 254 x86: How to Boot the Failsafe Archive to Forcibly Update a Corrupt Boot Archive ......... 256 Booting an x86 Based System from the Network ........................................................................... 258 x86: About DHCP Macros ........................................................................................................ 259 x86: How to Perform a GRUB Based Boot From the Network ............................................. 261 Troubleshooting Booting a System (Task Map) ............................................................................ 262 SPARC: How to Stop the System for Recovery Purposes ...................................................... 263 x86: How to Stop a System for Recovery Purposes ................................................................ 263 SPARC: How to Boot a System for Recovery Purposes ......................................................... 264 SPARC: Forcing a Crash Dump and Reboot of the System ................................................... 266 x86: Forcing a Crash Dump and Reboot of the System ......................................................... 268 SPARC: How to Boot the System With the Kernel Debugger (kmdb) .................................. 269 x86: How to Boot a System With the Kernel Debugger in the GRUB Boot Environment (kmdb) ........................................................................................................................................... 270
13
Managing the Solaris Boot Archives (Tasks) ................................................................................. 273 Managing the Solaris Boot Archives (Task Map) .......................................................................... 273 Description of the Solaris Boot Archives ........................................................................................ 274 Managing the boot-archive Service .............................................................................................. 275 How to Enable or Disable the boot-archive Service ............................................................ 275 How to Update an Inconsistent Boot Archive by Clearing the boot-archive Service ..... 276 Using the bootadm Command to Manage the Boot Archives ...................................................... 278 How to Manually Update the Boot Archive ............................................................................ 278
System Administration Guide: Basic Administration September 2008
10
Contents
How to Manually Update the Boot Archive on a RAID-1 (Mirror) Volume ..................... 279 How to List Contents of the Boot Archive .............................................................................. 285 x86: How to Locate the Active GRUB Menu and List Current Menu Entries ..................... 286 x86: How to Set the Default Boot Entry for the Active GRUB Menu ................................... 286
14
x86: GRUB Based Booting (Reference) ........................................................................................... 289 x86: Boot Processes ........................................................................................................................... 289 x86: System BIOS ....................................................................................................................... 289 x86: Kernel Initialization Process ............................................................................................. 290 x86: Solaris Support for the GRUB Bootloader ............................................................................. 290 x86: GRUB Terminology .......................................................................................................... 290 x86: Functional Components of GRUB .................................................................................. 292 How Multiple Operating Systems Are Supported by GRUB ................................................ 293 x86: Supported GRUB Implementations ................................................................................ 294
15
x86: Booting a System That Does Not Implement GRUB (Tasks) ................................................297 x86: Booting a System (Task Map) .................................................................................................. 297 x86: Booting a System That Does Not Implement GRUB ............................................................ 299 x86: How to Boot a System to Run Level 3 (Multiuser Level) ............................................... 299 x86: How to Boot a System to Run Level S (Single-User Level) ............................................ 302 x86: How to Boot a System Interactively ................................................................................. 303 x86: Booting From the Network ............................................................................................... 305 x86: How to Boot a System From the Network ....................................................................... 306 x86: Using the Device Configuration Assistant ...................................................................... 308 x86: How to Stop a System for Recovery Purposes ................................................................ 309 x86: How to Boot a System for Recovery Purposes ................................................................ 309 x86: How to Boot a System With the Kernel Debugger (kmdb) ............................................. 312 x86: Forcing a Crash Dump and Reboot of the System ......................................................... 314 x64: Troubleshooting a Failed 64-Bit Boot ............................................................................. 316 x86: Boot Processes (Reference) ...................................................................................................... 317 x86: Boot Subsystems ................................................................................................................ 317 x86: Boot Process ....................................................................................................................... 322 x86: Boot Files ............................................................................................................................. 323
11
Contents
16
Managing Services (Overview) ........................................................................................................325 Introduction to SMF ......................................................................................................................... 325 Changes in Behavior When Using SMF ......................................................................................... 326 SMF Concepts .................................................................................................................................... 327 SMF Service ................................................................................................................................ 327 Service Identifiers ....................................................................................................................... 328 Service States ............................................................................................................................... 329 SMF Manifests ............................................................................................................................ 329 SMF Profiles ................................................................................................................................ 330 Service Configuration Repository ............................................................................................ 330 SMF Repository Backups .......................................................................................................... 331 SMF Snapshots ........................................................................................................................... 331 SMF Administrative and Programming Interfaces ....................................................................... 331 SMF Command-Line Administrative Utilities ...................................................................... 332 Service Management Configuration Library Interfaces ........................................................ 332 SMF Components ............................................................................................................................. 332 SMF Master Restarter Daemon ................................................................................................ 332 SMF Delegated Restarters ......................................................................................................... 333 SMF and Booting ............................................................................................................................... 333 SMF Compatibility ............................................................................................................................ 334 Run Levels .......................................................................................................................................... 334 When to Use Run Levels or Milestones ................................................................................... 335 Determining a System's Run Level ........................................................................................... 336 /etc/inittab File ............................................................................................................................. 336 What Happens When the System Is Brought to Run Level 3 ................................................ 337
17
Managing Services (Tasks) ...............................................................................................................339 Managing Services (Task Map) ........................................................................................................ 339 Monitoring SMF Services ................................................................................................................. 340 How to List the Status of a Service ............................................................................................ 340 How to Show Which Services Are Dependent on a Service Instance .................................. 342 How to Show Which Services a Service Is Dependent On .................................................... 342 Managing SMF Services (Task Map) ............................................................................................... 343 Managing SMF Services .................................................................................................................... 343 Using RBAC Rights Profiles With SMF ................................................................................... 344
12
Contents
How to Disable a Service Instance ............................................................................................ 344 How to Enable a Service Instance ............................................................................................. 345 How to Restart a Service ............................................................................................................ 345 How to Restore a Service That Is in the Maintenance State .................................................. 346 How to Revert to Another SMF Snapshot ............................................................................... 346 How to Create an SMF Profile .................................................................................................. 347 How to Apply an SMF Profile ................................................................................................... 349 Changing Services Offered to the Network with generic*.xml .......................................... 349 Configuring SMF Services ................................................................................................................ 350 How to Modify a Service ........................................................................................................... 350 How to Change an Environment Variable for a Service ........................................................ 350 How to Change a Property for an inetd Controlled Service ................................................ 351 How to Modify a Command-Line Argument for an inetd Controlled Service ................. 353 How to Convert inetd.conf Entries ....................................................................................... 354 Using Run Control Scripts (Task Map) .......................................................................................... 355 Using Run Control Scripts ............................................................................................................... 355 How to Use a Run Control Script to Stop or Start a Legacy Service ..................................... 355 How to Add a Run Control Script ............................................................................................ 356 How to Disable a Run Control Script ...................................................................................... 357 Troubleshooting the Service Management Facility ....................................................................... 358 Debugging a Service That Is Not Starting ............................................................................... 358 How to Repair a Corrupt Repository ....................................................................................... 358 How to Boot Without Starting Any Services .......................................................................... 361 How to Force a sulogin Prompt If the system/filesystem/local:default Service Fails During Boot ................................................................................................................................ 362
18
Managing Software (Overview) ......................................................................................................365 What's New in Software Management in the Solaris Operating System? ................................... 366 Deferred-Activation Patching .................................................................................................. 366 Common Agent Container Included in the Solaris OS ......................................................... 366 Improvements to How patchadd -M Command Handles Multiple Patches ....................... 367 Package and Patch Tool Enhancements .................................................................................. 367 Where to Find Software Management Tasks ................................................................................. 368 Overview of Software Packages ....................................................................................................... 368 Signed Packages, Patches, and Software Updates .................................................................. 369
13
Contents
Tools for Managing Software Packages .......................................................................................... 372 Adding or Removing a Software Package (pkgadd) ...................................................................... 373 Key Points for Adding Software Packages (pkgadd) ...................................................................... 374 Guidelines for Removing Packages (pkgrm) ................................................................................... 374 Restrictions on Adding and Removing Software Packages and Patches for Solaris Releases That are Not Zones Aware ......................................................................................................................... 375 Avoiding User Interaction When Adding Packages (pkgadd) ..................................................... 375 Using an Administration File ................................................................................................... 375 Using a Response File (pkgadd) ................................................................................................ 376
19
Managing Software With Solaris System Administration Tools (Tasks) .................................. 377 Solaris Product Registry and Solaris GUI Installation Tools for Managing Software ............... 377 Adding Software With the Solaris Installation GUI ...................................................................... 378 How to Install Software With the Solaris Installation GUI Program ................................... 378 Managing Software With the Solaris Product Registry GUI (Task Map) ................................... 379 How to View Installed or Uninstalled Software Information With the Solaris Product Registry GUI ............................................................................................................................... 381 How to Install Software With the Solaris Product Registry GUI .......................................... 382 How to Uninstall Software With the Solaris Product Registry GUI .................................... 383 Managing Software With the Solaris Product Registry Command-Line Interface (Task Map) .................................................................................................................................................... 384 Managing Software With the Solaris Product Registry Command-Line Interface ................... 385 How to View Installed or Uninstalled Software Information (prodreg) ............................ 385 How to View Software Attributes (prodreg) .......................................................................... 388 How to Check for Software Dependencies (prodreg) ........................................................... 390 How to Identify Damaged Software Products (prodreg) ..................................................... 392 How to Uninstall Software (prodreg) ..................................................................................... 394 How to Uninstall Damaged Software (prodreg) .................................................................... 398 How to Reinstall Damaged Software Components (prodreg) ............................................. 401
20
Managing Software by Using Package Commands (Tasks) ....................................................... 405 Adding and Removing Signed Packages by Using the pkgadd Command (Task Map) ............ 405 Adding and Removing Signed Packages by Using the pkgadd Command ................................. 406 How to Import a Trusted Certificate From the Java Keystore (pkgadm addcert) ............. 406 How to Display Certificate Information (pkgadm listcert) .............................................. 408
14
Contents
How to Remove a Certificate (pkgadm removecert) ............................................................. 408 How to Set Up a Proxy Server (pkgadd) .................................................................................. 409 How to Add a Signed Package (pkgadd) .................................................................................. 410 Managing Software Packages by Using Package Commands (Task Map) ................................. 411 Using Package Commands to Manage Software Packages ........................................................... 412 How to Add Software Packages (pkgadd) ................................................................................ 412 Adding a Software Package to a Spool Directory ................................................................... 415 How to List Information About All Installed Packages (pkginfo) ...................................... 417 How to Check the Integrity of Installed Software Packages (pkgchk) ................................. 418 How to Check the Integrity of Installed Objects (pkgchk -p, pkgchk -P) ........................419 Removing Software Packages ................................................................................................... 421 How to Remove Software Packages (pkgrm) ........................................................................... 422
21
Managing Solaris Patches by Using the patchadd Command (Tasks) .......................................423 Types of Patches ................................................................................................................................. 424 Signed and Unsigned Patches ................................................................................................... 424 Accessing Solaris Patches ................................................................................................................. 424 Solaris Patch Numbering .......................................................................................................... 425 Managing Solaris Patches .......................................................................................................... 425 Managing Patches in the Solaris Operating System ...................................................................... 426 Determining Whether to Apply Signed or Unsigned Patches to Your System .................. 426 Solaris Patch Management Terms and Definitions ....................................................................... 426 Managing Solaris Patches by Using the patchadd Command (Task Map) ................................ 428 How to Import a Trusted Certificate to Your Package Keystore .......................................... 429 Exporting the Root CA Certificate From the Java Keystore .................................................. 430 How to Specify a Web Proxy ..................................................................................................... 431 Restrictions on Using patchadd -R to Create an Alternate root Path ............................... 432 How to Download and Apply a Solaris Patch ......................................................................... 432 How to Display Information About Solaris Patches .............................................................. 434 How to Remove a Solaris Patch by Using the patchrm Command ...................................... 434
16
Preface
System Administration Guide: Basic Administration is part of a set that includes a significant part of the SolarisTM system administration information. This guide contains information for both SPARC based and x86 based systems. This book assumes you have completed the following tasks:
Installed the SunOSTM 5.10 Operating System (Solaris OS) Set up all the networking software that you plan to use
For the Solaris 10 release, new features that might be interesting to system administrators are covered in sections called What's New in ... ? in the appropriate chapters.
Note This Solaris release supports systems that use the SPARC and x86 families of processor
architectures: UltraSPARC, SPARC64, AMD64, Pentium, and Xeon EM64T. The supported systems appear in the Solaris OS: Hardware Compatibility Lists at http://www.sun.com/bigadmin/hcl. This document cites any implementation differences between the platform types. In this document these x86 related terms mean the following:
x86 refers to the larger family of 64-bit and 32-bit x86 compatible products. x64 points out specific 64-bit information about AMD64 or EM64T systems. 32-bit x86 points out specific 32-bit information about x86 based systems.
For supported systems, see the Solaris OS: Hardware Compatibility Lists.
Preface
User accounts and groups, server and client support, shutting down and booting a system, managing services, and managing software (packages and patches) Terminals and modems, system resources (disk quotas, accounting, and crontabs), system processes, and troubleshooting Solaris software problems Removable media, disks and devices, file systems, and backing up and restoring data TCP/IP network administration, IPv4 and IPv6 address administration, DHCP, IPsec, IKE, Solaris IP filter, Mobile IP, IP network multipathing (IPMP), and IPQoS DNS, NIS, and LDAP naming and directory services, including transitioning from NIS to LDAP and transitioning from NIS+ to LDAP NIS+ naming and directory services Web cache servers, time-related services, network file systems (NFS and Autofs), mail, SLP, and PPP Solaris printing topics and tasks, using services, tools, protocols, and technologies to set up and administer printing services and printers Auditing, device management, file security, BART, Kerberos services, PAM, Solaris Cryptographic Framework, privileges, RBAC, SASL, and Solaris Secure Shell Resource management topics projects and tasks, extended accounting, resource controls, fair share scheduler (FSS), physical memory control using the resource capping daemon (rcapd), and resource pools; virtualization using Solaris Zones software partitioning technology and lx branded zones ZFS storage pool and file system creation and management, snapshots, clones, backups, using access control lists (ACLs) to protect ZFS files, using ZFS on a Solaris system with zones installed, emulated volumes, and troubleshooting and data recovery
System Administration Guide: Devices and File Systems System Administration Guide: IP Services
System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) System Administration Guide: Naming and Directory Services (NIS+) System Administration Guide: Network Services System Administration Guide: Solaris Printing
18
Preface
Book Title
Topics
Solaris Trusted Extensions Administrators Procedures Solaris Trusted Extensions Configuration Guide
System administration that is specific to a Solaris Trusted Extensions system. Starting with the Solaris 10 5/08 release, describes how to plan for, enable, and initially configure Solaris Trusted Extensions.
document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or liable for any actual or alleged damage or loss caused by or in connection with the use of or reliance on any such content, goods, or services that are available on or through such sites or resources.
Typographic Conventions
The following table describes the typographic conventions that are used in this book.
TABLE P1 Typeface
Typographic Conventions
Meaning Example
AaBbCc123
The names of commands, files, and directories, and onscreen computer output
Edit your .login file. Use ls -a to list all files. machine_name% you have mail.
AaBbCc123
machine_name% su Password:
19
Preface
TABLE P1 Typeface
Typographic Conventions
Meaning
(Continued)
Example
aabbcc123 AaBbCc123
Placeholder: replace with a real name or value Book titles, new terms, and terms to be emphasized
The command to remove a file is rm filename. Read Chapter 6 in the User's Guide. A cache is a copy that is stored locally. Do not save the file. Note: Some emphasized items appear bold online.
Shell Prompts
Prompt
C shell C shell for superuser Bourne shell and Korn shell Bourne shell and Korn shell for superuser
machine_name% machine_name# $ #
General Conventions
Be aware of the following conventions used in this book.
When following steps or using examples, be sure to type double-quotes ("), left single-quotes (), and right single-quotes () exactly as shown. The key referred to as Return is labeled Enter on some keyboards. The root path usually includes the /sbin, /usr/sbin, /usr/bin, and /etc directories, so the steps in this book show the commands in these directories without absolute path names. Steps that use commands in other, less common, directories show the absolute paths in the examples. The examples in this book are for a basic SunOS software installation without the Binary Compatibility Package installed and without /usr/ucb in the path.
20
Preface
Caution If /usr/ucb is included in a search path, it should always be at the end of the search
path. Commands like ps or df are duplicated in /usr/ucb with different formats and options from the SunOS commands.
21
22
C H A P T E R
This chapter provides a roadmap to Solaris management tools. What's New in Solaris Management Tools? on page 23 Matrix of Solaris Management Tools and Supported Releases on page 25 Feature Descriptions for Solaris Management Tools on page 25 Feature Descriptions for Solaris 9 Management Tools on page 26 Availability of Solaris Management Commands on page 27 For More Information About Solaris Management Tools on page 29
Note Solaris 10 5/08: Although added in the Solaris 10 5/08 release, this information is applicable to all of the Solaris 10 OS. To register your Solaris system, go to https://inventory.sun.com/inventory/. For information about how to use Sun Inventory to register your hardware, software, and operating systems, see the Sun Inventory Information Center (http://wikis.sun.com/display/SunInventory/Sun+Inventory).
If you use Sun xVM Ops Center to provision, update, and manage the systems in your data center, see the Sun xVM Information Center (http://wikis.sun.com/display/xVM/Sun+xVM+Ops+Center) for information about how to register your software with Sun xVM Ops Center.
admintool Starting with the Solaris 10 release, this tool is no longer available Package and Patch Tool Enhancements
For a complete listing of new Solaris features and a description of Solaris releases, see Solaris 10 Whats New.
23
The following table provides a brief description of new or changed Solaris management tools in the Solaris 10 release.
TABLE 11
admintool
This tool is no longer available. Alternative tools include the following: Solaris Management Console to manage users and groups Solaris Product Registry to manage software Solaris Print Manager to manage printers Solaris Management Console to manage terminals and modems
Setting Up User Accounts (Task Map) on page 113 Managing Software With the Solaris Product Registry GUI (Task Map) on page 379 Chapter 4, Setting Up Printers (Tasks), in System Administration Guide: Solaris Printing Setting Up Terminals and Modems With Serial Ports Tool (Overview) in System Administration Guide: Advanced Administration
Starting with the Solaris 10 release, the package and patch tools have been enhanced. Use the pkgchk command with the -P option instead of grep pattern /var/sadm/install/contents. The -P option enables you to use a partial path.
Package and Patch Tool Enhancements on page 367 Chapter 21, Managing Solaris Patches by Using the patchadd Command (Tasks) Whats New in Printing? in System Administration Guide: Solaris Printing
Expanded printer support in Solaris Print Manager includes the following features. These features were introduced in a Solaris 10 release: Never Print Banner option
Support for raster image processor (RIP) Support for PostScript Printer Description (PPD) files New -n option to the lpadmin command, which enables you to specify a PPD file when creating a new print queue or modifying an existing print queue The lpstat command output displays the PPD for a print queue that was creating by specifying a PPD file
24
Not supported Not supported Not supported Not supported Not supported
Solaris Management Tools 1.0 Supported Solaris Management Tools 2.0 Supported (Solaris 8 01/01, 4/01, 7/01, 10/01, 2/02 releases only) Solaris Management Tools 2.1 Not supported
Supported
Supported
If you want to perform administration tasks on a system with a text-based terminal as the console, use Solaris Management Console commands instead. For more information, see Table 15.
Feature or Tool
Computers and Networks tool Diskless Client support Disks tool Enhanced Disk tool (Solaris Volume Manager) Job Scheduler tool
25
TABLE 13
(Continued)
Supported in Solaris Management Console 2.1?
Feature or Tool
Log Viewer tool Mail Alias support Mounts and Shares tool Name Service support Performance tool Printer support Projects tool role-based access control (RBAC) support RBAC Tool Serial Port tool Software Package tool System Information tool User/Group tool
Supported Supported Supported For users, groups, and network information only Supported Not Supported, but Solaris Print Manager is available as a separate tool Supported Supported Supported Supported Not supported Supported Supported
Feature or Tool
Computers and Networks tool Diskless Client support Disks tool Enhanced Disk tool (Solaris Volume Manager) Job Scheduler tool Log Viewer tool
Not supported Not supported Not supported Not supported Not supported Not supported
Supported A diskless client command-line interface is available Supported Supported Supported Supported
26
TABLE 14
(Continued)
Supported in Solaris Management Console 2.1?
Feature or Tool
Mail Alias support Mounts and Shares tool Name Service support Performance tool Printer support
Supported Supported For users, groups, and network information only Supported Not supported, but Solaris Print Manager is available as a separate tool Supported Supported Supported Supported Not supported Supported Supported
Projects tool RBAC support RBAC tool Serial Port tool Software Package tool System Information tool User/Group tool
Not supported Not supported Not supported Supported Supported Not supported Supported
27
TABLE 15 Command
smc
smc(1M)
Manages crontab jobs Manages diskless client support Manages entries in the exec_attr database Manages group entries Manages and views WBEM log files Manages bulk operations on multiple user accounts Adds Operating System (OS) services and diskless client support Manages profiles in the prof_attr and exec_attr databases
smosservice
smosservice(1M)
smprofile
smprofile(1M)
Manages roles and users in role accounts smrole(1M) Manages serial ports Manages user entries smserialport(1M) smuser(1M)
This table describes the commands you can use to manage RBAC from the command line. You must be superuser or assume an equivalent role to use these commands. These commands cannot be used to manage RBAC information in a name service environment.
TABLE 16 Command
Displays authorizations granted to a user auths(1) Displays execution profiles for a user Adds a new role to the system Displays roles granted to a user profiles(1) roleadd(1M) roles(1)
28
This table describes the commands you can use to manage users, groups, and RBAC features from the command line. You must be superuser or assume an equivalent role to use these commands. These commands cannot be used to manage user and group information in a name service environment.
TABLE 17 Command
Solaris Management Console 2.1 suite of tools Solaris Management Console 2.0 suite of tools admintool AdminSuite 3.0 Diskless Client command-line interface
Solaris 8 1/01, 4/01, 7/01, 10/01, and 2/02 releases Solaris 9 and previous Solaris releases Solaris 8, Solaris 8 6/00, and Solaris 8 10/00 releases Solaris 8 1/01, 4/01, 7/01, 10/01, 2/02, Solaris 9, and Solaris 10 releases
admintool Solaris Easy Access Server 3.0 Installation Guide Chapter 7, Managing Diskless Clients (Tasks)
29
30
C H A P T E R
This chapter describes the Solaris management tools that are used to perform system administration tasks. Topics include starting the Solaris Management Console (console), setting up role-based access control (RBAC) to use with the console, and working with the Solaris management tools in a name service environment. For information on the procedures associated with performing system management tasks by using the Solaris Management Console, see these task maps:
Using the Solaris Management Tools With RBAC (Task Map) on page 40 Using the Solaris Management Tools in a Name Service Environment (Task Map) on page 45
For information on troubleshooting Solaris Management Console problems, see Troubleshooting the Solaris Management Console on page 53.
Users Projects cron jobs for mounting and sharing file systems
31
For a brief description of each Solaris management tool, see Table 21. You can add tools to the existing toolbox, or you can create new toolboxes. The Solaris Management Console has three primary components:
The Solaris Management Console client Called the console, this component is the visible interface and contains the GUI tools used to perform management tasks.
The Solaris Management Console server This component is located either on the same machine as the console or remotely. This component provides all the back-end functionality that allows management through the console.
The Solaris Management Console toolbox editor This application, which looks similar to the console, is used to add or modify toolboxes, to add tools to a toolbox, or to extend the scope of a toolbox. For example, you could add a toolbox to manage a name service domain.
Monitors and manages system information such as date, time, and time zone
Chapter 5, Displaying and Changing System Information (Tasks), in System Administration Guide: Advanced Administration
Log Viewer
Monitors and Chapter 14, Troubleshooting Software Problems manages the Solaris (Overview), in System Administration Guide: Management Console Advanced Administration tools log and system logs
32
TABLE 21 Category
(Continued)
For More Information
Processes
Processes and System Performance in System Administration Guide: Advanced Administration Chapter 11, Managing System Performance (Overview), in System Administration Guide: Advanced Administration
Performance
Manages users, rights, What Are User Accounts and Groups? on roles, groups, and page 86 and Role-Based Access Control (Overview) in System Administration Guide: mailing lists Security Services Creates and manages entries in the /etc/project database Chapter 2, Projects and Tasks (Overview), in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones Solaris Management Console online help
Projects
Computers and Creates and monitors Networks computer and network information Services Scheduled Jobs Creates and manages scheduled cron jobs
Ways to Automatically Execute System Tasks in System Administration Guide: Advanced Administration
Storage
Mounts and shares file Chapter 18, Mounting and Unmounting File systems Systems (Tasks), in System Administration Guide: Devices and File Systems Creates and manages disk partitions Creates and manages volumes, hot spare pools, state database replicas, and disk sets Sets up terminals and modems Chapter 10, Managing Disks (Overview), in System Administration Guide: Devices and File Systems Solaris Volume Manager Administration Guide
Enhanced Storage
Serial Ports
Chapter 1, Managing Terminals and Modems (Overview), in System Administration Guide: Advanced Administration
Contextsensitive help is available after you start a tool. For broader, more in-depth online information than the context help provides, see the expanded help topics. You can access these help topics from the console Help menu.
33
Supports all experience levels Inexperienced administrators can complete tasks by using the GUI, which includes dialog boxes, wizards, and context help. Experienced administrators find that the console provides a convenient, secure alternative to using vi to manage hundreds of configuration parameters spread across dozens or hundreds of systems.
Controls user access to the system Although any user can access the console by default, only superuser can make changes in the initial configuration. As described in Role-Based Access Control (Overview) in System Administration Guide: Security Services, it is possible to create special user accounts called roles can be created and assigned to users, typically administrators, who are permitted to make specific system changes. The key benefit of RBAC is that roles can be limited so that users have access to only those tasks that are necessary for doing their jobs. RBAC is not required for using the Solaris management tools. You can run all tools as superuser without making any changes.
Provides a command line interface If preferred, administrators can operate the Solaris management tools through a command-line interface (CLI). Some commands are written specifically to mimic the GUI tool functions, such as the commands for managing users. These new commands are listed in Table 15, which includes the names and brief descriptions of each command. There is also a man page for each command. For Solaris management tools that have no special commands, such as the Mounts and Shares tool, use the standard UNIX commands.
For in-depth information about how RBAC works, its benefits, and how to apply those benefits to your site, see Role-Based Access Control (Overview) in System Administration Guide: Security Services. To learn more about using RBAC with the Solaris management tools, see Using the Solaris Management Tools With RBAC (Task Map) on page 40.
34
FIGURE 21
Navigation pane (at the left) For accessing tools (or sets of tools), folders, or other toolboxes. Icons in the navigation pane are called nodes and are expandable if they are folders or toolboxes. View pane (at the right) For viewing information related to the node selected in the navigation pane. The view pane shows either the contents of the selected folder, subordinate tools, or the data associated with the selected tool. Information pane (at the bottom) For displaying context-sensitive help or console events.
35
View menu Use the Show option in the View menu to hide or display the optional bars and panes. The other options in the View menu control the display of nodes in the view pane. Console menu Use the Preferences option to set the following: the initial toolbox, the orientation of panes, clicking or double-clicking for selection, text or icons in the tool bar, fonts, default tool loading, authentication prompts, and advanced logins. Context Help or Console Events toggles Use the icons at the bottom of the information pane to toggle between the display of context-sensitive help and console events.
Context-sensitive help responds to your use of the console tools. Clicking the cursor on tabs, entry fields, radio buttons, and so forth, causes the appropriate help to appear in the Information pane. You can close, or reopen the Information pane by clicking the question mark button on dialog boxes and wizards.
Expanded help topics are available from the Help menu or by clicking cross reference links in some context-sensitive help. These topics appear in a separate viewer and contain more in-depth information than is provided by the context help. Topics include overviews of each tool, explanations of how each tool works, files used by a specific tool, and troubleshooting.
RBAC Approach
Description
No RBAC
Allows you to perform all tasks as superuser. You can log in as yourself. When you select a Solaris management tool, you specify root as the user and the root password.
root as a role
Eliminates anonymous How to Plan Your RBAC Implementation in System root logins and prevents Administration Guide: Security Services users from logging in as root. This approach requires users to log in as themselves before they assume the root role. Note that you can apply this approach whether or not you are using other roles.
Uses the Primary Administrator role, which is roughly equivalent to having root access only. Uses three roles that are easily configured: Primary Administrator, System Administrator, and Operator. These roles are appropriate for organizations with administrators at different levels of responsibility whose job capabilities roughly fit the suggested roles.
Suggested roles
Custom roles
You can add your own Managing RBAC in System Administration Guide: Security roles, depending on your Services and How to Plan Your RBAC Implementation in System Administration Guide: Security Services organization's security needs.
37
Log in to the console as yourself and then supply the root user name and password Log in to the console as yourself and then assume a role
A major benefit of RBAC is that roles can be created to give limited access to specific functions only. If you are using RBAC, you can run restricted applications by assuming a role rather than by becoming superuser. For step-by-step instructions on creating the Primary Administrator role, see How to Create the First Role (Primary Administrator) on page 42. For an overview on using RBAC, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.
Log in as a user, start the Solaris Management Console, select a Solaris management tool, and then log in as root. This method enables to you perform any management task from the console. For information on starting the Solaris Management Console, see How to Start the Solaris Management Console in a Name Service Environment on page 51.
38
The pound sign (#) is the Bourne shell prompt for the superuser account. This method provides complete access to all system commands and tools.
Log in as a user, and then change to the superuser account by using the su command at the command line.
% su Password: root-password #
This method provides complete access to all system commands and tools.
Log in remotely as superuser. This method is not enabled by default. You must modify the /etc/default/login file to remotely log in as superuser on the system console. For information on modifying this file, see Chapter 3, Controlling Access to Systems (Tasks), in System Administration Guide: Security Services. This method provides complete access to all system commands and tools.
Log in as user, and then change to a role by using the su command at the command line.
% su role Password: role-password $
This method provides access to all the commands and tools that the role has access to.
Log in as a user, start the Solaris Management Console, select a Solaris management tool, and then assume a role. For information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44. This method provides access to the Solaris management tools that the role has access to.
39
overview and task information is included to show you how to initially set up RBAC with the console. For detailed information on RBAC and how to use it with other applications, see Role-Based Access Control (Overview) in System Administration Guide: Security Services.
Task
Description
For Instructions
If your user account is How to Start the Console as Superuser or as a Role on already set up, start the page 44 console as yourself. Then, log in to the console as root. If you do not have a user account set up, become superuser first, and then start the console. Solaris Management Console online help If You Are the First to Log in to the Console on page 41 How to Create the First Role (Primary Administrator) on page 42 How to Assume the Primary Administrator Role on page 43
2. Add a user account Add a user account for for yourself. yourself, if you do not have an account already. 3. Create the Primary Create the Primary Administrator role Administrator role. Then, add yourself to this role. 4. Assume the Primary Administrator role. 5. (Optional) Make root a role. Assume the Primary Administrator role after you have created this role.
Make root a role and add How to Plan Your RBAC Implementation in System yourself to the root role so Administration Guide: Security Services that no other user can use the su command to become root. Create other administrative Chapter 9, Using Role-Based Access Control (Tasks), roles and grant the in System Administration Guide: Security Services appropriate rights to each role. Then, add the appropriate users to each role.
40
The following sections provide overview information and step-by-step instructions for using the Solaris Management Console and the RBAC security features.
Without RBAC If you choose not to use RBAC, continue working as superuser. All other administrators will also need root access to perform their jobs. With RBAC You will need to do the following:
Set up your user account, if you do not already have an account. Create the role called Primary Administrator. Assign the Primary Administrator right to the role that you are creating. Assign your user account to this role. For step-by-step instructions on creating the Primary Administrator role, see How to Create the First Role (Primary Administrator) on page 42. For an overview on using RBAC, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.
Field Descriptions for Adding a Role by Using the Solaris Management Console
Description
Role name Full name Description Role ID number Role shell Create a role mailing list Role password and confirm Password
Selects the name an administrator uses to log in to a specific role. Provides a full, descriptive name of this role. (Optional) Provides further description of this role. Selects the identification number assigned to this role. This number is the same as the set of identifiers for UIDs. Selects the shell that runs when a user logs in to a terminal or console window and assumes a role in that window. Creates a mailing list with the same name as the role, if checked. You can use this list to send email to everyone assigned to the role. Sets and confirms the role password.
Available rights and granted Rights Assigns rights to this role by choosing from the list of Available Rights and adding them to the list of Granted Rights. Select a home directory Assign users to this role Selects the home directory server where this role's private files will be stored. Adds specific users to the role so that they can assume the role to perform specific tasks.
For detailed information about role-based access control, and instructions on how to use roles to create a more secure environment, see Role-Based Access Control (Overview) in System Administration Guide: Security Services.
For additional information on starting the console, see How to Start the Console as Superuser or as a Role on page 44. The console online help provides more information about creating a user account for yourself.
2
42
3 4
Click on System Configuration->Users -> Administrative Roles. Click Action->Add Administrative Role. The Add Administrative Role wizard opens.
Create the Primary Administrator role with the Administrative Role wizard by following these steps. a. Identify the role name, full role name, description, role ID number, role shell, and whether you want to create a role mailing list. Click Next. b. Set and confirm the role password. Click Next. c. Select the Primary Administrator right from the Available Rights column and add it to Granted Rights column. Click Next. d. Select the home directory for the role. Click Next. e. Assign yourself to the list of users who can assume the role. Click Next. If necessary, see Table 22 for a description of the role fields.
Click Finish.
For information on starting the console, see How to Start the Console as Superuser or as a Role on page 44.
2
Log in with your user name and password. A list shows which roles you are permitted to assume.
Log in to the Primary Administrator role and provide the role password.
Chapter 2 Working With the Solaris Management Console (Tasks) 43
1 2
Verify that you are in a window environment, such as the CDE environment. Start the console in one of the following ways:
It might take a minute or two for the console to come up the first time.
Start the console from the Tools menu of the CDE front panel. Double-click the Solaris Management Console icon in CDE's Applications Manager or File Manager.
Double-click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed.
44
Using the Solaris Management Tools in a Name Service Environment (Task Map)
(Optional) Select the appropriate toolbox. If you want to use a toolbox other than the default toolbox, select the appropriate toolbox from the Navigation pane. Or, select Open Toolbox from the console menu and load the toolbox you want. For information about using different toolboxes, see How to Create a Toolbox for a Specific Environment on page 48.
Double-click the category icon to access a particular tool. Use the online help to identify how to perform a specific task.
Decide if you want to use the tool as superuser or as a role. If you are logging in a as superuser, enter the root password. If you are logging in as yourself, backspace over the root user name. Then supply your user ID and user password. A list of roles you can assume is displayed.
Select the Primary Administrator role, or an equivalent role, and supply the role password. For step-by-step instructions on creating the Primary Administrator role, see How to Create the First Role (Primary Administrator) on page 42. The main tool menu is displayed.
Using the Solaris Management Tools in a Name Service Environment (Task Map)
By default, the Solaris management tools are set up to operate in a local environment. For example, the Mounts and Shares tool enables you to mount and share directories on specific systems, but not in an NIS or NIS+ environment. However, you can manage information with the Users and Computers and Networks tools in a name service environment. To work with a console tool in a name service environment, you need to create a name service toolbox, and then add the tool to that toolbox.
45
Using the Solaris Management Tools in a Name Service Environment (Task Map)
Task
Description
For Instructions
1. Verify prerequisites.
Verify you have completed the prerequisites before attempting to use the console in a name service environment. Use the New Toolbox wizard to create a toolbox for your name service tools. Add the Users tool, or any other name service tool, to your name service toolbox. Select the toolbox you just created to manage name service information.
Prerequisites for Using the Solaris Management Console in a Name Service Environment on page 47 How to Create a Toolbox for a Specific Environment on page 48 How to Add a Tool to a Toolbox on page 50 How to Start the Solaris Management Console in a Name Service Environment on page 51
2. Create a toolbox for the name service. 3. Add a tool to the name service toolbox. 4. Select the toolbox that was just created.
The RBAC security files are created when you upgrade to or install at least the Solaris 9 release. This table briefly describes the predefined security files that are installed on a system that is running at least the Solaris 9 release.
46 System Administration Guide: Basic Administration September 2008
Using the Solaris Management Tools in a Name Service Environment (Task Map)
TABLE 23
/etc/user_attr
user_attr
Associates users and roles with authorizations and rights profiles Defines authorizations and their attributes and identifies associated help files Defines rights profiles, lists the rights profiles assigned to the authorizations, and identifies associated help files Defines the privileged operations assigned to a rights profile
/etc/security/auth_attr
auth_attr
/etc/security/prof_attr
prof_attr
/etc/security/exec_attr
exec_attr
For unusual upgrade cases, you might have to use the smattrpop command to populate RBAC security files in the following instances:
When creating or modifying rights profiles When you need to include users and roles by customizing the usr_attr file
For more information, see Role-Based Access Control (Overview) in System Administration Guide: Security Services.
Prerequisites for Using the Solaris Management Console in a Name Service Environment
The following table identifies what you need to do before you can use the Solaris Management Console in a name service environment.
Prerequisite For More Information
Install at least the Solaris 9 release. Set up your name service environment. Select your management scope. Make sure your/etc/nsswitch.conf file is configured so that you can access your name service data.
Solaris 10 Installation Guide: Basic Installations System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) Management Scope on page 48 /etc/nsswitch.conf File on page 48
47
Using the Solaris Management Tools in a Name Service Environment (Task Map)
Management Scope
The Solaris Management Console uses the term management scope to refer to the name service environment that you want to use with the selected management tool. The management scope choices for the Users tool and the Computers and Networks tool are LDAP, NIS, NIS+, or files. The management scope that you select during a console session should correspond to the primary name service identified in the /etc/nsswitch.conf file.
/etc/nsswitch.conf File
The /etc/nsswitch.conf file on each system specifies the policy for name service lookups (where data is read from) on that system.
Note You must make sure that the name service accessed from the console, which you specify
through the console Toolbox Editor, appears in the search path of the /etc/nsswitch.conf file. If the specified name service does not appear there, the tools might behave in unexpected ways, resulting in errors or warnings. When you use the Solaris management tools in a name service environment, you might impact many users with a single operation. For example, if you delete a user in the NIS name service, that user is deleted on all systems that are using NIS. If different systems in your network have different /etc/nsswitch.conf configurations, unexpected results might occur. So, all systems to be managed with the Solaris management tools should have a consistent name service configuration.
48
Using the Solaris Management Tools in a Name Service Environment (Task Map)
Note You can start the Toolbox Editor as a normal user. However, if you plan to make changes
and save them to the default console toolbox, /var/sadm/smc/toolboxes, you must start the Toolbox Editor as root.
1
2 3 4
Select Open from the Toolbox menu. Select the This Computer icon in the Toolboxes: window. Click Open. The This Computer toolbox opens in the window.
5 6 7
Select the This Computer icon again in the Navigation pane. Select Add Folder from the Action menu. Use the Folder wizard to add a new toolbox for your name service environment. a. Name and Description Provide a name in the Full Name window. Click Next. For example, provide NIS tools for the NIS environment. b. Provide a description in the Description window. Click Next. For example, tools for NIS environment is an appropriate example. c. Icons Use the default value for the Icons. Click Next. d. Management Scope Select Override. e. Select your name service under the Management Scope pull-down menu. f. Add the name service master name in the Server field, if necessary. g. Add the domain managed by the server in the Domain field. h. Click Finish. The new toolbox appears in the left Navigation pane.
Select the new toolbox icon and select Save As from the Toolbox menu.
49
Using the Solaris Management Tools in a Name Service Environment (Task Map)
Enter the toolbox path name in the Local Toolbox Filename dialog box. Use the .tbx suffix.
/var/sadm/smc/toolboxes/this_computer/toolbox-name.tbx
10
Click Save. The new toolbox appears in the Navigation pane in the console window. After you have created a name service toolbox, you can put a name service tool into it. For more information, see How to Add a Tool to a Toolbox on page 50.
See Also
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Start the Toolbox Editor, if necessary.
# /usr/sadm/bin/smc edit &
Select the toolbox. If you want to work in a name service, select the toolbox you just created in the Toolbox Editor. For more information, see How to Create a Toolbox for a Specific Environment on page 48. Select Add Tool from the Action menu. Use the Add Tool wizard to add the new tool. a. Server Selection Add the name service master in the Server window. Click Next. b. Tools Selection Select the tool you want to add from the Tools window. Click Next. If this toolbox is a name service toolbox, choose a tool you want to work in a name service environment. For example, choose the Users tool. c. Name and Description Accept the default values. Click Next. d. Icons Accept the default values, unless you have created custom icons. Click Next.
4 5
50
e. Management Scope Accept the default valueInherit from Parent.Click Next. f. Tool Loading Accept the defaultLoad tool when selected.Click Finish.
6
Select Save from the Toolbox menu to save the updated toolbox. The Local Toolbox window is displayed.
Ensure that the system you are logged in to is configured to work in a name service environment. Verify that the /etc/nsswitch.conf file is configured to match your name service environment.
Start the Solaris Management Console. For more information, see How to Start the Console as Superuser or as a Role on page 44. Select the toolbox you created for the name service, which appears in the Navigation pane. For information on creating a toolbox for a name service, see How to Create a Toolbox for a Specific Environment on page 48.
1 2
Become superuser or assume an equivalent role. Start the Solaris Management Console Toolbox Editor, if necessary.
# /usr/sadm/bin/smc edit &
Open the toolbox to which you want to add the legacy application. The toolbox selected is opened in the Toolbox Editor.
Select the node in the toolbox to which you want to add the legacy application. A legacy application can be added to the top node of a toolbox or to another folder.
Click Action->Add Legacy Application. The first panel of the Legacy Application Wizard: General is displayed.
6 7
Follow the instructions in the wizard. Save the toolbox in the Toolbox Editor.
1 2
Become superuser or assume an equivalent role. Install the new tool package.
# pkgadd ABCDtool
Restart the console so that it recognizes the new tool. a. Stop the console server.
# /etc/init.d/init.wbem stop
Start the console to verify that the new tool is displayed. For more information, see How to Start the Console as Superuser or as a Role on page 44.
52
SUNWmc Solaris Management Console 2.1 (Server Components) SUNWmcc Solaris Management Console 2.1 (Client Components) SUNWmccom Solaris Management Console 2.1 (Common Components) SUNWmcdev Solaris Management Console 2.1 (Development Kit) SUNWmcex Solaris Management Console 2.1 (Examples) SUNWwbmc Solaris Management Console 2.1 (WBEM Components)
These packages provide the basic Solaris Management Console launcher. You must install the SUNWCprog cluster to use the Solaris Management Console and all of its tools.
1 2
Become superuser or assume an equivalent role. Determine whether the console server is running.
# /etc/init.d/init.wbem status
If the console server is running, you should see a message similar the following:
SMC server version 2.1.0 running on port 898. 3
After a short time, you should see a message similar to the following:
SMC server is ready. 4
If the server is running and you are still having problems, stop the console server. Then, restart it. a. Stop the console server.
# /etc/init.d/init.wbem stop
Chapter 2 Working With the Solaris Management Console (Tasks) 53
54
C H A P T E R
This chapter describes the Sun JavaTM Web Console, which is used to administer web-based Sun system management applications that are installed and registered on your system. Topics in this chapter include the following:
What's New in Administering the Java Web Console? on page 55 Java Web Console (Overview) on page 56 Getting Started With the Java Web Console on page 59 Managing the Console Service on page 62 Configuring the Java Web Console on page 64 Troubleshooting the Java Web Console Software on page 72 Java Web Console Reference Information on page 79
For information about the procedures that are associated with using the Java Web Console, see Getting Started With the Java Web Console (Task Map) on page 58 and Troubleshooting the Java Web Console Software (Task Map) on page 70.
Create a new storage pool. Add capacity to an existing pool. Move (export) a storage pool to another system. Import a previously exported storage pool, to make it available on another system. View tables of information about storage pools. Create a file system. Create a zvol (virtual volume). Take a snapshot of a file system or a zvol volume. Roll back a file system to a previous snapshot.
For more information about using the Solaris ZFS web-based management tool, see Solaris ZFS Administration Guide.
Note The Sun Java Enterprise System software includes several management applications that run in the Java Web Console.
A single point of entry for login and the launching of browser-based system management applications The Java Web Console is Sun's current direction for system management applications. The console provides a central location from which you can start browser-based management applications simply by clicking the application names. No compatibility exists between the Java Web Console and the Solaris Management Console. The Java Web Console is a web application that you access through a browser, and Solaris Management Console is a Java application that you start from a command line. Because the consoles are completely independent, you can run both consoles on the same system at the same time.
Single sign-on through a secure https port Single sign-on in this context means that you do not have to authenticate yourself to each management application after you authenticate yourself to the web console. You enter your user name and password just once per console session.
Dynamically organized and aggregated applications Applications are installed and displayed on the console launch page under the category of management tasks that is most applicable. Categories include the following:
A common look and feel All web console applications use the same user interface (UI) components and behavior, thereby reducing the learning curve for administrators.
Standard, extensible authentication, authorization, and auditing mechanisms The Java Web Console supports Pluggable Authentication Module (PAM), role-based access control (RBAC) roles, and Basic Security Module (BSM) auditing.
57
smcwebserver This command starts and stops the console's web server. wcadmin Starting with the Solaris 10 11/06 release, this command is used to configure the console, and to register and deploy console applications. For more information, see the wcadmin(1M) man page. smreg In the Solaris 10, Solaris 10 1/06, and Solaris 10 6/06 OS, this command is used to register all console applications. Starting with the Solaris 10 11/06 release, use this command only to register legacy applications that were created for a version of the console that is not at least Java Web Console 3.0.
The commands are used to perform various tasks that this chapter describes. For more information about each command, see the smcwebserver(1M), wcadmin(1M), and the smreg(1M) man pages.
Mozilla (at least Version, 1.4) Netscape (at least Version, 6.2) Firefox (at least Version, 1.0)
The Java Web Console's launch page lists all the registered system management applications that you have permission to use. You connect to a specific application by clicking its application name.
How to Start Applications From the Java Web Console's Launch Page on page 60
58
Task
Description
For Instructions
You can manage the web server that is used to run the console and the registered applications.
How to Start the Console Service on page 62 How to Enable the Console Service to Run at System Start on page 62 How to Stop the Console Service on page 63 How to Disable the Console Service on page 63
You should not have to change any How to Change Java Web Console of the web console's default Properties on page 66 properties. Properties that you might choose to change include the following: Console session timeout Logging level Audit implementation
https specifies a Secure Socket Layer (SSL) connection hostname.domain specifies the name and domain of the server that is hosting the console 6789 is the console's assigned port number
59
Note The first time you access the Java Web Console from a particular system, you must accept the server's certificate before the web console's launch page is displayed.
If RBAC is enabled on the system, and your user identity is assigned to a role, you are prompted for a role password after you have successfully logged in. If you assume a role, authorization checks are made for the assumed role. You can opt out of assuming a role by selecting NO ROLE, and then authorization checks are made against your user identity. Following a successful authorization check, the web console launch page is displayed.
How to Start Applications From the Java Web Console's Launch Page
Start a web browser that is compatible with the Java Web Console, such as Mozilla 1.7 or Firefox 1.0. See Supported Web Browsers on page 58 for a list of supported browsers.
Type the console's URL in the web browser's location field. For example, if the management server host is named sailfish, and the domain is sw, the URL is https://sailfish.sw:6789. This URL takes you to the web console login page.
Accept the server's certificate. You only have to accept the server's certificate once per browser session, not each time you login to the console or start an application. The login page is displayed as shown in the following figure.
60
FIGURE 31
Enter your user name and password, and optionally your RBAC role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. The console services check your credentials to authenticate them, and ensure that you are authorized to use the console and registered applications.
Click the Start Each Application in a New Window check box if you want to run the application in a new window. If you do not select this option, the application will run in the default window, replacing the launch page.
Click the link for the application that you want to run.
Tip You can also launch an individual application directly and bypass the launch page by using
where app-context-name is the name that is used when the application is deployed.
61
To find the application context name, you can do one of the following:
Read the application's documentation. Run the wcadmin list -a or the smreg list -a command to see a list of deployed web applications and their context names. Run the application from the web console's launch page and note the URL that is displayed in the address location field. You can type the URL directly the next time you use the application. Or, you can bookmark the location and access the application through the bookmark.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Start the server now, without changing the enabled state.
# smcwebserver start
62
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Enable the server to be started at system boot.
# smcwebserver enable
Solaris 10 11/06: Alternatively, if you want to both start the server now, and enable the server to start when the system boots, use the command:
# svcadm enable system/webconsole:console
Note If you are running the Solaris 10 11/06 release, you cannot enable the console by using the
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Stop the server now, without changing the enabled state.
# smcwebserver stop
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Chapter 3 Working With the Sun Java Web Console (Tasks) 63
Solaris 10 11/06: Alternatively, if you want to both stop the server now, and disable the server from starting when the system boots, use the command:
# svcadm disable system/webconsole:console
Note If you are running the Solaris 10 11/06 release, you cannot disable the console with the smcwebserver command. You must use the svcadm command.
Properties in the console's configuration files control the behavior of the console. To change the behavior, you define new values for properties to override the default values. The default values of most properties should not be overridden unless there is a specific need that the default values do not provide, such as specifying your own login service.
64
In general, the property values that you might consider changing are the following:
Console session timeout The web console's session timeout period is controlled by the session.timeout.value property. This property controls how long a web console page can be displayed without user interaction before the session times out. After the timeout is reached, the user must log in again. The default value is 15 minutes. You can set a new value, in minutes, to conform to your own security policy. However, keep in mind that this property controls the timeout period for all console users and all registered applications. See Example 31 for an example of how to change the session timeout.
Logging level You use logging properties to configure the logging service. The console log files are created in the /var/log/webconsole/console directory. The logging.default.level property determines which messages are logged. The console logs provide valuable information for troubleshooting problems. The logging level applies to any messages that are written through the logging service, which by default uses syslog in the Solaris release The syslog log file is /var/adm/messages. The file /var/log/webconsole/console/console_debug_log contains log messages written when the debugging service is enabled. This is done by setting the debug.trace.level property as described in Using the Console Debug Trace Log on page 69. Although the default logging and debug logging services are separate, all Java Web Console logging messages to syslog are also written to the console_debug_log to aid in debugging. Generally, the logging service, set with logging.default.level, should be always enabled for logging by console applications. Debug logging, set with debug.trace.level, should only be enabled to investigate problems. The following property values are available for logging.default.level:
See Example 32 for an example that shows how to change the logging level.
Auditing implementation Auditing is the process of generating and logging security-related management events. An event signifies that a specific user has updated the management information on a system. The auditing implementation is used by services and applications that generate audit events. The following audit events are defined by the web console:
When audit events occur, a record of the event is made in an audit log. The location of the audit log varies with the auditing implementation that is in use. The web console's auditing service uses an auditing implementation that is provided by the underlying operating system. The web console supports three auditing implementations: Solaris, Log, and None. You can select an auditing implementation by specifying one of these keywords for the value of the audit.default.type configuration property. Only one auditing implementation is in effect at a time. The supported auditing implementation types are:
Solaris The Solaris implementation is the default. This implementation supports the BSM auditing mechanism. The auditing mechanism writes audit records into a system file in the /var/audit directory. You can display the records with the praudit command. For events to be captured, you must enable the BSM auditing mechanism on the system. In addition, the /etc/security/audit_control file must contain entries that indicate which events should be generated. You must set the lo event as the flag option to see login and logout events for each user. For more information, see the praudit(1M) and bsmconv(1M) man pages and Part VII, Solaris Auditing, in System Administration Guide: Security Services.
Log You can configure this implementation to write to the system's syslog service. Audit messages are written to the console log if the logging service has been enabled at the info level. See Example 32 for more information.
None No audit events are generated. Audit messages are written to the debug trace log, if enabled.
66
Depending on which Solaris release you are running, change the selected property value as follows:
If you are running at least the Solaris 10 11/06 release, use this command:
# wcadmin add -p -a console name=value
-p -a console
Specifies that the object type is a property. Specifies that the property changes are for the application named console. The -a console option must always be used when you are changing console properties. Specifies the property name and the new value for that property.
name=value
For the Solaris 10, Solaris 10 1/06, and the Solaris 10 6/06 releases, use this command:
# smreg add -p -c name
If you are running at least the Solaris 10 11/06 release, use this command:
# wcadmin remove -p -a console name=value
For the Solaris 10, Solaris 10 1/06, and the Solaris 10 6/06 releases, use this command:
# smreg remove -p -c name
-p -c name
Example 31
Specifies that the object type is a property. Specifies that the property changes are for the console application. The -c option must always be used when you are changing console properties. Specifies the property name and the new value for that property.
Example 32
67
Example 33
Resetting the Java Web Console Logging Level to the Default Value
This example shows how to reset the logging level to the default.
# wcadmin remove -p -a console logging.default.level
Example 34
Example 35
The valid auditing types are: None Log Solaris No auditing Audit messages to syslog Audit messages to BSM
This command starts the web console server under the specified user identity. The web console server runs under this identity each time the server is subsequently started if the command is issued before the first console start.
68
If you are running at least the Solaris 10 11/06 release, you can also use this command:
# wcadmin add -p -a console com.sun.web.console.user=username
Note Starting with the Solaris 10 11/06 release, when the system initially starts, the console also
starts and is automatically configured to run under noaccess. Consequently, the user identity is set to noaccess before you are able to change the user identity. Use the following commands to reset the console to its initial unconfigured state. Then, specify a different user identity when you restart the console.
# smcwebserver stop # /usr/share/webconsole/private/bin/wcremove -i console # smcwebserver start -u new_user_identity
For the Solaris 10, Solaris 10 1/06, Solaris 10 6/06 releases, use this command:
# smreg add -p -c com.sun.web.console.user=username
This command causes the web console server to run under the specified user identity the next time the server starts, and each time the server is started.
1 - Use this setting to record potentially severe errors. 2 - Use this setting to record important messages, as well as error messages of the 1 level. 3 - Use this setting to record all possible messages with full details.
By default, the debug trace log is created in the /var/log/webconsole directory for the Solaris 10, Solaris 10 1/06, and the Solaris 10 6/06 releases. Starting with the Solaris 10 11/06 release, the log is created in the /var/log/webconsole/console directory. The log file is named console_debug_log. Historical logs, such as console_debug_log.1 and console_debug_log.2 might also exist in this directory. There can be up to five (default setting) historical logs stored in this directory before the earliest log is deleted and a new log is created.
69
EXAMPLE 36
Use the following command to set the debug trace log level to 3. For the Solaris 10 11/06 release, use this command:
# wcadmin add -p -a console debug.trace.level=3
For the Solaris 10, Solaris 10 1/06, and the Solaris 10 6/06 releases, use this command:
# smreg add -p -c debug.trace.level=3
EXAMPLE 37
To check the status of the debug.trace.level property, use the wcadmin list or smreg list command. Solaris 10 11/06:
# wcadmin list -p | grep "debug.trace.level"
For the Solaris 10, Solaris 10 1/06, and Solaris 10 6/06 releases, use this command:
# smreg list -p | grep "debug.trace.level"
Check to determine if the console is Use the smcwebserver, wcadmin, How to Check if the Console is running and enabled. and svcs commands to check if the Running and Enabled on page 72 console is running and enabled. This information is useful for troubleshooting problems. List console resources and properties. You might need to gather information about the console resources and properties for troubleshooting purposes. How to List Console Resources and Properties on page 72
70
Task
Description
For Instructions
Current applications are registered How to Determine if an and deployed with a single Application is a Legacy command while the console server Application on page 75 is running. Legacy applications require the console server to be stopped during registration. If you need to register or unregister an application, you must first determine if the application is a legacy application You can list all applications that are How to List Deployed registered with the Java Web Applications on page 75 Console. Listing all registered applications provides you with information that can be helpful in troubleshooting situations. If you need to use a legacy application, you must first register the application with the Java Web Console. How to Register a Legacy Application With the Java Web Console on page 76
If you do not want a legacy How to Unregister a Legacy application registered with the Java Application From the Java Web Web Console, follow the procedure Console on page 77 to unregister the legacy application. Before using a new application, you How to Register a Current need to register the application Application With the Java Web with the Java Web Console. Console on page 78 In some situations, you might need How to Unregister a Current to unregister a current application Application from the Java Web from the Java Web Console. Console on page 78 You can enable remote access only to the console, while leaving the other access restrictions in place. How to Enable Remote Access to the Java Web Console on page 83
Register a current application with the Java Web Console. Unregister a current application from the Java Web Console. Enable remote Access to the Java Web Console. Change the console's internal passwords
The Java Web Console uses How to Change the Console's internal passwords. To reduce the Internal Passwords on page 84 possibility of a security breach, you can change these passwords.
71
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Check the server status.
# smcwebserver status Sun Java(TM) Web Console is running
Solaris 10 11/06: Check the console's SMF status and enabled state.
# svcs -l system/webconsole:console fmri svc:/system/webconsole:console name java web console enabled true state online next_state none state_time Wed 17 May 2006 01:22:32 PM EDT logfile /var/svc/log/system-webconsole:console.log restarter svc:/system/svc/restarter:default contract_id 129 dependency require_all/none svc:/milestone/multi-user (online)
If you start and stop the server with smcwebserver commands without enabling and disabling, the enabled property might display as false (temporary) or true (temporary).
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
System Administration Guide: Basic Administration September 2008
72
List the console's resources and properties. If you are running at least the Solaris 10 11/06 release, use this command:
# wcadmin list Deployed web applications (application name, context name, status): console console console console legacy ROOT com_sun_web_ui console manager myapp [running] [running] [running] [running] [running]
Registered jar files (application name, identifier, path): console console console console console audit_jar console_jars jato_jar javahelp_jar shared_jars /usr/lib/audit/Audit.jar /usr/share/webconsole/lib/*.jar /usr/share/lib/jato/jato.jar /usr/jdk/packages/javax.help-2.0/lib/*.jar /usr/share/webconsole/private/container/shared/lib/*.jar
Registered login modules (application name, service name, identifier): console ConsoleLogin userlogin console ConsoleLogin rolelogin Shared service properties (name, value): ENABLE java.home yes /usr/jdk/jdk1.5.0_06
Note This ENABLE property is ignored because SMF uses its own enabled property, which is
shown in the previous procedure. The ENABLE property is used on older Solaris systems where the console server is not managed by SMF. For the Solaris 10, Solaris 10 1/06, and Solaris 10 6/06 releases, use this command:
# smreg list The list of registered plugin applications: com.sun.web.console_2.2.4 /usr/share/webconsole/console com.sun.web.ui_2.2.4 /usr/share/webconsole/com_sun_web_ui com.sun.web.admin.example_2.2.4 /usr/share/webconsole/example The list of registered jar files:
73
com_sun_management_services_api.jar scoped to ALL com_sun_management_services_impl.jar scoped to ALL com_sun_management_console_impl.jar scoped to ALL com_sun_management_cc.jar scoped to ALL com_sun_management_webcommon.jar scoped to ALL com_iplanet_jato_jato.jar scoped to ALL com_sun_management_solaris_impl.jar scoped to ALL com_sun_management_solaris_implx.jar scoped to ALL The list of registered login modules for service ConsoleLogin: com.sun.management.services.authentication.PamLoginModule optional use_first_pass="true" commandPath="/usr/lib/webconsole"; com.sun.management.services.authentication.RbacRoleLoginModule requisite force_role_check="true" commandPath="/usr/lib/webconsole"; The list of registered server configuration properties: session.timeout.value=15 authentication.login.cliservice=ConsoleLogin logging.default.handler=com.sun.management.services.logging.ConsoleSyslogHandler logging.default.level=info logging.default.resource=com.sun.management.services.logging.resources.Resources logging.default.filter=none logging.debug.level=off audit.default.type=None audit.None.class=com.sun.management.services.audit.LogAuditSession audit.Log.class=com.sun.management.services.audit.LogAuditSession audit.class.fail=none authorization.default.type=SolarisRbac authorization.SolarisRbac.class= com.sun.management.services.authorization.SolarisRbacAuthorizationService authorization.PrincipalType.class= com.sun.management.services.authorization.PrincipalTypeAuthorizationService debug.trace.level=0 . . . No environment properties have been registered.
Starting with the Solaris 10 11/06 release, the web console has changed the approach to application registration but can still support applications that were developed for earlier versions of the console. Current applications are registered and deployed with a single command while the console server is running. Applications that were developed for the earlier console are known as legacy applications, and require the console server to be stopped during registration. If you need to register or unregister an application, you must first determine if the application is a legacy application, as described in the following procedure.
View the application's app.xml file. The app.xml file is located in the application's WEB-INF directory. Examine the registrationInfo tag in the app.xml file. For a legacy application, the registrationInfo tag is a version 2.x . For example, registrationInfo version="2.2.4". For a current application, the version in the registrationInfo tag is at least 3.0. For example, registrationInfo version="3.0".
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. List the deployed applications. If you are running at least the Solaris 10 11/06 release, use this command:
# wcadmin list -a Deployed web applications (application name, context name, status):
75
The command lists all the registered and deployed applications. Legacy applications are listed with the application name legacy. See How to Determine if an Application is a Legacy Application on page 75. All other listed applications are current applications, and would be registered as described in How to Register a Current Application With the Java Web Console on page 78. Typically, the status that is shown for the applications contains either running or stopped. If the status is running, the application is currently loaded and available. If the status is stopped, then the application is not currently loaded and is unavailable. Sometimes an application registers and deploys successfully, but does not load because of a problem in the application. If so, the application's status is stopped. Check the console_debug_log to determine if there is an error with a traceback from the console's underlying web container, Tomcat, when attempting to load the application. For more information about the console_debug_log, see Using the Console Debug Trace Log on page 69. If all the applications show stopped (including the console application), this usually means the console's web container is not running. The list of applications in this case is obtained from the static context.xml files registered with the web container. For the Solaris 10, Solaris 10 1/06, and Solaris 10 6/06 releases, use this command:
# smreg list -a The list of registered plugin applications: com.sun.web.console_2.2.4 /usr/share/webconsole/console com.sun.web.ui_2.2.4 /usr/share/webconsole/com_sun_web_ui com.sun.web.admin.yourapp_2.2.4 /usr/share/webconsole/yourapp
Solaris 10 6/06 releases. Starting with Solaris 10 11/06 release, this procedure also applies only to those applications that are identified as legacy applications. See How to Register a Current Application With the Java Web Console on page 78 for the registration procedure for current applications. See also How to Determine if an Application is a Legacy Application on page 75.
1
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
System Administration Guide: Basic Administration September 2008
76
The smreg command manages the information in the Java Web Console's registration table. This script also performs some additional work to deploy the application. For additional options to this command, see the smreg(1M) man page.
4
Example 38
Solaris 10 6/06 releases. Starting with Solaris 10 11/06 release, this procedure applies only to those applications that are identified as legacy applications. See How to Unregister a Current Application from the Java Web Console on page 78 for the procedure that describes how to unregister current applications. If you do not want a particular legacy application to display in the web console's launch page, but you do not want to uninstall the software, you can use the smreg command to unregister the application. See How to Determine if an Application is a Legacy Application on page 75.
Chapter 3 Working With the Sun Java Web Console (Tasks) 77
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Unregister an application.
# smreg remove -a app-name
Example 39
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Register and deploy the application.
wcadmin deploy -a app-name -x app-context-name /full path/to/app-name
Example 310
Solaris 10 6/06 releases. See How to List Deployed Applications on page 75 and How to Determine if an Application is a Legacy Application on page 75 to determine if an application is a legacy or updated application.
1
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Undeploy and unregister the application.
# wcadmin undeploy -a newexample_1.0 -x newexample
Java Web Console Security Considerations on page 79 Specifying Authorizations With the authTypes Tag on page 81
Access to the Java Web Console Whether you can connect to the console through a browser. Access to applications Whether you can see a particular application in the Java Web Console's launch page. Application permissions The levels of permissions that you must have to run parts or all of an application. Application access to remote systems How security credentials relate to remote systems Internal passwords used in the console - Changing the default passwords that are used internally in the console, starting with the Solaris 10 11/06 release.
Some system configurations are set up to be very secure, so that attempts to connect from a remote system to the URLs of the console or registered applications are refused. If your system is configured to prevent remote access, when you try to access the console as https://hostname.domain:6789, your browser displays a message such as:
Connect to hostname.domain:6789 failed (Connection refused)
The SMF profile in effect on the system might be restricting access. See SMF Profiles on page 330 for more information about profiles. See Enabling Remote Access to the Java Web Console on page 83 for a procedure to allow access to the console from remote systems.
This command lists each deployed application, showing when it was deployed and the path to the application's base directory. The app.xml file is located in the subdirectory WEB-INF within the base directory. For more information, see Specifying Authorizations With the authTypes Tag on page 81.
Application Privileges
If you can see an application's link on the Java Web Console's launch page, you can run that application. However, an application might make additional authorization checks based upon the authenticated user or role identity. These checks are not controlled by the authTypes tag, but are explicitly coded into the application itself. For example, an application might grant read access to all authenticated users, but restrict update access to a few users or a few roles.
administer by using the Java Web Console application has its own security domain. Having read-and-write permissions on the web console system does not guarantee that those credentials are automatically sufficient to administer any other remote system. In general, access to remote systems depends on how the security is implemented in the web application. Typically, web applications make calls to agents that perform actions on behalf of the applications. These applications must be authenticated by the agents based on their web console credentials and the credentials by which they are known on the agent system. Depending upon how this agent authentication is done, an authorization check might also be made on the agent itself, based upon this authenticated identity. For example, in web applications that use remote WBEM agents, authentication typically uses the user or role identity that initially authenticated to the Java Web Console. If this authentication fails on that agent system, access to that system is denied in the web application. If authentication succeeds on that agent system, access might still be denied if the agent makes an access control check and denies access there. Most applications are written so that the authentication and authorization checks on the agent never fail if you have been successfully authenticated on the web console and assumed the correct role.
The authTypes tag must contain at least one authType tag that provides the following necessary information:
Type of authorization check to perform Permission subclass name Parameters that are required to instantiate the Permission subclass
In the following example, the authType tag has one attribute, name. The required name attribute is the name of the authorization service type. Different authorization types might require different values for the classType and permissionParam tags.
<authTypes> <authType name="SolarisRbac"> <classType> com.sun.management.solaris.RbacPermission </classType> <permissionParam name="permission"> solaris.admin.serialmgr.read </permissionParam> </authType> </authTypes>
The following table shows the tags that can be nested within an authType tag
TABLE 31 Tag
The Permission subclass name. This tag is a required tag. The parameters that are required to create an instance of the class specified by classType.
The authTypes tag and nested authType tags are required elements in the app.xml file. If you want to register an application that is available to anyone, specify the authType tag with no content, as shown in the following example.
<authTypes> <authType name=""> <classType></classType> <permissionParam name=""></permissionParam> </authType> </authTypes>
82
Become superuser or assume an equivalent role on the system where the console is running. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Set a property to allow the console server to respond to network requests and restart the console server.
# svccfg -s svc:/system/webconsole setprop options/tcp_listen = true # smcwebserver restart
Become superuser or assume an equivalent role on the system where the console is running. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Set a property to prevent the console server from responding to network requests, and restart the console server.
# svccfg -s svc:/system/webconsole setprop options/tcp_listen = false # smcwebserver restart
After the restart the console now only responds to a browser on the same system as the console server process. You cannot use a proxy in the browser, only a direct connection. You can also use the https://localhost:6789/ URL to access the console.
Chapter 3 Working With the Sun Java Web Console (Tasks) 83
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Change the administrative password.
# wcadmin password -a
You are prompted to enter the new password twice. The password should be 8 to 32 characters.
3
You are prompted to enter the new password twice. The password should be 8 to 32 characters.
4
You are prompted to enter the new password twice. The password should be 8 to 32 characters.
84
C H A P T E R
This chapter provides guidelines and planning information for managing user accounts and groups. This chapter also includes information about customizing the user's work environment. This is a list of the overview information in this chapter:
What's New in Managing Users and Groups? on page 85 What Are User Accounts and Groups? on page 86 Where User Account and Group Information Is Stored on page 94 Tools for Managing User Accounts and Groups on page 98 Customizing a User's Work Environment on page 102
For step-by-step instructions on managing user accounts and groups, see Chapter 5, Managing User Accounts and Groups (Tasks).
85
Graphical tool that is used to Setting Up User Accounts (Task manage users, groups, roles, rights, Map) on page 113 mailing lists, disks, terminals, and modems. Commands that are used to Adding a Group and User With manage users, groups and roles. the smgroup and smuser The SMC services must be running Commands on page 119 to use these commands. Commands that are used to manage users, groups, and roles. Adding a Group and User With the groupadd and useradd Commands on page 119
The first initial, middle initial, first five characters of the user's last name The number 1, or 2, or 3, and so on, until you have a unique name
Note Each new user name must be distinct from any mail aliases that are known to the system
or to an NIS or NIS+ domain. Otherwise, mail might be delivered to the alias rather than to the actual user. For detailed guidelines on setting up user (login) names, see Guidelines for Using User Names, User IDs, and Group IDs on page 93.
User ID Numbers
Associated with each user name is a user identification number (UID). The UID number identifies the user name to any system on which the user attempts to log in. And, the UID number is used by systems to identify the owners of files and directories. If you create user accounts for a single individual on a number of different systems, always use the same user name and ID number. In that way, the user can easily move files between systems without ownership problems. UID numbers must be a whole number that is less than or equal to 2147483647. UID numbers are required for both regular user accounts and special system accounts. The following table lists the UID numbers that are reserved for user accounts and system accounts.
Chapter 4 Managing User Accounts and Groups (Overview) 87
TABLE 42
UID Numbers
root, daemon, bin, sys, and so on Regular users nobody and nobody4 noaccess
Reserved for use by the Solaris OS General purpose accounts Anonymous users Non trusted users
Do not assign UIDs 0 through 99. These UIDs are reserved for allocation by the Solaris Operating System. By definition, root always has UID 0, daemon has UID 1, and pseudo-user bin has UID 2. In addition, you should give uucp logins and pseudo user logins, such as who, tty, and ttytype, low UIDs so that they fall at the beginning of the passwd file. For additional guidelines on setting up UIDs, see Guidelines for Using User Names, User IDs, and Group IDs on page 93. As with user (login) names, you should adopt a scheme to assign unique UID numbers. Some companies assign unique employee numbers. Then, administrators add a number to the employee number to create a unique UID number for each employee. To minimize security risks, you should avoid reusing the UIDs from deleted accounts. If you must reuse a UID, wipe the slate clean so that the new user is not affected by attributes set for a former user. For example, a former user might have been denied access to a printer by being included in a printer deny list. However, that attribute might be inappropriate for the new user.
88
TABLE 43 Category
NFS interoperability
NFS server and client code truncates large UIDs and GIDs to 16 bits. This situation can create security problems if systems running SunOS 4.0 and compatible releases are used in an environment where large UIDs and GIDs are being used. Systems running SunOS 4.0 and compatible releases require a patch to avoid this problem. Users with UIDs greater than 60000 can log in or use the su command on systems running the Solaris 2.5 (and compatible releases). However, their UIDs and GIDs will be set to 60001 (nobody). Users with UIDs greater than 60000 are denied access on systems running Solaris 2.5 (and compatible releases) and the NIS+ name service.
Users who log in to systems running Solaris 2.5 (and compatible releases) and the NIS or files name service get a UID and GID of nobody.
Systems running Solaris 2.5 (and compatible releases) with the NFS version 2 software truncate UIDs to 16 bits, creating possible security problems. Users who use the cpio command with the default archive format to copy a file see an error message for each file. And, the UIDs and GIDs are set to nobody in the archive. x86 based systems: Users that run SVR3-compatible applications will probably see EOVERFLOW return codes from system calls. x86 based systems: If users attempt to create a file or directory on a mounted System V file system, the System V file system returns an EOVERFLOW error.
The ps -l command displays a maximum five-digit UID. So, the printed column won't be aligned when it includes a UID or GID larger than 99999. Users who use the cpio command with the -H odc format or the pax -x cpio command to copy files see an error message returned for each file. And, the UIDs and GIDs are set to nobody in the archive. Users who use the ar command have their UIDs and GIDs set to nobody in the archive.
1000000 or greater
89
(Continued)
2097152 or greater
Users who use the tar command, the cpio -H ustar command, or the pax -x tar command have their UIDs and GIDs set to nobody.
UNIX Groups
A group is a collection of users who can share files and other system resources. For example, users who working on the same project could be formed into a group. A group is traditionally known as a UNIX group. Each group must have a name, a group identification (GID) number, and a list of user names that belong to the group. A GID number identifies the group internally to the system. The two types of groups that a user can belong to are as follows:
Primary group Specifies a group that the operating system assigns to files that are created by the user. Each user must belong to a primary group. Secondary groups Specifies one or more groups to which a user also belongs. Users can belong to up to 15 secondary groups.
For detailed guidelines on setting up group names, see Guidelines for Using User Names, User IDs, and Group IDs on page 93. Sometimes, a user's secondary group is not important. For example, ownership of files reflect the primary group, not any secondary groups. Other applications, however, might rely on a user's secondary group memberships. For example, a user has to be a member of the sysadmin group (group 14) to use the Admintool software in previous Solaris releases. However, it doesn't matter if group 14 is his or her current primary group. The groups command lists the groups that a user belongs to. A user can have only one primary group at a time. However, a user can temporarily change the user's primary group, with the newgrp command, to any other group in which the user is a member. When adding a user account, you must assign a primary group for a user or accept the default group, staff (group 10). The primary group should already exist. If the primary group does not exist, specify the group by a GID number. User names are not added to primary groups. If user names were added to primary groups, the list might become too long. Before you can assign users to a new secondary group, you must create the group and assign it a GID number. Groups can be local to a system or managed through a name service. To simplify group administration, you should use a name service such as NIS or a directory service such as LDAP. These services enable you to centrally manage group memberships.
90
User Passwords
You can specify a password for a user when you add the user. Or, you can force the user to specify a password when the user first logs in. User passwords must comply with the following syntax:
Password length must at least match the value identified by the PASSLENGTH variable in the /etc/default/passwd file. By default, PASSLENGTH is set to 6. The first 6 characters of the password must contain at least two alphabetic characters and have at least one numeric or special character. You can increase the maximum password length to more than eight characters by configuring the /etc/policy.conf file with an algorithm that supports greater than eight characters.
Although user names are publicly known, passwords must be kept secret and known only to users. Each user account should be assigned a password. The password can be a combination of six to eight letters, numbers, or special characters. To make your computer systems more secure, users should change their passwords periodically. For a high level of security, you should require users to change their passwords every six weeks. Once every three months is adequate for lower levels of security. System administration logins (such as root and sys) should be changed monthly, or whenever a person who knows the root password leaves the company or is reassigned. Many breaches of computer security involve guessing a legitimate user's password. You should make sure that users avoid using proper nouns, names, login names, and other passwords that a person might guess just by knowing something about the user. Good choices for passwords include the following:
Phrases (beammeup). Nonsense words made up of the first letters of every word in a phrase. For example, swotrb for SomeWhere Over The RainBow. Words with numbers or symbols substituted for letters. For example, sn00py for snoopy.
Your name (spelled forwards, backwards, or jumbled) Names of family members or pets Car license numbers Telephone numbers Social Security numbers Employee numbers Words related to a hobby or interest Seasonal themes, such as Santa in December Any word in the dictionary
91
Home Directories
The home directory is the portion of a file system allocated to a user for storing private files. The amount of space you allocate for a home directory depends on the kinds of files the user creates, their size, and the number of files that are created. A home directory can be located either on the user's local system or on a remote file server. In either case, by convention the home directory should be created as /export/home/username. For a large site, you should store home directories on a server. Use a separate file system for each /export/homen directory to facilitate backing up and restoring home directories. For example, /export/home1, /export/home2. Regardless of where their home directory is located, users usually access their home directories through a mount point named /home/username. When AutoFS is used to mount home directories, you are not permitted to create any directories under the /home mount point on any system. The system recognizes the special status of /home when AutoFS is active. For more information about automounting home directories, see Task Overview for Autofs Administration in System Administration Guide: Network Services. To use the home directory anywhere on the network, you should always refer to the home directory as $HOME, not as /export/home/username. The latter is machine-specific. In addition, any symbolic links created in a user's home directory should use relative paths (for example, ../../../x/y/x) so that the links are valid no matter where the home directory is mounted.
Name Services
If you are managing user accounts for a large site, you might want to consider using a name or directory service such as LDAP, NIS, or NIS+. A name or directory service enables you to store user account information in a centralized manner instead of storing user account information in every system's /etc files. When you use a name or directory service for user accounts, users can move from system to system using the same user account without having site-wide user account information duplicated on every system. Using a name or directory service also promotes centralized and consistent user account information.
Note Do not use system initialization files, such as /etc/profile or /etc/.login, to manage a user's work environment. These files reside locally on systems and are not centrally administered. For example, if AutoFS is used to mount the user's home directory from any system on the network, you would have to modify the system initialization files on each system to ensure a consistent environment whenever a user moved from system to system.
For detailed information about customizing user initialization files for users, see Customizing a User's Work Environment on page 102. Another way to customize user accounts is through role-based access control (RBAC). See Role-Based Access Control (Overview) in System Administration Guide: Security Services for more information.
Guidelines for Using User Names, User IDs, and Group IDs
User names, UIDs, and GIDs should be unique within your organization, which might span multiple domains. Keep the following guidelines in mind when creating user or role names, UIDs, and GIDs:
User names They should contain from two to eight letters and numerals. The first character should be a letter. At least one character should be a lowercase letter.
Note Even though user names can include a period (.), underscore (_), or hyphen (-), using these characters is not recommended because they can cause problems with some software products.
System accounts Do not use any of the user names, UIDs, or GIDs that are contained in the default /etc/passwd and /etc/group files. Do not use the UIDs and GIDs, 0-99. These numbers are reserved for allocation by the Solaris Operating System and should not be used by anyone. Note that this restriction also applies to numbers not currently in use. For example, gdm is the reserved user name and group name for the GNOME Display Manager daemon and should not be used for another user. For a complete listing of the default /etc/passwd and /etc/group entries, see Table 45 and Table 46. The nobody and nobody4 accounts should never be used for running processes. These two accounts are reserved for use by NFS. Use of these accounts for running processes could lead to unexpected security risks. Processes that need to run as a non-root user should use the daemon or noaccess accounts.
93
System account configuration The configuration of the default system accounts should never be changed. This includes changing the login shell of a system account that is currently locked. The only exception to this rule is the setting of a password and password aging parameters for the root account.
The NIS+ name service information is stored in tables. The NIS name service information is stored in maps. The LDAP directory service information is stored in indexed database files.
Note To avoid confusion, the location of the user account and group information is generically
referred to as a file rather than as a database, table, or map. Most user account information is stored in the passwd file. Password information is stored as follows:
In the passwd file when you are using NIS or NIS+ In the /etc/shadow file when you are using /etc files In the people container when you are using LDAP
Password aging is available when you are using NIS+ or LDAP, but not NIS. Group information is stored in the group file for NIS, NIS+ and files. For LDAP, group information is stored in the group container.
For example:
kryten:x:101:100:Kryten Series 4000 Mechanoid:/export/home/kryten:/bin/csh
For a complete description of the fields in the passwd file, see the passwd(1) man page.
94 System Administration Guide: Basic Administration September 2008
root daemon
0 1
Superuser account Umbrella system daemon associated with routine system tasks Administrative daemon associated with running system binaries to perform some routine system task Administrative daemon associated with system logging or updating files in temporary directories Administrative daemon associated with system logging Line printer daemon Daemon associated with uucp functions Another daemon associated with uucp functions Sendmail message submission program daemon Account reserved for WebServer access GNOME Display Manager daemon
bin
sys
4 71 5 6 25 80 50
95
(Continued)
Description
37 60001 60002
Network listener daemon Account reserved for anonymous NFS access. Assigned to a user or a process that needs access to a system through some application but without actually logging in. SunOS 4.0 or 4.1 version of the nobody user account
nobody4
65534
For example:
rimmer:86Kg/MNT/dGu.:8882:0::5:20:8978
For a complete description of the fields in the shadow file, see the shadow(4) and crypt(1) man pages.
For example:
bin::2:root,bin,daemon
For a complete description of the fields in the group file, see the group(4) man page.
sys::3:root,bin,adm adm::4:root,daemon uucp::5:root mail::6:root tty::7:root,adm lp::8:root,adm nuucp::9:root staff::10: daemon::12:root smmsp::25: sysadmin::14: gdm::50: webservd::80: nobody::60001: noaccess::60002: nogroup::65534:
TABLE 46
Group Name
0 1 2
Superuser group Optional group Administrative group associated with running system binaries Administrative group associated with system logging or temporary directories Administrative group associated with system logging Group associated with uucp functions Electronic mail group Group associated with tty devices Line printer group Group associated with uucp functions General administrative group. Group associated with routine system tasks Administrative group associated with legacy Admintool and Solstice AdminSuite tools Daemon for Sendmail message submission program Group reserved for WebServer access
sys
4 5 6 7 8 9 10 12 14 25 80
smmsp webservd
97
TABLE 46
(Continued)
Description
Group Name
gdm
50 60001 60002
Group reserved for the GNOME Display Manager daemon Group assigned for anonymous NFS access Group assigned to a user or a process that needs access to a system through some application but without actually logging in Group assigned to a user who is not a member of a known group
nobody noaccess
nogroup
65534
Users User Templates Rights Administrative Roles Groups Projects Mailing Lists
Manage users accounts Create a set of attributes for a specific kind of user like students, engineers, or instructors Manage RBAC rights Manage RBAC administrative roles Manage group information Manage project information Manage mailing lists
Use the Solaris Management Console online help for information on performing these tasks. For information on the Solaris commands that can be used to manage user accounts and groups, see Table 15. These commands provide the same functionality as the Solaris management tools, including authentication and name service support.
98
Adds a user to the local system or name service. Creates a template of predefined user attributes for creating users of the same group, such as students, contractors, or engineers. Adds a user with a template so that user attributes are predefined. Clones a user template if you would like to use a similar set of predefined user attributes. Then, change only some of the attributes as needed. Sets up user properties in advance of adding users. Properties include specifying whether a user template is used when adding a user, and whether the home directory or mail box is deleted by default when removing a user. Adds multiple users to the local system or name service by specifying a text file, typing each name, or automatically generating a series of user names. Displays or changes user properties such as login shell, password, or password options. Assigns RBAC rights to users that will allow them to perform specific administration tasks. Removes the user from the local system or the name service. Optionally, you can also specify whether the user's home directory or mailbox is removed. The user is also removed from any groups or roles.
For information about adding a user to the local system or name service, see What Are User Accounts and Groups? on page 86 and User Account Components on page 87.
99
TABLE 49 Task
Grant a right
Grants a user a right to run a specific command or application that was previously only available to an administrator. Displays or changes existing rights. Adds an authorization, which is a discrete right granted to a role or a user. Displays or changes existing authorizations.
View or change existing rights properties Add an authorization View or change an authorization
For more information on granting rights to users, see Contents of Rights Profiles in System Administration Guide: Security Services.
TABLE 410 Task
Add an administrative role Assign rights to an administrative role Change an administrative role
Adds a role that someone would use to perform a specific administrative task. Assigns specific rights to a role that enable someone to perform a task. Adds or removes rights from a role.
For more information on using administrative roles, see How to Plan Your RBAC Implementation in System Administration Guide: Security Services.
TABLE 411 Task
Adds a group to the local system or name service so that the group name is available before you add the user. Adds a user to a group if the user needs access to group-owned files. Removes a user from a group if the user no longer requires group file access.
For information on adding users to groups, see UNIX Groups on page 90.
100
Create a mailing list Change a mailing list name Remove a mailing list
Creates a mailing list, which is a list of user names for sending email messages. Changes the mailing list after it is created. Removes a mailing list if it is no longer used.
For information on creating mailing lists, see the Solaris Management Console's online help.
TABLE 413 Task
Creates a new project or clones an existing project if the existing project has attributes similar to what you need for the new project. Displays or changes existing project attributes. Removes a project if the project is no longer used.
Bourne C
$HOME/.profile $HOME/.cshrc
Defines the user's environment at login Defines the user's environment for all C shells and is invoked after login shell Defines the user's environment at login
$HOME/.login
Korn
$HOME/.profile $HOME/$ENV
Defines the user's environment at login Defines user's environment at login in the file and is specified by the Korn shell's ENV environment variable
The Solaris environment provides default user initialization files for each shell in the /etc/skel directory on each system, as shown in the following table.
TABLE 415 Shell
/etc/skel/local.login /etc/skel/local.cshrc
Bourne or Korn
/etc/skel/local.profile
You can use these files as a starting point and modify them to create a standard set of files that provide the work environment common to all users. Or, you can modify these files to provide the working environment for different types of users. Although you cannot create customized user initialization files with the Users tool, you can populate a user's home directory with user initialization files located in a specified skeleton directory. You can do this by creating a user template with the User Templates tool and specifying a skeleton directory from which to copy user initialization files.
102 System Administration Guide: Basic Administration September 2008
For step-by-step instructions on how to create sets of user initialization files for different types of users, see How to Customize User Initialization Files on page 115. When you use the Users tool to create a new user account and select the create home directory option, the following files are created, depending on which login shell is selected.
TABLE 416 Shell
The /etc/skel/local.cshrc and the /etc/skel/local.login files are copied into the user's home directory and are renamed .cshrc and .login, respectively. The /etc/skel/local.profile file is copied into the user's home directory and renamed .profile.
If you use the useradd command to add a new user account and specify the /etc/skel directory by using the -k and -m options, all three /etc/skel/local* files and the /etc/skel/.profile file are copied into the user's home directory. At this point, you need to rename them to whatever is appropriate for the user's login shell.
To reference a site initialization file in a Bourne-shell or Korn-shell user initialization file, place a line similar to the following at the beginning of the user initialization file:
Chapter 4 Managing User Accounts and Groups (Overview) 103
. /net/machine-name/export/site-files/site-init-file
To make a user's home directory available anywhere on the network, always refer to the home directory with the variable $HOME. For example, use $HOME/bin instead of /export/home/username/bin. The $HOME variable works when the user logs in to another system and the home directories are automounted. To access files on a local disk, use global path names, such as /net/system-name/directory-name. Any directory referenced by /net/system-name can be mounted automatically on any system on which the user logs in, assuming the system is running AutoFS.
Shell Features
The following table lists basic shell features that each shell provides, which can help you determine what you can and can't do when creating user initialization files for each shell.
TABLE 417 Feature
Known as the standard shell in UNIX Compatible syntax with Bourne shell Job control History list Command-line editing Aliases Single-character abbreviation for login directory Protection from overwriting (noclobber) Setting to ignore Control-D (ignoreeof)
104
(Continued)
C Korn
Shell Environment
A shell maintains an environment that includes a set of variables defined by the login program, the system initialization file, and the user initialization files. In addition, some variables are defined by default. A shell can have two types of variables:
Environment variables Variables that are exported to all processes spawned by the shell. Their settings can be seen with the env command. A subset of environment variables, such as PATH, affects the behavior of the shell itself. Shell (local) variables Variables that affect only the current shell. In the C shell, a set of these shell variables have a special relationship to a corresponding set of environment variables. These shell variables are user, term, home, and path. The value of the environment variable counterpart is initially used to set the shell variable.
In the C shell, you use the lowercase names with the set command to set shell variables. You use uppercase names with the setenv command to set environment variables. If you set a shell variable, the shell sets the corresponding environment variable. Likewise, if you set an environment variable, the corresponding shell variable is also updated. For example, if you update the path shell variable with a new path, the shell also updates the PATH environment variable with the new path. In the Bourne and Korn shells, you can use the uppercase variable name equal to some value to set both shell and environment variables. You also have to use the export command to activate the variables for any subsequently executed commands. For all shells, you generally refer to shell and environment variables by their uppercase names. In a user initialization file, you can customize a user's shell environment by changing the values of the predefined variables or by specifying additional variables. The following table shows how to set environment variables in a user initialization file.
105
C shell
The following table describes environment variables and shell variables that you might want to customize in a user initialization file. For more information about variables that are used by the different shells, see the sh(1), ksh(1), or csh(1) man pages.
TABLE 419 Variable
Sets a variable used by the cd command. If the target directory of the cd command is specified as a relative path name, the cd command first looks for the target directory in the current directory (.). If the target is not found, the path names listed in the CDPATH variable are searched consecutively until the target directory is found and the directory change is completed. If the target directory is not found, the current working directory is left unmodified. For example, the CDPATH variable is set to /home/jean, and two directories exist under /home/jean, bin, and rje. If you are in the /home/jean/bin directory and type cd rje, you change directories to /home/jean/rje, even though you do not specify a full path. Sets the history for the C shell. Sets the path to the user's home directory. Sets the locale. Defines the name of the user currently logged in. The default value of LOGNAME is set automatically by the login program to the user name specified in the passwd file. You should only need to refer to, not reset, this variable. Sets the user's default printer. Sets the path to the user's mailbox. Sets the hierarchies of man pages that are available.
106
(Continued)
Specifies, in order, the directories that the shell searches to find the program to run when the user types a command. If the directory is not in the search path, users must type the complete path name of a command. As part of the login process, the default PATH is automatically defined and set as specified in .profile (Bourne or Korn shell) or .cshrc (C shell). The order of the search path is important. When identical commands exist in different locations, the first command found with that name is used. For example, suppose that PATH is defined in Bourne and Korn shell syntax as PATH=/bin:/usr/bin:/usr/sbin:$HOME/bin and a file named sample resides in both /usr/bin and /home/jean/bin. If the user types the command sample without specifying its full path name, the version found in /usr/bin is used.
prompt PS1
Defines the shell prompt for the C shell. Defines the shell prompt for the Bourne or Korn shell.
SHELL, or shell in the C Sets the default shell used by make, vi, and other tools. shell TERMINFO Specifies the path name for an unsupported terminal that has been added to the terminfo file. Use the TERMINFO variable in either the /etc/profile or /etc/.login file. When the TERMINFO environment variable is set, the system first checks the TERMINFO path defined by the user. If the system does not find a definition for a terminal in the TERMINFO directory defined by the user, it searches the default directory, /usr/share/lib/terminfo, for a definition. If the system does not find a definition in either location, the terminal is identified as dumb. TERM, or term in the C shell Defines the terminal. This variable should be reset in either the /etc/profile or /etc/.login file. When the user invokes an editor, the system looks for a file with the same name that is defined in this environment variable. The system searches the directory referenced by TERMINFO to determine the terminal characteristics. Sets the time zone. The time zone is used to display dates, for example, in the ls -l command. If TZ is not set in the user's environment, the system setting is used. Otherwise, Greenwich Mean Time is used.
TZ
107
A default path is set by the system. However, most users modify it to add other command directories. Many user problems related to setting up the environment and accessing the correct version of a command or a tool can be traced to incorrectly defined paths.
If security is not a concern, put the current working directory (.) first in the path. However, including the current working directory in the path poses a security risk that you might want to avoid, especially for superuser. Keep the search path as short as possible. The shell searches each directory in the path. If a command is not found, long searches can slow down system performance. The search path is read from left to right, so you should put directories for commonly used commands at the beginning of the path. Make sure that directories are not duplicated in the path. Avoid searching large directories, if possible. Put large directories at the end of the path. Put local directories before NFS mounted directories to lessen the chance of hanging when the NFS server does not respond. This strategy also reduces unnecessary network traffic.
In a Bourne-shell or Korn-shell user initialization file, you would add the following:
PATH=.:/usr/bin:/$HOME/bin:/net/glrr/files1/bin export PATH
Locale Variables
The LANG and LC environment variables specify the locale-specific conversions and conventions for the shell. These conversions and conventions include time zones, collation orders, and formats of dates, time, currency, and numbers. In addition, you can use the stty command in a user initialization file to indicate whether the terminal session will support multibyte characters.
108 System Administration Guide: Basic Administration September 2008
The LANG variable sets all possible conversions and conventions for the given locale. You can set various aspects of localization separately through these LC variables: LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_NUMERIC, LC_MONETARY, and LC_TIME. The following table describes some of the values for the LANG and LC environment variables.
TABLE 420 Value
de_DE.ISO8859-1 en_US.UTF-8 es_ES.ISO8859-1 fr_FR.ISO8859-1 it_IT.ISO8859-1 ja_JP.eucJP ko_KR.EUC sv_SE.ISO8859-1 zh_CN.EUC zh_TW.EUC
German American English (UTF-8) Spanish French Italian Japanese (EUC) Korean (EUC) Swedish Simplified Chinese (EUC) Traditional Chinese (EUC)
For more information on supported locales, see the International Language Environments Guide.
EXAMPLE 41
The following examples show how to set the locale by using the LANG environment variables. In a C-shell user initialization file, you would add the following:
setenv LANG de_DE.ISO8859-1
In a Bourne-shell or Korn-shell user initialization file, you would add the following:
LANG=de_DE.ISO8859-1; export LANG
The first digit sets permissions for the user The second digit sets permissions for group The third digit sets permissions for other, also referred to as world
Note that if the first digit is zero, it is not displayed. For example, if the user mask is set to 022, 22 is displayed. To determine the umask value you want to set, subtract the value of the permissions you want from 666 (for a file) or 777 (for a directory). The remainder is the value to use with the umask command. For example, suppose you want to change the default mode for files to 644 (rw-r--r--). The difference between 666 and 644 is 022, which is the value you would use as an argument to the umask command. You can also determine the umask value you want to set by using the following table. This table shows the file and directory permissions that are created for each of the octal values of umask.
TABLE 421
0 1 2 3 4 5 6 7
The following line in a user initialization file sets the default file permissions to rw-rw-rw-.
umask 000
EXAMPLE 42
The .profile File PATH=$PATH:$HOME/bin:/usr/local/bin:/usr/ccs/bin:. MAIL=/var/mail/$LOGNAME NNTPSERVER=server1 MANPATH=/usr/share/man:/usr/local/man PRINTER=printer1 umask 022 export PATH MAIL NNTPSERVER MANPATH PRINTER
1. 2. 3. 4. 5. 6. 7.
Defines the user's shell search path Defines the path to the user's mail file Defines the user's Usenet news server Defines the user's search path for man pages Defines the user's default printer Sets the user's default file creation permissions Sets the listed environment variables
The .cshrc File set path=($PATH $HOME/bin /usr/local/bin /usr/ccs/bin) setenv MAIL /var/mail/$LOGNAME setenv NNTPSERVER server1 setenv PRINTER printer1 alias h history umask 022 source /net/server2/site-init-files/site.login
EXAMPLE 43
1. Defines the user's shell search path. 2. Defines the path to the user's mail file. 3. Defines the user's Usenet news server. 4. Defines the user's default printer. 5. Creates an alias for the history command. The user needs to type only h to run the history command. 6. Sets the user's default file creation permissions. 7. Sources the site initialization file.
EXAMPLE 44
The following shows an example site initialization file in which a user can choose a particular version of an application.
# @(#)site.login main:
Chapter 4 Managing User Accounts and Groups (Overview) 111
EXAMPLE 44
(Continued)
echo "Application Environment Selection" echo "" echo "1. Application, Version 1" echo "2. Application, Version 2" echo "" echo -n "Type 1 or 2 and press Return to set your application environment: " set choice = $< if ( $choice !~ [1-2] ) then goto main endif switch ($choice) case "1": setenv APPHOME /opt/app-v.1 breaksw case "2": setenv APPHOME /opt/app-v.2 endsw
This site initialization file could be referenced in a user's .cshrc file (C shell users only) with the following line:
source /net/server2/site-init-files/site.login
In this line, the site initialization file is named site.login and is located on a server named server2. This line also assumes that the automounter is running on the user's system.
112
C H A P T E R
This chapter describes how to set up and maintain user accounts and groups. For information on the procedures associated with setting up and maintaining user accounts and groups, see the following:
Setting Up User Accounts (Task Map) on page 113 Maintaining User Accounts (Task Map) on page 123
For background information about managing user accounts and groups, see Chapter 4, Managing User Accounts and Groups (Overview).
Use a standard form to gather user information to help you keep user information organized.
You can set up user initialization How to Customize User files (.cshrc, .profile, .login), so Initialization Files on page 115 that you can provide new users with consistent environments. You can add a group with the following tools: Solaris Management Console's Groups tool Solaris command-line interface tools How to Add a Group With the Solaris Management Console's Groups Tool on page 116 Adding Groups and Users With Command-Line Tools on page 119
Add a group.
113
Task
Description
For Instructions
Add a user.
You can add a user with the following tools: Solaris Management Console's Users tool Solaris command-line interface tools
How to Add a User With the Solaris Management Console's Users Tool on page 117 Adding Groups and Users With Command-Line Tools on page 119
You can create a user template so See Solaris Management Console that you don't have to manually add online help all similar user properties. You can add rights or a role to a user so that the user can perform a specific command or task. You must share the user's home directory so that the directory can be remotely mounted from the user's system. You must mount the user's home directory on the user's system. See Solaris Management Console online help How to Share a User's Home Directory on page 120
User Name: Role Name: Profiles or Authorizations: UID: Primary Group: Secondary Groups: Comment: Default Shell: Password Status and Aging:
114
Item
Description
Home Directory Path Name: Mounting Method: Permissions on Home Directory: Mail Server: Department Name: Department Administrator: Manager: Employee Name: Employee Title: Employee Status: Employee Number: Start Date: Add to These Mail Aliases: Desktop System Name:
shared-dir user-type
3
The name of a directory that is available to other systems on the network. The name of a directory to store initialization files for a type of user.
Copy the default user initialization files into the directories that you created for different types of users.
# cp /etc/skel/local.cshrc /shared-dir/skel/user-type/.cshrc # cp /etc/skel/local.login /shared-dir/skel/user-type/.login # cp /etc/skel/local.profile /shared-dir/skel/user-type/.profile
115
Note If the account has profiles assigned to it, then the user has to launch a special version of
the shell called a profile shell to use commands (with any security attributes) that are assigned to the profile. There are three profile shells corresponding to the types of shells: pfsh (Bourne shell), pfcsh (C shell), and pfksh (Korn shell). For information about profile shells, see Role-Based Access Control (Overview) in System Administration Guide: Security Services.
4
Edit the user initialization files for each user type and customize them based on your site's needs. For a detailed description on the ways to customize the user initialization files, see Customizing a User's Work Environment on page 102.
Verify that the permissions for the user initialization files are correct.
# ls -la /shared-dir/skel/*
Example 51
How to Add a Group With the Solaris Management Console's Groups Tool
You can add existing users to the group when you add the group. Or, you can just add the group and then add the user to the group when you add the user.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
116
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed. (Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User icon and provide the superuser password or the role password. Click the Groups icon. Select Add Group from the Action menu. Use the Context help to add a group to the system. Identify the group name at the Group Name prompt under Group Identification. For example, mechanoids.
4 5 6 7
Identify the group number at the Group ID number prompt. For example, GID 101. Click OK.
10
How to Add a User With the Solaris Management Console's Users Tool
Use the following procedure to add a user with the Solaris Management Console's Users tool. Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Start the Solaris Management Console.
# /usr/sadm/bin/smc &
117
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed.
4 5 6 7
(Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User icon and provide the superuser password or the role password. Click the User Accounts icon. Use the Context help to add a user to the system. Select Add UserWith Wizard from the Action menu. Click Next between the steps below. a. Identify the user name or login name at the User Name prompt. For example, kryten b. (Optional) Identify the user's full name at the Full Name prompt. For example, kryten series 3000. c. (Optional) Provide a further description of this user at the Description prompt. d. Provide the user ID at the User ID Number prompt. For example, 1001. e. Select the User Must Use This Password At First Login option. Provide a password for the user at the Password prompt and then confirm the password at the Confirm Password prompt. f. Select the user's primary group. For example, mechanoids. g. Create the user's home directory by accepting the defaults at the Server and Path prompts. h. Specify the mail server.
118
i. Review the information you provided and go back to correct the information, if necessary. Otherwise, click Finish.
Adding a Group and User With the groupadd and useradd Commands
The following example shows how to use the groupadd and useradd commands to add the group scutters and the user scutter1 to files on the local system. These commands cannot be used to manage users in a name service environment.
# groupadd -g 102 scutters # useradd -u 1003 -g 102 -d /export/home/scutter1 -s /bin/csh \ -c "Scutter 1" -m -k /etc/skel scutter1 64 blocks
For more information, see the groupadd(1M) and useradd(1M) man pages.
Adding a Group and User With the smgroup and smuser Commands
The following example shows how to use the smgroup and smuser commands to add the group gelfs and the user camille to the NIS domain solar.com on the host starlite.
# /usr/sadm/bin/smgroup add -D nis:/starlitesolar.com -- -g 103 -n gelfs # /usr/sadm/bin/smuser add -D nis:/starlite/solar.com -- -u 1004 -n camille -c "Camille G." -d /export/home/camille -s /bin/csh -g gelfs
For more information, see the smgroup(1M) and smuser(1M) man pages.
119
If you use the Users tool's Add User Wizard to add a user account and you specify the user's home directory as /export/home/username, the home directory is automatically set up to automount. Also, the following entry is added to the passwd file.
/home/username
There is only way you can use Users tool to set up a user account that does not automount the home directory. First, set up a user account template that disables this feature. Then, add users with this template. You cannot disable this feature with the Add User Wizard. You can use the smuser add command with the -x autohome=N option to add a user without automounting the user's home directory. However, there is no option to the smuser delete command to remove the home directory after the user is added. You would have to remove the user and the user's home directory with the Users tool.
120
Select one of the following based on whether the file system that contains the user's home directory is already shared. a. If the user's home directory is already shared, go to the step 8. b. If the user's home directory is not shared, go to Step 6.
/file-system is the file system that contains the user's home directory that you need to share. By convention, the file system is /export/home.
7
This command executes all the share commands in the /etc/dfs/dfstab file so that you do not have to wait to reboot the system.
8
Example 52
(The line share -F nfs /export/home is added.) # shareall -F nfs # share /usr/dist ro "" /export/home/user-name rw "" See Also
If the user's home directory is not located on the user's system, you have to mount the user's home directory from the system where it is located. For detailed instructions, see How to Mount a User's Home Directory on page 122.
121
Make sure that the user's home directory is shared. For more information, see How to Share a User's Home Directory on page 120. Log in as superuser on the user's system. Edit the /etc/vfstab file and create an entry for the user's home directory.
system-name:/export/home/user-name - /export/home/username nfs - yes rw
2 3
system-name /export/home/username
The name of the system where the home directory is located. The name of the user's home directory that will be shared. By convention, /export/home/username contains user home directories. However, you can use a different file system. Required placeholders in the entry. The name of the directory where the user's home directory will be mounted.
/export/home/username
For more information about adding an entry to the /etc/vfstab file, see Mounting File Systems in System Administration Guide: Devices and File Systems.
4
All entries in the current vfstab file (whose mount at boot fields are set to yes) are mounted.
6
Example 53
122
# mkdir -p /export/home/ripley # mountall # mount / on /dev/dsk/c0t0d0s0 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=... /devices on /devices read/write/setuid/dev=46c0000 on Thu Jan 8 09:38:19 2004 /usr on /dev/dsk/c0t0d0s6 read/write/setuid/intr/largefiles/xattr/onerror=panic/dev=... /proc on /proc read/write/setuid/dev=4700000 on Thu Jan 8 09:38:27 2004 /etc/mnttab on mnttab read/write/setuid/dev=47c0000 on Thu Jan 8 09:38:27 2004 /dev/fd on fd read/write/setuid/dev=4800000 on Thu Jan 8 09:38:30 2004 /var/run on swap read/write/setuid/xattr/dev=1 on Thu Jan 8 09:38:30 2004 /tmp on swap read/write/setuid/xattr/dev=2 on Thu Jan 8 09:38:30 2004 /export/home on /dev/dsk/c0t0d0s7 read/write/setuid/intr/largefiles/xattr/onerror=... /export/home/ripley on venus:/export/home/ripley remote/read/write/setuid/xattr/dev=...
Modify a group.
You can modify a group's name or the users in a group by using the Groups tool. You can delete a group if it is no longer needed. Disable a user account You can temporarily disable a user account if it will be needed in the future. Change a user's password You might need to change a user's password if the user forgets it. Set password aging You can force users to change their passwords periodically with User Account tool's Password Options menu.
How to Modify a Group on page 125 How to Delete a Group on page 125 How to Disable a User Account on page 127 How to Change a User's Password on page 128 How to Set Password Aging on a User Account on page 129
You can delete a user account if it is How to Delete a User Account on no longer needed. page 129
123
If two user accounts have duplicate UID numbers, use the Users tool to remove one account and add it again with a different UID number. You cannot use the Users tool to modify a UID number of an existing user account. If two user accounts have duplicate user names, use the Users tool to modify one of the accounts and change the user name.
If you do use the Users tool to change a user name, the home directory's ownership is changed, if a home directory exists for the user. One part of a user account that you can change is a user's group memberships. Select the Properties option from Users tool's Action menu to add or delete a user's secondary groups. Alternatively, you can use the Groups tool to directly modify a group's member list. You can also modify the following parts of a user account:
Description (comment) Login shell Passwords and password options Home directory and home directory access Rights and roles
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed. (Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User icon. Provide the superuser password or the role password. Click the Groups icon. Select the group to modify. For example, select scutters. Modify the selected group in the Group Name: text box. Click OK when you are finished. For example, change scutters to scutter. All the users that were in the scutters group are now in the scutter group.
4 5 6 7 8 9
10
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed.
4 5 6 7 8 9
(Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User icon. Provide the superuser password or the role password. Click the Groups icon. Select the group to delete. For example, select scutter.
10
Click OK in the popup window. The group is removed from all the users who were a member of this group.
Administering Passwords
You can use the Users tool for password administration. This tool includes the following capabilities:
Specifying a normal password for a user account Enabling users to create their own passwords during their first login Disabling or locking a user account Specifying expiration dates and password aging information
126
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed. (Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User icon and provide the superuser password or the role password. Click the User Accounts icon. Doubleclick the user. For example, select scutter2.
Chapter 5 Managing User Accounts and Groups (Tasks) 127
4 5 6 7 8
Select the Account is Locked option in the Account Availability section of the General tab features. Click OK.
10
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed.
4 5 6 7 8
(Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User icon. Provide the superuser password or the role password. Click the User Accounts icon, then doubleclick the user who needs a new password. For example, select scutter1.
9 10
Select the Password tab, then select the User Must Use This Password at Next Login option. . Enter the user's new password and click OK.
128
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed. (Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User Accounts icon and provide the superuser password or the role password. Click the User Accounts icon. Doubleclick the user, then select the Password Options tab. For example, select scutter2. Select the Password Options tab. Select the appropriate Password Options in Days option and click OK. For example, select Users Must Change Within to set a date when the user must change his or her password.
4 5 6 7 8
9 10
For more information on starting the Solaris Management Console, see How to Start the Console as Superuser or as a Role on page 44 or How to Start the Solaris Management Console in a Name Service Environment on page 51.
3
Click the This Computer icon under the Management Tools icon in the Navigation pane. A list of categories is displayed. (Optional) Select the appropriate toolbox for your name service environment. Click the System Configuration icon. Click the User icon. Provide the superuser password or the role password. Click the User Accounts icon. Doubleclick the user account to be removed. For example, select scutter4. Click Delete in the popup window if you are sure you want to remove the user account. You are prompted to remove the user's home directory and mailbox contents.
4 5 6 7 8 9
10
130
C H A P T E R
This chapter describes the management of server and client support on a network. Overview information is provided about each system configuration (referred to as a system type) that is supported in the Solaris Operating System. This chapter also includes guidelines for selecting the appropriate system type to meet your needs.
Note Information in this chapter that pertains only to a specific Solaris release, or was
introduced in a specific Solaris release, is labeled accordingly. This is a list of the overview information in this chapter.
What's New in Managing Client-Server Support? on page 131 Where to Find Client-Server Tasks on page 133 What Are Servers, Clients, and Appliances? on page 134 What Does Client Support Mean? on page 135 Overview of System Types on page 135 Diskless Client Management Overview on page 138
For step-by-step instructions about how to manage diskless client support, see Chapter 7, Managing Diskless Clients (Tasks).
131
The following feature enhancements are part of the new diskless boot scheme:
The OS server is now capable of serving multiple Solaris releases simultaneously. With the new diskless boot scheme, you can perform a pxegrub based network boot , where multiple releases are presented to a client from the GRUB menu.
Vendor-specific options are now specified in the boot archive. In previous releases, client-specific boot properties, typically defined in the bootenv.rc file, were provided by using vendor-specific options for the DHCP setup. The total length of the information that was required frequently exceeded the limit in the DHCP specification. With the boot new scheme, this information is part of the boot archive. The PXE/DHCP server is only required to provide the server IP address, the boot file, pxegrub, and possibly a client-specific menu file, through Site Option 150.
132
where host-name is the host name of the client system. For more information, see x86: How to Boot the Failsafe Archive to Forcibly Update a Corrupt Boot Archive on page 256 and the bootadm(1M) man page.
Note This information applies to both SPARC based and x86 based OS servers that are serving
x86 based clients. For more information on setting up and configuring DHCP, see Chapter 14, Configuring the DHCP Service (Tasks), in System Administration Guide: IP Services. For more information on how to manage diskless clients in the GRUB boot environment, see Booting an x86 Based System by Using GRUB (Task Map) on page 241.
133
Client-Server Services
Install or JumpStart clients Diskless client systems in the Solaris OS Diskless client systems in the Solaris 7 OS and earlier Solaris releases
Solaris 10 Installation Guide: Network-Based Installations Diskless Client Management Overview on page 138 and Chapter 7, Managing Diskless Clients (Tasks) Solstice AdminSuite 2.3 Administration Guide
Server
A system that provides services to other systems in its network. There are file servers, boot servers, web servers, database servers, license servers, print servers, installation servers, appliance servers, and even servers for particular applications. This chapter uses the term server to mean a system that provides boot services and file systems for other systems on the network. A system that uses remote services from a server. Some clients have limited disk storage capacity, or perhaps none at all. Such clients must rely on remote file systems from a server to function. Diskless systems and appliance systems are examples of this type of client. Other clients might use remote services (such as installation software) from a server. However, they don't rely on a server to function. A stand-alone system is a good example of this type of client. A stand-alone system has its own hard disk that contains the root (/), /usr, and /export/home file systems and swap space.
Client
Appliance
A network appliance such as the Sun RayTM appliance provides access to applications and the Solaris OS. An appliance gives you centralized server administration, and no client administration or upgrades. Sun Ray appliances also provide hot desking. Hot desking enables you to instantly access your computing session from any appliance in the server group, exactly where you left off. For more information, see http://www.sun.com/products/sunray.
134
Making a system known to the network (host name and Ethernet address information) Providing installation services to remotely boot and install a system Providing Solaris OS services and application services to a system with limited disk space or no disk space
System Type
Server
Available
Not available
High
High
Stand-alone system
Available
Not available
Low
High
/export/root Not available Not available root (/) swap /usr /home High High Low Low
Appliance
Not available
Not available
Not available
High
High
135
Description of a Server
A server system contains the following file systems:
The root (/) and /usr file systems, plus swap space The /export and /export/home file systems, which support client systems and provide home directories for users The /opt directory or file system for storing application software
Servers can also contain the following software to support other systems:
Solaris OS services for diskless systems that are running a different release Clients that use a different platform than the server Solaris CD image software and boot software for networked systems to perform remote installations JumpStartTM directory for networked systems to perform custom JumpStart installations
Stand-Alone Systems
A networked stand-alone system can share information with other systems in the network. However, it can continue to function if detached from the network. A stand-alone system can function autonomously because it has its own hard disk that contains the root (/), /usr, and /export/home file systems and swap space. Thus, the stand-alone system has local access to OS software, executables, virtual memory space, and user-created files.
Note A stand-alone system requires sufficient disk space to hold its necessary file systems.
A non-networked stand-alone system is a stand-alone system with all the characteristics just listed, except it is not connected to a network.
Diskless Clients
A diskless client has no disk and depends on a server for all its software and storage needs. A diskless client remotely mounts its root (/), /usr, and /home file systems from a server. A diskless client generates significant network traffic due to its continual need to procure OS software and virtual memory space from across the network. A diskless client cannot operate if it is detached from the network or if its server malfunctions. For more overview information about diskless clients, see Diskless Client Management Overview on page 138.
136 System Administration Guide: Basic Administration September 2008
Description of an Appliance
An appliance, such as the Sun Ray appliance, is an X display device that requires no administration. There is no CPU, fan, disk, and very little memory. An appliance is connected to a Sun display monitor. However, the appliance user's desktop session is run on a server and displayed back to the user. The X environment is set up automatically for the user and has the following characteristics:
Relies on a server to access other file systems and software applications Provides centralized software administration and resource sharing Contains no permanent data, making it a field-replaceable unit (FRU)
Can the system be treated as a field-replaceable unit (FRU)? This means that a broken system can be quickly replaced with a new system without any lengthy backup and restore operations and no loss of system data.
Does the system need to be backed up? Large costs in terms of time and resources can be associated with backing up a large number of desktop systems.
Can the system's data be modified from a central server? Can the system be installed quickly and easily from a centralized server without handling the client system's hardware? Performance
Does this configuration perform well in desktop usage? Does the addition of systems on a network affect the performance of other systems already on the network?
Disk space usage How much disk space is required to effectively deploy this configuration? This table describes how each system type scores in terms of each characteristic. A ranking of 1 is most efficient. A ranking of 4 is least efficient.
137
TABLE 62
System Type
4 1 1
1 4 1
4 1 1
SPARC servers x86 based servers SPARC based clients x86 based clients
Supported Supported Supported Supported (Starting with the Solaris 8 1/01 release)
This table describes the combination of OS client-server configurations that are supported by the smosservice and smdiskless commands.
138 System Administration Guide: Basic Administration September 2008
TABLE 63
OS Client-Server Support
Diskless Client OS
Add and modify diskless client support Add and remove OS services Manage diskless client information in the LDAP, NIS, NIS+, or files name service environment
If you are performing a GRUB based boot on an x86 system, you need to manually set up the DHCP configuration. See x86: How to Prepare for Adding Diskless Clients in a GRUB Based Boot Environment on page 146 for more information.
Note You can only use the diskless client commands to set up diskless client booting. You
cannot use these commands to set up other services, such as remote installation or profile services. Set up remote installation services by including diskless client specifications in the sysidcfg file. For more information, see Solaris 10 Installation Guide: Custom JumpStart and Advanced Installations.
139
TABLE 64 Command
/usr/sadm/bin/smosservice
Add OS services Delete OS services List OS services Manage OS service patches Add a diskless client to an OS server Delete a diskless client from an OS server List the diskless clients on an OS server Modify the attributes of a diskless client
/usr/sadm/bin/smdiskless
add delete
list modify
Use the -h option when you type the command, subcommand, and required options, as shown in the following example.
% /usr/sadm/bin/smdiskless add -p my-password -u my-user-name -- -h
smosservice list
List OS services
List OS service patches List diskless clients on an OS server Add diskless clients
140
(Continued)
System Administrator
All commands
All tasks
Adding OS Services
A Solaris OS server is a server that provides operating system (OS) services to support diskless client systems. You can add support for an OS server or convert a stand-alone system to an OS server by using the smosservice command. For each platform group and Solaris release that you want to support, you must add the particular OS service to the OS server. For example, if you want to support SPARC sun-4u systems running the Solaris 10 release, you must add sun-4u/Solaris 10 OS services to the OS server. For each diskless client that you support, you must add the OS service for that client to the OS server. For example, you would need to add OS services to support SPARC sun-4m systems or x86 based systems that run the Solaris 9 release, because they are different platform groups. You must have access to the appropriate Solaris software CD or disk image to add OS services.
In previous Solaris releases, you were prompted about diskless client support during the installation process. Starting with the Solaris 9 release, you must manually allocate an /export file system either during installation or create it after installation. See the following table for specific disk space requirements.
TABLE 66
Solaris 10 SPARC based OS server Solaris 10 x86 based OS server Solaris 10 SPARC based diskless client Solaris 10 x86 based diskless client
5 Gbytes 5 Gbytes Reserve 200 to 300 Mbytes per diskless client. Reserve 200 to 300 Mbytes per diskless client.
/export
142
C H A P T E R
This chapter describes how to manage diskless clients in the Solaris Operating System (Solaris OS). For information on the procedures that are associated with managing diskless clients, see Managing Diskless Clients (Task Map) on page 143. For information about installation problems that are associated with managing diskless clients, see Troubleshooting Diskless Client Installation Problems on page 164. For overview information on managing diskless clients, see Chapter 6, Managing Client-Server Support (Overview).
1. (Optional) Enable Solaris Choose Log Viewer from the Management Console logging to console main window to view view diskless client error messages. diskless client error messages. 2. Prepare for adding a diskless client. Verify supported releases and identify the platform, media path, and cluster (or software group) of each diskless client.
Starting the Solaris Management Console on page 44 x86: How to Prepare for Adding Diskless Clients in a GRUB Based Boot Environment on page 146 How to Prepare for Adding Diskless Clients in the Solaris 10 OS on page 149
143
Task
Description
For Instructions
Add the OS services for the diskless How to Add OS Services for clients you want to support by Diskless Client Support on using the smosservice command. page 150 You must identify the platform, media path, and each diskless client platform that you want to support. How to Locate and Install Missing The smosservice add command does not install any root (/) or /usr ARCH=all Packages on page 164 packages that are designated ARCH=all. These packages must be installed manually after adding the OS services to the OS server. This behavior has existed since the Solaris 2.1 OS. The behavior applies to both SPARC based and x86 based platforms. Missing ARCH=all packages vary, depending on which Solaris OS you are running. Add diskless client support by x86: How to Add a Diskless Client specifying all required information in the GRUB Based Boot by using the smdiskless Environment on page 153 command. How to Add a Diskless Client in the Solaris 10 OS on page 156 Verify that a diskless client was successfully added by booting the diskless client. x86: How to Boot a Diskless Client With GRUB on page 158 SPARC: How to Boot a Diskless Client in the Solaris 10 OS on page 159 How to Remove Diskless Client Support on page 159 How to Remove OS Services for Diskless Clients on page 160 How to Add an OS Patch for a Diskless Client on page 162
4. Locate and install any ARCH=all packages that were missed when you added OS services to the server.
Note To avoid having to add these packages to each diskless client individually, perform this task prior to adding diskless client support .
8. (Optional) Delete OS services for Delete OS services for a diskless a diskless client. client if they are no longer needed. 9. (Optional) Patch OS services. Add, delete, list, or synchronize patches for diskless client OS services.
144
The Solaris installation program doesn't prompt you to set up diskless client support. You must manually create an /export partition to support diskless clients. You create the /export partition during or after the installation process. The /export partition must contain a minimum of 5 Gbytes, depending upon the number of clients supported. For specific information, see Disk Space Requirements for OS Servers. The name service identified in the smosservice or smdiskless commands must match the primary name service identified in the /etc/nsswitch.conf file. If you don't specify a name service in the smdiskless or smosservice commands, the default name service is files. Use the -D option to the smosservice and smdiskless commands to specify a name server. For more information, see the smosservice(1M) and smdiskless(1M) man pages. Starting with the Solaris 10 8/07 release, the set_nfs4_domain script that was delivered in the Solaris 10 OS is no longer used to set the NFSv4 domain. To set the NFSv4 domain, add the nfs4_domain keyword to the diskless client's sysidcfg file, for example, server:/export/root/client/etc/sysidcfg. If the nfs4_domain keyword exists in the client system's sysidcfg file, the first boot of a diskless client sets the domain accordingly. Also, the OS server should be up and running, and the diskless client's NFSv4 domain setting must match the setting in the OS server's /var/run/nfs4_domain file. For more information, see Preconfiguring With the sysidcfg File in Solaris 10 Installation Guide: Network-Based Installations.
The OS server and the diskless client must be on the same subnet. You cannot provide client services on a multiterabyte UFS file system, because OS and diskless client services cannot be added to a UFS file system that resides on an EFI-labeled disk.
Note Attempts to add OS and diskless client services to a UFS file system that resides on an
EFI-labeled disk result in an erroneous insufficient disk space message similar to the following:
The partition /export does not have enough free space. 1897816 KB (1853.34 MB) additional free space required. Insufficient space available on /dev/dsk/c0t5d0s0 /export
After you determine the platform, media path, and cluster for each diskless client, you are ready to add OS services.
Chapter 7 Managing Diskless Clients (Tasks) 145
The following directories are created and populated for each OS service that you add:
/export/Solaris_version/Solaris_version-instruction-set.all (symbolic link to /export/exec/Solaris_version/Solaris_version-instruction-set.all) /export/Solaris_version /export/Solaris_version/var /export/Solaris_version/opt /export/share /export/root/templates/Solaris_version /export/root/clone /export/root/clone/Solaris_version /export/root/clone/Solaris_version/machine-class
The following default directories are created and populated on the OS server for each diskless client that you add:
Note You can modify the default locations of the root (/), /swap, and /dump directories by
using the -x option to the smosservice and smdiskless commands. However, do not create these directories under the /export file system.
x86: How to Prepare for Adding Diskless Clients in a GRUB Based Boot Environment
Use this procedure to prepare for adding a diskless client. This procedure includes general information for x86 based systems. When you use the smosservice add command to add OS services, you must specify the platform, media path, and cluster (or software group) of each diskless client platform that you want to support.
Ensure that the system that is intended to be the OS service is running a supported release. Also, verify that the OS server release and diskless client release combination is supported. For more information, see OS Server and Diskless Client Support Information on page 138.
System Administration Guide: Basic Administration September 2008
146
Identify the diskless client platform by using this format: instruction-set.machine-class.Solaris-version For example: i386.i86pc.Solaris_10 The following are the possible platform options:
instruction-set machine-class Solaris-version
sparc
Starting with the Solaris 10 1/06 OS Solaris 10, Solaris 9, Solaris 8, Solaris 7, and Solaris 2.7 Solaris 10, Solaris 9, Solaris 8, and Solaris 2.7
i386
i86pc
Note The sun-4c architecture is not supported in the Solaris 8, Solaris 9, or Solaris 10 releases. The sun-4d architecture is not supported in the Solaris 9, Solaris 10 releases. The sun-4m architecture is not supported in the Solaris 10 release. 2
Identify the media path. The media path is the full path to the disk image that contains the OS that you want to install for the diskless client. The Solaris OS is delivered on multiple CDs. However, you cannot use the smosservice command to load OS services from a multiple CD distribution. You must run the scripts that are found on the Solaris software CDs (and optional Language CD) to do the following:
Create an install image on a server. For information on setting up an install server, refer to Solaris 10 Installation Guide: Network-Based Installations. Load the required OS services from the CD image. Use one of the following scripts:
147
For example, if you are using the setup_install_server script from the Solaris 10 Software 1 CD on a locally connected CD-ROM device, the syntax looks similar to the following:
# mkdir /export/install/sol_10_x86 # cd /cd_mount_point/Solaris_10/Tools # ./setup_install_server /export/install/sol_10_x86 5
Add the BootFile and BootSrvA DHCP options to your DHCP server configuration to enable a PXE boot. For example:
Boot server IP (BootSrvA) : svr-addr (BootFile) : 01client-macro
where svr-addr is the IP address of the OS server and client-macro is named by the client's Ethernet type (01) and the mac address of the client. This number is also the name of the file that is used in the /tftpboot directory on the installation server.
Note The notation for the client-macro consists of uppercase letters. This notation should not
contain any colons. You can add these options from the command-line, or by using DHCP Manager. See Example 74 for more information. For more information, see x86: How to Perform a GRUB Based Boot From the Network on page 261, Preconfiguring System Configuration Information With the DHCP Service (Tasks) in Solaris 10 Installation Guide: Network-Based Installations, and Part III, DHCP, in System Administration Guide: IP Services.
6
After the Solaris CD image is installed on the disk, note the disk media path. For example:
/net/export/install/sol_10_x86
This is the disk media path that needs to be specified when you use the smosservice command.
7
Identify the SUNWCXall cluster when you add OS services. You must use the same cluster for diskless clients that run the same OS on the same system.
Note Always specify SUNWCXall as the cluster.
148
Ensure that the system that is intended to be the OS service is running a supported release. Also verify that the combination of OS server release and diskless client release is supported. For more information, see OS Server and Diskless Client Support Information on page 138. Identify the diskless client platform by using this format: instruction-set.machine-class.Solaris-version For example: sparc.sun4u.Solaris_10 The following are the possible platform options:
instruction-set machine-class Solaris_version
sparc
Starting with the Solaris 10 1/06 OS Solaris_10, Solaris_9, Solaris_8, Solaris_2.7 Solaris_10, Solaris_9, Solaris_8, Solaris_2.7
i386
i86pc
Note The sun-4c architecture is not supported in the Solaris 8, Solaris 9, or Solaris 10 releases. The sun-4d architecture is not supported in the Solaris 9 or 10 releases. The sun-4m architecture is not supported in the Solaris 10 release. 2
Identify the media path. The media path is the full path to the disk image that contains the OS that you want to install for the diskless client. The Solaris OS is delivered on multiple CDs. However, you cannot use the smosservice command to load OS services from a multiple CD distribution. You must run the scripts that are found on the Solaris software CDs (and optional Language CD) to do the following:
Create an install image on a server. For information on setting up an install server, refer to Solaris 10 Installation Guide: Network-Based Installations. Load the required OS services from the CD image.
Chapter 7 Managing Diskless Clients (Tasks) 149
For example, if you are using the setup_install_server script from the Solaris Express Developer Edition 10 Software 1 CD on a locally connected CD-ROM device, the syntax looks similar to the following:
# mkdir /export/install/sparc_10 # cd /cd_mount_point/Solaris_10/Tools # ./setup_install_server /export/install/sparc_10 5
After the Solaris CD image is installed on the disk, specify the disk media path. For example:
/export/install/sparc_10
Identify the SUNWCXall cluster when you add OS services. You must use the same cluster for diskless clients that run the same OS on the same system. For example, consider the following Solaris 9 diskless clients:
sparc.sun4m.Solaris_9 sparc.sun4u.Solaris_9
To set up these diskless clients, you would need to specify the SUNWCXall cluster for each diskless client because the sun4u and sun4m systems require the SUNWCXall cluster. In addition, diskless clients that run the same operating release (in this example, Solaris_9) on the same system must use the same cluster.
Note If you are using a sun4u system, or if you are using a system with an accelerated 8-bit color memory frame buffer (cgsix), you must specify SUNWCXall as the cluster.
150
Note When adding OS services with the smosservice add command, root (/) and /usr packages with the ARCH=all type are not installed. These packages are skipped. No warning or error messages are displayed. After you add the OS services to the OS server, you must install the missing packages manually. For instructions, see How to Locate and Install Missing ARCH=all Packages. 1
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Verify that the Solaris Management Console server is running and that the diskless client tools are available on the system.
# /usr/sadm/bin/smosservice list -H host-name:898 --
add Adds the specified OS service. -H host-name:898 Specifies the host name and port to which you want to connect. If you do not specify a port, the system connects to the default port, 898.
Note The -H option is not a required option when using the smossservice command to add
OS services. -Identifies that the subcommand arguments start after this point. -x mediapath=path Specifies the full path to the Solaris image. -x platform=instruction-set.machine-class..Solaris_version Specifies the instruction architecture, machine class, and the Solaris version to be added. -x cluster=cluster-name Specifies the Solaris cluster to install. -x locale=locale-name Specifies the locale to install.
Chapter 7 Managing Diskless Clients (Tasks) 151
Note The installation process can take about 45 minutes, depending on the server speed and
the OS service configuration you choose. For more information, see the smosservice(1M) man page.
4 5
(Optional) Continue to add the other OS services. When you are finished adding OS services, verify that the OS services were installed.
# /usr/sadm/bin/smosservice list -H host-name:898 --
Example 71
Example 72
152
Starting Solaris Management Console server version 2.1.0. endpoint created: :898 Solaris Management Console server is ready. Loading Tool: com.sun.admin.osservermgr.cli.OsServerMgrCli from orbit:898 Login to orbit as user root was successful. Download of com.sun.admin.osservermgr.cli.OsServerMgrCli from orbit:898 was successful. Client Root Area Swap Area Dump Area -------------------------------------------------------------------------------. . . # Next Steps
Locate and install any ARCH=all packages that were missed when you ran the smosservice add command to add the OS services to the OS server. For more information, see How to Locate and Install Missing ARCH=all Packages.
x86: How to Add a Diskless Client in the GRUB Based Boot Environment
Starting with the Solaris 10 1/06 release, use this procedure to add a diskless client after you have added OS services.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Add the diskless client.
# /usr/sadm/bin/smdiskless add -- -i ip-address -e ethernet-address -n client-name -x os=instruction-set.machine-class.Solaris_version -x root=/export/root/client-name -x swap=/export/swap/client-name -x swapsize=size -x tz=time-zone -x locale=locale-name
add Adds the specified diskless client. -Identifies that the subcommand arguments start after this point. -i ip-address Identifies the IP address of the diskless client. -e ethernet-address Identifies the Ethernet address of the diskless client.
Chapter 7 Managing Diskless Clients (Tasks) 153
-n client-name Specifies the name of the diskless client. -x os=instruction-set.machine-class.Solaris_version Specifies the instruction architecture, machine class, OS, and the Solaris version for the diskless client. -x root=root=/export/root/client-name Identifies the root (/) directory for the diskless client. -x swap=root=/export/root/client-name Identifies the swap file for the diskless client. -x swapsize=size Specifies the size of the swap file in Mbytes. The default is 24 Mbytes. -x tz=time-zone Specifies the time-zone for the diskless client. -x locale=locale-name Specifies the locale to install for the diskless client. For more information, see the smdiskless(1M) man page.
3
If not already created, add the BootSrva and BootFile DHCP options to your DHCP server configuration to enable a PXE boot. For example:
Boot server IP (BootSrvA) : svr-addr Boot file (BootFile) : 01client-macro
where svr-addr is the IP address of the server and client-macro is named by the client's Ethernet type (01) and the mac address of the client. This number is also the name of the file that is used in the /tftpboot directory on the installation server.
Note The client-macro notation consists of uppercase letters. The notation should not contain
any colons. The following files and directories are created in the /tftpboot directory:
drwxr-xr-x lrwxrwxrwx -rw-r--r-6 root sys 512 Dec 28 14:53 client-host-name 1 root root 31 Dec 28 14:53 menu.lst.01ethernet-address -> /tftpboot/client-host-name/grub/menu.lst 1 root root 118672 Dec 28 14:53 01ethernet-address
154
If the console is on a serial port, edit the /tftpboot/menu.lst.01ethernet-address file. Uncomment the line that specifies the tty setting. To change the default menu.lst file that is created on the client, edit the echo lines in the /usr/sadm/lib/wbem/config_tftp file. For more information, see Booting an x86 Based System from the Network on page 258.
6 Example 73
(Optional) Continue to use the smdiskless add command to add each diskless client.
x86: Adding Diskless Client Support to an x86 Based System in the GRUB Boot Environment
This example shows how to add a Solaris 10 x86 based diskless client, mikey1.
rainy-01# /usr/sadm/bin/smdiskless add -H sdts-01-qfe0 -- -o sdts-01-qfe0 -n mikey1 -i 192.168.20.22 -e 00:E0:88:55:33:BC -x os=i386.i86pc.Solaris_10 -x root=/export/root/mikey1 -x swap=/export/swap/mikey1 Loading Tool: com.sun.admin.osservermgr.cli.OsServerMgrCli from sdts-01-qfe0 Login to rainy-01-qfe0 as user root was successful. Download of com.sun.admin.osservermgr.cli.OsServerMgrCli from rainy-01-qfe0 was successful. # /usr/sadm/bin/smdiskless list -H mikey1:898 -Loading Tool: com.sun.admin.osservermgr.cli.OsServerMgrCli from mikey1:898 Login to mikey1 as user root was successful. Download of com.sun.admin.osservermgr.cli.OsServerMgrCli from mikey1:898 was successful. Platform -------------------------------------------------------------------------------i386.i86pc.Solaris_10 sparc.sun4us.Solaris_10 sparc.sun4u.Solaris_10 i386.i86pc.Solaris_9
Example 74
x86: Adding the BootSrvA and BootFile DHCP Options to the DHCP Server Configuration
This example shows how to add the BootSrva and BootFile DHCP options that are necessary for enabling a PXE boot.
rainy-01# pntadm -A mikey1 -m 0100E0885533BC -f MANUAL+PERMANENT \ -i 0100E0885533BC 192.168.0.101
Chapter 7 Managing Diskless Clients (Tasks) 155
In the preceding examples, the server address is the IP address of the server, and the client macro is named by the client's Ethernet type (01) and its mac address. This number is also the name of the file that is used in the /tftpboot directory on the installation server. Note that the notation for the client macro consists of uppercase letters and should not contain any colons.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Add the diskless client.
# /usr/sadm/bin/smdiskless add -- -i ip-address -e ethernet-address -n client-name -x os=instruction-set.machine-class.Solaris_version -x root=/export/root/client-name -x swap=/export/swap/client-name -x swapsize=size -x tz=time-zone -x locale=locale-name
add Adds the specified diskless client. -Identifies that the subcommand arguments start after this point. -i ip-address Identifies the IP address of the diskless client. -e ethernet-address Identifies the Ethernet address of the diskless client. -n client-name Specifies the name of the diskless client. -x os=instruction-set.machine-class..Solaris_version Specifies the instruction architecture, machine class, OS, and the Solaris version for the diskless client. -x root=root=/export/root/client-name Identifies the root (/) directory for the diskless client. -x swap=root=/export/root/client-name Identifies the swap file for the diskless client.
156 System Administration Guide: Basic Administration September 2008
-x swapsize=size Specifies the size of the swap file in Mbytes. The default is 24 Mbytes. -x tz=time-zone Specifies the time-zone for the diskless client. -x locale=locale-name Specifies the locale to install for the diskless client. For more information, see the smdiskless(1M) man page.
3 4
(Optional) Continue to use the smdiskless add command to add each diskless client. Verify that the diskless clients were installed.
# /usr/sadm/bin/smdiskless list -H host-name:898 --
Example 75
Note that the smdiskless list -H command output lists both SPARC based and x86 based systems.
Example 76
x86: Adding Diskless Client Support to an x86 Based System in the Solaris 10 OS
This example shows how to add a Solaris 10 x86 based diskless client, mars, from the server bearclaus.
Chapter 7 Managing Diskless Clients (Tasks) 157
# /usr/sadm/bin/smdiskless add -- -i 172.20.27.176 -e 00:07:E9:23:56:48 -n mars -x os=i386.i86pc.Solaris_10 -x root=/export/root/mars -x swap=/export/swap/mars -x swapsize=128 -x tz=US/Mountain -x locale=en_US
To ensure that the system boots from the network, verify the following prerequisites on the OS server:
Confirm that the name service used to add the diskless client and the OS services matches the primary name in the server's /etc/nsswitch.conf file. Verify that the DHCP and tftp boot services are running. Configure the system BIOS to boot the system from the network by enabling the PXE ROM option. Some PXE-capable network adapters have a feature that enables PXE boot if you type a particular keystroke in response to a brief boot-time prompt. See your hardware documentation for information about how to set the boot priority in the BIOS.
Boot the diskless client by typing the correct keystroke combination. The GRUB menu is displayed. Depending on the configuration of your network installation server, the GRUB menu that is displayed on your system might vary from the GRUB menu that is shown here.
Use the arrow keys to select a boot entry, then press Enter. If you do not make a selection, the default OS instance is automatically booted after several seconds.
If you need to modify the GRUB kernel behavior by editing the GRUB menu at boot time, use the arrow keys to select a boot entry, then type e to edit the entry.
158
Note The previous example shows the GRUB multiboot implementation. The GRUB menus vary, depending on the Solaris release you are running.
The boot command that you want to edit is displayed in the GRUB edit screen. For more information about modifying kernel behavior at boot time, see Chapter 11, Modifying Solaris Boot Behavior (Tasks).
To save the edits and return to the GRUB menu, press Enter. The GRUB menu is displayed, showing the edits you made to the boot command.
Confirm that the name service used to add the diskless client and the OS services matches the primary name in the server's /etc/nsswitch.conf file. Otherwise, the diskless client will not boot. Confirm that the rpc.bootparamd daemon is running. If it is not running, start it.
Example 77
Example 78
160
Please enter a string value for: password :: # /usr/sadm/bin/smosservice list -H starlite:898 -Loading Tool: com.sun.admin.osservermgr.cli.OsServerMgrCli from starlite:898 Login to starlite as user root was successful. Download of com.sun.admin.osservermgr.cli.OsServerMgrCli from starlite:898 was successful
Establish the /export/diskless/Patches patch spool directory on an OS server. Add patches to the patch spool directory. If the patch you are adding obsoletes an existing patch in the spool, the obsolete patch is moved to /export/diskless/Patches/Archive. Delete patches from the patch spool directory. List the patches in the patch spool directory. Synchronize spooled patches out to clients. You must reboot each synchronized client for the client to recognize the patch update.
Note Keep your OS servers up to date by installing recommended OS patches on a timely basis.
For information on downloading patches, see How to Download and Apply a Solaris Patch on page 432.
Kernel patches are logged in the diskless client's /var/sadm/patch directory. To display kernel patches, type the following command on the diskless client:
% patchadd p
Note You must be logged in to the diskless client when you run this command. Running the patchadd -p command on the OS server displays kernel patches for the OS server only.
/usr patches are logged in the OS server's /export/Solaris_version/var/patch directory. A directory is created for each patch ID. To display /usr patches, type the following command on the OS server:
161
To list all spooled patches by OS and architecture, use the smosservice command with the -P option.
If the patch to add depends on another patch, adding the patch fails with the following message:
The patch patch-ID-revision could not be added because it is dependent on other patches which have not yet been spooled. You must add all required patches to the spool first. 4
Note Pushing and synchronizing the patch to the diskless client can take up to 90 minutes per
patch.
6
Example 79
162
# /usr/sadm/bin/smosservice patch -- -a /var/patches/111879-01 Authenticating as user: root Type /? for help, pressing <enter> accepts the default denoted by [ ] Please enter a string value for: password :: Loading Tool: com.sun.admin.osservermgr.cli.OsServerMgrCli from starlite Login to starlite as user root was successful. Download of com.sun.admin.osservermgr.cli.OsServerMgrCli from starlite was successful.. . # /usr/sadm/bin/smosservice patch -- -P Patches In Spool Area Os Rel Arch Patch Id Synopsis ------------------------------------------------------------------------8 sparc 111879-01 SunOS 5.8: Solaris Product Registry patch SUNWwsr Patches Applied To OS Services Os Service Patch ------------------------------------------------------------------------Solaris_8 Patches Applied To Clone Areas Clone Area Patch ------------------------------------------------------------------------Solaris_8/sun4u Patches In Spool Area Os Rel Arch Patch Id Synopsis ---------------------------------------------------------------------------8 sparc 111879-01 SunOS 5.8: Solaris Product Registry patch SUNWwsr . . . # /usr/sadm/bin/smosservice patch -- -m -U Authenticating as user: root Type /? for help, pressing <enter> accepts the default denoted by [ ] Please enter a string value for: password :: Loading Tool: com.sun.admin.osservermgr.cli.OsServerMgrCli from starlite Login to starlite as user root was successful. Download of com.sun.admin.osservermgr.cli.OsServerMgrCli from starlite was successful. # /usr/sadm/bin/smosservice patch -- -P Authenticating as user: root . . . Patches In Spool Area Os Rel Arch Patch Id Synopsis
Chapter 7 Managing Diskless Clients (Tasks) 163
---------------------------------------------------------------------------8 sparc 111879-01 SunOS 5.8: Solaris Product Registry patch SUNWwsr Patches Applied To OS Services Os Service Patch ---------------------------------------------------------------------------Solaris_8 Patches Applied To Clone Areas Clone Area Patch ---------------------------------------------------------------------------Solaris_8/sun4u
Locate all the packages with the ARCH=all parameter. a. Change directories to the Product directory of the media for the Solaris 10 image. For example:
% cd /net/server/export/Solaris/s10u2/combined.s10s_u2wos/latest/Solaris_10/Product
b. List all the packages in the pkginfo file that have the ARCH=all parameter.
% grep -w ARCH=all */pkginfo
164 System Administration Guide: Basic Administration September 2008
If an error message indicating the arguments list is too long is displayed, you can alternately run the following command to generate the list:
% find . -name pkginfo -exec grep -w ARCH=all {} /dev/null \;
Note that running this command takes longer to produce results. The output is similar to the following:
./SUNWjdmk-base/pkginfo:ARCH=all ./SUNWjhdev/pkginfo:ARCH=all ./SUNWjhrt/pkginfo:ARCH=all ./SUNWjhdem/pkginfo:ARCH=all ./SUNWjhdoc/pkginfo:ARCH=all ./SUNWmlibk/pkginfo:ARCH=all
The information that is provided in this list enables you to determine which packages are installed in the /usr file system and which packages are installed in the root (/) file system. c. Check the value of the SUNW_PKGTYPE parameter in the package list you generated. Packages that belong in the /usr file system are designated as SUNW_PKGTYPE=usr in the pkginfo file. Packages that belong in the root (/) file system are designated as SUNW_PKGTYPE=root in the pkginfo file. In the preceding output, all the packages belong in the /usr file system.
2
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Create the temporary installation administration files. You must create a separate installation administration file for packages that are installed in the root (/) file system and a separate installation administration file for packages that are installed in the /usr file system.
For ARCH=all packages that are installed in the /usr file system, create the following temporary installation administration file:
# cat >/tmp/admin_usr <<EOF mail= instance=unique partial=nocheck runlevel=nocheck idepend=nocheck rdepend=nocheck space=nocheck setuid=nocheck conflict=nocheck
165
For ARCH=all packages that are installed in the root (/) file system, if any exist, create the following temporary installation administration file:
# cat >/tmp/admin_root <<EOF mail= instance=unique partial=nocheck runlevel=nocheck idepend=nocheck rdepend=nocheck space=nocheck setuid=nocheck conflict=nocheck action=nocheck EOF #
Install the missing ARCH=all packages. a. If the current directory is not the Product directory of the media for the Solaris 10 image, change directories to that directory. For example:
# cd /net/server/export/Solaris/s10u2/combined.s10s_u2wos/latest/Solaris_10/Product
You can run the pwd command to determine the current directory. b. Install the missing ARCH=all packages in the /usr file system.
# pkgadd -R /export/Solaris_10 -a /tmp/admin_usr -d pwd [package-A package-B ...]
Multiple packages can be listed when you running the pkgadd command. c. Check that the ARCH=all packages were installed.
# pkginfo -R /export/Solaris_10 [package-A package-B ...]
d. Install the missing ARCH=all packages that in the root (/) file system. Note that it is possible that none of these packages exist.
# pkgadd -R /export/root/clone/Solaris_10/sun4u -a /tmp/admin_root -d pwd [package-X package-Y ...]
166
After you have finished adding the missing ARCH=all packages, remove the temporary installation administration file.
# rm /tmp/administration-file
Example 710
% uname -a SunOS t1fac46 5.10 Generic_118833-02 sun4u sparc SUNW,UltraSPARC-IIi-cEngine % cat /etc/release Solaris 10 6/06 s10s_u2wos_03 SPARC Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 06 February 2006 % cd /net/ventor/export/Solaris/s10u2/combined.s10s_u2wos/latest/Solaris_10/Product % grep -w ARCH=all */pkginfo Arguments too long % find . -name pkginfo -exec grep -w ARCH=all {} /dev/null \; ./SUNWjdmk-base/pkginfo:ARCH=all ./SUNWjhdev/pkginfo:ARCH=all ./SUNWjhrt/pkginfo:ARCH=all ./SUNWjhdem/pkginfo:ARCH=all ./SUNWjhdoc/pkginfo:ARCH=all ./SUNWmlibk/pkginfo:ARCH=all % grep -w SUNW_PKGTYPE=usr ./SUNWjdmk-base/pkginfo ./SUNWjhdev/pkginfo ... ./SUNWjdmk-base/pkginfo:SUNW_PKGTYPE=usr ./SUNWjhdev/pkginfo:SUNW_PKGTYPE=usr ./SUNWjhrt/pkginfo:SUNW_PKGTYPE=usr ./SUNWjhdem/pkginfo:SUNW_PKGTYPE=usr ./SUNWjhdoc/pkginfo:SUNW_PKGTYPE=usr % grep -w SUNW_PKGTYPE=root ./SUNWjdmk-base/pkginfo ./SUNWjhdev/pkginfo ... % su Password: xxxxxx # cat >/tmp/admin_usr <<EOF mail= instance=unique partial=nocheck
Chapter 7 Managing Diskless Clients (Tasks) 167
runlevel=nocheck idepend=nochec> k rdepend=nocheck space=nocheck setuid=nocheck conflict=nocheck action=nocheck basedir=/usr_sparc.all EOF # pwd /net/ventor/export/Solaris/s10u2/combined.s10s_u2wos/latest/Solaris_10/Product # pkginfo -R /export/Solaris_10 SUNWjdmk-base ERROR: information for "SUNWjdmk-base" was not found # pkgadd -R /export/Solaris_10 -a /tmp/admin_usr -d pwd SUNWjdmk-base Processing package instance <SUNWjdmk-base> </net/ventor/export/Solaris/s10u2/combined.s10s_u2wos...
Java DMK 5.1 minimal subset(all) 5.1,REV=34.20060120 Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using </export/Solaris_10/usr_sparc.all> ## Processing package information. ## Processing system information. Installing Java DMK 5.1 minimal subset as <SUNWjdmk-base> ## Installing part 1 of 1. 2438 blocks Installation of <SUNWjdmk-base> was successful. # pkginfo -R /export/Solaris_10 SUNWjdmk-base application SUNWjdmk-base Java DMK 5.1 minimal subset # rm /tmp/admin_usr
/usr/lib/security/pam_unix_session.so.1 is not root, when attempting to log in, the /usr file system is owned by nobody. Solution: To correct the problem, follow this workaround: 1. Using a text editor, modify the diskless client's server:/export/root/client/etc/default/nfs file. 2. Change the #NFSMAPID_DOMAIN=domain line to the following:
NFSMAPID_DOMAIN=the_same_value_as_in_servers_/var/run/nfs4_domain
3. Ensure that the OS server and the diskless client have the same nfsmapid domain. To verify this information, check the /var/run/nfs4_domain file.
Caution If the diskless client's nfs4_domain file contains a different value than the OS server's /var/run/nfs4_domain file, you will not be able to log in to the system after the diskless client boots.
4. Reboot the diskless client. For more information, see Chapter 3, NFS Tunable Parameters, in Solaris Tunable Parameters Reference Manual and nfsmapid(1M).
Problem: The OS server fails to do the following:
Respond to client Reverse Address Resolution Protocol (RARP) requests Respond to client bootparam requests Mount a diskless client root (/) file system Solution: The following solutions apply in a files environment.
Verify that files is listed as the first source for hosts, ethers, and bootparams in the /etc/nsswitch.conf file on the OS server. Verify that the client's IP address appears in the /etc/inet/hosts file.
Note If you are not running at least the Solaris 10 8/07 release, you must also verify that the
client's IP address appears in the /etc/inet/ipnodes file. In this Solaris release, there is no longer two separate hosts files. The /etc/inet/hosts file is a single file that contains both IPv4 and IPv6 entries. You do not need to maintain IPv4 entries in two hosts files that always require synchronization. For backward compatibility, the /etc/inet/ipnodes file is replaced with a symbolic link of the same name to the /etc/inet/hosts file. For more information, see the hosts(4) man page.
Verify that the client's Ethernet address appears in the /etc/ethers file.
169
Verify that the /etc/bootparams file contains the following paths to the client's root (/) directory and swap areas.
client root=os-server:/export/root/client swap=os-server: /export/swap/client
The swap size varies depending on whether you specify the -x swapsize option when you add the diskless client. If you specify the -x dump option when you add the diskless client, the following line is present.
dump=os-server:/export/dump/client dumpsize=512
The dump size varies depending on whether you specify the -x dumpsize option when you add the diskless client.
Respond to client RARP requests Respond to client bootparam requests Mount a diskless client root (/) file system Verify that both the OS server's and the client's Ethernet address and IP address are correctly mapped. Verify that the /etc/bootparams file contains the paths to the client's root (/) directory and swap areas.
client root=os-server:/export/ root/client swap=os-server:/export/ swap/client swapsize=24
The swap size varies depending on whether you specify the -x swapsize option when you add the diskless client. If you specify the -x dump option when you add the diskless client, the following line is present:
dump=os-server:/export/dump/client dumpsize=24
The dump size varies depending on whether you specify the -x dumpsize option when you add the diskless client.
Problem: Diskless client panics Solution: Verify the following:
170 System Administration Guide: Basic Administration September 2008
The OS server's Ethernet address is correctly mapped to its IP address. If you physically moved a system from one network to another, you might have forgotten to remap the system's new IP address. The client's host name, IP address, and Ethernet address do not exist in the database of another server on the same subnet that responds to the client's RARP, Trivial File Transfer Protocol (TFTP), or bootparam requests. Often, test systems are set up to install their OS from an install server. In these cases, the install server answers the client's RARP or bootparam request, returning an incorrect IP address. This incorrect address might result in the download of a boot program for the wrong architecture, or a failure to mount the client's root (/) file system. The diskless client's TFTP requests are not answered by an install server (or previous OS server) that transfers an incorrect boot program. If the boot program is of a different architecture, the client immediately panics. If the boot program loads from a non-OS server, the client might obtain its root partition from the non-OS server and its /usr partition from the OS server. In this situation, the client panics if the root and /usr partitions are of conflicting architectures or versions. If you are using both an install server and an OS server, verify that the following entry exists in the /etc/dfs/dfstab file.
share -F nfs -o -ro /export/exec/Solaris_version-instruction-set.all/usr
Verify that the diskless client's root (/), /swap, and /dump (if specified) partitions have share entries:
share -F nfs -o rw=client,root=client /export/root/client share -F nfs -o rw=client,root=client /export/swap/client share -F nfs -o rw=client,root=client /export/dump/client
On the OS server, type the following command to check which files are shared:
% share
The OS server must share /export/root/client and /export/swap/client-name (defaults), or the root, /swap, and /dump partitions that you specified when you added the diskless client. Verify that the following entries exist in the /etc/dfs/dfstab file:
share -F nfs -o ro /export/exec/Solaris_version-instruction-set.all/usr share -F nfs -o rw=client,root=client /export/root/client share -F nfs -o rw=client,root=client /export/swap/client
171
Problem: OS server is not responding to diskless client's RARP request Solution: From the client's intended OS server, run the snoop command as superuser (root) by using the client's Ethernet address: # snoop xx:xx:xx:xx:xx:xx Problem: Boot program downloads but panics early in the process Solution: Use the snoop command to verify that the intended OS server is answering the client's TFTP and NFS requests. Problem: Diskless client hangs. Solution: Restart the following daemons on the OS server: # /usr/sbin/rpc.bootparamd # /usr/sbin/in.rarpd -a Problem: Incorrect server responds to diskless client's RARP request Solution: Restart the following daemons on the OS server: # /usr/sbin/rpc.bootparamd # svcadm enable network/rarp
172
C H A P T E R
This chapter provides guidelines for shutting down and booting a system. The Solaris Operating System (Solaris OS) is designed to run continuously so that electronic mail and network resources are available to users. This is a list of the information in this chapter:
What's New in Shutting Down and Booting a System on page 173 Where to Find Shut Down and Boot Tasks on page 176 Shut Down and Boot Terminology on page 176 Guidelines for Shutting Down a System on page 177 Guidelines for Booting a System on page 178 When to Shut Down a System on page 179 When to Boot a System on page 180
For an overview of all of the boot features and methods that are available in the Solaris release, see Chapter 9, Shutting Down and Booting a System (Overview) For instructions on booting a Solaris system, see Chapter 12, Booting a Solaris System (Tasks).
For more information, see Booting From a ZFS Root File System on page 188.
For more information, see x86: Implementation of the findroot Command on page 219.
Other enhancements include an improved boot architecture that supports booting a system from additional file system types, for example a ZFS file system or a single miniroot for installation, as well as booting from DVD, NFS, or HTTP. These enhancements increase flexibility and reduce maintenance requirements on SPARC based systems. As part of this redesign, the Solaris boot archives and the bootadm command, previously only available on the Solaris x86 based platform, are now an integral part of the Solaris SPARC boot architecture. The primary difference between the SPARC and x86 boot architectures is how the boot device and file are selected at boot time. The SPARC based platform continues to use the OpenBootTM PROM (OBP) as the primary administrative interface, with boot options selected by using OBP commands. On x86 based systems, these options are selected through the BIOS and the GRand Unified Bootloader (GRUB) menu.
Note Although the implementation of the Solaris SPARC boot has changed, no administrative
procedures for booting a SPARC based system have been impacted. Boot tasks that are performed by the system administrator remain the same as they were prior to the boot architecture redesign. For more information, see the boot(1M) and bootadm(1M) man pages. For more information in this document, see Understanding the New Solaris SPARC Boot Architecture on page 183.
175
Note On certain x86 based systems that were manufactured before 1999 and are running an
older Solaris release, pressing the power button immediately turns off system power without safely shutting down the system. This same behavior occurs when pressing the power button on systems that are running with ACPI support that is disabled through the use of acpi-user-options. For more information about acpi-user-options, see the eeprom(1M) man page.
Shut down a SPARC based system or an x86 based system Modify boot behavior Boot a SPARC based system or an x86 based system Manage the Solaris boot archives Troubleshoot boot behavior on a SPARC or an x86 based system
Chapter 10, Shutting Down a System (Tasks) Chapter 11, Modifying Solaris Boot Behavior (Tasks) Chapter 12, Booting a Solaris System (Tasks) Chapter 13, Managing the Solaris Boot Archives (Tasks) Troubleshooting Booting a System (Task Map) on page 262
Boot options
176
Interactive boot You are prompted to provide information about how the system is booted, such as the kernel and device path name. Reconfiguration boot .The system is reconfigured to support newly added hardware or new pseudo devices. Recovery boot The system is hung or an invalid entry is prohibiting the system from booting successfully or from allowing users to log in.
For terminology that is specific to GRUB based booting, see x86: GRUB Terminology on page 290.
Use the init and shutdown commands to shut down a system. Both commands perform a clean system shutdown, which means that all system processes and services are terminated normally.
x86 only For x86 based systems that are running at least the Solaris 10 6/06 release, you can
initiate a clean system shutdown by pressing and releasing the power button. Shutting down an x86 based system in this manner is equivalent to using the init 5 command to shut down a system. On some x86 based systems, the BIOS configuration might prevent the power button from initiating a system shutdown. To use the power button, reconfigure the BIOS.
Use the shutdown command to shut down a server. Logged-in users and systems that mount resources from the server are notified before the server is shut down. Additional notification of system shutdowns by electronic mail is also recommended so that users can prepare for system downtime. You need superuser privileges to use the shutdown or init command to shut down a system. Both shutdown and init commands take a run level as an argument.
177
Run level 3 All system resources are available and users can log in. By default, booting a system brings it to run level 3, which is used for normal day-to-day operations. This run level is also known as multiuser level with NFS resources shared. Run level 6 Stops the operating system and reboots to the state that is defined by the initdefault entry in the /etc/inittab file. Run level 0 The operating system is shut down, and it is safe to turn off power. You need to bring a system to run level 0 whenever you move a system, or add or remove hardware.
Run levels are fully described in Chapter 16, Managing Services (Overview).
After a SPARC based system is shut down, it is booted by using the boot command at the PROM level. After an x86 based system is shut down, it is booted by selecting an OS instance in the GRUB menu. In the Solaris 9 release and some Solaris 10 releases, after an x86 based system is shut down, it is booted by using the boot command at the Primary Boot Subsystem menu. A system can be rebooted by turning the power off and then back on.
Caution This method is not considered a clean shutdown, unless you have an x86 based system that is running a Solaris release that supports this shutdown method. See x86: Support for Using Power Button to Initiate System Shutdown on page 175. Use this shutdown method only as an alternative in emergency situations. Because system services and processes are terminated abruptly, file system damage is likely to occur. The work required to repair this type of damage could be substantial and might require the restoration of various user and system files from backup copies.
SPARC and x86 based systems use different hardware components for booting. These differences are described in Chapter 14, x86: GRUB Based Booting (Reference).
178
To turn off system power due to anticipated power outage To change kernel parameters in the /etc/system file
Run level 0, where it is safe to turn off power Run level 6 (reboot the system)
Chapter 10, Shutting Down a System (Tasks) Chapter 10, Shutting Down a System (Tasks) Chapter 10, Shutting Down a System (Tasks)
To perform file system maintenance, Run level S (single-user level) such as backing up or restoring system data To repair a system configuration file such as /etc/system To add or remove hardware from the system See When to Boot a System on page 180 Reconfiguration boot (also to turn off power when adding or removing hardware)
N/A Adding a Peripheral Device to a System in System Administration Guide: Devices and File Systems N/A Chapter 10, Shutting Down a System (Tasks) N/A For SPARC based systems: SPARC: How to Boot the System With the Kernel Debugger (kmdb) on page 269 For x86 based systems: ,x86: How to Boot a System With the Kernel Debugger in the GRUB Boot Environment (kmdb) on page 270
To repair an important system file that See When to Boot a System on is causing system boot failure page 180 To boot the kernel debugger (kmdb) to track down a system problem To recover from a hung system and force a crash dump Reboot the system by using the kernel debugger (kmdb), if the debugger can't be loaded at runtime. Run level 0, if possible See When to Boot a System on page 180 Run level 6 (reboot the system)
For examples of shutting down a server or a stand-alone system, see Chapter 10, Shutting Down a System (Tasks).
179
Booting a System
Appropriate Boot Option Information for SPARC Based Systems Information for x86 Based Systems
Turn off system power due to anticipated power outage. Change kernel parameters in the /etc/system file. Perform file system maintenance, such as backing up or restoring system data. Repair a system configuration file such as /etc/system. Add or remove hardware from the system.
Reboot the system to run level 3 SPARC: How to Boot a System x86: How to Boot a System to (multiuser level with NFS to Run Level 3 (Multiuser Run Level 3 (Multiuser) on resources shared) Level) on page 225 page 242 Press Control-D from run level S to bring the system back to run level 3 Interactive boot Reconfiguration boot (also to turn on system power after adding or removing hardware) SPARC: How to Boot a System x86: How to Boot a System to to Run Level S (Single-User Run Level S (Single-User Level) on page 226 Level) on page 244 SPARC: How to Boot a System x86: How to Boot a System Interactively on page 227 Interactively on page 246 Adding a System Disk or a Secondary Disk (Task Map) in System Administration Guide: Devices and File Systems SPARC: How to Boot the System With the Kernel Debugger (kmdb) on page 269 How to Boot the Failsafe Archive on a SPARC Based System on page 236 SPARC: How to Force a Crash Dump and Reboot of the System on page 266 Adding a System Disk or a Secondary Disk (Task Map) in System Administration Guide: Devices and File Systems x86: How to Boot a System With the Kernel Debugger in the GRUB Boot Environment (kmdb) on page 270 How to Boot the Failsafe Archive on an x86 Based System by Using GRUB on page 254 x86: How to Force a Crash Dump and Reboot of the System on page 268
Boot the system by using the Booting kmdb kernel debugger (kmdb) to track down a system problem. Boot the system in failsafe mode to repair an important system file that is causing system boot failure. To recover from a hung system and force a crash dump. Booting the failsafe archive
Recovery boot
180
C H A P T E R
This chapter provides an overview of booting a system. The Solaris boot design, boot processes, and various methods of booting a system in the Solaris OS are described. This is a list of the information in this chapter.
Fundamentals of the Solaris Boot Design on page 182 Understanding the New Solaris SPARC Boot Architecture on page 183 Implementation of the Boot Archives on Solaris SPARC on page 185 x86: Administering the GRUB Bootloader on page 186 Booting From a ZFS Root File System on page 188
For instructions on booting a Solaris system, see Chapter 12, Booting a Solaris System (Tasks) For what's new in shutting down and booting a system, see What's New in Shutting Down and Booting a System on page 173. For overview information and instructions on administering boot loaders and modifying Solaris boot behavior, see Chapter 11, Modifying Solaris Boot Behavior (Tasks). For information about managing boot services through the Service Management Facility (SMF), see SMF and Booting on page 333.
181
Use of a boot archive The boot archive is a ramdisk image that contains all of the files that are required for booting a system. When you install the Solaris OS, two boot archives are created, one primary archive and one failsafe archive. For more information, see Implementation of the Boot Archives on Solaris SPARC on page 185. The bootadm command has also been modified for use on the SPARC platform. This command functions the same way that it does on the Solaris x86 platform. The bootadm command handles the details of archive update and verification automatically. During an installation or system upgrade, the bootadm command creates the initial boot archive. During the process of a normal system shutdown, the shutdown process checks the boot archive contents against the root file system. If there are any inconsistencies, the system rebuilds the boot archive to ensure that on reboot, the boot archive and root (/) file system are synchronized. You can also use the bootadm command to manually update the boot archives. See Using the bootadm Command to Manage the Boot Archives on page 278.
Note Some options of the bootadm command cannot be used on SPARC based systems.
For more information, see the bootadm(1M) and boot(1M) man pages.
Use of a ramdisk image as the root file system during installation and failsafe operations This process is now the same on the Solaris SPARC and Solaris x86 platforms. The ramdisk image is derived from the boot archive and is then transferred to the system from the boot device.
Note On the SPARC platform, the OpenBootTM PROM continues to be used to access the
boot device and to transfer the boot archive to the system's memory. Conversely, on the x86 platform, the system is initially controlled by the BIOS. The BIOS is used to initiate a transfer of the boot archive from a network device or to run a boot loader. In the Solaris OS, the x86 boot loader that is used to transfer the boot archive from disk is GRUB. See x86: Boot Processes on page 289. In the case of a software installation, the ramdisk image is the root file system that is used for the entire installation process. Using the ramdisk image for this purpose eliminates the need to boot the system from removable media. The ramdisk file system type can be either a High Sierra File System (HSFS) or UFS.
182 System Administration Guide: Basic Administration September 2008
Commonality in boot processes on the Solaris SPARC and x86 platforms Commonality in the network boot experience Boot architecture flexibility that enables booting a system from different file system types more easily
The following four boot phases are now independent of each other: 1. Open Boot PROM (OBP) phase The OBP phase of the boot process on the Solaris SPARC platform is unchanged. For disk devices, the firmware driver usually uses the OBP label package's load method, which parses the VTOC label at the beginning of the disk to locate the specified partition. Sectors 1-15 of the partition are then read into the system's memory. This area is commonly called the boot block and usually contains a file system reader. 2. Booter phase During this phase the boot archive is read and executed. Note that this is the only phase of the boot process that requires knowledge of the boot file system format. In some instances, the boot archive might also be the installation miniroot. Protocols that are used for the transfer of the boot loader and the boot archive include local disk access, NFS, and HTTP. 3. Ramdisk phase The ramdisk is a boot archive that is comprised of kernel modules or an installation miniroot. The Solaris SPARC boot archive is identical to a Solaris x86 boot archive. The boot archive file system format is private. Therefore, knowledge of the file system type that is used during a system boot, for example an HSFS or a UFS file system, is not required by the booter or the kernel. The ramdisk extracts the kernel image from the boot archive and then executes it. To minimize the size of the ramdisk, in particular, the installation miniroot that resides in the system's memory, the contents of the miniroot are compressed. This compression is performed on a per-file level and is implemented within the individual file system. The /usr/sbin/fiocompress utility is then used to compress the file and mark the file as compressed.
183
Note This utility has a private interface to the file compression file system, dcfs.
4. Kernel phase The kernel phase is the final stage of the boot process. During this phase, the Solaris OS is initialized and a minimal root file system is mounted on the ramdisk that was constructed from the boot archive. If the boot archive is the installation miniroot, the OS continues executing the installation process. Otherwise, the ramdisk contains a set of kernel files and drivers that is sufficient to mount the root file system on the specified root device. The kernel then extracts the remainder of the primary modules from the boot archive, initializes itself, mounts the real root file system, then discards the boot archive.
185
On supported Solaris releases, for both SPARC and x86 based systems, there are two kinds of boot archives:
The files that are included in the Solaris SPARC boot archives are located in the /platform directory. The contents of the /platform directory is divided into two groups of files:
Files that are required for a sun4u boot archive Files that are required for sun4v boot archive
For information about managing the boot archives, see Managing the Solaris Boot Archives (Task Map) on page 273.
Because GRUB is intuitive about file systems and kernel executable formats, you can load an operating system without recording the physical position of the kernel on the disk. With GRUB-based booting, the kernel is loaded by specifying its file name, and the drive and the partition where the kernel resides. For more information see Conventions That Are Used for Configuring GRUB on page 292. For step-by-step instructions on booting a system with GRUB, see Booting an x86 Based System by Using GRUB (Task Map) on page 241. See also the following man pages:
-B console=ttyb
For more information, see x86: Implementation of the findroot Command on page 219. For GRUB reference information, see Chapter 14, x86: GRUB Based Booting (Reference).
187
Solaris release information: The ability to install and boot from a ZFS root file system is available in the Solaris 10 10/08 release. To perform a Solaris Live Upgrade operation to migrate to a ZFS root file system, you must have installed or upgraded to the Solaris 10 10/08 release.
ZFS storage pool space requirements: The minimum amount of available pool space that is required for a bootable ZFS root file system is larger than for a bootable UFS root file system because swap and dump devices are not shared in a ZFS root environment. If you select a ZFS root file system during an initial software installation, or if you use Solaris Live Upgrade to migrate from a UFS root file system to a ZFS root file system, a swap area is created on a ZFS volume in the ZFS root pool. The default swap area is sized at 1/2 the size of physical memory, but no more than 2 Gbytes. A ZFS volume is also created for the dump device. The dump device is sized at 1/2 the size of physical memory, but no more than 2 Gbytes. Currently, the swap area and the dump device must reside on separate ZFS volumes. For more information, see ZFS Support for Swap and Dump Devices in Solaris ZFS Administration Guide.
between booting from a ZFS root file system and booting from a UFS root file system is that with ZFS a device identifier does not uniquely identify a root file system, and thus a BE. With ZFS, a device identifier uniquely identifies a storage pool. A storage pool can contain multiple bootable datasets (root file systems). Therefore, in addition to specifying a boot device, a root file system within the pool that was identified by the boot device must also be specified. On an x86 based system, if the boot device that is identified by GRUB contains a ZFS storage pool, the menu.lst file that is used to create the GRUB menu is located in the dataset at the root of that pool's dataset hierachy. This dataset has the same name as the pool. There is one such dataset in each pool. A default bootable dataset is the bootable dataset for the pool that is mounted at boot time and is defined by the root pool's bootfs property. When a device in a root pool is booted, the dataset that is specified by this property is then mounted as the root file system. The new bootfs pool property is a mechanism that is used by the system to specify the default bootable dataset for a given pool. When a device in a root pool is booted, the dataset that is mounted by default as the root file system is the one that is identified by the bootfs pool property. On a SPARC based system, the default bootfs pool property is overridden by using the new -Z dataset option of the boot command. On an x86 based system, the default bootfs pool property is overridden by selecting an alternate bootable environment in the GRUB menu at boot time.
SPARC: Boot Options That Support Booting From a ZFS Root File System
On the SPARC platform, the following two boot options are new:
The -L option, which is used to print a list of all the available BEs on a system.
ok boot -L
Note The -L option is run from the ok prompt. This option only presents the list of available BEs on the system. To boot the system, use the- Z boot option.
The -Z option of the boot command enables you to specify a bootable dataset other than the default dataset that is specified by the bootfs pool property.
ok boot -Z dataset
189
The list of BEs that are displayed when you use the -L option on a device that has a ZFS boot loader reflect the menu.lst entries that are available on that particular system. Along with the list of available BEs, instructions for selecting a BE and using the -Z option to boot the system are also provided. The dataset specified by the bootfs value for the menu item is used for all subsequent files that are read by the booter, for example, the boot archive and various configuration files that are located in the /etc directory. This dataset is then mounted as the root file system. For step-by-step instructions, see Booting From a ZFS Root File System on a SPARC Based System on page 231.
x86: Boot Options That Support Booting From a ZFS Root File System
On the x86 platform, a new GRUB keyword, $ZFS-BOOTFS has been introduced. When booting an x86 based system, if the root file system that corresponds with the GRUB menu entry is a ZFS dataset, the GRUB menu entry contains the -B option with the $ZFS-BOOTFS token by default. If you install or upgrade your system with a Solaris release that supports a ZFS boot loader, the GRUB menu.lst file is updated with this information automatically. The default bootable dataset is identified by the bootfs property. On x86 based systems that are running a Solaris release that supports a ZFS boot loader, this information is included in the GRUB menu. The following is an example of a default menu.lst file for a GRUB implementation that supports a ZFS boot loader:
title Solaris 10 5/08 s10x_nbu6wos_nightly X86 findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive title Solaris failsafe findroot (pool_rpool,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe
-B console=ttyb
For step-by-step instructions on booting a system from ZFS, see Booting From a ZFS Root File System on an x86 Based System on page 249.
190
10
C H A P T E R
1 0
This chapter describes the procedures for shutting down systems. This is a list of the step-by-step instructions in this chapter. This is a list of the overview information in this chapter. System Shutdown Commands on page 192 User Notification of System Down Time on page 193 Turning Off Power to All Devices on page 200
For overview information about system run levels, see Chapter 16, Managing Services (Overview). For information on the procedures associated with run levels and boot files, see Shutting Down the System (Task Map) on page 191.
Determine who is logged in to a system. Shut down a server. Shut down a stand-alone system.
Use the who command to determine who is logged in to a system. Use the shutdown command with the appropriate options to shut down a server. Use the init command and indicate the appropriate run-level to shut down a stand-alone system.
How to Determine Who Is Logged in to a System on page 194 How to Shut Down a Server on page 194 How to Shut Down a Stand-Alone System on page 198
191
Task
Description
For Instructions
Powering down a system includes the following devices: CPU Monitor External devices, such as disks, tapes, and printers
Adding or removing hardware Preparing for an expected power outage Performing file system maintenance, such as a backup
For a complete list of system administration tasks that require a system shutdown, see Chapter 9, Shutting Down and Booting a System (Overview). For information on using your system's power management features, see the pmconfig(1M) man page.
Note On x86 systems that are running at least the Solaris 10 6/06 release, pressing and releasing the power button initiates a clean system shutdown. This method is equivalent to using the init 5 command.
The following table describes the various shutdown commands and provides recommendations for using them.
TABLE 101 Command
Shutdown Commands
Description When To Use
shutdown
An executable shell script that calls the init program to shut down the system. The system is brought to run level S by default. An executable that kills all active processes and synchronizes the disks before changing run levels. An executable that synchronizes the disks and passes boot instructions to the uadmin system call. In turn, this system call stops the processor. An executable that synchronizes the disks and stops the processor.
Recommended for servers operating at run level 3 because users are notified of the impending shutdown. Also notified are the systems that are mounting resources from the server that is being shut down. Recommended for stand-alone systems when other users will not be affected. Provides a faster system shutdown because users are not notified of the impending shutdown. The init command is the preferred method.
init
reboot
halt, poweroff
Not recommended because it doesn't shutdown all processes, and unmount any remaining file systems. Stopping the services, without doing a clean shutdown, should only be done in an emergency or if most of the services are already stopped.
1 2
Example 101
(starlite) (bluemidget)
Data in the first column identifies the user name of the logged-in user Data in the second column identifies the terminal line of the logged-in user Data in the third column identifies the date and time that the user logged in Data in the forth column, if present, identifies the host name if a user is logged in from a remote system
A list of all logged-in users is displayed. You might want to send mail or broadcast a message to let users know that the system is being shut down.
3
-iinit-level
Brings the system to an init level that is different from the default of S. The choices are 0, 1, 2, 5, and 6. Run levels 0 and 5 are reserved states for shutting the system down. Run level 6 reboots the system. Run level 2 is available as a multi-user operating state.
194
-ggrace-period -y
Indicates a time (in seconds) before the system is shut down. The default is 60 seconds. Continues to shut down the system without intervention. Otherwise, you are prompted to continue the shutdown process after 60 seconds.
If you used the shutdown -y command, you will not be prompted to continue.
5
After you have finished the system administration tasks, press Control-D to return to the default system run level. Use the following table to verify that the system is at the run level that you specified in the shutdown command.
Specified Run Level SPARC Based System Prompt x86 Based System Prompt
S (single-user level) 0 (power-down level) Run level 3 (multiuser level with remote resources shared)
Example 102
Jun 14 15:49
(:0)
Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16... The system venus will be shut down in 3 minutes . .
Chapter 10 Shutting Down a System (Tasks) 195
. Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16... The system venus will be shut down in 30 seconds . . . INIT: New run level: S The system is coming down for administration. Please wait. Unmounting remote filesystems: /vol nfs done. Shutting down Solaris Management Console server on port 898. Print services stopped. Jun 14 15:49:00 venus syslogd: going down on signal 15 Killing user processes: done. Requesting System Maintenance Mode SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx single-user privilege assigned to /dev/console. Entering System Maintenance Mode #
Example 103
196
If you are bringing the system to run level 0 to turn off power to all devices, see How to Turn Off Power to All Devices on page 200.
Example 104
Changing to init state 6 - please wait # INIT: New run level: 6 The system is coming down. Please wait. . . . The system is down. syncing file systems... done rebooting... . . . venus console login:
See Also
Regardless of why you shut down a system, you'll probably want to return to run level 3 where all file resources are available and users can log in. For instructions on bringing a system back to a multiuser level, see Chapter 12, Booting a Solaris System (Tasks).
197
Alternately, you can use the uadmin command to shut down the system.
# uadmin 2 0
If you have an x86 based system that is running at least the Solaris 10 6/06 release, you can press and release the power button to initiate a clean system shutdown and turn off the system. This functionality is equivalent to using the init 5 command to shut down a system. For more information, see What's New in Shutting Down and Booting a Systemon page 173.
Use the following table to verify that the system is at the run level that you specified in the init command.
Specified Run Level SPARC Based System Prompt x86 Based System Prompt
# # ok or >
Example 105
Example 106
198
# init 0 # INIT: New run level: 0 The system is coming down. Please wait. . . . The system is down. syncing file systems... [11] [10] [3] done Press any key to reboot
If you are bringing the system to run level 0 to turn off power to all devices, see How to Turn Off Power to All Devices on page 200.
Example 107
See Also
Regardless of why you shut down the system, you'll probably want to return to run level 3 where all file resources are available and users can log in. For instructions on bringing a system back to a multiuser level, see Chapter 12, Booting a Solaris System (Tasks).
199
Replace or add hardware. Move the system from one location to another. Prepare for an expected power outage or natural disaster such as an approaching electrical storm.
Turn the power off for system devices, including the CPU, the monitor, and external devices such as disks, tapes, and printers. Before you turn off power to all system devices, you should shut down the system cleanly, as described in the preceding sections.
If you are shutting down a server, see How to Shut Down a Serveron page 194. If you are shutting down a stand-alone system, see How to Shut Down a Stand-Alone Systemon page 198.
Turn off the power to all devices after the system is shutdown. If necessary, also unplug the power cables. After power can be restored, use the following steps to turn on the system and devices. a. Plug in the power cables. b. Turn on the monitor. c. Turn on disk drives, tape drives, and printers. d. Turn on the CPU. The system is brought to run level 3.
200
11
C H A P T E R
1 1
This chapter provides information about modifying boot behavior on Solaris systems. The following is list of the information in this chapter: Modifying Boot Behavior on SPARC Based Systems (Task Map) on page 201 Modifying Solaris Boot Behavior on x86 Based Systems (Task Map) on page 209
For what's new in booting and general overview information about the boot process, see Chapter 8, Introduction to Shutting Down and Booting a System. For step-by-step instructions on booting a Solaris system, see Chapter 12, Booting a Solaris System (Tasks).
Identify the PROM revision number. Identify devices on the system that can be booted. Display the current boot device.
Use the banner command at the ok prompt to display the PROM revision number for a system. Before modifying boot behavior by using the boot PROM, identify the devices on the system. Use this procedure to determine the current default boot device from which the system will boot.
SPARC: How to Find the PROM Revision Number for a System on page 202 SPARC: How to Identify Devices on a System on page 203 SPARC: How to Determine the Default Boot Device on page 205
201
Task
Description
For Instructions
To change the default boot device, use one of the following methods: Change the boot-device parameter at the boot PROM. Change the boot-device parameter by using the eeprom command. When you reset the system, the system runs diagnostic tests on the hardware, then reboots. To change the default kernel that the system boots, use one of the following methods: Change the boot-file parameter by using the boot PROM. Change theboot-file parameter by using the eeprom command.
SPARC: How to Change the Default Boot Device by Using the Boot PROM on page 205 SPARC: How to Change the Default Boot Device by Using the eeprom Command on page 207 SPARC: Resetting the System on page 207 SPARC: How to Change the Default Kernel by Using the Boot PROM on page 208 SPARC: How to Change the Default Kernel by Using the eeprom Command on page 208
Add a new drive to the system either permanently or temporarily Change the network boot strategy Temporarily boot a stand-alone system from the network
202
Hardware configuration information, including the revision number of the PROM, is displayed. In this example, the PROM revision number is 3.15.
Before you can safely use the probe commands to determine what devices are attached to the system, you need to do the following:
You can view the probe commands that are available on your system by using the sifting probe command:
ok sifting probe
If you run the probe commands without clearing the system registers, the following message is displayed:
ok probe-scsi This command may hang the system if a Stop-A or halt command has been executed. Please type reset-all to reset the system before executing this command. Do you wish to continue? (y/n) n 1
(Optional) If you want the system to reboot after a power failure or after using the reset command, then reset the auto-boot? parameter to true.
ok setenv auto-boot? true auto-boot? = true
Example 111
Alternatively, you can use the devalias command to identify the device aliases and the associated paths of devices that might be connected to the system. For example:
ok devalias screen net cdrom disk disk3 disk2 disk1 disk0 ide floppy ttyb ttya keyboard! keyboard mouse name
204
/pci@1f,0/pci@1,1/SUNW,m64B@2 /pci@1f,0/pci@1,1/network@1,1 /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f /pci@1f,0/pci@1,1/ide@3/disk@0,0 /pci@1f,0/pci@1,1/ide@3/disk@3,0 /pci@1f,0/pci@1,1/ide@3/disk@2,0 /pci@1f,0/pci@1,1/ide@3/disk@1,0 /pci@1f,0/pci@1,1/ide@3/disk@0,0 /pci@1f,0/pci@1,1/ide@3 /pci@1f,0/pci@1,1/ebus@1/fdthree /pci@1f,0/pci@1,1/ebus@1/se:b /pci@1f,0/pci@1,1/ebus@1/se:a /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8:forcemode /pci@1f,0/pci@1,1/ebus@1/su@14,3083f8 /pci@1f,0/pci@1,1/ebus@1/su@14,3062f8 aliases
boot-device device[n]
Identifies the parameter for setting the device from which to boot. Identifies the boot-device value such as a disk or the network. The n can be specified as the disk number.
If the default boot-device is a network boot device, the output is similar to the following:
boot-device = /sbus@1f,0/SUNW,fas@e,8800000/sd@a,0:a \ /sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a disk net
SPARC: How to Change the Default Boot Device by Using the Boot PROM
You might need to identify the devices on the system before you can change the default boot device to some other device. For information on identifying devices on the system, see SPARC: How to Identify Devices on a System on page 203.
The ok PROM prompt is displayed. For more information, see theinit(1M) man page.
2
Use one of the probe commands if you need help identifying the disk number.
3
205
206
ok setenv boot-device net boot-device = net ok printenv boot-device boot-device net disk ok reset Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard OpenBoot 3.15, 128 MB memory installed, Serial #number. Ethernet address number, Host ID: number.
SPARC: How to Change the Default Boot Device by Using the eeprom Command
Become superuser or assume an equivalent role. Specify the alternate kernel to boot.
# eeprom boot-device new-boot-device
1 2
The output should display the new eeprom value for the boot-device parameter.
The self-test program, which runs diagnostic tests on the hardware, is executed. Then, if the auto-boot? parameter is set to true, the system is rebooted.
207
SPARC: How to Change the Default Kernel by Using the Boot PROM
Change to run level 0.
# init 0
The ok PROM prompt is displayed. For more information, see theinit(1M) man page.
2
SPARC: How to Change the Default Kernel by Using the eeprom Command
Become superuser or assume an equivalent role. Specify the alternate kernel to boot.
# eeprom boot-file new boot-file
1 2
For example:
# eeprom boot-file=kernel.name/sparcv9/unix 3
The output should display the new eeprom value for the specified parameter.
208
Modify boot behavior on an x86 x86: How to Modify Boot based system by using the eeprom Behavior by Using the eeprom command. Boot options that are Command on page 210 set by using the eeprom command persist over a system reboot, unless these options are overridden by modifying kernel behavior in the GRUB menu at boot time. Modify boot behavior by editing GRUB menu at boot time. Boot options that are specified by modifying the boot behavior in the GRUB menu persist only until the next system reboot. Modify boot behavior by editing the menu.lst configuration file to add new OS entries or redirect the console. Changes you make to the file persist over system reboots. x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time on page 213
x86: How to Modify Boot Behavior by Editing the menu.lst File on page 216
By using the eeprom command. The eeprom command is used to assign a different value to a standard set of properties. These values, which are equivalent to the SPARC OpenBoot PROM NVRAM variables, are stored in the /boot/solaris/bootenv.rc file. Changes that are made to boot behavior by using the eeprom command persist over each system reboot and are preserved during a software upgrade. Changes that are made by using the eeprom command can be overridden by editing the GRUB menu at boot time or by editing the menu.lst file. See the eeprom(1M) man page for more information.
209
Note Changes that are made by directly editing the bootenv.rc file are not always preserved during a software upgrade. This method is therefore discouraged. The preferred method for making these types of changes is to use the eeprom command.
By editing the GRUB menu at boot time. Changes that are made by modifying the GRUB kernel behavior at boot time override options that you set by using the eeprom command. However, these changes only remain in effect until the next time you boot the system. See the kernel(1M) man page for more information.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To change the specified parameter, type the eeprom command with the appropriate arguments .
# eeprom parameter=new-value
The output should display the new eeprom value for the specified parameter.
210 System Administration Guide: Basic Administration September 2008
Example 113
This example shows how to manually boot a 32-bit kernel on a 64-bit capable system.
# eeprom boot-file=kernel/unix
This example shows how to restore the default auto detected boot behavior on a system.
# eeprom boot-file=""
x86: Modifying Boot Behavior by Editing the GRUB Menu at Boot Time
The following is an example of a GRUB main menu in a Solaris release that supports booting a system from a ZFS root file system. This menu is based on the contents of the menu.lst configuration file and includes menu entries for all of the bootable OS instances on the system. The first entry in the menu is the default, unless otherwise specified. To specify another boot entry as the default, add the default=n command to the menu.lst file, where n is a number, starting from 0 (the first boot entry).
GNU GRUB version 0.95 (637K lower / 3144640K upper memory) +-------------------------------------------------------------------------+ be1) be1 failsafe be3 be3 failsafe be2 be2 failsafe +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line.
Note The information that is contained in the menu.lst file varies, depending on the Solaris release and the installation method that was used.
To edit a boot entry in the GRUB menu, use the arrow keys to select the entry, then type e.
Chapter 11 Modifying Solaris Boot Behavior (Tasks) 211
GNU GRUB version 0.95 (637K lower / 3144640K upper memory) +-------------------------------------------------------------------------+ findroot (BE_be1,0,a) bootfs rpool/ROOT/szboot_0508 kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive +-------------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line.
For instructions on editing the GRUB menu at boot time, see x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time on page 213.
Boot Arguments You Can Specify When Editing the GRUB Menu at Boot Time
The following list describes the boot arguments and options that can be specified by editing the GRUB menu at boot time: multiboot -a -s -r
212
Specifies the kernel to boot. Prompts the user for configuration information. Boots the system in single-user mode. Specifies a reconfiguration boot.
The system probes all attached hardware devices and then assigns nodes in the file system to represent only those devices that are actually found. -v -x -k -m smf-options Boots the system with verbose messages enabled. Does not boot in clustered mode. Boots the system with the kernel debugger enabled. Controls the boot behavior of the Service Management Facility (SMF). Included are two categories of options, recovery options and messages options. Specifies an alternative executable as the primordial process. altinit is a valid path to an executable. Specifies kernel boot properties.
The following are various ways you can modify boot behavior in the GRUB menu by using the -B prop=val option: -B console=ttya -B acpi-enum=off -B console=ttya,acpi-enum=off -B acpi-user-options=0x2 Redirects the console to ttya. Disables Advanced Configuration and Power Interface (ACPI) enumeration of devices. Redirects the console to ttya and disables the ACPI enumeration of devices. Disables ACPI entirely.
Note When properties are specified by using the eeprom command and on the GRUB command line, the GRUB command takes precedence.
x86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time
When you modify the GRUB kernel behavior by editing the GRUB menu at boot time, the changes do not persist over a system reboot. Default boot behavior is restored the next time you boot the system.
Reboot the system. When the boot sequence begins, the GRUB main menu is displayed. Use the arrow keys to select the boot entry to edit, then type e to access the GRUB edit menu.
213
3 4 5 6
Use the arrow keys to select the kernel or kernel$ line in this menu. Type e to add boot arguments to the line. Type any additional boot arguments that you want to specify. Press Return to save your changes and return to the GRUB edit menu.
Note Pressing the Escape key returns you to the GRUB main menu without saving your
changes.
7
To boot the system, type b. Changes you make take affect when the system is booted.
Example 114
Example 115
Alternatively, you can use input-device/output-device property, as shown in the following example:
grub edit> kernel /platform/i86pc/multiboot -B input-device=ttyb,output-device=ttyb
This example shows how you would override the serial line speed:
grub edit> kernel /platform/i86pc/multiboot -B ttyb-mode="115200,8,n,1,-"
Caution: In the preceding example, the property value contains commas, which is also a property separator. To avoid confusing the property parser, use double quotation marks around the entire property value.
214
A configurable timeout is available to boot the default OS entry. The default OS boot entry that is booted is configurable through the default command. The Solaris installation software typically sets this command to boot one of the valid Solaris boot entries. To boot a different instance of the Solaris OS (if applicable), or to boot a different OS, use the arrow keys to highlight a different boot entry. Then press Enter to boot that entry. Note that if the default command is not set, the first boot entry in the GRUB menu is booted. Only the active menu.lst file is used to boot the system. To modify the GRUB menu that is displayed when you boot the system, edit the active GRUB menu.lst file. Changing any other menu.lst file has no effect on the menu that is displayed when you boot the system To determine the location of the active menu.lst file, use the list-menu subcommand of the bootadm command. For more information about using the bootadm command, see Using the bootadm Command to Manage the Boot Archives on page 278. For a complete description of the menu.lst file in each of the GRUB implementations in the Solaris OS, see x86: Supported GRUB Implementations on page 294.
215
Because only the active GRUB menu.lst file is used to boot the system, make sure you edit the correct file. Changing any other GRUB menu.lst file has no effect on the menu that is displayed when you boot the system. The location of the active menu.lst file varies, depending on whether you have a system with a UFS root or a ZFS root.
For a UFS root, the active menu.lst file is /boot/grub/menu.lst. For a ZFS root, the active menu.lst file is /pool-name/boot/grub/menu.lst
You can determine the location of the active GRUB menu.lst file by using the bootadm command with the list-menu subcommand.
# bootadm list-menu
For more information about the bootadm command, see the bootadm(1M) man page.
1 2
Become superuser or assume an equivalent role. To add a new OS entry to the active menu.lst file, use a text editor to modify the file. The comments within the menu.lst file provide you with the necessary information for adding a new OS entry. The following is an example of a menu.lst file on a system that is running a Solaris release with ZFS boot support. Boot entries in the menu.lst file vary, depending on the Solaris release you are running.
#---------- ADDED BY BOOTADM - DO NOT EDIT ---------title Solaris Solaris 10 s10x_nbu6wos_nightly X86 kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive #---------------------END BOOTADM--------------------
216
Caution Do not directly edit the original contents of the menu.lst file. To make changes to any of the OS entries in the file, edit the file manually, duplicating the existing content. Then, make the modifications to the duplicated content.
Also note when manually adding new user entries to the file, do not include guard comments that are reserved for use by the system, such as Added by bootadm or Added by Live Upgrade. Not using these comments for manually-added entries ensures that these entries remain intact during a software upgrade. If you have added any additional entries, beyond the default entries, make equivalent changes manually. The [-B *] and [*] flags must be preserved, if these flags exist in the original menu.lst file. Also, the failsafe entry should always have an -s flag.
3
After adding the required information, save the file. Note that any changes you make to the file take effect at the next system reboot.
Tip If you are running the Linux OS, and install the Solaris OS, the Linux OS entry is not
displayed in the GRUB menu when the system is rebooted. Before installing the Solaris software, save a copy of the menu.lst file that contains the Linux information. After the installation, add the Linux information back to the newly-created menu.lst file in the Solaris partition. Because changes you make to the menu.lst file are not directly related to the Solaris OS, you cannot make them by using the eeprom command. You must edit the file directly. Note that the Solaris software upgrade process preserves any changes that you make to the menu.lst file.
Caution Solaris GRUB is capable of booting both the Linux OS and the Solaris OS. However,
Linux GRUB is not capable of booting the Solaris OS. Always ensure that one of the following conditions are met:
The Solaris fdisk partition is active, that it has GRUB installed , and that the menu.lst file is the active GRUB menu That Solaris GRUB is installed to the Master Boot Record (MBR) and that it refers to a menu.lst in the Solaris fdisk partition.
For a detailed description of the GRUB menu.lst that pertains to each Solaris release, see x86: Supported GRUB Implementations on page 294.
217
Example 116
-B console=ttyb
-B console=ttyb
Example 117
-B console=ttyb
218
-B console=ttyb
This command also lists the contents of the active menu.lst file:
# bootadm list-menu The location for the active GRUB menu is: /pool-name/boot/grub/menu.lst default 0 timeout 10 0 be1 1 be1 failsafe 2 be3 3 be3 failsafe 4 be2 5 be2 failsafe
For further instructions on using the bootadm command, see Using the bootadm Command to Manage the Boot Archives on page 278.
219
supports booting systems with ZFS roots, as well as UFS roots. This information is located in the menu.lst file that is used by GRUB. Previously, the root command, root (hd0.0.a), was used to explicitly specify which disk slice to boot. The installation methods include Solaris Live Upgrade, JumpStart, and the installation GUI program. In addition to the findroot command, the name of a signature file on the slice, (mysign, 0, a), where mysign is the name of a signature file that is located in the /boot/grub/bootsign directory. When booting a system from a ZFS root, the ZFS GRUB plug-in looks for and tries to mount a ZFS file system in slice a of fdisk partition 0. The name of the signature file varies, depending on the type of installation that is used:
Standard system upgrades and new installations for systems with ZFS support:
findroot(pool_p,0,a)
Standard system upgrades and new installations for systems with UFS support:
findroot (rootfsN,0,a)
The N variable is an integer number that starts at 0. Additional menu entries, which also use the findroot command, may be added to the GRUB menu after an installation or upgrade. For instructions, see x86: How to Add GRUB Menu Entries That Use the findroot Command on page 221.
Caution The boot signature must be unique. Do not use or remove system generated signatures or user signatures that are duplicated across multiple instances of the Solaris software. Doing so might result in booting an incorrect OS instance or prevent the system from booting.
Note that the root command can still be used in the menu.lst file in certain instances, for example to boot Windows. However, use of the root command in cases where the findroot command is preferred is discouraged.
220
EXAMPLE 118
The following example shows the format of a menu.lst file entry that implements the findroot command:
title Solaris 10 s10x_nbu6wos_nightly X86 findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive title Solaris failsafe findroot (pool_rpool,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe
EXAMPLE 119
-B console=ttyb
This is an example of a menu.lst file on system that supports a ZFS boot loader. The information for booting from a ZFS root file system is automatically added to the file when a Solaris Live Upgrade is performed.
title be1 findroot (BE_be1,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive title be1 failsafe findroot (BE_be1,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe
-B console=ttyb
x86: How to Add GRUB Menu Entries That Use the findroot Command
This procedure shows how to manually update the menu.lst file with user defined entries that use the findroot command. Typically, these entries are added after an installation or an upgrade. For guidelines on adding user defined entries that use the findroot command, see x86: Implementation of the findroot Command on page 219.
221
Create a boot signature file on the root file system or pool to be booted.
For a ZFS pool, my-pool, create the boot signature file in the /my-pool/boot/grub/bootsign directory. For example:
# touch /my-pool/boot/grub/bootsign/user-sign
For a UFS file system, create the boot signature file in the /boot/grub/bootsign directory of the root file system to be booted. For example:
# touch /boot/grub/bootsign/user-sign
Note Make sure that the file name you choose for the boot signature is unique. Do not use
system generated signature names or user signature names that are duplicated across multiple instances of the Solaris software. Doing so might prevent the system from booting or cause the wrong Solaris instance to boot.
3
Add a menu entry that contains the findroot command. a. Locate the active menu.lst file:
# bootadm list-menu
b. Using a text editor, edit the active menu.lst file, adding the following entry:
title User Solaris boot entry findroot (user-sign, 3, c) kernel$ /platform/i86pc/multiboot module /platform/i86pc/boot_archive
In the preceding step, the 3 represents the 4th fdisk partition (partitions start at 0). The c represents the slice within a Solaris fdisk partition (slices start with a).
4
Reboot the system. The new entry appears in the GRUB menu and can be selected to boot the specified Solaris OS instance.
222
12
C H A P T E R
1 2
This chapter describes the procedures for booting the Solaris release on SPARC and x86 based systems. The following is a list of information that is in this chapter: Booting a SPARC Based System (Task Map) on page 223 Booting an x86 Based System by Using GRUB (Task Map) on page 241 Troubleshooting Booting a System (Task Map) on page 262
For overview information about the boot process, see Chapter 9, Shutting Down and Booting a System (Overview). For information about booting an x86 based system in a Solaris release that does not implement GRUB based booting, see Chapter 15, x86: Booting a System That Does Not Implement GRUB (Tasks).
Use this boot method after shutting down the system or performing a system hardware maintenance task. Use this boot method to boot the system after performing a system maintenance task such as backing up a file system. At this level, only local file systems are mounted and users cannot log in to the system.
SPARC: How to Boot a System to Run Level 3 (Multiuser Level) on page 225 SPARC: How to Boot a System to Run Level S (Single-User Level) on page 226
223
Task
Description
For Instructions
Use this boot method after making temporary changes to a system file or the kernel for testing purposes.
Use this procedure to boot a Solaris kernel SPARC: How to Boot a Solaris Kernel other than the default kernel. Other Than the Default Kernel on page 228 Alternately, you can obtain a copy of an alternate boot file, change the default kernel to the new kernel, then set the boot-file parameter to boot the new default boot device. Use the boot -L command to display a list SPARC: How to List Available Bootable of the available BEs within a ZFS pool on a Datasets Within a ZFS Root Pool on system. page 231
Note This option is only supported for boot devices that contain a ZFS pool.
Display a list of the available ZFS bootable datasets on a SPARC based system.
SPARC: How to Boot From a ZFS Root File System on page 232
Use this procedure to boot the failsafe archive on a SPARC based system. Then, run the bootadm command to update the boot archive. Use this boot method to boot a system from the network. Note that this method is also used for booting a diskless client.
How to Boot the Failsafe Archive on a SPARC Based System on page 236
224
The automatic boot procedure displays a series of startup messages, and brings the system to run level 3. For more information, see the boot(1M) man page.
2
Verify that the system has booted to run level 3. The login prompt is displayed when the boot process has finished successfully.
hostname console login:
Example 121
In the preceding example, sparcv9 was used as an example only. This string matches the output of the isainfo -k command.
Chapter 12 Booting a Solaris System (Tasks) 225
4 5
Perform the maintenance task that required the run level change to S. After you complete the system maintenance task, type Control-D to bring the system to the multiuser state.
Example 122
226
Answer the following system prompts: a. When prompted, enter the name of the kernel to use for booting. Press enter to use the default kernel file name. Otherwise, provide the name of an alternate kernel, press Enter. b. When prompted, provide an alternate path for the modules directories. Press enter to use the default module directories. Otherwise, provide the alternate paths to module directories, press Enter. c. When prompted, provide the name of an alternate system file. Type /dev/null if your /etc/system file has been damaged. d. When prompted, enter the root filesystem type. Press enter to select UFS for local disk booting, which is the default, or enter NFS for network booting.
Chapter 12 Booting a Solaris System (Tasks) 227
e. When prompted, enter the physical name of root device. Provide an alternate device name or press return to use the default.
3
If you are not prompted to answer these questions, verify that you typed the boot -a command correctly.
Example 123
SPARC: How to Boot a Solaris Kernel Other Than the Default Kernel
Become superuser or assume an equivalent role. Obtain a copy of an existing Solaris kernel and rename it.
System Administration Guide: Basic Administration September 2008
1 2
228
Add the kernel that you copied and renamed in Step 2 to the /etc/boot/solaris/filelist.ramdisk file.
# echo "kernel.name" >> /boot/solaris/filelist.ramdisk
Verify that the alternate kernel has been added the /etc/boot/solaris/filelist.ramdisk file.
# cat > /etc/boot/solaris/filelist.ramdisk
For example:
ok boot kernel.myname/sparcv9/unix
To boot the alternate kernel by default, follow these steps: a. Set the boot-file parameter to the new kernel.
ok setenv boot-file kernel.name/sparc9/unix
After the system has booted, verify that the alternate kernel that was booted.
# prtconf -vp | grep whoami
Example 124
^D (control D) ok setenv boot-file kernel.caiobells/sparcv9/unix ok printenv boot-file boot-file = kernel.caiobella/sparcv9/unix ok boot SC Alert: Host System has Reset SC Alert: Host system has shut down.
Sun Fire T200, No KeyboardCopyright 2006 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.25.0.build_01***PROTOTYPE BUILD***, 32760 MB memory available, Serial #69060038. Ethernet address 0:x:4f:x:c5:c6, Host ID: 8xxc5c6.
Rebooting with command: boot Boot device: /pci@7c0/pci@0/pci@1/pci@0,2/LSILogic,sas@2/disk@0,0:a File and args: kernel.caiobella/sparcv9/unix SunOS Release 5.10 Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. DEBUG enabled misc/forthdebug (176650 bytes) loaded Hostname: seasonz NIS domain name is lab.domain.sun.com Reading ZFS config: done. seasonz console login: Password: Last login: Mon Nov 12 18:02:00 on console Sun Microsystems Inc. SunOS 5.10 . . . You have new mail. # # # prtconf -vp | grep whoami whoami: /platform/sun4v/kernel.caiobella/sparcv9/unix
230
line. -Z dataset Boots the root file system for the specified ZFS bootable dataset.
If you are booting a system from a ZFS root file system, first use the boot command with the -L option from the OBP to print a list of the available BEs on the system. Then, use the -Z option to boot the specified BE. For more information, see the boot(1M) man page.
SPARC: How to List Available Bootable Datasets Within a ZFS Root Pool
On SPARC based systems, the menu.lst file contains the following two GRUB commands:
title Provides a title for a boot environment bootfs Specifies the full name of the bootable dataset
To display a list of bootable datasets within a ZFS pool, choose from the following methods:
Use the lustatus command. This command lists all of the BEs in a given ZFS pool. Note that the lustatus command can also be used on x86 based systems. Use the boot -L command. This command displays a list of available BEs in a given ZFS pool and provides instructions for booting the system.
The following procedure shows how to use the boot -L command to list available BEs on a system. To boot a specified BE after running this command, follow the instructions that are printed on the screen.
1
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
231
(Optional) To boot one of the entries that is displayed, type the number of the entry. To boot the specified BE, follow the directions that are printed to the screen. For instructions, see SPARC: How to Boot From a ZFS Root File System on page 232.
Example 125
See Also
For more information, see Chapter 4, Installing and Booting a ZFS Root File System, in Solaris ZFS Administration Guide.
232
shows how to boot the system by specifying a ZFS bootable dataset. See the boot(1M) man page for a complete description of all the boot options that are available.
Note If the bootfs property was previously set up correctly, for example, if you used the
luactivate command to activate a BE, the system boots a ZFS root automatically. For more information, see zpool(1M) man page.
1
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Bring the system to the ok prompt.
# init 0
(Optional) To display a list of available BEs, use the boot command with the -L option. For instructions, see SPARC: How to List Available Bootable Datasets Within a ZFS Root Pool on page 231. To boot a specified entry, type the number of the entry and press Return:
Select environment to boot: [1 - 2]:
To boot the system, follow the instructions that are printed to the screen:
To boot the selected entry, invoke: boot [<root-device>] -Z rpool/ROOT/dataset ok boot -Z rpool/ROOT/dataset
For example:
# boot -Z rpool/ROOT/zfs2BE 6
After the system has booted, type the following command to verify the active BE:
# prtconf -vp | grep whoami
Alternately, you can use the following command to determine whether the corrected BE was booted:
# df -lk
233
Example 126
234
See Also
For information about booting the failsafe archive for a specified ZFS bootable dataset, see How to Boot the Failsafe Archive on a SPARC Based System on page 236.
Failsafe booting is also supported on systems that are booted from ZFS. When booting from a ZFS-rooted BE, each BE has its own failsafe archive. The failsafe archive is located where the root (/) file system is located, as is the case with a UFS-rooted BE. The default failsafe archive is the archive that is in the default bootable file system. The default bootable file system (dataset) is indicated by the value of the pool's bootfs property. For information about booting an x86 based failsafe archive, see Booting the Failsafe Archive on an x86 Based System on page 253. Another method that can be used to update the boot archives is to clear the boot-archive service. However, the preferred methods for updating the boot archives are to boot the failsafe archive or use the bootadm command. For more information, see How to Update an Inconsistent Boot Archive by Clearing the boot-archive Service on page 276.
235
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Bring the system to the ok prompt:
# init 0
For example:
ok boot -F failsafe -Z rpool/ROOT/zfsBE2
Note To determine the name of the dataset to boot, first use the boot -L command to display a list of the available BEs on the system. For more information, see SPARC: How to List Available Bootable Datasets Within a ZFS Root Pool on page 231.
236
Example 127
Example 128
237
Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args: -L 1 zfsBE2 Select environment to boot: [ 1 - 1 ]: 1 To boot the selected entry, invoke: boot [<root-device>] -Z rpool/ROOT/zfsBE2 Program terminated {0} ok
Resetting ... screen not found. Cant open input device. Keyboard not present. Using ttya for input and output. Sun Enterprise 220R (2 X UltraSPARC-II 450MHz), No Keyboard OpenBoot 3.23, 1024 MB memory installed, Serial #13116682. Ethernet address 8:0:20:c8:25:a, Host ID: 80c8250a.
{0} ok boot -F failsafe -Z rpool/ROOT/zfsBE2 Boot device: /pci@1f,4000/scsi@3/disk@1,0 File and args: -F failsafe -Z rpool/ROOT/zfsBE2 SunOS Release 5.10 Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Configuring /dev Searching for installed OS instances... ROOT/zfsBE2 was found on rpool. Do you wish to have it mounted read-write on /a? [y,n,?] y mounting rpool on /a Starting shell. # # # # zpool list NAME SIZE USED AVAIL rpool 16.8G 6.26G 10.5G
238
NAME STATE rpool ONLINE c0t1d0s0 ONLINE errors: No known data # # df -h Filesystem /ramdisk-root:a /devices /dev ctfs proc mnttab swap objfs sharefs swap /tmp/root/etc fd rpool/ROOT/zfsBE2 rpool/export rpool/export/home rpool errors
used avail capacity Mounted on 153M 0K 100% / 0K 0K 0% /devices 0K 0K 0% /dev 0K 0K 0% /system/contract 0K 0K 0% /proc 0K 0K 0% /etc/mnttab 344K 601M 1% /etc/svc/volatile 0K 0K 0% /system/object 0K 0K 0% /etc/dfs/sharetab 1.4M 601M 1% /tmp 1.4M 601M 1% /.tmp_proto/root/etc 0K 0K 0% /dev/fd 5.7G 9.8G 37% /a 20K 9.8G 1% /a/export 18K 9.8G 1% /a/export/home 63K 9.8G 1% /a/rpool
When the system is first installed If the system won't boot from the local disk If the system is a diskless client
Reverse Address Resolution Protocol (RARP) and ONC+TM RPC Bootparams Protocol Dynamic Host Configuration Protocol (DHCP)
239
For network devices, the process for booting over a local area network (LAN) and booting over a wide area network (WAN) is slightly different. In both network boot scenarios, the PROM downloads the booter from a boot server or an installation server, which is inetboot in this case. When booting over a (LAN), the firmware uses RARP and BOOTP or DHCP to discover the boot or installation server. TFTP is then used to download the booter, which is inetboot in this case. When booting over a WAN, the firmware uses either DHCP or NVRAM properties to discover the installation server, the router, and the proxies that are required for the system to boot from the network. The protocol that is used to download the booter is HTTP. In addition, the booter's signature might be checked with a predefined private key.
RARP Reverse Address Resolution Protocol and ONC+ RPC Bootparams Protocol DHCP Dynamic Host Configuration Protocol
The default network boot strategy is set to RARP. You can use either protocol, depending on whether a RARP boot server or a DHCP boot server is available on your network.
Note Sun Ultra systems must have at least PROM version 3.25.nn to use the DHCP network
boot strategy. For information on determining your PROM version, see SPARC: How to Find the PROM Revision Number for a System on page 202. If both protocols are available, you can temporarily specify which protocol to use in the boot command. Or, you can save the network boot strategy across system reboots at the PROM level by setting up an NVRAM alias. The following example uses the nvalias command to set up a network device alias for booting DHCP by default on a Sun Ultra 10 system.
ok nvalias net /pci@1f,4000/network@1,1:dhcp
As a result, when you type boot net, the system boots by using the DHCP network book strategy.
240
Note You should not use the nvalias command to modify the NVRAMRC file, unless you are very familiar with the syntax of this command and the nvunalias command. For information on using these commands, see the OpenBoot 3.x Command Reference Manual.
You must have already set up a RARP or DHCP boot server in your network to use either protocol to boot successfully. If necessary, shut down the system. Determine the method for booting from the network, and select one of the following: a. Boot the system from the network by using the DHCP strategy.
ok boot net[:dhcp]
1 2
If you have changed the PROM setting to boot DHCP by default, as in the preceding nvalias example, you only have to specify boot net. b. Boot the system from the network by using the RARP strategy.
ok boot net[:rarp]
Because RARP is the default network boot strategy, you only have to specify boot net:rarp if you have changed the PROM value to boot DHCP.
Boot an x86 based system to run level 3, multiuser level. Boot an x86 based system the in single-user mode. Boot an x86 based system interactively.
Use this boot method to bring the system back to multiuser level after shutting down the system or performing a system hardware maintenance task. Use this boot method to perform a system maintenance task, such as backing up a file system. Use this boot method after making temporary changes to a system file or the kernel for testing purposes.
x86: How to Boot a System to Run Level 3 (Multiuser) on page 242 x86: How to Boot a System to Run Level S (Single-User Level) on page 244 x86: How to Boot a System Interactively on page 246
241
Task
Description
For Instructions
Use one of the following methods to display the available BEs on an x86 based system that has a ZFS root file system: lustatus bootadm list-menu If you install or upgrade your system to a Solaris release that supports a ZFS boot loader, the GRUB menu entry for the default ZFS BE contains the -B $ZFS-BOOTFS boot argument by default. The system boots automatically from ZFS.
Note This option is supported only for boot devices
How to Display a List of the Available ZFS Bootable Environments on an x86 Based System on page 249
How to Boot From a ZFS Root File System on an x86 Based System on page 250
that contain a ZFS pool. Boot the failsafe archive on an x86 Use this procedure to boot the failsafe archive on an based system. x86 based system. Then, run the bootadm command to update the boot archive. Boot an x86 based failsafe archive Use this procedure in cases where the boot archive is to forcibly update a corrupt boot corrupt, and the system refuses to boot normally, or archive. you are not prompted to update an inconsistent boot archive. Boot an x86 based system from the network by using GRUB. Use this method to boot a PXE or non-PXE device from the network with the default network configuration strategy. This method is also used for booting a diskless client. How to Boot the Failsafe Archive on an x86 Based System by Using GRUB on page 254 x86: How to Boot the Failsafe Archive to Forcibly Update a Corrupt Boot Archive on page 256 x86: How to Perform a GRUB Based Boot From the Network on page 261
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch. When the boot sequence begins, the GRUB menu is displayed.
2
When the GRUB menu is displayed, press Enter to boot the default OS instance. If you do not choose an entry within 10 seconds, the system automatically boots to run level 3. The login prompt is displayed when the boot process has finished successfully.
242
0 S
Example 129
GNU GRUB version 0.95 (637K lower / 2096064K upper memory) ============================================================== Solaris 10 10/08 s10x_u6wos_03 X86 Solaris failsafe ============================================================== Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line.
SunOS Release 5.10 Version Generic_137138-04 32-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hostname: pups NIS domain name is ....sfbay.sun.com Reading ZFS config: done. Mounting ZFS filesystems: (5/5) pups console login: # who -r .
0 S
243
the GRUB main menu vary, depending on the Solaris release you are running. For a description of all the kernel options that you can specify in the GRUB menu at boot time, see x86: Modifying Boot Behavior by Editing the GRUB Menu at Boot Time on page 211.
1
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch. When the boot sequence begins, the GRUB menu is displayed.
2 3
When the GRUB main menu is displayed, type e to boot the system to run level S. . Use the arrow keys to choose the kernel or kernel$ line. If you cannot use the arrow keys, use the caret key (^) key to scroll up and the letter v key to scroll down. Type e to edit the boot entry line. From here, you can add options and arguments to the kernel or kernel$ line. To boot the system in single-user mode, type -s at the end of the boot entry line. Then, press Return to go back to the previous screen.
To specify other boot behaviors, replace the -s option with the appropriate boot option. The following alternate boot behaviors can be specified in this manner.
Perform a reconfiguration boot. Boot a 64-bit capable system in 32-bit mode. Boot the system with the kernel debugger. Redirect the console.
6 7 8
To boot the system in single-user mode, type b. When prompted, type the root password. Verify that the system is at run level S.
# who -r . run-level S Jun 13 11:07 S 0 0
9 10
Perform the system maintenance task that required the run level change to S. After you complete the system maintenance task, reboot the system.
Example 1210
GNU GRUB version 0.95 (637K lower / 2096064K upper memory) =================================================== Solaris 10 10/08 s10x_u6wos_03 X86 <Type "e"> Solaris failsafe ===================================================== Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line. ===================================================== GNU GRUB version 0.95 (637K lower / 2096064K upper memory) ===================================================== findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS <Type "e"> module /platform/i86pc/boot_archive ================================================ Use the and keys to select which entry is highlighted. Press b to boot, e to edit the selected command in the boot sequence, c for a command-line, o to open a new line after (O for before) the selected line, d to remove the selected line, or escape to go back to the main menu. [ Minimal BASH-like line editing is supported. For the first word, TAB
Chapter 12 Booting a Solaris System (Tasks) 245
lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time exits. ] grub edit> kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS -s GNU GRUB version 0.95 (637K lower / 2096064K upper memory) ======================================================= findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS -s <Type "b"> module /platform/i86pc/boot_archive ====================================== Use the and keys to select which entry is highlighted. Press b to boot, e to edit the selected command in the boot sequence, c for a command-line, o to open a new line after (O for before) the selected line, d to remove the selected line, or escape to go back to the main menu. . . . SunOS Release 5.10 Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Booting to milestone "milestone/single-user:default". Hostname: pups Requesting System Maintenance Mode SINGLE USER MODE Root password for system maintenance (control-d to bypass): single-user privilege assigned to /dev/console. Entering System Maintenance Mode Jul 2 14:41:48 su: su root succeeded for root on /dev/console Sun Microsystems Inc. # who -r who -r . run-level S Jul 2 14:39 S 0 0 #
246
To specify an alternate /etc/system file when booting an x86 based system interactively by using the boot -a command, you must first perform the following steps:
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch. When the boot sequence begins, the GRUB main menu is displayed.
2 3 4 5 6 7
To access the GRUB edit menu, type e. Use the arrow keys to select the kernel or kernel$ line. Type e to edit the boot entry line. Type -a to boot the system interactively. Then, press Enter to return to the GRUB main menu. To boot the system interactively, type b. Type a default directory for modules, or press Enter to accept the default.
Enter default directory for modules [/platform/i86pc/kernel /kernel /usr/kernel]:
Pressing Enter without providing an alternate file accepts the default. Repair the damaged /etc/system file.
9
Example 1211
GNU GRUB version 0.95 (637K lower / 2096064K upper memory) =================================================== Solaris 10 10/08 s10x_u6wos_03 X86 <type "e"> Solaris failsafe ===================================================== Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line. =====================================================
GNU GRUB version 0.95 (637K lower / 2096064K upper memory) ===================================================== findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS <type "e"> module /platform/i86pc/boot_archive ====================================================== Use the and keys to select which entry is highlighted. Press b to boot, e to edit the selected command in the boot sequence, c for a command-line, o to open a new line after (O for before) the selected line, d to remove the selected line, or escape to go back to the main menu. [ Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists the possible completions of a device/filename. ESC at any time exits. ] grub edit> kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS -a GNU GRUB version 0.95 (637K lower / 2096064K upper memory) =================================================== findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS -a <Type "b"> module /platform/i86pc/boot_archive ==================================================== . . . Enter default directory for modules [/platform/i86pc/kernel /kernel /usr/kernel]: Name of system file [/etc/system]: /etc/system.bak SunOS Release 5.10 Version Generic_137138-04 32-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
248 System Administration Guide: Basic Administration September 2008
Use is subject to license terms. Hostname: pups NIS domain name is ....sfbay.sun.com Reading ZFS config: done. Mounting ZFS filesystems: (5/5) pups console login:
How to Display a List of the Available ZFS Bootable Environments on an x86 Based System
Become superuser or assume an equivalent role. To display a list of available BEs on the system, type the following command:
# lustatus
1 2
Note that the lustatus command can also be used on SPARC based systems.
Note If the following error is displayed when you run the lustatus command, it is an indication that a new installation was performed and that Solaris Live Upgrade was not used. Before any BEs can be acknowledged in the lustatus output, a new BE must be first created on the system. # lustatus ERROR: No boot environments are configured on this system ERROR: cannot determine list of all boot environment names
249
For more information about using Solaris Live Upgrade to migrate a UFS root file system to a ZFS root file system, see Migrating a UFS Root File System to a ZFS Root File System (Solaris Live Upgrade) in Solaris ZFS Administration Guide.
Example 1212
Displaying a List of Available ZFS Bootable Datasets by Using the lustatus Command
In this example, the output of the lustatus command shows the status of three ZFS bootable datasets. The default bootable environment is be1 and therefore cannot be deleted.
# lustatus Boot Environment Name -------------------------s10s_nbu6wos zfs2BE zfsbe3 #
If the BE has been created and is bootable, a yes appears in the Is Complete column. If a BE has been created, but is not yet activated, a 'no appears in this column. To activate a BE, use the luactivate command. Run the lustatus command afterwards to verify that the BE was successfully activated. For more information see the lustatus(1M) and the luactivate(1M)man pages.
How to Boot From a ZFS Root File System on an x86 Based System
This procedure describes how to boot from a ZFS root file system on an x86 system that supports a ZFS boot loader. Note that if you install or upgrade your system to a Solaris release that supports a ZFS boot loader, the GRUB menu entry contains the -B $ZFS-BOOTFS boot argument by default, so the system boots from ZFS without requiring any additional boot arguments.
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch.
250 System Administration Guide: Basic Administration September 2008
When the boot sequence begins, the GRUB main menu is displayed. If the default boot entry is a ZFS file system menu is similar to the following:
GNU GRUB version 0.95 (637K lower / 3144640K upper memory) +----------------------------------------------------------------+ | be1 | be1 failsafe | be3 | be3 failsafe | be2 | be2 failfafe +---------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line. 2
When the GRUB menu is displayed, press Enter to boot the default OS instance. If you do not choose an entry within 10 seconds, the system automatically boots to run level 3. To boot another BE, use the arrow keys to highlight the specified boot entry. Type b to boot this entry or e to edit the entry. If you type e to edit the entry, the default menu for booting a system with a ZFS root would appear as follows:
findroot (BE_be10,0,a) kernel$ /platform/i86pc/kernel/$ISADIR/unix -B $ZFS-BOOTFS module$ /platform/i86pc/$ISADIR/boot-archive
3 4
For more information about GRUB menu entries at boot time, seex86: How to Modify Boot Behavior by Editing the GRUB Menu at Boot Time on page 213.
Example 1213
251
# luactivate be10 System has findroot enabled GRUB Generating boot-sign, partition and slice information for PBE <be1> WARNING: The following file s have change on both the current boot environment <be1> zone <global> and the boot environment to be activitate <be10> /etc/zfs/zpool.cache INFORMATION: The files listed above are in conflict between the current boot environment <be1> zone <global> and the boot environment to be activated <be10>. These files will not be automatically synchronized from the current boot environment <be1> when boot environment <be10> is activated. Setting failsafe console to <ttyb> Generating boot-sign for ABE <be10> Generating partition and slice information for ABE <be10> Copied boot menu from top level dataset. Generating direct boot menu entries for PBE. Generating direct boot menu entries for ABE. Disabling splashimage Current GRUB menu default setting is not valid title Solaris bootenv rc No more bootadm entries. Deletion of bootadm entries is complete. GRUB menu default setting is unchanged Done eliding bootadm entries. ************************************************************** The target boot environment has been activated. It will be used when you reboot. NOTE: You MUST NOT USE the reboot, halt, or uadmin commands. You MUST USE either the init or the shutdown command when you reboot. If you do not use either init or shutdown, the system will not boot using the target BE. *************************************************************** ,,,
# reboot May 30 09:52:32 pups reboot: initiated by root on /dev/console syncing file systems... done rebooting... CE SDRAM BIOS P/N GR-xlint.007-4.330 * BIOS Lan-Console 2.0 Copyright (C) 1999-2001 Intel Corporation . . . GNU GRUB version 0.95 (637K lower / 3144640K upper memory) +-------------------------------------------------------------------+
252 System Administration Guide: Basic Administration September 2008
| be1 | be1 failsafe | be10 | be10 failsafe +------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line. SunOS Release 5.10 32-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Hostname: pups NIS domain name is sunsoft.eng.sun.com Reading ZFS config: done. Mounting ZFS filesystems: (8/8) pups console login: # lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot Delete Status ----------------------------------------------------------------be1 yes yes yes no be10 yes yes yes no #
How to Boot the Failsafe Archive on an x86 Based System by Using GRUB
Note The GRUB failsafe interaction in some Solaris releases prompts you to update the boot
archives, regardless of whether any inconsistent boot archive are detected. In this Solaris release, the system only prompts you to update the boot archives if an inconsistent boot archive is detected.
1
Stop the system by using one of the methods described in the procedure, x86: How to Stop a System for Recovery Purposeson page 263. If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the Reset button at this prompt. Or, you can use the power switch to reboot the system. When the boot sequence begins, the GRUB menu is displayed.
GNU GRUB version 0.95 (637K lower / 3144640K upper memory) +-------------------------------------------------------------------+ | be1 | be1 failsafe | be3 | be3 failsafe | be2 | be2 failfafe +------------------------------------------------------------------+ Use the ^ and v keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line.
Note The GRUB menu that is displayed may vary, depending on the Solaris release you are
running.
3 4
Use the arrow keys to navigate the GRUB menu to select a failsafe entry. Press Return to boot the failsafe archive. The system searches for installed OS instances. If an inconsistent boot archive is detected, a message similar to the following is displayed:
Searching for installed OS instances... An out of sync boot archive was detected on /dev/dsk/c0t0d0s0. The boot archive is a cache of files used during boot and
254
should be kept in sync to ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?] 5
Type y to update the boot archive. If multiple inconsistent boot archives are detected, the system will prompt you to type y to update each inconsistent boot archive. For each archive that is updated successfully, the following message is displayed:
Updating boot archive on /dev/dsk/c0t0d0s0. The boot archive on /dev/dsk/c0t0d0s0 was updated successfully.
After the boot archive is updated, the system searches again for all installed OS instances, then prompts you to select a device to mount on /a. Note that this same message is displayed when the system first boots if no inconsistent boot archives are detected.
Searching for installed OS instances... Multiple OS instances were found. To check and mount one of them read-write under /a, select it from the following list. To not mount any, select q. 1 pool10:13292304648356142148 2 rpool:14465159259155950256 ROOT/be10 ROOT/be01
If you choose not to mount a device, type q to continue to boot process. If you choose to mount a device, follow these steps: a. Type the number of the device and press Return. The system mounts the device on /a, and returns you to a shell prompt. b. Repair the critical system resource. c. When you are done repairing the critical system resource, unmount the device.
# umount /a
255
x86: How to Boot the Failsafe Archive to Forcibly Update a Corrupt Boot Archive
This procedure shows how to rebuild an inconsistent or corrupt boot archive in the event you are not prompted by the system to update the boot archive the system, or in the event of a system hang or looping sequence occurs.
Stop the system by using one of the methods that are described in the procedure, x86: How to Stop a System for Recovery Purposeson page 263. Reboot the system.
# reboot
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the Reset button at this prompt. When the boot sequence begins, the GRUB menu is displayed.
+---------------------------------------------------------------------+ | Solaris 10.1... X86 | | Solaris failsafe | | | | | +-------------------------------------------------------------------------+ Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line.
Note The contents of the GRUB menus vary, depending on the Solaris release you are running. 3
Use the arrow keys to navigate the GRUB menu, then select the failsafe entry. Press Return to boot the failsafe archive. If any boot archives are out of date, a message that is similar to the following is displayed:
Searching for installed OS instances... An out of sync boot archive was detected on /dev/dsk/c0t0d0s0. The boot archive is a cache of files used during boot and should be kept in sync to ensure proper system operation. Do you wish to automatically update this boot archive? [y,n,?]
256
Type y, then press Enter to update the inconsistent boot archive. The system displays the following message:
Updating boot archive on /dev/dsk/c0t0d0s0. The boot archive on /dev/dsk/c0t0d0s0 was updated successfully.
If no inconsistent boot archives are found, a message that is similar to the following is displayed:
Searching for installed OS instances... Solaris 10.1... X86 was found on /dev/dsk/c0t0d0s0. Do you wish to have it mounted read-write on /a? [y,n,?]
This message is also displayed after any inconsistent boot archives are updated successfully.
5
Mount the device that contains the corrupt boot archive on /a by typing the corresponding number of the device, then press Enter.
Note If any inconsistent boot archives were updated in the previous step, the device is already
Example 1214
x86: Booting the Failsafe Archive to Forcibly Update a Corrupt Boot Archive
This example shows how to boot the failsafe archive to forcibly update a corrupt boot archive.
GNU GRUB version 0.95 (635K lower / 523200K upper memory) +-------------------------------------------------------------------------+ | Solaris 10 1/06 s10x_u1wos_19a X86 | | >Solaris failsafe< | | | | | +-------------------------------------------------------------------------+ Use the and keys to select which entry is highlighted. Press enter to boot the selected OS, e to edit the commands before booting, or c for a command-line.
257
SunOS Release 5.10 Copyright 1983-2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Booting to milestone "milestone/single-user:default". Configuring devices. Searching for installed OS instances... Multiple OS instances were found. To check and mount one of them read-write under /a, select it from the following list. To not mount any, select q. 1 /dev/dsk/c0t0d0s0 2 /dev/dsk/c0t1d0s0 Solaris 10 1/06 s10x_u1wos_19a X86 Solaris 10 5/08 X86
Please select a device to be mounted (q for none) [?,??,q]: 1 mounting /dev/dsk/c0t0d0s0 on /a Starting shell. # rm /a/platform/i86pc/boot_archive # bootadm update-archive -f -R /a Creating boot_archive for /a updating /a/platform/i86pc/amd64/boot_archive updating /a/platform/i86pc/boot_archive # umount /a # reboot syncing file systems... done rebooting... . . .
Execution Environment specification. The default network boot strategy that is used for a GRUB based PXE network boot is DHCP. For non-PXE devices, you can use either the DHCP or the RARP boot strategy. The strategy
258 System Administration Guide: Basic Administration September 2008
that you use depends on which type of boot server is available on your network. If no PXE or DHCP server is available, you can load GRUB from a diskette, a CD-ROM, or a local disk. To perform a GRUB based network boot, a DHCP server that is configured for PXE clients is required. A boot server that provides tftp service is also required. The DHCP server supplies the information that the client needs to configure its network interface. The DHCP server must be able to respond to the DHCP classes, PXEClient and GRUBClient with the following information:
The sequence for performing a PXE network boot of the Solaris OS is as follows: 1. The BIOS is configured to boot from a network interface. 2. The BIOS sends a DHCP request. 3. The DHCP server replies with the server address and the name of the boot file. 4. The BIOS downloads pxegrub by using tftp and executes pxegrub. 5. The system downloads a GRUB menu file by using tftp. This file displays the boot menu entries that are available. 6. After you select a menu entry, the system begins to load the Solaris OS. See How to Set Up a Network Configuration Server in System Administration Guide: IP Services for more information. Running the add_install_client command creates the /tftpboot_01ethernet-address file. This file is linked to pxegrub and the/tftpboot/menu.lst.01ethernet-address file. The /tftpboot/menu.lst.01ethernet-address file is the GRUB menu file. If this file does not exist, then pxegrub reverts to using DHCP Option 150, if this option is specified, or the /tftpboot/boot/grub/menu.lst file. Typically, a single system is set up to serve both functions. In this instance, the add_install_client command sets up the /tftpboot file with the correct pxegrub menu file and the Solaris files. DHCP service is handled separately by using the add_install_client command. The setup only needs to be completed once per client. See x86: About DHCP Macros on page 259 and x86: How to Perform a GRUB Based Boot From the Network on page 261 for more information.
To install DHCP clients with a DHCP server over the network, you must create DHCP options. This information is needed to install the Solaris OS. When a client sends a DHCP request, the server must have the following client information:
Client's ID, which is typically the Ethernet address Class of the client request Subnet the client resides on
The Solaris DHCP server forms a response. This response is based on the following macros, which matches the client request: class macro The class macro is based on a class string that is contained in the DHCP request. On x86 based systems, the BIOS already makes a DHCP request with the class PXEClient:Arch:00000:UNDI:002001. If a macro by this name is defined in the DHCP server configuration, then the macro content is sent to the x86 based clients. The network macro is named by the IP address of the subnet that the client resides on. If the macro 129.146.87.0 is defined on the DHPC server, the macro content is sent to all clients on that subnet. The macro content is sent, regardless of the class of the request. If an option is defined in both the class macro and the network macro, the network macro takes precedence. The IP macro is named by an IP address. This macro is rarely used The client macro is named by the client type (01 for Ethernet) and the mac address of the client, in uppercase letters. For a client with the Ethernet address 0:0:39:fc:f2:ef, the corresponding macro name is 01000039FCEF. Note the absence of colons in the client macro.
network macro
For example, for a client on the subnet 192.168.100.0, with the Ethernet address 0:0:39:fc:f2:ef, making a DHCP request of class PXEClient, the DHCP server has the following matching macro:
PXEClient BootSrvA: 192.168.100.0 BootFile: pxegrub 129.146.87.0 Router: 129.146.87.1 NISdmain: sunsoft.eng.sun.com 01000039FCEF BootFile: 01000039FCEF The actual DHCP response will be BootSrvA: 192.168.100.0 BootFile: 01000039FCEF Router: 129.146.87.1 NISdmain: sunsoft.eng.sun.com
260 System Administration Guide: Basic Administration September 2008
Note that the BootFile in the client macro overrides the BootFile in the class macro. For more detailed information, see Preconfiguring System Configuration Information With the DHCP Service (Tasks) in Solaris 10 Installation Guide: Network-Based Installations.
Before performing a network boot on an x86 based system with GRUB, do the following:
Run the appropriate commands on the installation server to enable the system to boot from the network. Add the client system as an install client.
See Chapter 7, Preparing to Install From the Network (Overview), in Solaris 10 Installation Guide: Network-Based Installations for more information.
1
On the DHCP server, create a client macro for the DHCP service with the following two options:
BootSrvA: svr-addr BootFile: client-macro Note that you must have superuser privileges on the DHCP server to run the dhtadm command. where svr-addr is the IP address of the server, and client-macro is named by the client's Ethernet type (01) and the mac address, in uppercase letters. This number is also the name of the file that is used in the /tftpboot directory on the installation server.
Note The notation for the client-macro should not contain any colons.
You can create the client macro from the DHCP GUI or from command-line interface.
261
Reboot the system. Instruct the BIOS to boot from the network.
If your system uses a specific keystroke sequence to boot from the network, type the keystrokes when the BIOS screen is displayed. If you need to manually modify the BIOS settings to boot from the network, type the keystroke sequence to access the BIOS setup utility. Then, modify the boot priority to boot from the network.
When the GRUB menu is displayed, select the network installation image that you want to install.
Stop a system for recovery purposes. If a damaged file is preventing the system from booting normally, first stop the system to attempt recovery
SPARC: How to Stop the System for Recovery Purposes on page 263 x86: How to Stop a System for Recovery Purposes on page 263 SPARC: How to Force a Crash Dump and Reboot of the System on page 266 x86: How to Force a Crash Dump and Reboot of the System on page 268
You can force a crash dump and reboot of the system as a troubleshooting measure.
Boot a SPARC based system for recovery purposes. Boot a system with the kernel debugger.
Boot to repair an important system file that is preventing the system from booting successfully. You can the system with the kernel debugger to troubleshoot booting problems. Use the kmdb command to boot the system.
SPARC: How to Boot a System for Recovery Purposes on page 264 SPARC: How to Boot the System With the Kernel Debugger (kmdb) on page 269 x86: How to Boot a System With the Kernel Debugger in the GRUB Boot Environment (kmdb) on page 270
262
You might need to use one or more of the following methods to troubleshoot problems that prevent the system from booting successfully.
Troubleshoot error messages when the system boots. Stop the system to attempt recovery. Boot a system for recovery purposes. Force a crash dump and reboot of the system. Boot the system with the kernel debugger by using the kmdb command.
The specific Stop key sequence depends on your keyboard type. For example, you can press Stop-A or L1-A. On terminals, press the Break key.
2
3 4
When you see the syncing file systems... message, press the Stop key sequence again. Type the appropriate boot command to start the boot process. For more information, see the boot(1M) man page. Verify that the system was booted to the specified run level.
# who -r . run-level s May 2 07:39 3 0 S
Example 1215
If the keyboard and mouse are functional, become superuser. Then, type init 0 to stop the system. After the Press any key to reboot prompt appears, press any key to reboot the system. If the keyboard and mouse are functional, become superuser. then, type init 6 to reboot the system.
If the system does not respond to any input from the mouse or the keyboard, press the Reset key, if it exists, to reboot the system. Or, you can use the power switch to reboot the system.
1 2
Stop the system by using the system's Stop key sequence. Boot the system in single-user mode.
Insert the Solaris installation media into the drive. Boot from the installation media in single-user mode.
ok boot cdrom -s
Boot the system from the network if an installation server or remote CD or DVD drive is not available.
ok boot net -s
Mount the file system that contains the file with an invalid entry.
# mount /dev/dsk/device-name /a
264
10
Verify that the system booted to run level 3. The login prompt is displayed when the boot process has finished successfully.
hostname console login:
Example 1216
Example 1217
# # # #
cd /a/etc TERM=vt100 export TERM vi shadow (Remove root's encrypted password string) # cd / # umount /a # init 6
Type the stop key sequence for your system. The specific stop key sequence depends on your keyboard type. For example, you can press Stop-A or L1-A. On terminals, press the Break key. The PROM displays the ok prompt.
After the crash dump is written to disk, the system will continue to reboot.
3
Verify the system boots to run level 3. The login prompt is displayed when the boot process has finished successfully.
hostname console login:
Example 1218
SPARC: Forcing a Crash Dump and Reboot of the System by Using the halt -d Command
This example shows how to force a crash dump and reboot of the system jupiter by using the halt -d and boot command. Use this method to force a crash dump and reboot of the system.
266
# halt -d Jul 21 14:13:37 jupiter halt: halted by root panic[cpu0]/thread=30001193b20: forced crash dump initiated at user request 000002a1008f7860 genunix:kadmin+438 (b4, 0, 0, 0, 5, 0) %l0-3: 0000000000000000 0000000000000000 0000000000000004 %l4-7: 00000000000003cc 0000000000000010 0000000000000004 000002a1008f7920 genunix:uadmin+110 (5, 0, 0, 6d7000, ff00, %l0-3: 0000030002216938 0000000000000000 0000000000000001 %l4-7: 000000423791e770 0000000000004102 0000030000449308
syncing file systems... 1 1 done dumping to /dev/dsk/c0t0d0s1, offset 107413504, content: kernel 100% done: 5339 pages dumped, compression ratio 2.68, dump succeeded Program terminated ok boot Resetting ... Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz), No Keyboard OpenBoot 3.15, 128 MB memory installed, Serial #10933339. Ethernet address 8:0:20:a6:d4:5b, Host ID: 80a6d45b. Rebooting with command: boot Boot device: /pci@1f,0/pci@1,1/ide@3/disk@0,0:a File and args: kernel/sparcv9/unix SunOS Release 5.10 Version s10_60 64-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. configuring IPv4 interfaces: hme0. add net default: gateway 172.20.27.248 Hostname: jupiter The system is coming up. Please wait. NIS domain name is example.com . . . System dump time: Wed Jul 21 14:13:41 2004 Jul 21 14:15:23 jupiter savecore: saving system crash dump in /var/crash/jupiter/*.0 Constructing namelist /var/crash/jupiter/unix.0 Constructing corefile /var/crash/jupiter/vmcore.0 100% done: 5339 of 5339 pages saved Starting Sun(TM) Web Console Version 2.1-dev... . . .
Chapter 12 Booting a Solaris System (Tasks) 267
Access the kernel debugger. The method used to access the debugger is dependent upon the type of console that you are using to access the system.
If you are using a locally attached keyboard, press F1A. If you are using a serial console, send a break by using the method appropriate to that type of serial console.
Panic messages are displayed, the crash dump is saved, and the system reboots.
3
Verify that the system has rebooted by logging in at the console login prompt.
Example 1219
x86: Forcing a Crash Dump and Reboot of the System by Using halt -d
This example shows how to force a crash dump and reboot of the x86 based system neptune by using the halt -d and boot commands. Use this method to force a crash dump of the system. Reboot the system afterwards manually.
# halt -d 4ay 30 15:35:15 wacked.Central.Sun.COM halt: halted by user panic[cpu0]/thread=ffffffff83246ec0: forced crash dump initiated at user request
268
fffffe80006bbd60 genunix:kadmin+4c1 () fffffe80006bbec0 genunix:uadmin+93 () fffffe80006bbf10 unix:sys_syscall32+101 () syncing file systems... done dumping to /dev/dsk/c1t0d0s1, offset 107675648, content: kernel NOTICE: adpu320: bus reset 100% done: 38438 pages dumped, compression ratio 4.29, dump succeeded Welcome to kmdb Loaded modules: [ audiosup crypto ufs unix krtld s1394 sppp nca uhci lofs genunix ip usba specfs nfs md random sctp ] [0]> kmdb: Do you really want to reboot? (y/n) y
SPARC: How to Boot the System With the Kernel Debugger (kmdb)
This procedure shows you the basics for loading the kernel debugger (kmdb). For more detailed information, see the Solaris Modular Debugger Guide.
Note Use the reboot and halt command with the -d option if you do not have time to debug
the system interactively. To run the halt command with the -d option requires a manual reboot of the system afterwards. Whereas, if you use the reboot command, the system boots automatically. See the reboot(1M) for more information.
1
Halt the system, causing it to display the ok prompt. To halt the system gracefully, use the /usr/sbin/halt command. Type either boot kmdb or boot -k to request the loading of the kernel debugger. Press return. Enter the kernel debugger. The method used to enter the debugger is dependent upon the type of console that is used to access the system:
2 3
If a locally attached keyboard is being used, press Stop-A or L1A, depending upon the type of keyboard. If a serial console is being used, send a break by using the method that is appropriate for the type of serial console that is being used.
A welcome message is displayed when you enter the kernel debugger for the first time.
Rebooting with command: kadb Boot device: /iommu/sbus/espdma@4,800000/esp@4,8800000/sd@3,0
Chapter 12 Booting a Solaris System (Tasks) 269
. . .
Example 1220
x86: How to Boot a System With the Kernel Debugger in the GRUB Boot Environment (kmdb)
This procedure shows the basics for loading the kernel debugger (kmdb). The savecore feature is enabled by default. For more detailed information about using the kernel debugger, see the Solaris Modular Debugger Guide.
Boot the system. The GRUB menu is displayed when the system is booted.
2 3
When the GRUB menu is displayed, type e to access the GRUB edit menu. Use the arrow keys to select the kernel$ line. If you cannot use the arrow keys, use the ^ key to scroll up and the v key to scroll down.
Type e to edit the line. The boot entry menu is displayed. In this menu, you can modify Solaris boot behavior by adding additional boot arguments to the end of the kernel$ line.
5 6 7 8
Type -k at the end of the line. Press enter to return to the GRUB main menu. Type b to boot the system with the kernel debugger enabled. Access the kernel debugger.
270
The method used to access the debugger is dependent upon the type of console that you are using to access the system:
If you are using a locally attached keyboard, press F1A. If you are using a serial console, send a break by using the method appropriate to that type of serial console.
A welcome message is displayed when you access the kernel debugger for the first time.
Example 1221
x86: Booting a System With the Kernel Debugger (GRUB Multiboot Implementation)
This example shows how to manually boot a 64-bit capable x86 based system with the kernel debugger enabled.
kernel$ /platform/i86pc/multiboot kernel/amd64/unix -k -B $ZFS-BOOTFS
This example shows how to boot a 64-bit capable x86 based system 32-bit mode with the kernel debugger enabled.
kernel$ /platform/i86pc/multiboot kernel/unix -k -B $ZFS-BOOTFS
271
272
13
C H A P T E R
1 3
This chapter describes boot archive management in the Solaris OS. Procedures for using the bootadm command are described in detail. The following is a list of the information in this chapter: Managing the Solaris Boot Archives (Task Map) on page 273 Description of the Solaris Boot Archives on page 274 Managing the boot-archive Service on page 275 Using the bootadm Command to Manage the Boot Archives on page 278
For overview information about the boot process, see Chapter 9, Shutting Down and Booting a System (Overview). For step-by-step instructions on booting a system, see Chapter 12, Booting a Solaris System (Tasks).
The boot-archive service is controlled by the Service Management Facilty (SMF). Use the svcadm command to enable and disable services. Use the svcs command to verify whether the boot-archive service is running.
273
(Continued)
For Information
Use this procedure as an alternate to booting the failsafe archive. After the boot-archive service is cleared, the bootadm command runs silently to update the boot archives. Use the bootadm update-archive command to manually update the boot archive.
How to Update an Inconsistent Boot Archive by Clearing the boot-archive Service on page 276 How to Manually Update the Boot Archive on page 278 How to Manually Update the Boot Archive on a RAID-1 (Mirror) Volume on page 279
Manually update the boot On systems that use a metadevice mirror archive for a mirrored root (/) for the root (/) partition, booting the partition. failsafe archive and running the bootadm update-archive command to manually update the boot archive fails. This problem occurs because the mirror is a metadevice. Consequently, you must manually update the boot archive. List the contents of the boot Use the bootadm list-archive archives by using the bootadm command to list the contents of the boot command. archive. x86 only: Locate the active GRUB menu by using the bootadm command. x86 only: Set the default boot entry in the GRUB menu by using the bootadm command. Use the bootadm list-menu command to determine the location of the active GRUB menu. Use the bootadm set-menu command to set the default boot entry in the GRUB menu.
How to List Contents of the Boot Archive on page 285 x86: How to Locate the Active GRUB Menu and List Current Menu Entries on page 286 x86: How to Set the Default Boot Entry for the Active GRUB Menu on page 286
274
The contents of this directory are divided into three groups of files:
Files that are required for a sun4u boot archive Files that are required for a sun4v boot archive Files that are required for a sun4us boot archive
The files that make up the x86 boot archives are located in the /platform/i86pc directory. To list the files and directories that are included in the boot archives, use the bootadm list-archive command. If any files in the archive are updated, the boot archive must be rebuilt. For modifications to take effect, the rebuild of the archive must take place before the next system reboot The failsafe boot archive is the second type of archive that is created when you install the Solaris OS. A failsafe boot archive has the following benefits and characteristics:
Is self-sufficient Can boot on its own Is created by default during installation of the OS Requires no maintenance
For more information about booting a system in failsafe mode, see Booting the Failsafe Archive on a SPARC Based System on page 235 and Booting the Failsafe Archive on an x86 Based System on page 253.
1 2
If the service is not running, the output indicates the service is offline.
Troubleshooting
For information about updating the boot archive by clearing the boot-archive service, see How to Update an Inconsistent Boot Archive by Clearing the boot-archive Service on page 276.
For SPARC based systems, see Booting a SPARC Based System From the Network on page 239. For x86 based systems, see Booting the Failsafe Archive on an x86 Based System on page 253.
1
During the process of booting the system, if a warning similar to the following is displayed, ignore the warning.
WARNING: The following files in / differ from the boot archive: changed file-name
After this command is run, the bootadm update-archive command runs silently. If the boot archive is updated successfully, the system is rebooted.
276 System Administration Guide: Basic Administration September 2008
Example 131
Rebooting with command: boot Boot device: /pci@1f,4000/scsi@3/disk@1,0:a File and args: SunOS Release 5.10 64-bit Copyright 1983-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. DEBUG enabled misc/forthdebug (507204 bytes) loaded Hostname: marnie WARNING: The following files in / differ from the boot archive: changed /kernel/drv/sd.conf The recommended action is to reboot to the failsafe archive to correct the above inconsistency. To accomplish this, on a GRUB-based platform, reboot and select the "Solaris failsafe" option from the boot menu. On an OBP-based platform, reboot then type "boot -F failsafe". Then follow the prompts to update the boot archive. Alternately, to continue booting at your own risk, you may clear the service by running: "svcadm clear system/boot-archive" Nov 21 15:47:20 svc.startd[100004]: svc:/system/boot-archive:default: Method "/lib/svc/method/boot-archive" failed with exit status 95. Nov 21 15:47:20 svc.startd[100004]: system/boot-archive:default failed fatally: transitioned to maintenance (see svcs -xv for details) Requesting System Maintenance Mode (See /lib/svc/share/README for more information.) Console login service(s) cannot run Root password for system maintenance (control-d to bypass): single-user privilege assigned to /dev/console.
Chapter 13 Managing the Solaris Boot Archives (Tasks) 277
Entering System Maintenance Mode Nov 21 15:48:36 su: su root succeeded for root on /dev/console Sun Microsystems Inc. SunOS 5.10, 2007 . . .# # # svcadm clear system/boot-archive # # NIS domain name is mpklab.sfbay.sun.com /dev/rdsk/c0t1d0s5 is clean Reading ZFS config: done. # # bootadm update-archive # svcs boot-archive STATE STIME FMRI online 9:02:38 svc:/system/boot-archive:default
Manually update the current boot archives on a system. List the files and directories that are included in the boot archives on a system. x86 only: Maintain the GRUB menu. x86 only: Locate the active GRUB menu, as well as the current GRUB menu entries.
For more information about the bootadm command, see the bootadm(1M) man page.
278
bootadm update-archive
Manages the boot archives on a system. Updates the current boot archive, if required. Applies to both SPARC and x86 based systems.
-R altroot
If the boot archive and the root (/) file system become inconsistent, an error message is displayed when you boot the system. Typically, the recommended action is to boot the system in failsafe mode, then run the bootadm update-archive command to update the boot archives. However, if the root (/) file system is a mirrored metadevice (RAID-1 volume), this method fails to successfully update the boot archive. When you boot the system in failsafe mode, a message similar to the following is displayed:
Searching for installed OS instances... /dev/dsk/c0t0d0s0 is under md control, skipping. /dev/dsk/c1t3d0s0 is under md control, skipping. No installed OS instance found.
This message indicates the metadevice was skipped. To manually update the boot archives, follow the steps that are described in the following procedure.
1
On the system that has an inconsistent boot archive, become superuser or assume an equivalent role.
279
For more information, see How to Boot the Failsafe Archive on a SPARC Based System on page 236.
On an x86 based system, boot the system, then select the failsafe boot entry in the GRUB menu. For more information, see How to Boot the Failsafe Archive on an x86 Based System by Using GRUB on page 254.
The system boots in failsafe mode, searches for installed OS instances, then returns the message previously described, No installed OS instance found. After the boot sequence completes, the command prompt is displayed.
3
-p
Displays a list of active metadevices and hot spare pools. The -p output is designed for taking a snapshot of the configuration for later recovery or setup.
For example:
# metastat -p d10 -m d0 d1 1 d0 1 1 c0t0d0s0 d1 1 1 c1t3d0s0
In the previous output, d0 and d1 are submirrors of d10. The primary submirror, which is typically listed first, is d0.
4
280
Temporarily update the /etc/vfstab file to use a single root (/) partition. a. Make a copy of the original vfstab file.
# cp /a/etc/vfstab /a/etc/vfstab.orig
b. Using a text editor, edit the vfstab file as follows: i. Comment out the line for the root (/) mirror metadevice.
#device device #to mount to fsck # . . . #/dev/md/dsk/d10 mount point FS type fsck pass mount mount at boot options
/dev/md/rdsk/d10
ufs
no
In the previous example, the line, /dev/md/dsk/d10, was commented out. ii. Add a new line for the disk device of the primary submirror.
#device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # . . . #/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no . . .
In the previous example, a new line for the disk device of the primary submirror, /dev/dsk/c0t0d0s0, was added. c. Save the changes.
6
To prevent the system from attempting to boot from the metadevice, temporarily update the /etc/system file as follows: a. Make a copy of the original /etc/system file.
# cp /a/etc/system /a/etc/system.orig
281
b. Using a text editor, edit the /etc/system file, commenting out the rootdev line. This line is located between the Begin MDD root and the End MDD root lines.
* Begin MDD root info (do not edit) # rootdev:/pseudo/md@0:0,0,blk * End MDD root info (do not edit)
If the system still does not boot normally, reboot the failsafe archive and check the /etc/vfstab and the /etc/system files to make sure the information is correct.
After the system has successfully rebooted, rebuild the metadevice: a. Identify the name of the root (/) mirror metadevice from the vfstab file. The name of the metadevice is the line that was commented out in Step 5. b. Display the components of the mirror by using the metastat command. For example:
# metastat -p d10 -m d0 d1 1 d0 1 1 c0t0d0s0 d1 1 1 c1t3d0s0
For example:
# metadetach d10 d1
d. Replace the existing copy of the /etc/vfstab file with the original file.
# cp /a/etc/vfstab.orig /a/etc/vfstab
e. Replace the existing copy of the /etc/system file with the original file.
# cp /a/etc/system.orig /a/etc/system
282
After the system reboots, the mirrored root (/) partition is restored on the metadevice.
10
For example:
# metattach d10 d1
To check the status of the resynchronization process, use the metastat command:
# metastat | grep Resync in progress
283
Requesting System Maintenance Mode (See /lib/svc/share/README for more information.) Console login service(s) cannot run Root password for system maintenance (control-d to bypass): single-user privilege assigned to /dev/console. Entering System Maintenance Mode Sep 18 15:22:18 su: su root succeeded for root on /dev/console Sun Microsystems Inc. SunOS 5.10 Generic January 2005 # reboot -- "-F failsafe" syncing file systems... done rebooting... Resetting ... Rebooting with command: boot -F failsafe Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args: -F failsafe SunOS Release 5.10 Version Generic_137137-08 64-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Configuring devices. Searching for installed OS instances... /dev/dsk/c0t0d0s0 is under md control, skipping. /dev/dsk/c1t3d0s0 is under md control, skipping. No installed OS instance found. Starting shell. pilgrim1# metastat -p d10 -m d0 d1 1 d0 1 1 c0t0d0s0 d1 1 1 c1t3d0s0 # mount /dev/dsk/c0t0d0s0 /a # cp /a/etc/vfstab /a/etc/vfstab.orig # vi /a/etc/vfstab << input changes to vfstab file, then save changes >> # cp /a/etc/system /a/etc/system.orig # vi /a/etc/system << input changes to /etc/system file, then save changes >> # bootadm update-archive -R /a Creating boot_archive for /a updating /a/platform/sun4u/boot_archive 15+0 records in
284
15+0 records out # umount /a # shutdown -i 6 << reboot the system >> Rebooting with command: boot Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args: SunOS Release 5.10 Version Generic_137137-08 64-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. [...] # metastat -p d10 # metadetach d10 d1 # cp /a/etc/vfstab.orig /a/etc/vfstab # cp /a/etc/system.orig /a/etc/system # shutdown -i 6 << reboot the system >> Rebooting with command: boot Boot device: /pci@1f,4000/scsi@3/disk@0,0:a File and args: SunOS Release 5.10 Version Generic_137137-08 64-bit Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. [...] # metattach d10 d1 # metastat | grep Resync in progress Resync in progress: 4 % done # metastat | grep Resync in progress
list-archive
Lists the files and directories that are included in the boot archive or archives. Applies to both SPARC and x86 based systems.
285
x86: How to Locate the Active GRUB Menu and List Current Menu Entries
Use this procedure to determine the location of the active GRUB menu and to list current GRUB menu entries.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. To list the location of the active GRUB menu and current GRUB menu entries, type:
# bootadm list-menu
list-menu
Lists the location of the active GRUB menu, as well as the current GRUB menu entries. Information about the autoboot-timeout, the default entry number, and the title of each entry is included in this listing. Applies to x86 based systems only.
Example 133
Listing the Location of the Active GRUB Menu and Current GRUB Menu Entries
# bootadm list-menu The location for the active GRUB menu is: /stubboot/boot/grub/menu.lst default=0 timeout=10 (0) Solaris10 (1) Solaris10 Failsafe (2) Linux
x86: How to Set the Default Boot Entry for the Active GRUB Menu
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
To set the default boot entry in the active GRUB menu, type:
# bootadm set-menu menu-entry
set-menu menu-entry
286
Maintains the GRUB menu. The location of the active GRUB menu is boot/grub/menu.lst. Applies to x86 bases systems only. Specifies the GRUB menu entry to set as the default.
See Also
For a description of the menu.lst file in each GRUB implementation, see x86: Supported GRUB Implementations on page 294.
287
288
14
C H A P T E R
1 4
This chapter contains information about x86 boot processes, including GRUB implementation details and additional GRUB reference information. For overview information, see Chapter 9, Shutting Down and Booting a System (Overview). For step-by-step instructions on booting a system, see Chapter 12, Booting a Solaris System (Tasks).
Diskette CD or DVD
289
The BIOS attempts to boot from each device, in turn, until a valid device with a bootable program is found.
Interpreting the content of boot archive Autodetection of systems that are 64-bit capable Selecting the best kernel mode for booting the system Assembling core kernel modules in memory Handing control of the system to the Solaris kernel
After the kernel gains control of the system, the kernel initializes the CPU, memory, and device subsystems. The kernel then mounts the root device, which corresponds to the bootpath and fstype properties that are specified in the /boot/solaris/bootenv.rc file. This file is part of the boot archive. If these properties are not specified in the bootenv.rc file, or on the GRUB command line, the root file system defaults to UFS on /devices/ramdisk:a. The root file system defaults to UFS when you boot the installation miniroot. After the root device is mounted, the kernel initializes the sched and init commands. These commands start the Service Management Facility (SMF) services.
boot archive
A collection of critical files that is used to boot the Solaris OS. These files are needed during system startup before the root file system is mounted. Multiple boot archives are maintained on a system:
290
A primary boot archive is used to boot the Solaris OS on an x86 based system. A failsafe boot archive that is used for recovery when a primary boot archive is damaged. This boot archive starts the system without mounting the root file system. On the GRUB menu, this boot archive is called failsafe. The archive's primary purpose is to regenerate the primary boot archives, which are usually used to boot the system.
The first software program that runs after you power on a system. This program begins the booting process. See boot archive. GNU GRand Unified Bootloader (GRUB) is an open-source boot loader with a menu interface. The menu displays a list of the operating systems that are installed on a system. GRUB enables you to easily boot these various operating systems, such as the Solaris OS, Linux, or Windows. A boot menu that lists the operating systems that are installed on a system. From this menu, you can easily boot an operating system without modifying the BIOS or fdisk partition settings. A submenu of the GRUB main menu. GRUB commands are displayed on this submenu. These commands can be edited to change boot behavior. A configuration file that lists all the operating systems that are installed on a system. The contents of this file dictate the list of operating systems that is displayed in the GRUB menu. From the GRUB menu, you can easily boot an operating system without modifying the BIOS or fdisk partition settings. A minimal, bootable root (/) file system that resides on the Solaris installation media. A miniroot consists of the Solaris software that is required to install and upgrade systems. On x86 based systems, the miniroot is copied to the system to be used as the failsafe boot archive. See boot archive for details about the failsafe boot archive. See boot archive.
menu.lst file
miniroot
291
stage1 Is an image that is installed on the first sector of the Solaris fdisk partition. You can optionally install stage1 on the master boot sector by specifying the -m option with the installgrub command. See the installgrub(1M) man page and Disk Management in the GRUB Boot Environment in System Administration Guide: Devices and File Systems for more information. stage2 Is an image that is installed in a reserved area in the Solaris fdisk partition. The stage2 image is the core image of GRUB. menu.lst file Is typically located in the /boot/grub directory on systems with a UFS root and in the /pool-name/boot/grub directory on systems with a ZFS root. This file is read by the GRUB stage2 file. For more information, see the section, x86: Modifying Boot Behavior by Editing the menu.lst File on page 215.
You cannot use the dd command to write stage1 and stage2 images to disk. The stage1 image must be able to receive information about the location of the stage2 image that is on the disk. Use the installgrub command, which is the supported method for installing GRUB boot blocks.
First diskette Second diskette Network device First fdisk partition on first hard disk Second fdisk partition on first hard disk Slice a on first fdisk partition on first hard disk Slice b on first fdisk partition on first hard disk
292
For more information about fdisk partitions, see Guidelines for Creating an fdisk Partition in System Administration Guide: Devices and File Systems.
Operating System
Based on the preceding information, the GRUB menu would look like the following:
title Solaris 10 findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive title Solaris 9 OS (pre-GRUB) root (hd0,2,a) chainloader +1 makeactive title Linux root (hd0,1) kernel <from Linux GRUB menu...> initrd <from Linux GRUB menu...> title Windows root (hd0,0) chainloader +1
Chapter 14 x86: GRUB Based Booting (Reference) 293
Note The Solaris slice must be the active partition. Also, do not indicate makeactive under the
Windows menu. Doing so causes the system to boot Windows every time. Note that if Linux has installed GRUB on the master boot block, you cannot access the Solaris boot option. The inability to access the Solaris boot option occurs whether or not you designate it as the active partition. In this case, you can do one of the following:
Chain-load from the Linux GRUB by modifying the menu on Linux. Chain-loading is a mechanism for loading unsupported operating systems by using another boot loader.
Replace the master boot block with the Solaris GRUB by running the installgrub command with the -m option:
# installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/root-slice
See the installgrub(1M) man page for more information. For information about the Solaris Live Upgrade boot environment, see Solaris 10 Installation Guide: Solaris Live Upgrade and Upgrade Planning.
GRUB ZFS boot support For a description of the menu.lst file and an example, see Description of the menu.lst File (ZFS Support) on page 294.
GRUB UFS boot support For a description of the menu.lst file and an example, see Description of a menu.lst File (UFS Support) on page 295.
module /platform/i86pc/boot_archive title Solaris failsafe findroot (pool_rpool,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe
-B console=ttyb
Note Because the miniroot is mounted as the real root file system, the entry for failsafe booting in the menu.lst file does not change to the ZFS bootfs property, even if the failsafe archive is read from a ZFS dataset. The ZFS dataset is not accessed after the boot loader reads the miniroot.
EXAMPLE 141
title Solaris 10 5/08 s10x_nbu6wos_nightly X86 findroot (pool_rpool,0,a) kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive title Solaris failsafe findroot (pool_rpool,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe
EXAMPLE 142
-B console=ttyb
title be1 findroot (BE_be1,0,a) bootfs rpool/ROOT/szboot_0508 kernel$ /platform/i86pc/multiboot -B $ZFS-BOOTFS module /platform/i86pc/boot_archive title be1 failsafe findroot (BE_be1,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe
-B console=ttyb
EXAMPLE 143
(Continued)
kernel /platform/i86pc/multiboot module /platform/i86pc/boot_archive title Solaris failsafe findroot (rootfs0,0,a) kernel /boot/multiboot kernel/unix -s -B console-ttyb module /boot/x86.miniroot-safe
EXAMPLE 144
title be1 findroot (BE_be1,0,a) kernel /platform/i86pc/multiboot module /platform/i86pc/boot_archive title be1 failsafe findroot (BE_be1,0,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe
-B console=ttyb
296
15
C H A P T E R
1 5
This chapter describes the procedures for booting an x86 based system in the Solaris 10 OS on releases that do not implement GRUB based booting.
Note Starting with the Solaris 10 1/06 release, the open source GRand Unified Bootloader (GRUB) has been implemented on x86 based systems. GRUB is responsible for loading a boot archive, which contains the kernel modules and configuration files, into the system's memory. For more information about GRUB based booting, see Booting an x86 Based System by Using GRUB (Task Map) on page 241.
For overview information about the boot process, see Chapter 9, Shutting Down and Booting a System (Overview). For step-by-step instructions on booting a SPARC based system, see Chapter 12, Booting a Solaris System (Tasks).
Boot an x86 based system to run level 3. Boot an x86 based system to single-user mode.
Boot to run level 3 Used after shutting down the system or performing some system hardware maintenance task.
x86: How to Boot a System to Run Level 3 (Multiuser Level) on page 299
Boot to run level S Used after performing a system x86: How to Boot a System to Run maintenance task such as backing up a file system. Level S (Single-User Level) on page 302
297
Task
Description
For Instructions
Boot an x86 based system interactively. Boot an x86 based system from the network.
Boot interactively Used after making temporary changes to a system file or the kernel for testing purposes. Used to boot a PXE or non-PXE device from the network with the default network configuration strategy. This method is used for booting a diskless client.
x86: How to Boot a System Interactively on page 303 x86: How to Boot a System From the Network on page 306
Used after changing the hardware configuration of Solaris 10: Use the Device Configuration Assistant on a Solaris the system. This utility enables you to boot the Operating System x86 based system. Solaris system from a different boot device, configure new or misconfigured hardware, or Note Starting with the Solaris 10 perform other device-related or boot-related tasks. 1/06 release, the Device Configuration Assistant has been replaced by the GRUB menu. Boot a system for recovery purposes. Boot for recovery purposes - Used to boot the system when a damaged file is preventing the system from booting. You might need to do one or both of the following to boot for recovery purposes: 1. First, stop the system to attempt recovery. 2. Force a crash dump and reboot the system Used to force a crash dump for troubleshooting purposes. 3. Boot to repair an important system file that is preventing the system from booting successfully. Boot kmdb Used to troubleshoot system problems.
x86: How to Stop a System for Recovery Purposes on page 309 x86: Forcing a Crash Dump and Reboot of the System on page 314 x86: How to Boot a System for Recovery Purposes on page 309
x86: How to Boot a System With the Kernel Debugger (kmdb) on page 312 Use the reboot and halt command with the -d option if you do not have time to debug the system interactively. Running the halt command with the -d option requires a manual reboot of the system afterwards. Whereas, if you use the reboot command, the system boots automatically.
x64: Troubleshooting a Failed 64-Bit If you have hardware that requires the system to Boot on page 316 load one or more device drivers that are not available in 64-bit mode, booting the system to 64-bit mode could fail. You would then need to boot the system to 32-bit mode.
298
Type b to boot the system to run level 3. Press Enter. If you do not make a selection within five seconds, the system is automatically booted to run level 3. Verify that the system has booted to run level 3. The login prompt is displayed when the boot process has finished successfully.
hostname console login:
Example 151
Type or or
Select (b)oot or (i)nterpreter: b SunOS Release 5.10 Version amd64-gate-2004-09-27 64-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. DEBUG enabled Hostname: venus NIS domain name is example.com checking ufs filesystems /dev/rdsk/c1d0s7: is logging. venus console login:
Example 152
x64: Manually Booting a System That Has 64-Bit Computing Capabilities in 64-Bit Mode to Run Level 3 (Multiuser Level)
For new installations of the Solaris OS, typing b at the boot prompt automatically boots 64-bit capable x86 based systems to 64-bit mode. For upgrade installations of the Solaris OS, typing b at the boot prompt also boots 64-bit capable x86 based systems to 64-bit mode, unless the eeprom boot-file parameter was previously set to a value other than kernel/unix. This example shows how to manually boot this type of system in 64-bit mode to run level 3.
# init 0 # svc.startd: The system is coming down. Please wait. svc.startd: 68 system services are now being stopped. umount: /etc/svc/volatile busy svc.startd: The system is down. syncing file systems... done Press any key to reboot. Initializing system Please wait...
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a Boot args: Type or or b [file-name] [boot-flags] <ENTER> i <ENTER> <ENTER> to boot with options to enter boot interpreter to boot with defaults
300
<<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b kernel/amd64/unix SunOS Release 5.10 Version amd64-gate-2004-09-27 64-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. DEBUG enabled Hostname: venus NIS domain name is example.com checking ufs filesystems /dev/rdsk/c1d0s7: is logging. venus console login:
Example 153
32-bit x64: Manually Booting a System That Has 64-Bit Computing Capabilities in 32-Bit Mode to Run Level 3 (Multiuser Level)
For new installations of the Solaris OS, typing b at the boot prompt automatically boots 64-bit capable x86 based systems to 64-bit mode. For upgrade installations of the Solaris OS, typing b at the boot prompt also boots 64-bit capable x86 based systems to 64-bit mode, unless the eeprom boot-file parameter was previously set to a value other than kernel/unix. This example shows how to manually boot this type of system in 32-bit mode to run level 3.
# init 0 # svc.startd: The system is coming down. Please wait. svc.startd: 68 system services are now being stopped. umount: /etc/svc/volatile busy svc.startd: The system is down. syncing file systems... done Press any key to reboot. Resetting... If the system hardware has changed, or to boot from a different device, interrupt the autoboot process by pressing ESC.
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a Boot args: Type or or b [file-name] [boot-flags] <ENTER> i <ENTER> <ENTER> to boot with options to enter boot interpreter to boot with defaults
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks)
301
<<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b kernel/unix SunOS Release 5.10 Version amd64-gate-2004-09-30 32-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. DEBUG enabled Hostname: venus NIS domain name is example.com checking ufs filesystems /dev/rdsk/c1d0s7: is logging. venus console login:
Type b -s to boot the system to run level S. Press Enter. If you do not make a selection within five seconds, the system is automatically booted to run level 3. Type the superuser password, if prompted. Verify that the system is at run level S.
# who -r . run-level S Jul 19 14:37 S 0 3
3 4
5 6
Perform the maintenance task that required the run level change to S. After you complete the system maintenance task, type Control-D to bring the system to the multiuser state.
Example 154
302
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a Boot args: Type or or b [file-name] [boot-flags] <ENTER> i <ENTER> <ENTER> <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b -s SunOS Release 5.10 Version amd64-gate-2004-09-30 32-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. DEBUG enabled Booting to milestone "milestone/single-user:default". Hostname: venus NIS domain name is example.com Requesting System Maintenance Mode SINGLE USER MODE Root password for system maintenance (control-d to bypass): xxxxxx Entering System Maintenance Mode . . . # who -r . run-level S Jul 19 14:37 S 0 3 (Perform some maintenance task) # ^D to boot with options to enter boot interpreter to boot with defaults
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power switch.
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks) 303
Select the Solaris partition (if not marked as active) from the list. Press Enter. If you do not make a selection within five seconds, the active boot partition is selected automatically. The Current Boot Parameters menu is displayed after a few minutes.
Type b -a to boot the system interactively. Press Enter. If you do not make a selection within five seconds, the system is automatically booted to run level 3. Answer the following system prompts. a. When prompted, enter the name of the kernel to use for booting. Press enter to use the default kernel file name. Otherwise, provide the name of an alternate kernel, press Enter. b. When prompted, provide an alternate path for the module directories. Press enter to use the default module directories. Otherwise, provide the alternate paths to module directories, press Enter. c. When prompted, provide the name of an alternate system file. Type /dev/null if your /etc/system file has been damaged. d. When prompted, enter the root file system type. Press enter to select local disk booting with UFS, which is the default, or enter NFS for network booting. e. When prompted, enter the physical name of root device. Provide an alternate device name or press return to use the default.
If you are not prompted to answer these questions, verify that you typed the boot -a command correctly.
Example 155
304
If the system hardware has changed, or to boot from a different device, interrupt the autoboot process by pressing ESC.
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a Boot args: Type or or Running b [file-name] [boot-flags] <ENTER> to boot with options i <ENTER> to enter boot interpreter <ENTER> to boot with defaults Configuration Assistant... <<< timeout in 5 seconds >>>
Select (b)oot or (i)nterpreter: b -a Enter default directory for modules [/platform/i86pc/kernel /kernel /usr/kernel]: Press Enter Name of system file [etc/system]: Press Enter SunOS Release 5.10 Version amd64-gate-2004-09-30 32-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. DEBUG enabled root filesystem type [ufs]: Press Enter Enter physical name of root device[/pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a]: Press Enter Hostname: venus NIS domain name is example.com checking ufs filesystems /dev/rdsk/c1d0s7: is logging. venus console login:
booting protocol. The PXE network boot is available only for devices that implement the Intel Preboot Execution Environment specification. If the system is capable of a PXE network boot, you might want to boot the system directly from the network without using either the Device Configuration Assistant boot diskette or the Solaris Software 1 CD or DVD.
required. For general information on DHCP configuration, see Part III, DHCP, in System Administration Guide: IP Services. If you want to set up your DHCP server to support installation, see Solaris 10 Installation Guide: Network-Based Installations. In the Solaris 10 release, if you are performing a PXE network boot, or if you are booting the system from the Solaris Software 1 CD or DVD, the system boots automatically. The Device Configuration Assistant menu is no longer displayed by default. If you are booting a non-PXE device, you will need to follow the steps in this procedure that describe how to enter the Device Configuration Assistant menu to change the network configuration.
1
Insert the Device Configuration Assistant boot diskette or the Solaris Software 1 CD or DVD that you want to boot from. Or, use the system or network adapter BIOS configuration program to enable the PXE network boot.
If you are using the boot diskette, the first menu of the Device Configuration Assistant is displayed. If you are using the Solaris Software 1 CD, DVD, or booting a PXE device from the network, the system boots automatically. If you choose to change the network configuration and enter the Device Configuration Assistant menu, press Esc when the following message is displayed.
306
If the system hardware has changed, or to boot from a different device, interrupt the autoboot process by pressing ESC. Press ESCape to interrupt autoboot in 5 seconds.
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power switch.
Press the F2 key (F2_Continue) to scan for devices. Device identification is performed. Then, the Identified Devices screen is displayed.
Press the F2 key (F2_Continue) to load drivers. Bootable drivers are loaded. Then, the Boot Solaris menu is displayed.
Use the Device Configuration Assistant to change the network configuration. a. Press the F4 key (F4_Boot Tasks). b. Select Set Network Configuration Strategy. Press the F2 key (F2_Continue). c. Select either RARP or DHCP and press the F2 key (F2_Continue).
Note The previous step applies only if you are booting a non-PXE device from the network.
For a PXE network boot, you must use DHCP, which is the default network boot strategy. A screen that confirms your new network boot strategy is displayed. Your network boot strategy selection is saved as the default network boot method for the next time this diskette is used for booting. d. Press F3_Back to return to the Boot Solaris menu.
6
Select NET as the boot device. Then, press F2_Continue to boot the network device. The Solaris boot option screen is displayed.
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks)
307
menu. For more information about this feature, see Booting an x86 Based System by Using GRUB (Task Map) on page 241. Solaris 10: The Device Configuration Assistant for Solaris Operating System x86 based systems is a program that enables you to perform various hardware configuration and booting tasks. You can access the Device Configuration Assistant menu from either of the following:
Solaris boot diskette Solaris Software 1 CD or DVD PXE network boot Hard disk with Solaris OS installed
For the procedures in this chapter, you might be requested to insert the Device Configuration Assistant boot diskette to boot the Configuration Assistant. Alternately, if your system's BIOS supports booting from the CD or DVD, you can insert the Solaris Software 1 CD or DVD to boot the Device Configuration Assistant.
If you are booting from the Device Configuration boot diskette, the first menu of the Device Configuration Assistant is displayed after a few minutes. If you are booting from the Solaris Software 1 CD, DVD, hard disk, or performing a PXE network boot, the following message is displayed:
If the system hardware has changed, or to boot from a different device, interrupt the autoboot process by pressing ESC. Press ESCape to interrupt autoboot in 5 seconds.
If you choose to enter the Device Configuration Assistant menu, press Esc to interrupt the autoboot process. The Device Configuration Assistant menu is displayed.
308 System Administration Guide: Basic Administration September 2008
If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the reset button at this prompt. If the system is shut down, turn the system on with the power switch.
If the system is running, become superuser and type init 0 to stop the system. After the Press any key to reboot prompt appears, press any key to reboot the system. If the system is running, become superuser and type init 6 to reboot the system.
If the system doesn't respond to any input from the mouse or keyboard, press the Reset key, if it exists, to reboot the system. Or, you can use the power switch to reboot the system.
Stop the system by using the system's Stop key sequence. Use the Stop key sequence for your system if you don't know the root password, or if you can't log in to the system. For more information, see x86: How to Stop a System for Recovery Purposes on page 309.
Boot the system from the Solaris Software 1 CD, DVD, or from the network, to single-user mode. a. Insert the Device Configuration Assistant boot diskette or the Solaris Software 1 CD or DVD that you want to boot from.
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks)
309
Note If you are using the boot diskette the Device Configuration Assistant menu is displayed. If you are using the Solaris Software 1 CD or DVD, the system boots automatically. To enter the Device Configuration Assistant menu, press Esc to interrupt the boot process, when prompted by the system.
b. If the system displays the Press any key to reboot prompt, press any key to reboot the system. You can also use the Reset button at this prompt. If the system is shut down, turn the system on with the power switch.
3 4
The Current Boot Parameters menu is displayed after a few minutes. Type b -s at the prompt. Press Enter. After a few minutes, the single-user mode # prompt is displayed. Mount the root (/) file system that contains the invalid passwd file. Change to the newly mounted etc directory. Make the necessary change to the file by using an editor. Change to the root (/) directory. Unmount the /a directory. Reboot the system. Verify that the system has booted to run level 3. The login prompt is displayed when the boot process has finished successfully.
host-name console login:
5 6 7 8 9 10
Example 156
If the system hardware has changed, or to boot from a different device, interrupt the autoboot process by pressing ESC. Press ESCape to interrupt autoboot in 5 seconds.
<<< Current Boot Parameters >>> Boot path: /pci@0,0/pci-ide@7,1/ide@1/sd@0,0:a Boot args:
Select the type of installation you want to perform: 1 Solaris Interactive 2 Custom JumpStart 3 Solaris Interactive Text (Desktop session) 4 Solaris Interactive Text (Console session) Enter the number of your choice followed by the <ENTER> key. Alternatively, enter custom boot arguments directly. If you wait for 30 seconds without typing anything, an interactive installation will be started. Select type of installation: b -s . . . # mount /dev/dsk/c0t0d0s0 /a . . . # cd /a/etc
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks) 311
1 2 3
Boot the system. Type b -k at the Select (b)oot or (i)nterpreter prompt. Press Enter. Access the kernel debugger. The method used to enter the debugger is dependent upon the type of console that is used to access the system:
If a locally attached keyboard is being used, press F1A. If a serial console is being used, send a break by using the method appropriate to the type of serial console that is being used.
A welcome message is displayed when you access the kernel debugger for the first time.
Example 157
312
Type or or Running
b [file-name] [boot-flags] <ENTER> to boot with options i <ENTER> to enter boot interpreter <ENTER> to boot with defaults Configuration Assistant... <<< timeout in 5 seconds >>>
Select (b)oot or (i)nterpreter: b -k Loading kmdb... SunOS Release 5.10 Version gate:2004-10-21 32-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. . . . Example 158
x64: Manually Booting a System That Has 64-Bit Computing Capabilities to 64-Bit Mode With the Kernel Debugger (kmdb)
This example shows how to manually boot an x86 based system that has 64-bit computing capabilities to 64-bit mode with kmdb.
Press any key to reboot . . . <<< Current Boot Parameters >>> Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b kernel/amd64/unix -k Loading kmdb...
Example 159
32-bit x64: Manually Booting a System That Has 64-Bit Computing Capabilities to 32-Bit Mode With the Kernel Debugger (kmdb)
This example shows how to manually boot an x86 based system that has 64-bit computing capabilities to 32-bit mode with kmdb.
Press any key to reboot . .
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks) 313
. <<< Current Boot Parameters >>> Boot path: /pci@0,0/pci-ide@7,1/ide@0/cmdk@0,0:a Boot args: Type b [file-name] [boot-flags] <ENTER> to boot with options or i <ENTER> to enter boot interpreter or <ENTER> to boot with defaults <<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: b kernel/unix -k Loading kmdb...
If a locally-attached keyboard is being used as the system console, press F1-A on that keyboard. If the system is configured to use a remote (serial) console, use the mechanism that is appropriate to that console to send a break character. The kmdb prompt is displayed.
Panic messages are displayed, the crash dump is saved, and the system reboots.
3
314
Verify that the system has rebooted by logging in at the console login prompt.
System Administration Guide: Basic Administration September 2008
Example 1510
x86: Forcing a Crash Dump and Reboot of the System by Using halt -d
This example shows how to force a crash dump and reboot of the x86 based system neptune by using the halt -d and boot commands. Use this method to force a crash dump of the system. You will need to manually reboot the system after running the halt command with the -d option.
# halt -d Aug 11 12:51:27 neptune halt: halted by <user> panic[cpu45]/thread=d3971a00: forced crash dump initiated at user request d363ae58 genunix:kadmin+bd (5, 0, 0, d3fefac0) d363af88 genunix:uadmin+88 (5, 0, 0, 0, 0, d363afb4) syncing file systems... done dumping to /dev/dsk/c0t0d0s1, offset 107806720, content: kernel 100% done: 40223 pages dumped, compression ratio 4.11, dump succeeded Press any key to reboot. Resetting... . . . SunOS Secondary Boot version 3.00 Autobooting from bootpath: /pci@0,0/pci1028,10a@3/sd@0,0:a Running Configuration Assistant... If the system hardware has changed, or to boot from a different device, interrupt the autoboot process by pressing ESC.
Initializing system Please wait... <<< Current Boot Parameters >>> Boot path: /pci@0,0/pci1028,10a@3/sd@0,0:a Boot args: Type or or b [file-name] [boot-flags] <ENTER> i <ENTER> <ENTER> to boot with options to enter boot interpreter to boot with defaults
<<< timeout in 5 seconds >>> Select (b)oot or (i)nterpreter: Loading kmdb... SunOS Release 5.10 Version s10_62 32-bit Copyright 1983-2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. configuring IPv4 interfaces: iprb0.
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks) 315
add net default: gateway 172.20.26.248 Hostname: neptune The system is coming up. Please wait. checking ufs filesystems /dev/rdsk/c0t0d0s7: is logging. NIS domain name is example.com starting rpc services: rpcbind keyserv ypbind done. Setting netmask of iprb0 to 255.255.255.0 Setting default IPv4 interface for multicast: add net 224.0/4: gateway venus syslog service starting. System dump time: Wed Aug 11 12:51:29 2004 Aug 11 13:13:26 venus savecore: saving system crash dump in /var/crash/venus/*.1 Constructing namelist /var/crash/venus/unix.1 Constructing corefile /var/crash/venus/vmcore.1 100% done: 42157 of 42157 pages saved volume management starting. The system is ready. . . .
In the event such a failure occurs, boot the system to 32-bit mode by typing the following command at the Select (b)oot or (i)nterpreter boot prompt:
Select (b)oot or (i)nterpreter: b kernel/unix
Primary Boot Subsystem (Partition Boot Menu) This first menu appears if multiple operating systems exist on the disk. The menu enables you to boot any of the operating systems installed. By default, the operating system that is designed as active is booted. Note that if you choose to boot a system other than the Solaris Operating System, you cannot reach the next two menus.
Interrupt the Autoboot Process If the autoboot process is interrupted, you can access the Device Configuration Assistant menu. The Solaris Device Configuration Assistant enables you to boot the Solaris system from a different boot device, configure new or misconfigured hardware, or perform other device-related or boot-related tasks.
Current Boot Parameters menu Two forms of this menu exist, one menu for a normal Solaris boot and one menu for a Solaris installation boot:
The normal Current Boot Parameters menu enables you to boot the Solaris system with options, or enter the boot interpreter. The install Current Boot Parameters menu enables you to select the type of installation to be performed or to customize the boot process.
The following table summarizes the purpose of the primary x86 based system boot interfaces. See the sections that follow for a detailed description and example of each boot interface.
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks)
317
TABLE 151
Boot Subsystem
This menu appears if the disk you are booting from contains multiple operating systems, including the Solaris Operating System (Solaris OS). This menu appears each time you boot the Solaris release. The Solaris release is booted automatically unless you choose to run the Solaris Device Configuration Assistant by interrupting the autoboot process.
There are two ways to access the Device Configuration Assistant menus: Use the Device Configuration Assistant boot diskette or the Solaris Software 1 CD (on systems that can boot from the CD-ROM drive) to boot the system. Interrupt the autoboot process when you boot the Solaris software from an installed disk.
This menu appears when you boot the Solaris release from the disk, CD-ROM, or the network. The menu presents a list of boot options.
Note If you need to create the Solaris Device Configuration Assistant boot diskette, go to
http://www.sun.com/bigadmin/hcl/drivers/dca_diskettes/.
Scans for devices that are installed on the system Displays the identified devices Enables you to perform optional tasks such as selecting a keyboard type or editing devices and their resources
During the boot phase, the Device Configuration Assistant does the following:
Displays a list of devices from which to boot. The device marked with an asterisk (*) is the default boot device. Enables you to perform optional tasks, such as editing autoboot settings and property settings, and choosing the network configuration strategy.
318
The following section provides examples of menus that appear during the device identification phase. The device output varies based on your system configuration.
Device Configuration Assistant screen Bus Enumeration screen Scanning Devices screen Identified Devices screen
replaced with the GRUB menu on x86 based systems. For more information, see Booting an x86 Based System by Using GRUB (Task Map) on page 241. In the Solaris 10 initial release, the autoboot process bypasses the Device Configuration Assistant menus, unless you press Esc when prompted by the system during the boot phase. If you choose to use the Device Configuration Assistant, the following screen is displayed.
Solaris Device Configuration Assistant The Solaris(TM)Device Configuration Assistant scans to identify system hardware, lists identified devices, and can boot the Solaris software from a specified device. This program must be used to install the Solaris operating environment, add a driver, or change the hardware on the system. > To perform a full scan to identify all system hardware, choose Continue. > To diagnose possible full scan failures, choose Specific Scan. > To add new or updated device drivers, choose Add Driver. About navigation... - The mouse cannot be used. - If the keyboard does not have function keys or they do not respond, press ESC. The legend at the bottom of the screen will change to show the ESC keys to use for navigation. - The F2 key performs the default action. F2_Continue F3_Specific Scan F4_Add Driver F6_Help
319
Chapter 15 x86: Booting a System That Does Not Implement GRUB (Tasks)
| 60
| 80 100
Setting a keyboard configuration Viewing and editing devices Setting up a serial console Saving and deleting configurations
Identified Devices The following devices have been identified on this system. To identify
320 System Administration Guide: Basic Administration September 2008
devices not on this list or to modify device characteristics, such as keyboard configuration, choose Device Tasks. Platform types may be included in this list. ISA: Floppy disk controller ISA: Motherboard ISA: PnP bios: 16550-compatible serial controller ISA: PnP bios: 16550-compatible serial controller ISA: PnP bios: Mouse controller ISA: PnP bios: Parallel port ISA: System keyboard (US-English) PCI: Bus Mastering IDE controller PCI: Universal Serial Bus PCI: VGA compatible display adapter F2_Continue F3_Back F4_Device Tasks F6_Help
During this phase, you can determine the way in which the system is booted. The following menus are displayed during the boot phase:
> To make a selection use the arrow keys, and press Enter to mark it [X]. [X] DISK: (*) Target 0:QUANTUM FIREBALL1280A on Bus Mastering IDE controller on Board PCI at Dev [ ] DISK: Target 1:ST5660A on Bus Mastering IDE controller on Board PCI at Dev [ ] DISK: Target 0:Maxtor 9 0680D4 on Bus Mastering IDE controller on Board PCI at [ ] CD : Target 1:TOSHIBA CD-ROM XM-5602B 1546 on Bus Mastering IDE controller on Board PCI at F2_Continue F3_Back F4_Boot Tasks F6_Help
BIOS
1. When the system is turned on, the BIOS runs self-test diagnostics to verify the system's hardware and memory. The system begins to boot automatically if no errors are found. If errors are found, error messages are displayed that describe recovery options. The BIOS of additional hardware devices are run at this time.
322
(Continued)
2. The BIOS boot program tries to read the first disk sector from the boot device. This first disk sector on the boot device contains the master boot record mboot, which is loaded and executed. If no mboot file is found, an error message is displayed. Boot Programs 3. The master boot record, mboot, contains disk information needed to find the active partition and the location of the Solaris boot program, pboot, loads and executes pboot, mboot. 4. The Solaris boot program, pboot, loads bootblk, the primary boot program. The purpose of bootblk is to load the secondary boot program, which is located in the UFS file system. 5. If there is more than one bootable partition, bootblk reads the fdisk table to locate the default boot partition, and builds and displays a menu of available partitions. You have a 30 seconds to select an alternate partition from which to boot. This step occurs only if there is more than one bootable partition present on the system. 6. bootblk finds and executes the secondary boot program, boot.bin or ufsboot, in the root (/) file system. You have five seconds to interrupt the autoboot to start the Solaris Device Configuration Assistant. 7. The secondary boot program, boot.bin or ufsboot, starts a command interpreter that executes the /etc/bootrc script. This script provides a menu of choices for booting the system. The default action is to load and execute the kernel. You have a 5second interval to specify a boot option or to start the boot interpreter. Kernel initialization 8. The kernel initializes itself and begins loading modules by using the secondary boot program (boot.bin or ufsboot) to read the files. When the kernel has loaded enough modules to mount the root (/) file system, the kernel unmaps the secondary boot program and continues, using its own resources. 9. The kernel creates a user process and starts the /sbin/init process, which starts other processes by reading the /etc/inittab file. init 10. In this Solaris release, the /sbin/init process starts /lib/svc/bin/svc.startd, which starts system services that do the following: Check and mount file systems Configure network and devices Start various processes and perform system maintenance tasks In addition, svc.startd executes the run control (rc) scripts for compatibility.
Contains menus and options for booting the Solaris release. Contains files and directories needed to boot the system. DOS executable that loads the first-level bootstrap program (strap.com) into memory from disk. DOS executable that loads the first-level bootstrap program (strap.com) into memory from diskette. Directory that contains install scripts. Do not modify the contents of this directory. Directory that contains items for the boot subsystem. Loads the Solaris kernel or stand-alone kmdb. In addition, this executable provides some boot firmware services. Prints the Solaris Operating System on an x86 system and runs the Device Configuration Assistant in DOS-emulation mode. DOS executable for the Device Configuration Assistant. Text file that contains internationalized messages for Device Configuration Assistant (bootconf.exe). Stores eeprom variables that are used to set up the boot environment. Directory that contains the master file, a database of all possible devices supported with realmode drivers. Directory that contains realmode drivers. DOS executable run during install time update (ITU) process. Obsolete directory. File associated with network booting. File that contains instructions on what load module to load and where in memory it should be loaded. DOS executable that loads the second-level bootstrap program into memory.
/boot/mdbootbp
/boot/rc.d
/boot/solaris /boot/solaris/boot.bin
/boot/solaris/boot.rc
/boot/solaris/bootconf.exe /boot/solaris/bootconf.txt
/boot/solaris/bootenv.rc
/boot/solaris/devicedb
/boot/strap.com
324
16
C H A P T E R
1 6
This chapter provides an overview of the Service Management Facility (SMF). In addition, information that is related to run levels is provided. This is a list of the overview information in this chapter. Introduction to SMF on page 325 SMF Concepts on page 327 SMF Administrative and Programming Interfaces on page 331 SMF Components on page 332 SMF Compatibility on page 334 Run Levels on page 334 /etc/inittab File on page 336
For information on the procedures associated with SMF, see Managing Services (Task Map) on page 339. For information on the procedures associated with run levels, see Using Run Control Scripts (Task Map) on page 355.
Introduction to SMF
SMF provides an infrastructure that augments the traditional UNIX start-up scripts, init run levels, and configuration files. SMF provides the following functions:
Automatically restarts failed services in dependency order, whether they failed as the result of administrator error, software bug, or were affected by an uncorrectable hardware error. The dependency order is defined by dependency statements. Makes services objects that can be viewed, with the new svcs command, and managed, with svcadm and svccfg commands. You can also view the relationships between services and processes using svcs -p, for both SMF services and legacy init.d scripts. Makes it easy to backup, restore, and undo changes to services by taking automatic snapshots of service configurations.
325
Makes it easy to debug and ask questions about services by providing an explanation of why a service isn't running by using svcs -x. Also, this process is eased by individual and persistent log files for each service. Allows for services to be enabled and disabled using svcadm. These changes can persist through upgrades and reboots. If the -t option is used, the changes are temporary. Enhances the ability of administrators to securely delegate tasks to non-root users, including the ability to modify properties and enable, disable, or restart services on the system. Boots faster on large systems by starting services in parallel according to the dependencies of the services. The opposite process occurs during shutdown. Allows you to customize the boot console output to either be as quiet as possible, which is the default, or to be verbose by using boot -m verbose. Preserves compatibility with existing administrative practices wherever possible. For example, most customer and ISV-supplied rc scripts still work as usual.
Dependency statements define the relationships between services. These relationships can be used to provide precise fault containment by restarting only those services that are directly affected by a fault, rather than restarting all of the services. Another advantage of dependency statements is that the statements allow for scalable and reproducible initialization processes. In addition, by defining all of the dependencies, you can take advantage of modern, highly parallel machines, because all independent services can be started in parallel. SMF defines a set of actions that can be invoked on a service by an administrator. These actions include enable, disable, refresh, restart, and maintain. Each service is managed by a service restarter which carries out the administrative actions. In general, the restarters carry out actions by executing methods for a service. Methods for each service are defined in the service configuration repository. These methods allow the restarter to move the service from one state to another state. The service configuration repository provides a per-service snapshot at the time that each service is successfully started so that fallback is possible. In addition, the repository provides a consistent and persistent way to enable or disable a service, as well as a consistent view of service state. This capability helps you debug service configuration problems.
The boot process creates many fewer messages now. Services do not display a message by default when they are started. All of the information that was provided by the boot messages can now be found in a log file for each service that is in /var/svc/log. You can use the svcs
326
SMF Concepts
command to help diagnose boot problems. In addition, you can use the -v option to the boot command, which generates a message when each service is started during the boot process.
Since services are automatically restarted if possible, it may seem that a process refuses to die. If the service is defective, the service will be placed in maintenance mode, but normally a service is restarted if the process for the service is killed. The svcadm command should be used to stop the processes of any SMF service that should not be running. Many of the scripts in /etc/init.d and /etc/rc*.d have been removed. The scripts are no longer needed to enable or disable a service. Entries from /etc/inittab have also been removed, so that the services can be administered using SMF. Scripts and inittab entries that are provided by an ISV or are locally developed will continue to run. The services may not start at exactly the same point in the boot process, but they are not started before the SMF services, so that any service dependencies should be OK.
SMF Concepts
This section presents terms and their definitions within the SMF framework. These terms are used throughout the documentation. To grasp SMF concepts, an understanding of these terms is essential.
SMF Service
The fundamental unit of administration in the SMF framework is the service instance. Each SMF service has the potential to have multiple versions of it configured. As well, multiple instances of the same version can run on a single Solaris system. An instance is a specific configuration of a service. A web server is a service. A specific web server daemon that is configured to listen on port 80 is an instance. Each instance of the web server service could have different configuration requirements. The service has system-wide configuration requirements, but each instance can override specific requirements, as needed. Multiple instances of a single service are managed as child objects of the service object. Services are not just the representation for standard long-running system services such as in.dhcpd or nfsd. Services also represent varied system entities that include ISV applications such as Oracle software. In addition, a service can include less traditional entities such as the following:
A physical network device A configured IP address Kernel configuration information Milestones that correspond to system init state, such as the multiuser run level
327
SMF Concepts
Generically, a service is an entity that provides a list of capabilities to applications and other services, local and remote. A service is dependent on an implicitly declared list of local services. A milestone is a special type of service. Milestone services represent high-level attributes of the system. For example, the services which constitute run levels S, 2, and 3 are each represented by milestone services.
Service Identifiers
Each service instance is named with a Fault Management Resource Identifier or FMRI. The FMRI includes the service name and the instance name. For example, the FMRI for the rlogin service is svc:/network/login:rlogin, where network/login identifies the service and rlogin identifies the service instance. Equivalent formats for an FMRI are as follows:
In addition, some SMF commands can use the following FMRI format: svc:/system/system-log. Some commands infer what instance to use, when there is no ambiguity. See the SMF command man pages, such as svcadm(1M) or svcs(1), for instructions about which FMRI formats are appropriate. The service names usually include a general functional category. The categories include the following:
Legacy init.d scripts are also represented with FMRIs that start with lrc instead of svc, for example: lrc:/etc/rcS_d/S35cacheos_sh. The legacy services can be monitored using SMF. However, you cannot administer these services. When booting a system for the first time with SMF, services listed in /etc/inetd.conf are automatically converted into SMF services. The FMRIs for these services are slightly different. The syntax for a converted inetd services is:
network/<service-name>/<protocol>
In addition, the syntax for a converted service that uses the RPC protocol is:
328 System Administration Guide: Basic Administration September 2008
SMF Concepts
network/rpc-<service-name>/rpc_<protocol>
Where <service-name> is the name defined in /etc/inetd.conf and <protocol> is the protocol for the service. For instance, the FMRI for the rpc.cmsd service is network/rpc-100068_2-5/rpc_udp.
Service States
The svcs command displays the state, start time, and FMRI of service instances. The state of each service is one of the following:
degraded The service instance is enabled, but is running at a limited capacity. disabled The service instance is not enabled and is not running. legacy_run The legacy service is not managed by SMF, but the service can be observed. This state is only used by legacy services. maintenance The service instance has encountered an error that must be resolved by the administrator. offline The service instance is enabled, but the service is not yet running or available to run. online The service instance is enabled and has successfully started. uninitialized This state is the initial state for all services before their configuration has been read.
SMF Manifests
An SMF manifest is an XML file that contains a complete set of properties that are associated with a service or a service instance. The files are stored in /var/svc/manifest. Manifests should not be used to modify the properties of a service. The service configuration repository is the authoritative source of configuration information. To incorporate information from the manifest into the repository, you must either run svccfg import or allow the service to import the information during a system boot. See the service_bundle(4) man page for a complete description of the contents of the SMF manifests. If you need to change the properties of a service, see the svccfg(1M) or inetadm(1M) man pages.
329
SMF Concepts
SMF Profiles
An SMF profile is an XML file that lists a set of service instances and whether each should be enabled or disabled. Some profiles which are delivered with the Solaris release include:
/var/svc/profile/generic_open.xml This profile enables the standard services that have been started by default in earlier Solaris releases. /var/svc/profile/generic_limited_net.xml This profile disables many of the internet services that have be started by default in earlier Solaris releases. The network/ssh service is enabled to provide network connectivity. /var/svc/profile/ns_*.xml These profiles enable services associated with the name service that is configured to run on the system. /var/svc/profile/platform_*.xml These profiles enable services associated with particular hardware platforms.
During the first boot after a new installation or an upgrade to the Solaris 10 release, some Solaris profiles are automatically applied. To be specific, the /var/svc/profile/generic.xml profile is applied. This file is usually symbolically linked to generic_open.xml or generic_limited_net.xml. Also, if a profile called site.xml is in /var/svc/profile during the first boot or is added between boots, the contents of this profile are applied. By using the site.xml profile, the initial set of enabled services may be customized by the administrator. For more information about using profiles, see How to Apply an SMF Profile on page 349.
330
The boot backup is taken immediately before the first change to the repository is made during each system startup. The manifest_import backup occurs after svc:/system/manifest-import:default completes, if it imported any new manifests or ran any upgrade scripts.
Four backups of each type are maintained by the system. The system deletes the oldest backup, when necessary. The backups are stored as /etc/svc/repository-type-YYYYMMDD_HHMMSWS, where YYYYMMDD (year, month, day) and HHMMSS (hour, minute, second), are the date and time when the backup was taken. Note that the hour format is based on a 24hour clock. You can restore the repository from these backups, if an error occurs. To do so, use the /lib/svc/bin/restore_repository command. For more information, see How to Repair a Corrupt Repository on page 358.
SMF Snapshots
The data in the service configuration repository includes snapshots, as well as a configuration that can be edited. Data about each service instance is stored in the snapshots. The standard snapshots are as follows:
initial Taken on the first import of the manifest running Used when the service methods are executed start Taken at the last successful start
The SMF service always executes with the running snapshot. This snapshot is automatically created if it does not exist. The svcadm refresh command, sometimes followed by the svcadm restart command, makes a snapshot active. The svccfg command is used to view or revert to instance configurations in a previous snapshot. See How to Revert to Another SMF Snapshot on page 346 for more information.
331
SMF Components
Command Name
inetadm svcadm
Provides the ability to observe or configure services controlled by inetd Provides the ability to perform common service management tasks, such as enabling, disabling, or restarting service instances Provides the ability to display and manipulate the contents of the service configuration repository Retrieves property values from the service configuration repository with a output format appropriate for use in shell scripts Gives detailed views of the service state of all service instances in the service configuration repository
svccfg
svcprop
svcs
SMF Components
SMF includes a master restarter daemon and delegated restarters.
scripts at the appropriate run levels. First, svc.startd retrieves the information in the service configuration repository. Next, the daemon starts services when their dependencies are met. The daemon is also responsible for restarting services that have failed and for shutting down services whose dependencies are no longer satisfied. The daemon keeps track of service state through an operating system view of availability through events such as process death.
There is a additional system state which is associated with the all milestone. With the all milestone, all of the services with a defined dependency on the multi-user-server milestone are started, as well as any services that do not have a defined dependency. If you have added services, such as third party products, they may not be started automatically unless you use the following command:
ok boot -m milestone=all
When booting a system, you can choose to use the verbose option to see more messages. By default, the system will not display these messages. To boot in the verbose mode, use the following command:
ok boot -mverbose
There is a new system state which is associated with the none milestone. Only init, svc.startd and svc.configd are started if you boot a system using this milestone. This state can be very useful for debugging booting problems. In particular, debugging any problems with the configuration of SMF services is made simpler, because none of the services are started. See How to Boot Without Starting Any Services on page 361 for instructions on how to use the none milestone.
333
SMF Compatibility
SMF Compatibility
While many standard Solaris services are now managed by SMF, the scripts placed in /etc/rc*.d continue to be executed on run-level transitions. Most of the /etc/rc*.d scripts that were included in previous Solaris releases have been removed as part of SMF. The ability to continue to run the remaining scripts allows for third-party applications to be added without having to convert the services to use SMF. In addition, /etc/inittab and /etc/inetd.conf must be available for packages to amend with postinstall scripts. These are called legacy-run services. The inetconv command is run to add these legacy-run services to the service configuration repository. The status of these services can be viewed, but no other changes are supported through SMF. Applications that use this feature will not benefit from the precise fault containment provided by SMF. Applications converted to utilize SMF should no longer make modifications to the /etc/inittab and /etc/inetd.conf files. The converted applications will not use the /etc/rc*.d scripts. Also, the new version of inetd does not look for entries in /etc/inetd.conf.
Run Levels
A system's run level (also known as an init state) defines what services and resources are available to users. A system can be in only one run level at a time. The Solaris OS has eight run levels, which are described in the following table. The default run level is specified in the /etc/inittab file as run level 3.
TABLE 162 Run Level
0 s or S 1 2
To shut down the operating system so that it is safe to turn off power to the system. To run as a single user with some file systems mounted and accessible. To access all available file systems. User logins are disabled. For normal operations. Multiple users can access the system and all file system. All daemons are running except for the NFS server daemons.
334
Run Levels
(Continued)
Type Purpose
Multiuser level with NFS resources Multiuser shared Alternative multiuser state Power-down state Power-down
For normal operations with NFS resources shared. This is the default run level for the Solaris OS. Not configured by default, but available for customer use. To shut down the operating system so that it is safe to turn off power to the system. If possible, automatically turns off power on systems that support this feature. To shut down the system to run level 0, and then reboot to multiuser level with NFS resources shared (or whatever level is the default in the inittab file).
4 5
Reboot state
Reboot
In addition, the svcadm command can be used to change the run level of a system, by selecting a milestone at which to run. The following table shows which run level corresponds to each milestone.
TABLE 163 Run Level
S 2 3
335
/etc/inittab File
Use the who -r command to determine a system's current run level for any level.
EXAMPLE 161
This example displays information about a system's current run level and previous run levels.
$ who -r . run-level 3 Dec 13 10:10 3 0 S $
Description
Identifies the current run level Identifies the date of last run level change Also identifies the current run level Identifies the number of times the system has been at this run level since the last reboot Identifies the previous run level
/etc/inittab File
When you boot the system or change run levels with the init or shutdown command, the init daemon starts processes by reading information from the /etc/inittab file. This file defines these important items for the init process:
That the init process will restart What processes to start, monitor, and restart if they terminate What actions to take when the system enters a new run level
Each entry in the /etc/inittab file has the following fields: id:rstate:action:process The following table describes the fields in an inittab entry.
336
/etc/inittab File
id rstate action
Is a unique identifier for the entry. Lists the run levels to which this entry applies. Identifies how the process that is specified in the process field is to be run. Possible values include: sysinit, boot, bootwait, wait, and respawn. For a description of the other action keywords, see inittab(4).
process
EXAMPLE 162
The following example shows a default inittab file that is installed with the Solaris release. A description for each line of output in this example follows.
ap::sysinit:/sbin/autopush -f /etc/iu.ap (1) sp::sysinit:/sbin/soconfig -f /etc/sock2path (2) smf::sysinit:/lib/svc/bin/svc.startd >/dev/msglog 2<>/dev/msglog p3:s1234:powerfail:/usr/sbin/shutdown -y -i5 -g0 >/dev/msglog 2<>/dev/...
(3) (4)
1. 2. 3. 4.
Initializes STREAMS modules Configures socket transport providers Initializes the master restarter for SMF Describes a power fail shutdown
337
338
17
C H A P T E R
1 7
This chapter covers the tasks required to manage and monitor the Service Management Facility (SMF). In addition, information that is related to managing run level scripts is provided. The following topics are covered: Managing Services (Task Map) on page 339 Monitoring SMF Services on page 340 Managing SMF Services on page 343 Configuring SMF Services on page 350 Using Run Control Scripts on page 355 Troubleshooting the Service Management Facility on page 358
Displays the status of all running service instances. Display the services that are dependent on the specified service. Display the services that a specified service is dependent on. This information can be used to help identify what is preventing a service from starting.
How to List the Status of a Service on page 340 How to Show Which Services Are Dependent on a Service Instance on page 342 How to Show Which Services a Service Is Dependent On on page 342
339
Task
Description
For Instructions
Turns off a service that is not functioning properly or needs to be off to increase security. Starts a service. Restart a service, without having to use separate commands to disable and then enable the service.
How to Disable a Service Instance on page 344 How to Enable a Service Instance on page 345 How to Restart a Service on page 345
Modifies the configuration parameters of a How to Modify a Service on page 350 specified service instance. Changes a configuration property of a service controlled by inetd. Changes the startup options of a service controlled by inetd. How to Change a Property for an inetd Controlled Service on page 351 How to Modify a Command-Line Argument for an inetd Controlled Service on page 353 How to Convert inetd.conf Entries on page 354 How to Repair a Corrupt Repository on page 358 How to Boot Without Starting Any Services on page 361
Convert inetd.conf entries. Repair a corrupt service configuration repository. Boot a system without starting any services.
Converts inetd services into legacy-run services that can be monitored using SMF. Replaces a corrupt repository with a default version. Boots a system without starting any services so that configuration problems that prevent booting can be fixed.
340
Example 171
Example 172
Example 173
Example 174
% inetadm
Example 175
Displaying the Service Instances That Are Dependent on the Multiuser Milestone
The following example shows how to determine which service instances are dependent on the multiuser milestone.
% svcs -D milestone/multi-user STATE STIME FMRI online Apr_08 svc:/milestone/multi-user-server:default
Example 176
342
Disable a service instance. Enable a service instance. Restarting a service. Restoring a service in maintenance state. Revert to a snapshot. Create an profile. Apply a profile. Change the services and their configuration using the netservices command.
Stops a running service and prevents the service from restarting. Starts a service. In addition, the service will be restarted during subsequent reboots. Stops and starts a service with one command
How to Disable a Service Instance on page 344 How to Enable a Service Instance on page 345 How to Restart a Service on page 345
Shows how to clean up and restart a service that is in How to Restore a Service That Is in the maintenance state. Maintenance State on page 346 Uses a previous snapshot to correct problems with a How to Revert to Another SMF Snapshot service. on page 346 Create a profile to disable or enable services as needed. Uses the information in a profile to disable or enable services as needed. Uses the information in the generic_limited.xml or generic_open.xml profiles to disable or enable services and make configuration changes to those services, as well. How to Create an SMF Profile on page 347 How to Apply an SMF Profile on page 349 Changing Services Offered to the Network with generic*.xml on page 349
343
Service Management: User can add, delete or modify services. Service Operator: User can request state changes of any service instance, such as restart and refresh.
For specific information about the authorizations, see the smf_security(5) man page. For instructions to assign a rights profile, see How to Change the RBAC Properties of a User in System Administration Guide: Security Services.
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services. Check the dependents of the service you want to disable. If this service has dependents that you need, then you cannot disable this service.
# svcs -D FMRI
Example 177
344
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services. Determine whether service dependencies are satisfied. If the service is enabled, then the service dependencies are satisfied. If not, use svcadm enable -r FMRI to recursively enable all dependencies.
# svcs -l FMRI|grep enabled
Enable a service.
# svcadm enable FMRI
Example 178
Example 179
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services. Restart a service.
# svcadm restart FMRI
(Optional) Kill any remaining processes. Repeat this step for all processes that are displayed by the svcs command.
# pkill -9 PID
If necessary, repair the service configuration. Consult the appropriate service log files in /var/svc/log for a list of errors. Restore the service.
# svcadm clear FMRI
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services.
System Administration Guide: Basic Administration September 2008
346
c. Select to revert to the start snapshot. The start snapshot is the last snapshot in which the service successfully started.
svc:/system/console-login:default> revert start svc:/system/console-login:default>
d. Quit svccfg.
svc:/system/console-login:default> quit # 3
Update the information in the service configuration repository. This step updates the repository with the configuration information from the start snapshot.
# svcadm refresh system/console-login
Create a profile. In this example, the svccfg command is used to create a profile which reflects which services are enabled or disabled on the current system. Alternately, you could make a copy of an existing profile to edit.
# svccfg extract> profile.xml
If you are using JumpStart, if you have large numbers of identical systems, or if you want to archive the system configuration for later restoration, you may want to use this procedure to create a unique version of a SMF profile.
2
Edit the profile.xml file to make any required changes. a. Change the name of the profile in the service_bundle declaration. In this example the name is changed to profile.
# cat profile.xml ... <service_bundle type=profile name=profile xmIns::xi=http://www.w3.org/2003/XInclude ...
b. Remove any services that should not be managed by this profile. For each service, remove the three lines that describe the service. Each service description starts with <service and ends with </service. This example shows the lines for the LDAP client service.
# cat profile.xml ... <service name=network/ldap/client version=1 type=service> <instance name=default enabled=true/> </service>
c. Add any services that should be managed by this profile. Each service needs to be defined using the three line syntax shown above. d. If necessary, change the enabled flag for selected services. In this example, the sendmail service is disabled.
# cat profile.xml ... <service name=network/smtp version=1 type=service> <instance name=sendmail enabled=false/> </service> ... 3
When necessary, apply the new profile. See How to Apply an SMF Profile on page 349 for instructions.
System Administration Guide: Basic Administration September 2008
348
Note For specific instructions for switching between the generic_limited_net.xml and
generic_open.xml and the properties that need to be applied when making this switch, please see Changing Services Offered to the Network with generic*.xml on page 349
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services.
Run the netservices command. In this example, the open or traditional network exposure is selected.
# /usr/sbin/netservices open
Example 1710
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services.
Make changes to the configuration files, as needed. Many of the services have one or more configuration files that are used to define the startup or other configuration information. These files can be changed while the service is running. The contents of the files is only checked when the service is started.
Example 1711
350
Set environment variables. In this example the UMEM_DEBUG and LD_PRELOAD environment variables are set. For information about the setenv subcommand refer to the svccfg(1M) man page.
# svccfg -s system/cron:default setenv UMEM_DEBUG default # svccfg -s system/cron:default setenv LD_PRELOAD libumem.so
List the properties for the specific service. This command displays all of the properties for the service identified by the FMRI.
# inetadm -l FMRI
351
Change the property for the service. Each property for an inetd controlled service is defined by a property name and an assigned value. Supplying the property name without a specified value resets the property to the default value. Specific information about the properties for a service should be covered in the man page associated with the service.
# inetadm -m FMRI property-name=value
Verify that the property has changed. List the properties again to make sure that the appropriate change has occurred.
# inetadm -l FMRI
Confirm that the change has taken effect. Confirm the property change that the change has the desired effect.
Example 1712
352
Connection to localhost closed by foreign host. # tail -1 /var/adm/messages Jun 21 06:04:57 yellow-19 inetd[100308]: [ID 317013 daemon.notice] telnet[100625] from 127.0.0.1 32802
Change the exec property for the service. The command-syntax set with the exec property defines the command string that is run when the service is started.
# inetadm -m FMRI exec="command-syntax"
Verify that the property has changed. List the properties again to make sure that the appropriate change has occurred.
# inetadm -l FMRI
Example 1713
# inetadm -l svc:/network/ftp:default | grep exec exec="/usr/sbin/in.ftpd -a" # inetadm -m svc:/network/ftp:default exec="/usr/sbin/in.ftpd -a -l" # inetadm -l svc:/network/ftp:default SCOPE NAME=VALUE name="ftp" endpoint_type="stream" proto="tcp6" isrpc=FALSE wait=FALSE
Chapter 17 Managing Services (Tasks) 353
exec="/usr/sbin/in.ftpd -a -l" . . # ftp localhost Connected to localhost. 220 yellow-19 FTP server ready. Name (localhost:root): mylogin 331 Password required for mylogin. Password: 230 User mylogin logged in. Remote system type is UNIX. Using binary mode to transfer files. ftp> quit 221-You have transferred 0 bytes in 0 files. 221-Total traffic for this session was 236 bytes in 0 transfers. 221-Thank you for using the FTP service on yellow-19. 221 Goodbye. # tail -2 /var/adm/messages Jun 21 06:54:33 yellow-19 ftpd[100773]: [ID 124999 daemon.info] FTP LOGIN FROM localhost [127.0.0.1], mylogin Jun 21 06:54:38 yellow-19 ftpd[100773]: [ID 528697 daemon.info] FTP session closed
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services. Convert the inetd.conf entries. The inetconv command converts each entry in the selected file into service manifests.
# inetconv -i filename
Example 1714
354
Stop or start a service. Add a run control script. Disable a run control script.
Use a run control script to stop or start a service. Create a run control script and add it to the /etc/init.d directory. Disable a run control script by renaming the file.
How to Use a Run Control Script to Stop or Start a Legacy Service on page 355 How to Add a Run Control Script on page 356 How to Disable a Run Control Script on page 357
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services. Stop the system service.
# /etc/init.d/filename stop
Example 1715
Then, you can restart the NFS server daemons by typing the following:
# /etc/init.d/nfs.server start # pgrep -f nfs 101773 101750 102053 101748 101793 102114 # pgrep -f nfs -d, | xargs ps -fp UID PID PPID C STIME daemon 101748 1 0 Sep 01 daemon 101750 1 0 Sep 01 daemon 101773 1 0 Sep 01 root 101793 1 0 Sep 01 daemon 102053 1 0 Sep 01 daemon 102114 1 0 Sep 01
TTY ? ? ? ? ? ?
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services. Add the script to the /etc/init.d directory.
# cp filename /etc/init.d # chmod 0744 /etc/init.d/filename # chown root:sys /etc/init.d/filename
356
Example 1716
Become superuser or assume a role that includes the Service Management rights profile. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC in System Administration Guide: Security Services. Rename the script by adding an underscore (_) to the beginning of the new file.
# cd /etc/rcn.d # mv filename _filename
Example 1717
357
The -x option provides additional information about the service instances that are impacted.
3
Disk failure Hardware bug Software bug Accidental overwrite of the file
If the integrity check fails, the svc.configd daemon writes a message to the console similar to the following:
svc.configd: smf(5) database integrity check of: /etc/svc/repository.db
358 System Administration Guide: Basic Administration September 2008
failed. The database might be damaged or a media error might have prevented it from being verified. Additional information useful to your service provider is in: /etc/svc/volatile/db_errors The system will not be able to boot until you have restored a working database. svc.startd(1M) will provide a sulogin(1M) prompt for recovery purposes. The command: /lib/svc/bin/restore_repository can be run to restore a backup version of your repository. See http://sun.com/msg/SMF-8000-MY for more information.
The svc.startd daemon then exits and starts sulogin to enable you to perform maintenance.
1
Enter the root password at the sulogin prompt. sulogin enables the root user to enter system maintenance mode to repair the system. Run the following command:
# /lib/svc/bin/restore_repository
Running this command takes you through the necessary steps to restore a non-corrupt backup. SMF automatically takes backups of the repository at key system moments. For more information see SMF Repository Backups on page 331. When started, the /lib/svc/bin/restore_repository command displays a message similar to the following:
Repository Restore utility See http://sun.com/msg/SMF-8000-MY for more information on the use of this script to restore backup copies of the smf(5) repository. If there are any problems which need human intervention, this script will give instructions and then exit back to your shell. Note that upon full completion of this script, the system will be rebooted using reboot(1M), which will interrupt any active services.
If the system that you are recovering is not a local zone, the script explains how to remount the / and /usr file systems with read and write permissions to recover the databases. The script exits after printing these instructions. Follow the instructions, paying special attention to any errors that might occur.
359
After the root (/) file system is mounted with write permissions, or if the system is a local zone, you are prompted to select the repository backup to restore:
The following backups of /etc/svc/repository.db exists, from oldest to newest: ... list of backups ...
Backups are given names, based on type and the time the backup was taken. Backups beginning with boot are completed before the first change is made to the repository after system boot. Backups beginning with manifest_import are completed after svc:/system/manifest-import:default finishes its process. The time of the backup is given in YYYYMMDD_HHMMSS format.
3
Enter the appropriate response. Typically, the most recent backup option is selected.
Please enter one of: 1) boot, for the most recent post-boot backup 2) manifest_import, for the most recent manifest_import backup. 3) a specific backup repository from the above list 4) -seed-, the initial starting repository. (All customizations will be lost.) 5) -quit-, to cancel. Enter response [boot]:
If you press Enter without specifying a backup to restore, the default response, enclosed in [] is selected. Selecting -quit- exits the restore_repository script, returning you to your shell prompt.
Note Selecting -seed- restores the seed repository. This repository is designed for use during initial installation and upgrades. Using the seed repository for recovery purposes should be a last resort.
After the backup to restore has been selected, it is validated and its integrity is checked. If there are any problems, the restore_repository command prints error messages and prompts you for another selection. Once a valid backup is selected, the following information is printed, and you are prompted for final confirmation.
After confirmation, the following steps will be taken: svc.startd(1M) and svc.configd(1M) will be quiesced, if running. /etc/svc/repository.db -- renamed --> /etc/svc/repository.db_old_YYYYMMDD_HHMMSS /etc/svc/volatile/db_errors -- copied --> /etc/svc/repository.db_old_YYYYMMDD_HHMMSS_errors
360 System Administration Guide: Basic Administration September 2008
repository_to_restore -- copied --> /etc/svc/repository.db and the system will be rebooted with reboot(1M). Proceed [yes/no]? 4
Type yes to remedy the fault. The system reboots after the restore_repository command executes all of the listed actions.
Boot without starting any services. This command instructs the svc.startd daemon to temporarily disable all services and start sulogin on the console.
ok boot -m milestone=none
2 3
Determine where the boot process is hanging. When the boot process hangs, determine which services are not running by running svcs -a. Look for error messages in the log files in /var/svc/log.
After fixing the problems, verify that all services have started. a. Verify that all needed services are online.
# svcs -x
b. Verify that the console-login service dependencies are satisfied. This command verifies that the login process on the console will run.
# svcs -l system/console-login:default 6
361
How to Force a sulogin Prompt If the system/filesystem/local:default Service Fails During Boot
Local file systems that are not required to boot the Solaris OS are mounted by the svc:/system/filesystem/local:default service. When any of those file systems are unable to be mounted, the service enters a maintenance state. System startup continues, and any services which do not depend on filesystem/local are started. Services which require filesystem/local to be online before starting through dependencies are not started. To change the configuration of the system so that a sulogin prompt appears immediately after the service fails instead of allowing system startup to continue, follow the procedure below.
# svccfg -s svc:/system/console-login svc:/system/console-login> addpg site,filesystem-local dependency svc:/system/console-login> setprop site,filesystem-local/entities = fmri: svc:/system/filesystem/local svc:/system/console-login> setprop site,filesystem-local/grouping = astring: require_all svc:/system/console-login> setprop site,filesystem-local/restart_on = astring: none svc:/system/console-login> setprop site,filesystem-local/type = astring: service svc:/system/console-login> end 2
Example 1718
362
When a failure occurs with the system/filesystem/local:default service, the svcs -vx command should be used to identify the failure. After the failure has been fixed, the following command clears the error state and allows the system boot to continue: svcadm clear filesystem/local.
363
364
18
C H A P T E R
1 8
Software management involves adding and removing software from stand-alone systems, servers, and their clients. This chapter describes the various tools that are available for installing and managing software. This chapter does not describe installing the Solaris Operating System (Solaris OS) on a new system, nor does it describe installing or upgrading a new version of the Solaris OS. For information about installing or upgrading the Solaris OS, see Solaris 10 Installation Guide: Basic Installations. This is a list of the overview information in this chapter.
What's New in Software Management in the Solaris Operating System? on page 366 Where to Find Software Management Tasks on page 368 Overview of Software Packages on page 368 Tools for Managing Software Packages on page 372 Adding or Removing a Software Package (pkgadd) on page 373 Key Points for Adding Software Packages (pkgadd) on page 374 Guidelines for Removing Packages (pkgrm) on page 374 Restrictions on Adding and Removing Software Packages and Patches for Solaris Releases That are Not Zones Aware on page 375 Avoiding User Interaction When Adding Packages (pkgadd) on page 375
For the most up-to-date information for managing packages and patches in the Solaris OS, see http://www.sun.com/bigadmin/patches/. For step-by-step instructions on managing software, see Chapter 19, Managing Software With Solaris System Administration Tools (Tasks), and Chapter 20, Managing Software by Using Package Commands (Tasks). For information about managing software on Solaris systems with zones installed, see Chapter 25, Adding and Removing Packages and Patches on a Solaris System With Zones Installed (Tasks), in System Administration Guide: Solaris Containers-Resource Management and Solaris Zones.
365
Note Solaris 10 5/08: Although added in the Solaris 10 5/08 release, this information is applicable to all of the Solaris 10 OS. To register your Solaris system, go to https://inventory.sun.com/inventory/. For information about how to use Sun Inventory to register your hardware, software, and operating systems, see the Sun Inventory Information Center (http://wikis.sun.com/display/SunInventory/Sun+Inventory).
If you use Sun xVM Ops Center to provision, update, and manage the systems in your data center, see the Sun xVM Information Center (http://wikis.sun.com/display/xVM/Sun+xVM+Ops+Center) for information about how to register your software with Sun xVM Ops Center.
Deferred-Activation Patching
Patching tools have changed to handle larger patches. Starting with patch 119254-42 and 119255-42, the patch installation commands, patchadd and patchrm, have been modified to change the way in which certain patches that deliver new features are handled. This modification affects the installation of these patches on any Solaris 10 release. These deferred-activation patches are better equipped to handle the large scope of changes that are delivered in feature patches. For more details, see http://www.sun.com/bigadmin/sundocs/articles/patch-wn.jsp.
However, there are two instances when you might need to interact with the container daemon:
In the event that another application attempts to use a network port that is reserved for the Common Agent Container. In the event that a certificate store is compromised. If this conflict occurs, you might have to regenerate the Common Agent Container certificate keys.
For information about how to troubleshoot these problems, see Troubleshooting Common Agent Container Problems in the Solaris OS in System Administration Guide: Advanced Administration.
367
Installing Solaris software. Adding or removing Solaris software packages after installation. Adding or removing Solaris patches after installation. Troubleshooting software package problems.
Solaris 10 Installation Guide: Basic Installations Chapter 19, Managing Software With Solaris System Administration Tools (Tasks), and Chapter 20, Managing Software by Using Package Commands (Tasks) Managing Patches in the Solaris Operating System on page 426 Chapter 21, Troubleshooting Software Package Problems (Tasks), in System Administration Guide: Advanced Administration
368
Java keystore A repository of certificates that is installed by default with the Solaris release. The Java keystore is usually stored in the /usr/j2se/jre/lib/security directory. Package keystore A repository of certificates that you import when adding signed packages and patches to your system. The package keystore is stored in the /var/sadm/security directory by default.
Trusted certificate
A certificate that holds a public key that belongs to another entity. The trusted certificate is named as such because the keystore owner trusts that the public key in the certificate indeed belongs to the identity identified by the subject or owner of the certificate. The issuer of the certificate vouches for this trust by signing the certificate. Trusted certificates are used when verifying signatures, and when initiating a connection to a secure (SSL) server.
369
User key
Holds sensitive cryptographic key information. This information is stored in a protected format to prevent unauthorized access. A user key consists of both the user's private key and the public key certificate that corresponds to the private key.
The process of using the pkgadd or patchadd command to add a signed package or patch to your system involves three basic steps: 1. Adding the certificates to your system's package keystore by using the pkgadm command 2. (Optional) Listing the certificates by using the pkgadm command 3. Adding the package with the pkgadd command or applying the patch by using the patchadd command For step-by-step instructions on adding signed packages to your system, see Adding and Removing Signed Packages by Using the pkgadd Command (Task Map) on page 405. For step-by-step instructions on applying signed patches to your system with the patchadd command, see Managing Solaris Patches by Using the patchadd Command (Task Map) on page 428.
The following describes the output of the pkgadm listcert command. Keystore Alias Command Name Certificate Type When you retrieve certificates for printing, signing, or removing, this name must be used to reference the certificate. The common name of the certificate. For trusted certificates, this name is the same as the keystore alias. Can be one of two types:
370
Trusted certificate A certificate that can be used as a trust anchor when verifying other certificates. No private key is associated with a trusted certificate. Signing certificate A certificate that can be used when signing a package or patch. A private key is associated with a signing certificate.
The name of the entity that issued, and therefore signed, this certificate. For trusted certificate authority (CA) certificates, the issuer common name and common name are the same. A date range that identifies when the certificate is valid. An MD5 digest of the certificate. This digest can be used to verify that the certificate has not been altered during transmission from the source of the certificate. Similar to an MD5 fingerprint, except that it is calculated using a different algorithm.
SHA1 Fingerprint
Each certificate is authenticated by comparing its MD5 and SHA1 hashes, also called fingerprints, against the known correct fingerprints published by the issuer.
Java keystore Import Sun's Root CA certificate that is included by default in the Java keystore when you install the Solaris release. Sun's Public Key Infrastructure (PKI) site If you do not have a Java keystore available on your system, you can import the certificates from this site.
371
For step-by-step instructions on importing certificates into the package keystore, see How to Import a Trusted Certificate From the Java Keystore (pkgadm addcert) on page 406. For complete instructions on adding signed packages with the pkgadd command, see How to Add a Signed Package (pkgadd) on page 410.
Tool or Command
installer
Launches an installer, such as Solaris installation GUI, to add software from the Solaris media. The installer must be available either locally or remotely.
installer(1M)
prodreg (GUI)
Launches an installer to add, prodreg(1M) remove, or display software product information. Use Solaris Product Registry to remove or display information about software products that were originally installed by using the Solaris installation GUI or the Solaris pkgadd command. Use the prodreg command to remove or display information about software products that were originally installed by using the Solaris installation GUI or the Solaris pkgadd command. Installs a signed or unsigned software package. Maintains the keys and certificates used to manage signed packages and signed patches. Checks the installation of a software package. prodreg(1M)
pkgadd
pkgadd(1M)
pkgadm
pkgadm(1M)
pkgchk
pkgchk(1M)
372
TABLE 181
(Continued)
Tool or Command
pkginfo pkgparam
Lists software package information. pkginfo(1) Displays software package parameter values. Removes a software package. pkgparam(1)
pkgrm pkgtrans
pkgrm(1M)
Translates an installable package pkgtrans(1) from one format to another format. The -g option instructs the pkgtrans command to generate and store a signature in the resulting data stream.
For more information about these commands, see Chapter 19, Managing Software With Solaris System Administration Tools (Tasks), and Chapter 20, Managing Software by Using Package Commands (Tasks).
Package naming conventions Sun packages always begin with the prefix SUNW, as in SUNWaccr, SUNWadmap, and SUNWcsu. Third-party packages usually begin with a prefix that corresponds to the company's stock symbol. What software is already installed You can use the Solaris installation GUI, Solaris Product Registry prodreg viewer (either GUI or CLI) or the pkginfo command to determine the software that is already installed on a system. How servers and clients share software Clients might have software that resides partially on a server and partially on the client. In such cases, adding software for the client requires that you add packages to both the server and the client.
374
Restrictions on Adding and Removing Software Packages and Patches for Solaris Releases That are Not Zones Aware
On systems that are running a Solaris release that is not zones aware, using any command that accepts the -R option to specify an alternate root path for a global zone that has non-global zones installed, does not work. These commands include:
See the pkgadd(1M), pkgrm(1M), patchadd(1M), and patchrm(1M) man pages. For additional information, see Restrictions on Using patchadd -R to Create an Alternate root Path on page 432.
installed and how a package's installation scripts run before using an administration file to avoid the checks and prompts that the pkgadd command normally provides. The following example shows an administration file that prevents the pkgadd command from prompting the user for confirmation before installing the package.
Chapter 18 Managing Software (Overview) 375
mail= instance=overwrite partial=nocheck runlevel=nocheck idepend=nocheck rdepend=nocheck space=nocheck setuid=nocheck conflict=nocheck action=nocheck networktimeout=60 networkretries=3 authentication=quit keystore=/var/sadm/security proxy= basedir=default
Besides using administration files to avoid user interaction when you add packages, you can use them in several other ways. For example, you can use an administration file to quit a package installation (without user interaction) if there's an error or to avoid interaction when you remove packages by using the pkgrm command. You can also assign a special installation directory for a package, which you might do if you wanted to maintain multiple versions of a package on a system. To do so, set an alternate base directory in the administration file by using the basedir keyword. The keyword specifies where the package will be installed. For more information, see the admin(4) man page.
376
19
C H A P T E R
1 9
This chapter describes how to add, verify, and remove software packages by using the Solaris installation graphical user interface (GUI) and the Solaris Product Registry. For information about software management features that are new in this release, see What's New in Software Management in the Solaris Operating System? on page 366. For information about the procedures that are associated with performing software management tasks, see:
Adding Software With the Solaris Installation GUI on page 378 Managing Software With the Solaris Product Registry GUI (Task Map) on page 379 Managing Software With the Solaris Product Registry Command-Line Interface (Task Map) on page 384
Solaris Product Registry and Solaris GUI Installation Tools for Managing Software
The following table lists the commands to use for adding, removing, and checking the installation of software packages the Solaris installation GUI and Solaris Package Registry tools.
TABLE 191 Tool
installer
installer(1M)
prodreg
Enables you to browse, unregister, prodreg(1M) and uninstall software in the Solaris Product Registry
377
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Decide to install software from a CD, a DVD, or from the network. Select one of the following:
If you are installing from a CD, insert the CD into the CD-ROM drive. If you insert the Solaris 10 Languages CD, the Solaris installation GUI starts automatically. Proceed to Step 5.
If you are installing from a DVD, insert the DVD into the DVD-ROM drive. If you are installing from the network, locate the net image of the software you want to install.
Change directories to find the Solaris installation GUI installer. Solaris installation GUI installers are located in various directories on the CDs and on the DVD.
Solaris 10 Software CDs or DVD. Solaris 10 Documentation DVD. Solaris 10 Languages CD. The Solaris installation GUI starts automatically when the CD is inserted.
378
Managing Software With the Solaris Product Registry GUI (Task Map)
% ./installer [options]
-nodisplay -noconsole
Runs the installer without a GUI. Runs without any interactive text console device. Use this option with the -nodisplay option when you include the installer command in a UNIX script for installing software.
From a file manager, double-click Installer or installer. An Installer window is displayed, followed by the Solaris installation GUI dialog box.
5 6
Follow the directions on the screen to install the software. When you have finished adding software, click Exit. The Solaris installation GUI exits.
Managing Software With the Solaris Product Registry GUI (Task Map)
The following task map describes the software management tasks that you can perform with the Solaris Product Registry.
Task Description For Instructions
View installed or uninstalled software with the Solaris Product Registry. Install software with the Solaris Product Registry.
Used for learning about installed or uninstalled software. You can use the Solaris Product Registry to find software and launch the Solaris installation GUI. This program takes you through the installation of that software.
How to View Installed or Uninstalled Software Information With the Solaris Product Registry GUI on page 381 How to Install Software With the Solaris Product Registry GUI on page 382
Uninstall software with the Use tor uninstall software Solaris Product Registry. with the Solaris Product Registry.
How to Uninstall Software With the Solaris Product Registry GUI on page 383
The Solaris Product Registry is a tool to help you manage installed software. After you have installed the software, Product Registry provides a list of all the installed software by using the Solaris installation GUI or the Solaris pkgadd command.
379
Managing Software With the Solaris Product Registry GUI (Task Map)
You can use the Solaris Product Registry in a GUI or with a command-line interface (CLI). For more information on how to use the Solaris Product Registry CLI, see Managing Software With the Solaris Product Registry Command-Line Interface (Task Map) on page 384. The Solaris Product Registry GUI interface enables you to do the following:
View a list of installed and registered software and some software attributes. View all Solaris system products that you installed in their localized version in the System Software Localizations directory. Find and launch an installer. Install additional software products. Uninstall software and individual software packages.
The Solaris Product Registry GUI main window consists of three panes of information:
Installed, registered, and removed software Standard attributes of the currently selected software Attributes that are customized and attributes that are internal to the registered software
380
Managing Software With the Solaris Product Registry GUI (Task Map)
FIGURE 191
How to View Installed or Uninstalled Software Information With the Solaris Product Registry GUI
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Start the Solaris Product Registry tool.
# prodreg &
Chapter 19 Managing Software With Solaris System Administration Tools (Tasks) 381
Managing Software With the Solaris Product Registry GUI (Task Map)
Click the turner control to the left of the System Registry directory in the Registered Software box. The turner control changes from pointing to the right to pointing downward. You can expand or collapse any item in the registry, except an item that has a text file icon to its left. The Software Installed in Registered Software box always contains the following components:
The configuration software group that you chose when you installed the Solaris release. Software groups that can be displayed include Reduced Network Support, Core, End User System Support, Developer System Support, Entire Distribution, or Entire Distribution Plus OEM Support. Additional system software, which contains Solaris products that are not part of the software group you chose. Unclassified software that is not a Solaris product or part of the software group. This software includes any package that you installed by using the pkgadd command.
Select directories until you find a software application to view. The list expands as you open directories. To view the attributes, select a directory or file. The Product Registry displays attribute information in the System Registry box.
For software products that were installed with the Solaris installation GUI, the Solaris Product Registry contains values for at least the following: Title, Version, Location, and Installed on. Items in an expanded list under a product or software group inherit the version information of the product. If all or part of the product was removed with the pkgrm command, a cautionary icon appears next to the software product's name.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Start the Solaris Product Registry tool.
# prodreg
382
Managing Software With the Solaris Product Registry GUI (Task Map)
Decide if you are installing from a CD, a DVD, or from the network. Select one of the following:
If you are installing from a CD, insert the CD into the CD-ROM drive. If you are installing from a DVD, insert the DVD into the DVD-ROM drive. If you are installing from the network, locate the net image of the software that you want to install.
4 5
To view the list of installed and registered software, click the turner control. Click the New Install button at the bottom of the Solaris Product Registry window. The Select Installer dialog box is displayed. This box initially points to the /cdrom directory or the directory you are in. Select directories to find the Solaris installation GUI installer. Solaris installation GUI installers are located in various directories on the CDs and on the DVD.
Solaris 10 Software CDs or DVD. Solaris 10 Documentation DVD. Solaris 10 Languages CD. The Solaris installation GUI automatically starts when the CD is inserted.
7 8
When you find the installer you want, select its name in the Files box. Click OK. The installer you selected is launched. Follow the directions that are displayed by the installer to install the software.
Managing Software With the Solaris Product Registry Command-Line Interface (Task Map)
To view the list of installed and registered software, click the turner control. Select directories until you find the name of the software that you want to uninstall. Read the software attributes to make sure that this software is the software that you want to uninstall. Click the Uninstall software-product-name button at the bottom of the Solaris Product Registry window. The software product you selected is uninstalled.
Managing Software With the Solaris Product Registry Command-Line Interface (Task Map)
The following task map describes the software management tasks that you cab perform with the Solaris Product Registry command-line interface.
Task Description For Instructions
View installed or uninstalled You can view software information by How to View Installed or Uninstalled software. using the browse subcommand. Software Information (prodreg) on page 385 View software attributes. You can view specific software attributes by using the info subcommand. You can view the components that depend on a specific software component by using the info subcommand. If you remove installed software files or packages without using the appropriate uninstaller, you can damage the software on your system. You can remove software from your system by using the uninstall subcommand. How to View Software Attributes (prodreg) on page 388 How to Check for Software Dependencies (prodreg) on page 390
Uninstall software
384
Task
Description
For Instructions
Uninstall damaged software. Uninstalling a damaged software How to Uninstall Damaged Software component might fail if the uninstaller (prodreg) on page 398 program for the software component has been removed from the system. Reinstall damaged software components. If other software depends on a damaged software component, you might want to reinstall the damaged component, rather than uninstall the component and the other dependent software. How to Reinstall Damaged Software Components (prodreg) on page 401
View a list of installed and registered software and software attributes. View all Solaris system products that you installed in their localized version in the System Software Localizations directory. Identify damaged software. Remove software entries from the Solaris Product Registry. Uninstall software and individual software packages.
For more information on how to manage the Solaris Product Registry by using the command-line interface, see the prodreg(1M) man page.
The browse subcommand to the prodreg command displays the following information about registered software. BROWSE # When you use the prodreg browse command, the Solaris Product Registry generates a browse number for each registered software component. This number can be used as an argument to either the prodreg browse command or the info subcommand to descend the hierarchy of specific registered components.
Note Browse numbers might change when you reboot or reinstall your system. Do not store browse numbers in scripts or attempt to reuse them between separate login sessions.
+/-/.
This field indicates if a software component has additional software component children registered in the Solaris Product Registry. The following characters are displayed in this field:
+ indicates that the software component has additional children components that are not currently displayed. - indicates that the software component has additional children components that are currently displayed. . indicates that the software component does not have children components.
UUID #
This field lists the software's unique identifier in the Solaris Product Registry. This field indicates the instance number of the software component on the system. If the system contains multiple instances of a software component, the Solaris Product Registry assigns a separate instance number to each instance of the component. This field lists the localized name of the software. The name of the Solaris OS in this sample output is the Solaris 10 system software.
NAME
386
Browse the information for one of the software components that are listed in the Solaris Product Registry.
% prodreg browse -m "name"
The -m name command displays information on the software component with the name name.
4
If the system contains multiple instances of name software, type the following command to browse the Solaris Product Registry:
% prodreg browse -u name-UUID -i instance -n number
-u name-UUID
Displays information on the name software component with the unique identifier name-UUID. Displays information on the name software component with the instance number instance. Displays software information by referencing the component's browse number number.
-i instance -n number
Repeat Step 3 and Step 4 for each software component that you want to browse.
Example 191
Example 192
387
% prodreg browse BROWSE # +/-/. UUID # NAME ======== ===== ==================================== = ============ 1 root 1 System Registry 2 + a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10 System Software 3 + 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified Software % prodreg browse -n 2
Example 193
Software component name Software component description Required components of the software Other components that require the software Base directory of the software
388
1 2
The -m name command displays the attributes of the software component with the name name.
4
Example 194
389
Example 195
Example 196
390
Repeat the prodreg browse command until the software component you want to check is displayed. See How to View Installed or Uninstalled Software Information (prodreg) on page 385 for more information on browsing the Solaris Product Registry by using the prodreg browse command.
3
Displays the attributes of the software component with the name name. Displays components that depend on name software by displaying the values of the Dependent Components attribute.
This command output lists the software components that depend on name software.
Example 197
391
View the Solaris Product Registry information on the software you want to check.
% prodreg BROWSE # ======== 1 2 browse +/-/. ===== + -m name UUID # NAME ==================================== = ============ root 1 System Registry a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10 System Software 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified Software name-UUID 1 name component-a-pkg 1 component-a component-b-pkg 1
3 4 233 234
+ . .
Displays information on the software component with the name name. Specifies the UUID of the name software component. Specifies the package name of the component-a component that depends on name software. Specifies the name of a component that depends on name software. Specifies the package name of the component-b component that depends on name software.
In the previous sample output, the component-b-pkg entry does not have an associated name in the Name field. If a software component name is not displayed in the Solaris Product Registry, the component might be damaged.
2
392
-u name-UUID -i 1 -d
Displays information on the name software component. Displays information on the first instance of the name software component. Displays the value of the isDamaged attribute of the name software component.
The output isDamaged=TRUE indicates that the name software component is damaged.
3
The error message output of the pkginfo component-b-pkg command indicates that the component-b-pkg package has been removed from the system. The name software component might not work without the component-b-pkg package.
Example 198
+ . . .
393
The ExampleSoft child component EXSOzzt does not have an entry in the NAME field. The ExampleSoft software might be damaged. You would use the prodreg info command with the -u, -i, and -d options to determine if the ExampleSoft software is damaged.
% prodreg info -u 95842091-725a-8501-ef29-0472985982be -i 1 -d isDamaged=TRUE
The output isDamaged=TRUE indicates that the ExampleSoft software is damaged. You would use the -a PKGS option of the prodreg info command to identify the ExampleSoft software packages.
% prodreg info -u 95842091-725a-8501-ef29-0472985982be -i 1 -a PKGS pkgs: EXSOzzt EXSOblob
To verify that the EXSOzzt and EXSOblob packages are installed on the system, you would use the pkginfo command.
% pkginfo EXSOzzt ERROR: information for "EXSOzzt" was not found % pkginfo EXSOblob application EXSOblob
Example Data
The output of the pkginfo command indicates that the EXSOzzt package is not installed on the system. Thus, the ExampleSoft software is damaged.
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
394
+ . .
-u name-UUID name
Displays information on the software component with the unique identifier name-UUID. Specifies the name of the software component you want to uninstall with the unique identifier name-UUID. Specifies the unique identifier of the component-a software component that is required by name software. Specifies the name of a component that is required by name software. Specifies the unique identifier of the component-b component that is required by name software. The - symbol indicates that component-b requires an additional software component. Specifies the name of a software component that is required by name software. Specifies the unique identifier of the component-b software component that is required by component-b software. Specifies the name of a software component that is required by component-b software.
. component-a-UUID
component-a - component-b-UUID
component-b . component-c-UUID
component-c
395
Check the dependencies for the software that you want to uninstall.
# prodreg info -u name-UUID Title: name . . . Child Components: Name UUID # -------------------------- ------------------------------------ component-a component-a-UUID component-b component-b-UUID Required Components: Name UUID # -------------------------- ------------------------------------ component-a component-a-UUID component-b component-b-UUID
1 1
1 1
Check the following information in the output of the prodreg info command.
Child Components Lists the software components that are associated with the name software component. When you unregister the name software, you also unregister the child components of name software. If the output of the previous prodreg info command lists any child components, verify that you want to unregister these child components. Required Components Lists the software components that are required by the name software component. Software components might require other components that are not child components. When you uninstall and unregister a component, only child components are unregistered and uninstalled. Dependent Components Lists the components that require name software to run. When you unregister the name software, you also unregister the dependent components of name software. If the output of the prodreg info command lists any dependent components, verify that you want to unregister these dependent components.
In the previous sample output, name software does not have any dependent components.
5
396
name
name-UUID
# prodreg info -u component-c-UUID -i 1 -a "Dependent Components" Dependent Components: Name UUID # --------------------------- ------------------------------------ component-b component-b-UUID
The sample output shows that no other software depends on the child components of name software.
6
-r
Recursively unregisters software with the unique identifier name-UUID and all the child components of this software. Specifies the unique identifier of the software you want to unregister. Specifies the instance of the software you want to unregister.
-u name-UUID -i 1
Example 199
+ . .
397
Title: ExampleSoft Software . . . Child Components: Name -------------------------Example Doc Example Data Required Components: Name -------------------------Example Doc Example Data
# 1 1
# 1 1
# prodreg info -u 90209809-9785-b89e-c821-0472985982be -i 1 -a "Dependent Components" Dependent Components: Name UUID # --------------------------- ------------------------------------ ExampleSoft 95842091-725a-8501-ef29-0472985982be 1 # prodreg info -u EXSOzzt -i Dependent Components: Name --------------------------ExampleSoft 1 -a "Dependent Components" UUID # ------------------------------------ 95842091-725a-8501-ef29-0472985982be 1
# prodreg info -u EXSOblob -i 1 -a "Dependent Components" Dependent Components: Name UUID # --------------------------- ------------------------------------ Example Data EXSOzzt 1 # prodreg unregister -r -u 95842091-725a-8501-ef29-0472985982be -i 1
398
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. View the information on the software you want to uninstall.
# prodreg BROWSE # ======== 1 2 browse +/-/. ===== + -m "name" UUID # NAME ==================================== = ============ root 1 System Registry a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10 System Software 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified Software UUID 1 name component-a-UUID 1 component-a component-b-UUID 1
3 4 1436 1437
+ . .
Displays information on the name software component you want to uninstall. Specifies the UUID of the software component you want to uninstall. Specifies the UUID of the component-a software component. Specifies the name of a child software component of name software. Specifies the UUID of a child software component of name software.
The component-b-UUID entry does not have an associated component name. The missing name value might indicate that this component is damaged.
3
-u UUID -i 1
Specifies the UUID of the software component you want to uninstall. Specifies the instance of the software you want to uninstall.
The error message indicates that the uninstaller program is not on the system.
399
-m name -a uninstallprogram
Displays information on the name software component. Displays information on the uninstaller program that is associated with the name software component. Specifies the registered location of the uninstaller program for the name software component.
uninstaller-location
The output of the ls command indicates that the uninstaller program is not in the registered location.
6
Remove the software from the system in one of the following ways:
If you have a system backup available, follow these steps: a. Load the uninstaller program from the backup. b. Run the uninstaller program from a shell command-line interface such as a terminal window.
If you do not have access to the uninstaller program on a backup, follow these steps: a. Unregister the software component.
# prodreg unregister -u UUID -i 1
b. Remove any remaining registered components that are required by the software you want to remove.
# pkgrm component-a-UUID
Example 1910
400
+ . . .
-m Examplesoft UUID # NAME ==================================== = ============ root 1 System Registry a01ee8dd-1dd1-11b2-a3f2-0800209a5b6b 1 Solaris 10 System Software 8f64eabf-1dd2-11b2-a3f1-0800209a5b6b 1 Unclassified Software 95842091-725a-8501-ef29-0472985982be 1 ExampleSoft 90209809-9785-b89e-c821-0472985982be 1 Example Doc EXSOzzt 1 EXSOblob 1 Example Data
# prodreg uninstall -u 95842091-725a-8501-ef29-0472985982be -i 1 The install program requested could not be found # prodreg info -m "ExampleSoft" -a uninstallprogram uninstallprogram: /usr/bin/java -mx64m -classpath /var/sadm/prod/org.example.ExampleSoft/987573587 uninstall_ExampleSoft # ls /var/sadm/prod/org.example.ExampleSoft/987573587 /var/sadm/prod/org.example.ExampleSoft/987573587: No such file or directory # prodreg unregister -u 95842091-725a-8501-ef29-0472985982be -i 1 # pkgrm EXSOblob
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
401
3 4
+ .
-m name UUID
Displays information on the name software component you want to reinstall. Specifies the UUID of the software component you want to reinstall.
Identify the software that depends on the software you want to reinstall.
# prodreg info -m "name" -a "Dependent Components" Dependent Components: Name UUID # --------------------------- ------------------------------------ component-a component-a-UUID 1
Specifies the name of the software component you want to reinstall. Displays the components that depend on name software. Specifies the name of a software component that depends on name software. Specifies the UUID of the component-a software component.
The component-a software component depends on the software you want to reinstall. To reinstall name software and not unregister component-a, you must forcibly unregister the name software, then reinstall name software.
4
402
The installer option specifies the name of the installer program for name software.
Example 1911
3 4
+ .
# prodreg info -m "ComponentSoft" -a "Dependent Components" Dependent Components: Name UUID # --------------------------- ------------------------------------ ExampleSoft 95842091-725a-8501-ef29-0472985982be 1 # prodreg unregister -f -u 86758449-554a-6531-fe90-4352678362fe -i 1 # /usr/bin/java -cp /usr/installers/org.example.componentsoft
403
404
C H A P T E R
20
2 0
This chapter describes how to add, verify, and remove software packages by using the package commands. For information on the procedures associated with performing these tasks, see:
Adding and Removing Signed Packages by Using the pkgadd Command (Task Map) on page 405 Managing Software Packages by Using Package Commands (Task Map) on page 411
Adding and Removing Signed Packages by Using the pkgadd Command (Task Map)
The following task map describes software management tasks that you can perform with signed package commands.
Task Description For Instructions
Import a certificate.
You can import a trusted How to Import a Trusted Certificate From the certificate by using the Java Keystore (pkgadm addcert) on page 406 pkgadm addcert command. You can print the details of a certificate by using the pkgadm listcert command. How to Display Certificate Information (pkgadm listcert) on page 408
Remove a certificate.
You can remove a certificate How to Remove a Certificate (pkgadm by using the pkgadm removecert) on page 408 removecert command.
405
Task
Description
For Instructions
Use this procedures for systems that are set up behind a firewall with a proxy. After the root certificate is imported, you can add a signed package by using he pkgadd command.
How to Import a Trusted Certificate From the Java Keystore (pkgadm addcert)
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Verify that the root certificate authority (CA) certificate exists in the Java TM keystore.
# keytool -storepass storepass -list -keystore certfile
keytool
Manages a Java keystore (database) of private keys and their associated X.509 certificate chains that authenticate the corresponding public keys. Also manages certificates from trusted entities. For more information on the keytool utility, see keytool-Key and Certificate Management Tool. Specifies the password that protects the integrity of the keystore. By default, prints the MD5 fingerprint of a certificate. Specifies the name and location of the persistent keystore file.
Export the root CA certificate from the Java keystore to a temporary file.
# keytool -export -storepass storepass -alias verisignclass2g2ca -keystore /usr/java/jre/lib/security/cacerts certfile -file filename
406
Exports the trusted certificate. Specifies the password that protects the integrity of the Java keystore. Identifies the alias of the trusted certificate. Specifies the name and location of the keystore file. Identifies the file to hold the exported certificate.
-t -f format certfile
5
Indicates that the certificate is a trusted CA certificate. The output includes the details of the certificate, which the user is asked to verify. Specifies the format of certificates and private keys. When you import a certificate, it must be encoded using PEM or binary DER format. Specifies the file that contains the certificate.
# pkgadm addcert -t -f der /tmp/root.crt Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D Are you sure you want to trust this certificate? yes Trusting certificate </C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O>
407
Type a Keystore protection Password. xxxxxx Press ENTER for no protection password (not recommended): For Verification: Type a Keystore protection Password. Press ENTER for no protection password (not recommended): Certificate(s) from </tmp/root.crt> are now trusted
Example 202
# pkgadm listcert -P pass:test123 Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D
The removecert -n certfile option specifies the alias of the user certificate/key pair or the alias of the trusted certificate.
408
Note View the alias names for certificates by using the pkgadm listcert command.
Example 203
Removing a Certificate
The following example shows how to remove a certificate.
# pkgadm listcert Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D # pkgadm removecert -n "/C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O" Enter Keystore Password: storepass Successfully removed Certificate(s) with alias \ </C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O>
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Select one of the following methods to specify a proxy server. a. Specify the proxy server by using the http_proxy, HTTPPROXY, or HTTPPROXYPORT environment variable. For example:
# setenv http_proxy http://mycache.domain:8080
409
b. Specify the proxy server on the pkgadd command line. For example:
# pkgadd -x mycache.domain:8080 -d http://myserver.com/pkg SUNWpkg
c. Create an administration file that includes proxy server information. For example:
# cat /tmp/admin mail= instance=unique partial=ask runlevel=ask idepend=ask rdepend=ask space=ask setuid=ask conflict=ask action=ask networktimeout=60 networkretries=3 authentication=quit keystore=/var/sadm/security basedir=default proxy=mycache.domain:8080
Then, identify the administration file by using the pkgadd -a command. For example:
# pkgadd -a /tmp/admin -d http://myserver.com/pkg SUNWpkg
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Add a signed package.
# pkgadd -d /pathname/device-name
The -d device-name option specifies the device from which the package is installed. The device can be a directory, tape, diskette, or removable disk. The device can also be a data stream created by the pkgtrans command.
410 System Administration Guide: Basic Administration September 2008
Example 204
The following example shows how to install a signed package using an HTTP URL as the device name. The URL must point to a stream-formatted package.
# pkgadd -d http://install/signed-video.pkg ## Downloading... ..............25%..............50%..............75%..............100% ## Download Complete . . .
You can add software packages to the local system by using the pkgadd command.
411
Task
Description
For Instructions
Add software packages to a spool directory. List information about all installed software packages. Check the integrity of installed software packages. Check the integrity of an installed object.
You can add software packages to a spool directory without actually installing the software. You can list information about installed packages by using the pkginfo command. You can verify the integrity of installed software packages by using the pkgchk command. You can verify the integrity of an installed object by using the pkchk command with the -p and -P options. The -p option specifies the full path name. The new -P option specifies a partial path name. You can remove unneeded software packages by using the pkgrm command.
Adding a Software Package to a Spool Directory on page 415 How to List Information About All Installed Packages (pkginfo) on page 417 How to Check the Integrity of Installed Software Packages (pkgchk) on page 418 How to Check the Integrity of Installed Objects (pkgchk -p, pkgchk -P) on page 419
412
-a admin-file
(Optional) Specifies an administration file that the pkgadd command should check during the installation. For details about using an administration file, see Using an Administration File on page 375. Specifies the absolute path to the software packages. device-name can be the path to a device, a directory, or a spool directory. If you do not specify the path where the package resides, the pkgadd command checks the default spool directory (/var/spool/pkg). If the package is not there, the package installation fails. (Optional) Is the name of one or more packages, separated by spaces, to be installed. If omitted, the pkgadd command installs all available packages from the specified device, directory, or spool directory.
-d device-name
pkgid
If the pkgadd command encounters a problem during installation of the package, it displays a message related to the problem, followed by this prompt:
Do you want to continue with this installation?
Respond with yes, no, or quit. If more than one package has been specified, type no to stop the installation of the package being installed. The pkgadd command continues to install the other packages. Type quit to stop the installation.
4
If no errors occur, a list of installed files is returned. Otherwise, the pkgchk command reports the error.
Example 205
413
. .
Example 206
If the automounter is running at your site, you do not need to mount the remote package server manually. Instead, use the automounter path, in this case, /net/package-server/latest-packages, as the argument to the -d option.
# pkgadd -d /net/package-server/latest-packages SUNWpl5u . . . Installation of <SUNWpl5u> was successful.
Example 207
Installing Software Packages From a Remote Package Server by Specifying an Administration File
This example is similar to the previous example, except that it uses the -a option and specifies an administration file named noask-pkgadd, which is illustrated in Avoiding User Interaction When Adding Packages (pkgadd) on page 375. In this example, assume that the noask-pkgadd administration file is in the default location, /var/sadm/install/admin.
# pkgadd -a noask-pkgadd -d /net/package-server/latest-packages SUNWpl5u . . . Installation of <SUNWpl5u> was successful.
414
Example 208
The following packages are available: 1 SUNWxf86r XFree86 Driver Porting Kit (Root) (i386) 4.3.0,REV=0.2003.02.28 2 SUNWxf86u XFree86 Driver Porting Kit (User) (i386) 4.3.0,REV=0.2003.02.28 . . .
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Remove any already spooled packages with the same names as the packages you are adding. For information on removing spooled packages, see Example 2020. Add a software package to a spool directory.
# pkgadd -d device-name -s spooldir pkgid ...
415
Specifies the absolute path to the software packages. device-name can be the path to a device, a directory, or a spool directory. Specifies the name of the spool directory where the package will be spooled. You must specify a spooldir. (Optional) Is the name of one or more packages, separated by spaces, to be added to the spool directory. If omitted, the pkgadd command copies all available packages.
Verify that the package has been copied successfully to the spool directory.
$ pkginfo -d spooldir| grep pkgid
If pkgid was copied correctly, the pkginfo command returns a line of information about the pkgid. Otherwise, the pkginfo command returns the system prompt.
Example 209
Example 2010
If the automounter is running at your site, you do not have to mount the remote package server manually. Instead, use the automounter path, in this case, /net/package-server/latest-packages, as the argument to the -d option.
# pkgadd -d /net/package-server/latest-packages -s /var/spool/pkg SUNWpl5p Transferring <SUNWpl5p> package instance
416 System Administration Guide: Basic Administration September 2008
Example 2011
Example 2012
Example 2013
417
11.9.0,REV=2002.04.06.15.27 / Sun Microsystems, Inc. core software for a specific hardware platform group leo20031003183400 Feb 20 2004 16:57 Please contact your local service provider completely installed 114 installed pathnames 36 shared pathnames 40 directories 57 executables 21469 blocks used (approx)
To specify the absolute path of the spool directory, type the following:
# pkgchk -d spooldir pkgid ...
-a -c -v -d spooldir pkgid
Specifies to audit only the file attributes (the permissions), rather than the file attributes and the contents, which is the default. Specifies to audit only the file contents, rather than the file contents and attributes, which is the default. Specifies verbose mode, which displays file names as they are processed. Specifies the absolute path of the spool directory. (Optional) Is the name of one or more packages, separated by spaces. If you do not specify a pkgid, all the software packages installed on the system are checked.
418
Example 2014
If no errors occur, the system prompt is returned. Otherwise, the pkgck command reports the error.
Example 2015
If no errors occur, the system prompt is returned. Otherwise, the pkgck command reports the error.
Example 2016
The checks made on a spooled package are limited because not all information can be audited until a package is installed.
How to Check the Integrity of Installed Objects (pkgchk -p, pkgchk -P)
This procedure explains how to use the pkgchk command to check the integrity of installed objects. The new -P option enables you to specify a partial path. This option has been added to assist you in mapping files to packages. Use this option with the -l option to list the information about the files that contain the partial path. Use the -p option to check the integrity of installed objects by specifying the full path. For more information, see the pkgchk(1M) man page.
419
Become superuser or assume an equivalent role. Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services. Check the integrity of an installed object.
To verify the integrity of an installed object for a full path name or path names, type the following:
# pkgchk -lp path-name
To verify the integrity of an installed object for a partial-path name or path names, type the following:
# pkgchk -lP partial-path-name
-p path
Checks the accuracy only of the path name or path names that are listed. Path can be one or more path names separated by commas. Specifies to audit only the file attributes (the permissions), rather than the file attributes and the contents, which is the default. Checks the accuracy of only the partial path name or path names that are listed. The partial-path can be one or more partial path names separated by commas. Matches any path name that contains the string contained in the partial path. Specifies to audit only the file contents, rather than the file contents and attributes, which is the default. Lists information about the selected files that make up a package. This option is not compatible with the -a, -c, -f, -g, and -v options. Specifies verbose mode, which displays file names as they are processed.
-P partial-path
-l
Example 2017
420
Example 2018
inaccuracies in the database that keeps track of all installed packages on the system.
421
pkgid identifies the name of one or more packages, separated by spaces, to be removed. If omitted, the pkgrmcommand removes all available packages.
Example 2019
Example 2020
422
C H A P T E R
21
2 1
Patch management involves applying Solaris patches and software updates to a system. Patch management might also involve removing unwanted or faulty patches. Removing patches is also called backing out patches. This chapter provides step-by-step instructions on how to manage Solaris patches by using the patchadd command. For additional information, see the patchadd(1M) man page. The following overview information is in this chapter:
Types of Patches on page 424 Accessing Solaris Patches on page 424 Managing Patches in the Solaris Operating System on page 426 Solaris Patch Management Terms and Definitions on page 426 Managing Solaris Patches by Using the patchadd Command (Task Map) on page 428
Note Solaris 10 5/08: Although added in the Solaris 10 5/08 release, this information is applicable to all of the Solaris 10 OS. To register your Solaris system, go to https://inventory.sun.com/inventory/. For information about how to use Sun Inventory to register your hardware, software, and operating systems, see the Sun Inventory Information Center (http://wikis.sun.com/display/SunInventory/Sun+Inventory).
If you use Sun xVM Ops Center to provision, update, and manage the systems in your data center, see the Sun xVM Information Center (http://wikis.sun.com/display/xVM/Sun+xVM+Ops+Center) for information about how to register your software with Sun xVM Ops Center. For information about applying patches to diskless client systems, see Patching Diskless Client OS Services on page 161. For information about recommended strategies and practices for using Solaris patches, see Solaris Patch Management: Recommended Strategies.
423
Types of Patches
Types of Patches
A patch is an accumulation of fixes for a known or potential problem within the Solaris OS or other supported software. A patch can also provide a new feature or an enhancement to a particular software release. A patch consists of files and directories that replace or update existing files and directories. Most Solaris patches are delivered as a set of sparse packages. For details about packages, see Chapter 18, Managing Software (Overview). A software update is a change that you apply to software that corrects an existing problem or that introduces a feature. To update is also the process of applying software updates to a system. You can manage patches on your Solaris system by using the patchadd command.
Each patch is associated with a README file that has information about the patch.
Determine the Solaris version number of the managing host and the target host Update the patch package's pkginfo file with this information:
Patches that have been obsoleted by the patch being applied Other patches that are required by this patch Patches that are incompatible with this patch
While you apply patches, the patchadd command logs information in the /var/sadm/patch/patch-id/log file.
Note In this Solaris release, improvements have been made to the patchadd -M command. When you use this command to apply patches to your system, you are no longer required to specify patch IDs in numeric order. If you use the patchadd -M command without specifying a patch ID, all patches in the directory are installed on the system. For more information about these changes, see the patchadd(1M) man page.
The patchadd command cannot apply a patch or software update under the following conditions:
The package is not fully installed on the system. The patch package's architecture differs from the system's architecture. The patch package's version does not match the installed package's version. A patch with the same base code and a higher revision number has already been applied. A patch that obsoletes this patch has already been applied. The patch is incompatible with a patch that has already been applied to the system. Each patch that has been applied keeps this information in its pkginfo file.
425
The patch being applied depends on another patch that has not yet been applied.
Determine whether to apply Determine whether applying signed signed or unsigned patches. or unsigned patches is best for your environment. Apply a patch to your system. Use the patchadd command on Solaris 2.6, Solaris 7, Solaris 8, Solaris 9, or Solaris 10 systems to apply unsigned Solaris patches.
Determining Whether to Apply Signed or Unsigned Patches to Your System on page 426 Managing Solaris Patches by Using the patchadd Command (Task Map) on page 428
426
patch server
Directory in which backout data is stored. By default, this is the save directory of each package that was installed by the patch. See patch dependency. An electronic signature that can be used to ensure that a document has not been modified since the signature was applied. To copy one or more patches from a source of patches, such as the Sun patch server, to the system where the patches are to be applied. Directory in which patches are stored when they are downloaded from the patch source. This is also the directory from which patches are applied. The default location is /var/sadm/spool. A repository of certificates and keys that is queried when you attempt to apply a signed patch.
nonstandard patch Nonstandard patches cannot be installed using the patchadd command. Nonstandard patches, those that are typically used to deliver firmware or software application fixes that are not delivered in package format, must be installed by using the instructions that are specified in the patch README file. order package patch patch analysis patch dependency patch ID patch incompatibility patch list To sort a set of patches in an order suitable for applying patches. The form in which software products are delivered for installation on a system. The package contains a collection of files and directories in a defined format. An update to software that corrects an existing problem or that introduces a feature. A method of checking a system to determine which patches are appropriate for the system. An instance where a patch depends on the existence of another patch on a system. A patch that depends on one or more patches can only be applied to a system when those other patches have already been applied. A unique alphanumeric string, with the patch base code first, a hyphen, and a number that represents the patch revision number. A rare situation where two patches cannot be on the same system. Each patch in the relationship is incompatible with the other. If you want to apply a patch that is incompatible with a patch already on the system, you must first remove the patch that is already on the system. Then, you can apply the new patch. A file that contains a list of patches, one patch ID per line. Such a list can be used to perform patch operations. The list can be generated based on the analysis of a system or on user input. Each line in a patch list has two columns. The first column is the patch ID, and the second column is a synopsis of that patch. patch obsolescence An instance where a patch replaces another patch, even if it has not already been applied to a system. A patch that obsoletes one or more patches replaces those patches entirely and does not require that the obsolete patches be applied before the replacement patch is applied. patch server A source of Solaris patches that can be used by your systems to perform patch analyses and from which to obtain the appropriate patches.
427
signed patch
signed patch
A patch that is signed with a valid digital signature. A signed patch offers greater security than an unsigned patch. The digital signature of the patch can be verified before the patch is applied to your system. A valid digital signature ensures that the signed patch has not been modified since the signature was applied. Signed patches are stored in Java Archive (JAR) format files. A change to software that you apply that corrects an existing problem or that introduces a feature. Patches with properties that indicate they must be installed in single-user mode. Also, patches that require you to restart the system after the patch has been applied are referred to as having special handling requirements. Standard patches are those that adhere to the Solaris patch specification and are installable by using the patchadd command. Note that nonstandard patches cannot be installed by using the patchadd command A notification to customers of a known product issue that might negatively impact customers' computing environments or productivity. A problem that warrants a Sun Alert notification meets the criteria for issues that are related to at least one of these concerns: availability, security, and data loss. The Sun Microsystems patch portal web site that provides access to patch, patch information, and patch clusters. See http://sunsolve.sun.com for more information. A patch that is not signed with a digital signature. A system that is used to connect your system to the Internet. Your system cannot connect directly to the Internet, but must use the web proxy to establish the connection.
1. (Optional) Set up the package If you plan to apply signed patches to your How to Import a Trusted keystore. system, you must first import Sun's Root CA Certificate to Your Package certificate into your package keystore. Keystore on page 429 2. (Optional) Specify a web proxy. 3. Download and apply a patch. If your system is behind a firewall with a web How to Specify a Web proxy, you must specify the web proxy to Proxy on page 431 obtain patches from the Sun patch server. You can download and apply a patch to your How to Download and system by using the patchadd command. Apply a Solaris Patch on page 432 If you want information about the patches that have already been applied to your system, use the patchadd, showrev, or pkgparam command. How to Display Information About Solaris Patches on page 434
4. (Optional) Display information about patches that have been applied to your system.
428
Task
Description
For Instructions
If necessary, remove a patch from your system by using the patchrm command.
How to Remove a Solaris Patch by Using the patchrm Command on page 434
1 2
Become superuser or assume an equivalent role. If you are using the patchadd command to install signed patches, add the new trusted Verisign certificate to the keystore. a. Download the Class 2 Public Primary Certification Authority - G2 trusted Verisign certificate from http://www.sun.com/pki/certs/ca/. The Subject Name of this certificate is:
C=US, O=VeriSign, Inc., OU=Class 2 Public Primary Certification Authority - G2, OU=(c) 1998 VeriSign, Inc. - For authorized use only, OU=VeriSign Trust Network
b. Select the binary format (DER encoded). c. Copy the certificate to the file, /tmp/root.crt.
Note In the event you are unable to download the trusted Verisign certificate, see Exporting the Root CA Certificate From the Java Keystore on page 430 for alternate instructions. 3
Import the Root CA certificate from the temporary file to the package keystore. Unless changed by the system administrator, the default Java keystore password is changeit. For example:
# pkgadm addcert -t -f der /tmp/root.crt Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1
Chapter 21 Managing Solaris Patches by Using the patchadd Command (Tasks) 429
SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D Are you sure you want to trust this certificate? yes Trusting certificate </C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O> Type a Keystore protection Password. changeit Press ENTER for no protection password (not recommended): For Verification: Type a Keystore protection Password. Press ENTER for no protection password (not recommended): Certificate(s) from </tmp/root.crt> are now trusted
-t -f format certfile
4
Indicates that the certificate is a trusted CA certificate. The command output includes the certificate details, which you are asked to verify. Specifies the format of the certificate or private key. When importing a certificate, it must be encoded using either the PEM (pem) or binary DER (der) format. Specifies the file that contains the certificate.
# pkgadm listcert Enter Keystore Password: storepass Keystore Alias: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Certificate Type: Trusted Certificate Issuer Common Name: /C=US/O=VeriSign, Inc./OU=Class 2 Public Primary Certification Authority - G2/O Validity Dates: <May 18 00:00:00 1998 GMT> - <Aug 1 23:59:59 2028 GMT> MD5 Fingerprint: 2D:BB:E5:25:D3:D1:65:82:3A:B7:0E:FA:E6:EB:E2:E1 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D 5
Exports the trusted certificate. Specifies the password that protects the integrity of the Java keystore. Identifies the alias of the trusted certificate. Specifies the name and location of the keystore file. Identifies the file in which to hold the exported certificate.
You are now ready to import the Root CA certificate from the temporary file to the package keystore. See the remaining steps in the section, How to Import a Trusted Certificate to Your Package Keystore on page 429, for instructions.
1 2
Become superuser or assume an equivalent role. Use one of the following methods to specify a web proxy:
Specify the web proxy by using the http_proxy, HTTPPROXY, or HTTPPROXYPORT environment variable. For example:
# setenv http_proxy http://mycache.domain:8080
Specify the web proxy on the patchadd command line. For example:
# patchadd -x mycache.domain:8080 \ -M http://www.sun.com/solaris/patches/latest 101223-02 102323-02
431
Upgrade any systems that are not running at least the Solaris 10 1/06 OS to the Solaris 10 1/06 release. If you are running the Solaris 10 initial 3/05 release, you can install the following patch to enable the use of commands that accept the -R option for creation of an alternate root path.
For SPARC based systems Install at least revision 19 of patch 119254. For x86 based systems Install at least revision 19 patch 119255.
Boot an alternate root, for example the Solaris 10 release, as the active OS. You can then install and uninstall packages and patches without using the -R option.
For more information, see the patchadd(1M), patchrm(1M), pkgadd(1M), and pkgrm(1M) man pages.
Log in to the system where you want to apply the patch. Download the patch and use the ftp command to copy the patch to the target system.
Start a web browser and go to the SunSolve Online Patch Portal at http://sunsolve.Sun.COM.
432
Determine whether to download a specific patch or a patch cluster, then do one of the following:
Type the patch number (patch-id) in the Find Patch search field, then click Find Patch. Entering patch-id downloads the latest patch revision. If this patch is freely available, the patch README appears. If this patch is not freely available, an ACCESS DENIED message appears. Note that patch numbers for SPARC based and x86 based systems are different. The patch IDs are listed in the patch README. Ensure that you apply the patch that matches your system architecture.
Select the Recommended Patch Cluster that matches the Solaris release that is running on the system that you want to patch.
To download a copy of the signed patch, click the Download Signed Patch (n bytes) button. To download an unsigned patch, click the Download Patch (n bytes) button.
When the patch or patches are successfully downloaded, close the web browser.
5 6 7
Change to the directory that contains the downloaded patch. Become superuser or assume an equivalent role. (Unsigned patch) If you downloaded an unsigned patch, unzip the patch.
# unzip patch-id
433
Verify that the patch has been successfully applied. For example:
# patchadd -p | grep 111879 Patch: 111879-01 Obsoletes: Requires: Incompatibles: Packages: SUNWwsr
patchadd -p or showrev -p Shows all patches that have been applied to the system. pkgparam pkgid PATCHLIST Shows all patches that have been applied to the package identified by pkgid, for example, SUNWadmap.
patchadd -S Solaris-OS -p Shows all the /usr patches that have been applied to an OS server.
Use one of the following patchadd command lines to display information about patches that have been applied to your system.
To obtain information about all patches that have been applied to your system, type:
$ patchadd -p
To verify whether a particular patch has been applied to your system, type, for example:
$ patchadd -p | grep 111879
1 2
434
Backing out patch 111879-01... Patch 111879-01 has been backed out. 3
435
436
A P P E N D I X
SMF Services
The following table lists some of the services that have been converted to use SMF. Each service includes the daemon or service name, the FMRIs for that service, the run script that is used to start the service, and whether the service is started by inetd.
TABLE A1
SMF Services
FMRI Run Script inetd Service
Service Name
automount consadmd coreadm cron cryptoadm cvcd dcs dtlogin dtprintinfo dtspcd dumpadm efdaemon fmd gssd
Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Applicable Not applicable Not applicable Applicable Not applicable Not applicable Not applicable Applicable
svc:/application/graphical-login/cde-login:default dtlogin svc:/application/cde-printinfo:default svc:/network/cde-spc:default svc:/system/dumpadm:default svc:/platform/<arch>/efdaemon:default svc:/system/fmd:default svc:/network/rpc/gss:default dtlogin None savecore efcode N/A None
437
SMF Services
TABLE A1
SMF Services
FMRI
(Continued)
Run Script inetd Service
Service Name
imapd
svc:/network/imap/tcp:default svc:/network/imapnew/tcp:default
None
Applicable
in.chargend
svc:/network/chargen:dgram svc:/network/chargen:stream
None
Applicable
in.comsat in.daytimed
None None
Applicable Applicable
in.dhcpd in.discardd
dhcp None
in.echod
svc:/network/echo:dgram svc:/network/echo:stream
None
Applicable
Applicable Applicable Not applicable Not applicable Not applicable Applicable Applicable
in.routed in.rshd
inetinit None
438
SMF Services
TABLE A1
SMF Services
FMRI
(Continued)
Run Script inetd Service
Service Name
in.timed
svc:/network/time:dgram svc:/network/time:stream
None
Applicable
in.tnamed in.uucpd inetd-upgrade inetd intrd ipop3d kadmind kbd keyserv kpropd krb5kdc ktkt_warnd ldap_cachemgr loadkeys lockd
svc:/network/tname:default svc:/network/uucp:default svc:/network/inetd-upgrade:default svc:/network/inetd:default svc:/system/intrd:default svc:/network/pop3/tcp:default svc:/network/security/kadmin:default svc:/system/keymap:default svc:/network/rpc/keyserv:default svc:/network/security/krb5_prop:default svc:/network/security/krb5kdc:default svc:/network/security/ktkt_warn:default svc:/network/ldap/client:default svc:/system/keymap:default svc:/network/nfs/client:default svc:/network/nfs/server:default
None None N/A inetsvc None None kdc.master keymap rpc None kdc None ldap.client keymap nfs.server
Applicable Applicable Not applicable Not applicable Not applicable Applicable Not applicable Not applicable Not applicable Applicable Not applicable Applicable Not applicable Not applicable Not applicable
Not applicable Not applicable Not applicable Not applicable Not applicable
mountd nfsd
svc:/network/nfs/server:default svc:/network/nfs/server:default
nfs.server nfs.server
439
SMF Services
TABLE A1
SMF Services
FMRI
(Continued)
Run Script inetd Service
Service Name
nfsmapid
svc:/network/nfs/client:default svc:/network/nfs/server:default
nfs.server
Not applicable
nis_cachemgr nscd ntpdate ocfserv picld pmconfig printd quotaon rcapd rpcbind rpc.bootparamd rpc.mdcomm rpc.metad rpc.metamedd rpc.metamhd rpc.nisd rpc.nispasswdd rpc.rexd rpc.rstatd rpc.rusersd rpc.smserverd rpc.sprayd rpc.ttdbserverd rpc.walld rpc.yppasswdd and rpc.ypupdated
svc:/network/rpc/nisplus:default svc:/system/name-service-cache:default svc:/network/ntp:default svc:/network/rpc/ocfserv:default svc:/system/picl:default svc:/system/power:default svc:/application/print/cleanup:default svc:/system/filesystem/local:default svc:/system/rcap:default svc:/network/rpc/bind:default svc:/network/rpc/bootparams:default svc:/network/rpc/mdcomm:default svc:/network/rpc/meta:default svc:/network/rpc/metamed:default svc:/network/rpc/metamh:default svc:/network/rpc/nisplus:default svc:/network/rpc/nisplus:default svc:/network/rpc/rex:default svc:/network/rpc/rstat:default svc:/network/rpc/rusers:default svc:/network/rpc/smserver:default svc:/network/rpc/spray:default svc:/network/rpc/ttdbserver:tcp svc:/network/rpc/wall:default svc:/network/nis/server:default
rpc nscd xntpd ocfserv picld power spc ufs_quota rcapd rpc boot.server None None None None rpc rpc None None None None None None None rpc
Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Applicable Applicable Applicable Applicable Not applicable Not applicable Applicable Applicable Applicable Applicable Applicable Applicable Applicable Not applicable
440
SMF Services
TABLE A1
SMF Services
FMRI
(Continued)
Run Script inetd Service
Service Name
Applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable
svc.startd syseventd
svc:/system/svc/restarter:default svc:/system/sysevent:default
Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable Not applicable
sysidpm, sysidns, svc:/system/sysidtool:system sysidroot, sysidsys sysidnet syslogd ttymon utmpd vold xntpd ypbind ypserv ypxfrd zoneadm None None svc:/system/sysidtool:net svc:/system/system-log:default svc:/system/console-login:default svc:/system/utmp:default svc:/system/filesystem/volfs:default svc:/network/ntp:default svc:/network/nis/client:default svc:/network/nis/server:default svc:/network/nis/server:default svc:/system/zones:default svc:/network/loopback:default svc:/network/physical:default
sysid.net syslog inittab utmpd volmgt xntpd rpc rpc rpc N/A network network
441
442
Index
A
active menu.lst file, location of, 216 adding a package, example of, 414 a package from a mounted CD (example of), 413 diskless client OS services (how to), 151 multiple versions of a package, 374 packages (prerequisites), 374 packages from a spool directory (example of), 417 packages from remote package server (example of), 414 packages to a spool directory (example of), 419 packages with administration files, 375 run control script (how to), 356 user initialization files, 102 adding and removing packages and patches restrictions on zones, 375 adding GRUB menu entries, findroot command, 221-222 adding missing ARCH=all packages (example of), 167-168 administering GRUB, reference, 186-187 administration file, keyword, 374 aging user passwords, 94, 126, 127 aliases, user login names vs., 87 appliances, definition, 137
application access, Java Web Console, 80 application access to remote systems, Java Web Console, 80 application privileges, Java Web Console, 80 applying patches to diskless clients, 423 using patchadd, 432-434 ARCH=all packages, how to add missing, diskless client troubleshooting, 164-172 archive booting the failsafe archive GRUB, 254-255 Solaris failsafe and primary description, 185-186 audit events, Java Web Console, 66 auditing implementation, Java Web Console, 65 authTypes tag, Java Web Console, 81 automounting, user home directories, 93
B
banner command (PROM), 202 base directory (basedir), 374, 376 basedir keyword (administration files), 374 bin group, 87 BIOS system BIOS in GRUB boot environment, 289-290 boot archive, how to rebuild a corrupt, 256-258 boot archives managing, 273-287
443
Index
boot archives (Continued) types of, 185-186 boot archives, managing, booting the failsafe archive, 273-274 boot behavior editing the GRUB menu.lst file how to, 216-219 how to modify in GRUB menu, 213-214, 250-253 managing, 201-222 boot behavior, modifying on x86 based systems, 209-222 boot-file property, changing, 208 boot options -L ZFS root file system, 231-235 -Z ZFS root file system, 231-235 boot process, x86, 322 boot-time interactions, GRUB menu, 215 bootadm command using to manage boot archives, 275-278 using to manage the boot archives, 273-287 bootadm update-archive, updating boot archive on root (/) mirror., 279-285 bootfs pool property, 189 booting 64-bit x86 based system in 32-bit mode (example of), 313 a diskless client (how to), 159 a system, guidelines, 178 interactively (how to) SPARC, 227 the Solaris Device Configuration Assistant (how to) x86, 308 to run level S SPARC, 226 booting a system by using GRUB, overview, 294-296 booting a system to run level S GRUB based booting how to, 244-246 booting an x86 based system interactively with GRUB, 246-249 booting from a ZFS root file system SPARC boot options, 189-190
444
booting from a ZFS root file system (Continued) x86 boot options, 190 booting from the network with GRUB, 258-262 DHCP configuration, 259 booting from ZFS root file system, SPARC platform, 231-235 booting the failsafe archive GRUB based booting, 254-255 SPARC based systems, 236-239 to rebuild a corrupt boot archive, 256-258 booting with GRUB, reference, 186-187 Bourne shell See also user initialization files basic features, 104, 105 Break key, 263
C
C shell basic features, 104, 105 environment variables and, 105, 106, 109 shell (local) variables and, 105, 106 user initialization files and, 102, 111 See user initialization files creating, 104 to reference a site initialization file, 103 CD-ROM devices adding software from mounted CD example of, 413 CDPATH environment variable, 106 certificate, trusted, definition, 369 changing directory ownership for user accounts, 124 file ownership for user accounts, 124 Java Web Console properties session timeout period, 67 user ID numbers, 124 user login names, 124 user passwords by user, 91 frequency of, 91 Users Tool, 126 changing boot properties, 208
Index
changing Java Web Console properties, choosing an auditing implementation, 65 checking, installed packages (example of), 419 class macro, configuring DHCP, 260 clean shutdown, 192 client macro, configuring DHCP, 260 commands (SMF), list of, 332 compatibility with other applications, Java Web Console, 57 components of GRUB, 292-293 configuration repository (SMF), See repository configuring DHCP, booting from the network with GRUB, 259-261 configuring Java Web Console, 64 console access, Java Web Console, 79 console session timeout, changing Java Web Console properties, 65 controlling file and directory access, 109 corrupt boot archive, how to rebuild, 256-258 .cshrc file customizing, 104, 111 description, 102
D
daemon group, 87 definitions of patch-related terms, 426-428 delegated restarters (SMF), 333 deleting diskless client OS services (example of), 160 diskless client OS services (how to), 160 user home directories, 124 user mailboxes, 124 dependency statements (SMF), description, 326 determining, system's run level (how to), 336 device naming conventions, in GRUB, 292-293 dfstab file, user home directory sharing and, 121 DHCP, configuring a GRUB based PXE boot, 259 DHCP macros, using in GRUB, 259-261 digital signature, of signed patches, 424 directories base directory (basedir), 374 changing ownership for user accounts, 124 controlling access to, 109
directories (Continued) home, 92 PATH environment variable and, 107, 108 skeleton, 102 disabling run control script (how to), 357 user accounts passwords and, 124 Users tool, 124 diskless client management commands smosservice add OS services, 141 diskless client troubleshooting, how to add missing ARCH=all packages, 164-172 diskless clients adding OS services for (how to), 151 applying patches to, 423 booting (how to), 159 definition, 136 deleting OS services (example of), 160 deleting OS services (how to), 160 displaying environment variables, 105 installed software information, 417 list of patches using patchadd, 434 user mask, 109 displaying a list of available BEs booting a ZFS root boot -L option, 189-190 downloading patches using patchadd, 432
E
editing the menu.lst file, modifying boot behavior, 216-219 eeprom command how to use to set boot parameters GRUB, 210-211 modifying boot behavior, 209-211 encryption, 94 env command, 105
445
Index
environment variables description, 105, 109 LOGNAME, 106 LPDEST, 106 PATH, 107, 108 SHELL, 107 TZ, 107 /etc/dfs/dfstab file, user home directory sharing and, 121 /etc files user account information and, 92 /etc/init.d directory, 356 /etc/inittab file entry description, 336 example of default, 337 /etc/passwd file description, 94 fields in, 94 user ID number assignment and, 88 recovering SPARC, 265 recovering (example of) x86, 257, 310 deleting user accounts and, 124 /etc/shadow file, description, 94 /etc/skel directory, 102 /etc/vfstab file, 122 /export/home file system, 92
findroot command adding GRUB menu entries, 221-222 menu.lst entries, 219-221 FMRI, description, 328-329 forget root password, SPARC, 265 functional components of GRUB, 292-293
G
GIDs, 87 assigning, 90 definition, 90 large, 88 glossary of patch-related terms, 426-428 group file deleting user accounts and, 124 description, 94 fields in, 96 group ID numbers, 87, 90 groups changing primary, 90 default, 90 description, 90 description of names, 90 displaying groups a user belongs to, 90 guidelines for managing, 90 ID numbers, 87, 90 name services and, 90 names description, 90 primary, 90 secondary, 90 storage of information for, 94, 96 UNIX, 90 groups command, 90 GRUB modifying boot behavior editing the menu.lst file, 216-219 support for multiple operating systems, 293-294 GRUB based booting about DHCP macros, 259-261 booting a system interactively, 246-249 booting the failsafe archive, 254-255 how to boot a system run level S, 244-246
F
failsafe archive booting on SPARC based systems, 236-239 GRUB based booting recovery, 254-255 GRUB reference description, 185-186 failsafe archives, booting, 273-274 fault management resource identifier, See FMRI files changing ownership for user accounts, 124 controlling access to, 109 verifying attributes for newly installed packages, 419
446
Index
GRUB based booting (Continued) how to rebuild a corrupt boot archive, 256-258 modifying kernel Behavior in the GRUB menu at boot time, 211-212 modifying the GRUB kernel behavior at boot time, 213-214, 250-253 GRUB-based booting, reference, 186-187 GRUB based network boot, 258-262 GRUB device naming conventions, 292-293 GRUB functional components, 292-293 GRUB menu description of, 215 modifying GRUB kernel behavior, 211-212 GRUB terminology, 290-291 GRUBClient, GRUB based network boot, 258-262
J
Java Web Console (Overview), 56 access to applications, 80 access to console, 79 application access to remote systems, 80 application privileges, 80 authorizing users of applications, 81 changing properties of auditing implementation, 65 console session timeout, 65 logging level, 65 changing the user identity that runs the console, 68 compatibility with other applications, 57 configuring, 64 configuring properties, 66-68 differences between default logging and debug logging, 65 disabling the console service, 63-64 enabling the console service, 62-63 internal passwords, 81 legacy applications, 75 listing deployed applications, 75-76 managing the console service, 62-64 noaccess user identity, 68 properties, 72-74 reference information, 79-84 registering applications, 76-77, 78 security considerations, 79 starting applications from, 59 starting the console service, 62 status, 72-74 stopping the console service, 63 troubleshooting, 72 unregistering applications, 77-78, 78-79 using authTypes tag, 81 Java Web Console commands smcwebserver, 58 smreg, 58 wcadmin, 58
H
halt command, 193 history environment variable, 106 HOME environment variable, 106 /home file system, user home directories and, 92 how to use GRUB to boot a system to run level s, 244-246
I
ID numbers group, 87, 90 user, 87, 88, 124 implementations of GRUB in Solaris OS, 294-296 inetadm command, description, 332 init command description, 193 shutting down a stand-alone system, 198 init states, See run levels initialization files, system, 93 interactive boot, booting an x86 based system with GRUB, 246-249 IP macro, configuring DHCP, 260
K
kernel behavior, modifying in GRUB menu, 211-212
447
Index
kernel initialization in the GRUB boot environment, 290 key, user, See user key keystore, 369 Korn shell basic features, 104 user initialization files and, 102
L
L1-A keys, 263 -L boot option, booting a ZFS root file system on SPARC platform, 231-235 -L option ZFS boot options displaying available BEs, 189-190 LANG environment variable, 106, 108, 109 LC environment variables, 108, 109 legacy applications, Java Web Console, 75 library interfaces, SMF, 332 listing, package information (example of), 417 *LK* password, 124 local.cshrc file, 102 local.login file, 102 local.profile file, 102 locale environment variable, 106 location of active menu.lst file, 216 .login file customizing, 104, 111 description, 102 login names (user) changing, 124 description, 87 LOGNAME environment variable, 106 LPDEST environment variable, 106
M
macros, DHCP, 259-261 mail aliases, user login names vs., 87 MAIL environment variable, 106 managing boot behavior, 201-222 managing Java Web Console service, 62-64
448
managing the boot-archive service, 275-278 managing the boot archives, tasks, 273-287 manifests (SMF), description, 329 MANPATH environment variable, 106 manually update the boot archives, systems with mirrored root (/) partitions, 279-285 maximums secondary groups users can belong to, 90 user ID number, 87 user login name length, 93 user password length, 91 menu GRUB description of, 215 menu.1st, GRUB component, 292-293 menu.lst file adding entries that use the findroot command, 221-222 and boot-time interactions description, 215 location, 216 modifying boot behavior, 216-219 multiboot implementation, 295-296 minimums user login name length, 93 user password length, 91 mirrored root (/) partition, updating the boot archives, 279-285 modifying boot behavior editing the GRUB menu.lst file how to, 216-219 in GRUB menu at boot time, 209-211 modifying boot behavior (Task Map), 209-222 modifying kernel usage in the GRUB menu, 213-214, 250-253 mounting user home directories automounting, 93 user home directories (how to), 122 multiboot implementation, menu.lst file description, 295-296 multiple operating systems in the GRUB boot environment, 293-294 multiple versions of software packages, 374, 376
Index
P
packages adding See also pkgadd command definition of, 368 overview, 368 signed See packages, signed packages, signed, overview, 369 passwd file, 94 deleting user accounts and, 124 fields in, 94 recovering SPARC, 265 recovering (example of) x86, 257, 310 user ID number assignment and, 88 passwords (user) aging, 94, 126, 127 changing frequency of, 91 by user, 91 Users Tool, 126 choosing, 91 description, 91, 127 disabling/locking user accounts and, 124 encryption, 94 *LK* password, 124 precautions, 91 setting, 91, 126 Users Tool, 126 patch lists displaying using patchadd, 434 patch management tools, road map, 426 patchadd command, tasks using, 428-435 patches accessing Solaris, 424-426 definition of, 424 displaying information about, 434 downloading using patchadd, 432 managing, 426 numbering scheme, 425
449
N
name services groups and, 90 user accounts and, 92, 94 names group description, 90 software package naming conventions, 374 SUNW prefix, 374 user login changing, 124 description, 87 naming conventions for devices, in GRUB, 292-293 Navigation pane of Solaris Management Console, nodes, 35 network boot, with GRUB, 258-262 network macro, configuring DHCP, 260 new features, SMF, 325 newgrp command, 90 NIS user accounts and, 92, 94 NIS+ groups and, 90 user accounts and, 124 noaccess user/group, 87 and Java Web Console, 68 noask_pkgadd administration file, 375, 414 nobody user/group, 87 nodes, Navigation pane of Solaris Management Console, 35 normal archive in GRUB boot archive reference, 185-186 notifying users of system down time, 193
O
OS server, description, 141
Index
patches (Continued) patch README files, 425 signed, 424 applying, 369 terms used with, 426-428 unsigned, 424 PATH environment variable description, 107 setting up, 108 path shell variable, 105 permissions, 109 /pkg directory, 417 pkgadd command -d option (device name), 412, 415, 416 -s option (spool directory), 415, 416 adding packages (how to), 412 using an HTTP URL, 415 alternate base directory and, 376 bypassing user interaction, 375, 376 overview, 372 -a option (administration file), 375, 376, 412, 414 prerequisites for using, 374 spool directories and, 415 spool directories and (example of), 417 pkgadm command, overview, 372 pkgchk command overview, 372 using (example of), 419 pkginfo command displaying all packages installed (example of), 417 how to use, 417 overview, 372, 374 pkgparam command, overview, 372 pkgrm command caution, 374 overview, 372 prerequisites for using, 374 rm command (compared), 374 pkgtrans command, overview, 372 poweroff command, 193 primary administrator role creating (overview), 41 granting rights, 41 primary groups, 90
450
prodreg command, overview, 372 .profile file customizing, 104, 111 description, 102 profiles (SMF), description, 330 PROM, finding the PROM revision, 203 prompt shell variable, 107 properties, changing the boot-file property, 208 PS1 environment variable, 107 pseudo-ttys, 88 pseudo user logins, 88 PXEClient, GRUB based network boot, 258-262
R
reboot command, 193 rebuilding corrupt boot archive (how to), 256-258 recover root password (how to), SPARC, 265 recovering booting the failsafe archive GRUB based booting, 254-255 reference, administering GRUB, 186-187 remote package server adding packages to a spool directory (example of), 416 software installation from, 414 software installation from (example of), 414 removef command, 374 removing packages with administration files and, 376 patches using patchrm, 434-435 software packages guidelines for, 374 removing and adding packages and patches restrictions on zones, 375 repairing the /etc/passwd file SPARC, 265 x86, 257, 310 repository (SMF) description, 326, 330 reset command, 207 resetting, a SPARC based system, 207
Index
restarters (SMF), 333 description, 326 restrictions, on adding and removing packages and patches, 375 root password, forget, SPARC, 265 run control scripts adding (how to), 356 disabling (how to), 357 starting and stopping services, 355 run level 0 (power-down level), 334 1 (single-user level), 334 2 (multiuser level), 334 3 (multiuser with NFS), 335 booting to, 158, 225, 242, 299 what happens when system is brought to, 337 6 (reboot level), 335 default run level, 334 definition, 334 determining (how to), 336 s or S (single-user level), 334 booting to, 302 s or S (single-user state) booting to, 226
S
secondary groups, 90 security, user ID number reuse and, 88 security considerations, Java Web Console, 79 selecting a logging level, changing Java Web Console properties, 65 servers, OS server, 141 service (SMF), description, 327 service configuration repository, See repository service management facility See SMF service states, description, 329 session timeout period, changing Java Web Console properties, 67 set command, 105 setenv command, 105, 106 Setting boot behavior by using eeprom command, GRUB based booting, 210-211
shadow file description, 94 fields in, 96 sharing, user home directories (how to), 120 SHELL environment variable, 107 shell variables, 106 shells basic features, 104, 105 environment of, 105 environment variables and, 105, 109 local variables, 105, 106 user initialization files and, 111 shutdown command description, 193 notifying users, 193 shutting down a server, 177 shutting down a server (how to), 194 shutting down a system, guidelines, 177-178 a system cleanly with shutdown and init commands, 192 signed patches, 424 See also patches when to use, 426 single sign-on, secure https port, Java Web Console, 57 single-user level, See run level s or S site initialization files, 103 /skel directory, 102 skeleton directories (/etc/skel), 102 smcwebserver command, Java Web Console, 58 SMF commands, 332 delegated restarters, 333 library interfaces, 332 overview, 325 smreg command Java Web Console, 58, 77 SMV mirrored root (/) metadevice, updating the boot archive, 279-285 snapshots (SMF), description, 331 software management naming conventions for packages, 374 packages and, 368
451
Index
software management (Continued) tools for, 372 software packages installing, 417 installing from a spool directory (example of), 416 Solaris boot archives failsafe and normal reference, 185-186 Solaris boot behavior, how to manage, 201-222 Solaris Device Configuration Assistant, overview, 308-309 Solaris Management Console description, 31 description of tools, 32 reasons for using, 34 starting (how to), 44 using with RBAC, 40 SPARC boot options, booting from a ZFS root file system, 189-190 spool directories installing software packages to (example of), 417, 419 installing software packages to (how to), 415 staff group, 90 stage2, GRUB component, 292-293 stand-alone systems, definition, 136 starting and stopping services, 355 starting applications, Java Web Console launch page, 59 Stop-A keys, 263 stopping a system for recovery purposes SPARC, 263 a system for recovery purposes (how to) x86, 263, 309 strategies, for using Solaris patches, 423 stty command, 108 Sun Java Web Console, 55 Sun software packages adding (example of), 413 installing, 414 SUNW prefix, 374 superuser (root) password, forget, SPARC, 265 svc.startddaemon, description, 332-333
452
svcadm command, description, 332 svccfg command, description, 332 svcprop command, description, 332 svcs command, description, 332 sync command, 266 synchronize file systems with sync command, 266 system accounts, 87 system BIOS in GRUB boot environment, 289-290 system initialization files, 93 system shutdown commands, 193 system types appliance, 137 diskless client, 136 guidelines for choosing, 137 overview, 135 stand-alone system, 136
T
TERM environment variable, 107 TERMINFO environment variable, 107 terminology, GRUB, 290-291 time zone environment variable, 107 troubleshooting a failed 64-bit boot, 316 diskless client general problems, 168 Java Web Console, 72 troubleshooting diskless client installation problems, adding missing ARCH=all packages (how to), 164-172 ttys (pseudo), 88 ttytype pseudo user logins, 88 TZ environment variable, 107
U
UIDs, 124 assigning, 88 definition, 87 large, 88 umask command, 109 UNIX groups, 90
Index
unregistering an application from the Java Web Console, 77 unsigned patches, 424 when to use, 426 updating the boot archives, mirrored root partition, 279-285 user accounts, 86 description, 86, 87 disabling/locking passwords and, 124 Users Tool, 124 guidelines for, 93 ID numbers, 87, 88, 124 login names, 87, 124 name services and, 92, 94 setting up information sheet, 114 storage of information for, 92 user home directories changing ownership of, 124 customized initialization files in, 102 deleting, 124 description, 92 mounting automounting, 93 mounting (how to), 122 nonlocal reference to ($HOME), 92, 104 sharing (how to), 120 user ID numbers, 87, 88, 124 user initialization files Bourne shell, 102 customizing, 102, 111 adding customized files, 102 avoiding local system references, 104 environment variables, 105, 109 overview, 103 shell variables, 106, 107 site initialization files, 103 user mask setting, 109 default, 102 description, 92, 93, 102 examples, 110 shells and, 103, 104, 111 user key, 369
user login names changing, 124 description, 87 user logins (pseudo), 88 user mask, 109 Users Tool disabling accounts, 124 password administration, 126 uucp group, 88
V
/var/sadm/install/admin directory, 375 /var/sadm/patch directory, 425 /var/spool/pkg directory, 415, 417 variables environment, 105, 109 shell (local), 105 verifying software installation (example of), 419 software package installation pkginfo command, 415 software package installation with pkginfo command, 415 viewing patch lists using patchadd, 434
W
wcadmin command, Java Web Console, 58 web-based system management applications, Java Web Console, 56 who command, 194, 336
X
x86 boot options, booting from a ZFS root file system, 190
453
Index
Z
-Z boot option, booting a ZFS root file system on SPARC platform, 231-235 -Z option, ZFS boot options, 189-190 ZFS booting on SPARC platform, boot options used, 231-235 ZFS root file system, booting from on SPARC platform, 231-235 zones, restrictions on adding and removing packages and patches, 375
454