Solved

Proper sequence to boot from run level 3 to single user mode.

Posted on 2010-11-17
3
769 Views
Last Modified: 2013-12-27
Hi, I was told by my tech lead that if you boot into single user mode  from run level 3 usnig init -s
that once you reach single user mode you are not truely in single user mode because there is a bug in the OS..  He said that the only way it should be done is to init 0 and then boot too single user mode from the boot prompt.  Has anyone heard of such a bug in the OS or know anything about the bug ? The reason for my concern is that we are trying to automate the patching where once booted into single user mode it will attempt to install the monthly patch cluster and would prefer to boot into single user mode to stream line the automation
0
Comment
Question by:FranHill
3 Comments
 
LVL 2

Expert Comment

by:ckiral
Comment Utility
Never heard of it, additionnaly official sun documents recommends using init S from run level 3 as you mentioned to switch in single user mode for patch installations.

http://sunsolve.sun.com/search/document.do?assetkey=1-71-1019146.1-1

---

 Using appropriate run level for patching

Description
Some patches such as the kernel updates need to be installed in single user mode.
Purpose/Scope:

This document describes the steps to use the appropriate run level during the patching operations.


Available Documentations:

The Manage Solaris Patches by Using the patchadd Command chapter in the Solaris System Administration Guide: Basic Administration manual provides further detail on patch installation on a Solaris system.


Steps to Follow
Please validate that each troubleshooting step below is true for your environment. Each step will provide instructions via a link to the document, for validating the step and taking corrective action as necessary. The steps are ordered in the most appropriate sequence to isolate the issue and identify the proper resolution. Please do not skip a step
1. Refer to the README file for the requirement of appropriate installation mode.
In general, kernel patches and patch clusters require installation in single user mode (or run level S).   Most other patches can be safely installed in multi user mode.  However, it is always necessary to check the installation requirement for every patch.  Such requirement is stated in the 'Installation Requirements' and 'Special Installation Instructions' section of the patch's associated README file.

For example, the README file for 120011-14 shows that this patch needs to be installed in single user mode.

(host1) /share/patches/120011/120011-14 $ ls README*
README.120011-14

............
Install Requirements: See Special Install Instructions
                      Reconfigure immediately after patch is installed, an alternative may be in Special Install Instructions
                      Install in Single User Mode, an alternative may be in Special Install Instructions
............
Special Install Instructions:
-----------------------------

NOTE 1:  Perform patch installation in single user mode.

NOTE 2:  Reconfigure the system (boot -r) immediately after patch installation.
............
2. Verify system's current run level with the command line utility 'who'.  For details of the utility, please refer to the manpage.
The following example shows that the system is at run level 3.
# who -r
   .       run-level 3  Apr  2 14:19     3      0  S
The following example shows that the system is at run level S.

# who -r
   .       run-level S  Apr  2 14:32     S      1  3
3. Bring the system to the single user mode if needed.
To switch the system to single user mode from multi user mode, you can use 'init S'.  Refer to the manpage for details.

The following example shows the process of bringing down to single user mode.

# init S
# svc.startd: The system is coming down for administration.  Please wait.
Apr  2 14:32:14 v4v-t1000c-sin06 syslogd: going down on signal 15
svc.startd: Killing user processes: done.
Requesting System Maintenance Mode
(See /lib/svc/share/README for more information.)
SINGLE USER MODE

Root password for system maintenance (control-d to bypass):
single-user privilege assigned to /dev/console.
Entering System Maintenance Mode

Apr  2 14:32:34 su: 'su root' succeeded for root on /dev/console
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
You have new mail.
4. If a patch needs to be installed in single user mode, it also needs to be removed in the same mode.

At this point, if you have validated that each troubleshooting step above is true for your environment, and the issue still exists, further troubleshooting is required.


Product
Solaris 10 Operating System
Solaris 9 Operating System
Solaris 8 Operating System
0
 
LVL 22

Expert Comment

by:blu
Comment Utility
Define "single user mode".  I don't know of a difference off hand, but I suppose it is possible
that coming down to single user mode might leave you in a different state than coming up
to single user mode. Might also depend on your OS rev. There are a number of system services that do not have stop methods as I recall in Solaris 9 and before.

In any case, you should be in single user mode as far as installing patches is concerned. The
reason to go into single user mode is that while patches are being installed, the system can
be in an inconsistent state, where the libraries and on-disk kernel do not match the in memory kernel. The effect of this on arbitrary user processes is unknown, and could lead to
data corruption. We therefore limit the exposure by preventing any user processes from
running during the patching process.

What OS rev are you using? If it is an option, you should really consider using live upgrade
to install you patches. This eliminates the need to go to single user mode at all and gives
you the previous un-patched system image as a backup in case something goes wrong.
0
 
LVL 16

Accepted Solution

by:
Joseph Gan earned 500 total points
Comment Utility
The difference of "init S" from multi-user mode and "init 0" then "boot -s" is, "init S" will have all filesystems mounted. But "init 0" and "boot -s" will only have OS of root, /usr and /var etc mounted. That is recommanded status for patching. If you use "init S" follow by "umountall" then will be the same. You can try "init S" to see.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now