Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 781
  • Last Modified:

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

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
FranHill
Asked:
FranHill
1 Solution
 
ckiralCommented:
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
 
Brian UtterbackPrinciple Software EngineerCommented:
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
 
Joseph GanSystem AdminCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now