HOME

  Solaris Forum  

  Newsletter  

 Tell a Friend

  Bookmark

Google Web adminschoice.com 
redarrow1.gif (101 bytes)redarrow1.gif (101 bytes) Day Light Saving Change in USA - Summary of changes with links to patches and information.
redarrow1.gif (101 bytes)redarrow1.gif (101 bytes) Application Monitoring - Challenges , best practices and implementation of application monitoring is discussed.
redarrow1.gif (101 bytes)Unix Commands - A quick reference to commonly used unix commands .
redarrow1.gif (101 bytes)Solaris Network Configuartion - Simplified : Quick reference to setting up network in Solaris system
Performance Monitoring -  iostat , vmstat & netstat - Introduction to performance monitoring tools with example and command  syntax.
crontab in Unix - A Quick Reference to setting up and using cron jobs in unix .
Veritas Volume Manager-1
Using vxdiskadm to add &  manage disks & disk groups .
Veritas Volume Manager-2
Using vxassist to create ,configure &  manage volumes .
Admin's Guide to Solstice Disk Suite: Complete practical reference including root mirroring and trouble shooting.
Securing Solaris
A few suggestions to make your Solaris system secure from internal and external intrusion.
 
Solaris Installation
Step by step guide to Solaris Installation.
Jumpstart Server
Network  installation of Solaris over one or multiple systems. 
Booting Process
Details of Solaris  booting process. 
Booting Problems in Solaris
Common booting related error messages and their possible solution
DNS Server
Setting up DNS server
Trouble Shooting DNS  Some of the configuration and nslookup related errors explained.
NIS+
Server , Clients setup and commands. 
OpenBoot Parameters
Reference table of important parameters and their values.
Solaris Error Messages
Alphabetical listing of common Solaris Error Messages and their explanation
Checking & Repairing File systems with fsck   fsck operation ,syntax and explanation of some common error messages
Vi Quick  Reference   
vi basics for  reference
explanations.
 
Open Directory   
Unix , Solaris Administration 
Sun.com   
BigAdmin
 
 
 
FAQs
unix , unix programming , VI  ,Sendmail  , Bind
ssh ,BASH ,Security, Secure unix programming, Unix socket 
SCSI
Solaris 2Solaris x86  ,NIS+ FreeBSD ,RedHat , HPUX
:
Unix
Unix History and timeline ,
Overview of the UNIX 
Microsoft Windows NT Server 4.0 versus UNIX
Overview of Unix Commands 
Unix for advance Users ,
Unix Bourne Shell Guide with Ksh ,
Korn Shell
BASH reference Guide
:
Solaris Documentation
Solaris 7 System Administration Collection
Solaris 8 System Administrator Collection
Solaris 9 System Administartion Collection
Creating Solaris Packages
Multibooting Solaris 
:
Sun
Sun System Handbook
Sun Hardware Info.
:
Documentation Home
Sun , BSD  ,Linux ,Hp,Veritas
:
Patches & Softwares
Solaris Patches , 
Solaris Freeware
GNU Software
big brother  , 
webmin .com
bugzilla.org
:
Certification Info 
Sun  ,Red Hat , HP

Booting process in Solaris

what happens when a system boots up

 

Understanding the booting process is important in the sense that you can get a clear idea when a system faces a booting problem if you are familiar with the booting sequence and steps involved. You can thereby isolate a booting phase and quickly resolve the issues.

Booting process in Solaris can be divided in to different phases for ease of study . First phase starts at the time of switching on the machine and is boot prom level , it displays a identification banner mentioning machine host id serial no , architecture type memory and Ethernet address This is followed by the self test of various systems in the machine.

This process ultimately looks for the default boot device and reads the boot program from the boot block which is located on the 1-15 blocks of boot device. The boot block contains the ufs file system reader which is required by the next boot processes.

The ufs file system reader opens the boot device and loads the secondary boot program from /usr/platform/`uname –i`/ufsboot ( uname –i expands to system architecture type)

The boot program above loads a platform specific kernel along with a generic solaris kernel 

The kernel initialize itself and load modules which are required to mount the root partition for continuing the booting process.

The booting process undergoes the following phases afterwards :

1) init phase
2) inittab file
3) rc scripts & Run Level
4.) Next Steps
 

 

 

 

 

 

INIT phase
Init phase is started by the execution of /sbin/init program and starts other processes after reading the /etc/inittab file as per the directives in the /etc/inittab file . 

Two most important functions of init are 

a) It runs the processes to bring the system to the default run level state ( Run level 3 in Solaris , defined by initdefault parameter in /etc/inittab ) 
b) It controls the transition between different run levels by executing appropriate rc scripts to start and the stop the processes for that run level. 

/etc/inittab file

This file states the default run level and some actions to be performed while the system reaches up to that level. The fields and their explanation are as follows :

S3:3:wait:/sbin/rc3 > /dev/console 2>&1 < /dev/console 

S3 denotes a identification if the line

3 is run level 
wait is action to be performed

/sbin/rc3 is the command to be run.

So the fields in the inittab are

Identification : run level : action : process

The complete line thus means run the command /sbin/rc3 at run level 3 and wait until the rc3 process is complete.

The action field can have any of the following keywords :

Initdefault : default run level of the system

Respawn : start and restart the process if it stops.

Powerfail : stop on powerfail

Sysinit : start and wait till console in accessible .

Wait : wait till the process ends before going on to the next line.

RC scripts & Run Levels
Rc scripts performs the following functions : 

a) They check and mount the file systems 

b) Start and stop the various processes like network , nfs etc.

c) Perform some of the house keeping jobs.

System goes in to one of the following run level after booting depending on default run level and the commands issued for changing the run level to some other one.

0 Boot prom level ok> or > prompt in Sun.
1 Administrative run level . Single user mode 
2 Multiuser mode with no resource sharing .
3 Multiuser level with nfs resource sharing
4 Not used
5 Shutdown & power off (Sun 4m and 4u architecture )
6 Reboot to default run level
S s Single user mode user logins are disabled.

Broadly speaking the running system can be in any of the folloing state

Single user – Minimum processes running , user logins disabled and root password is required to gain access to the shell . 
Multiuser - All system processes are running and user logins are permitted 

Run level of a desired state is achieved by a number of scripts executed by the rc program the rc scripts are located in /etc/rc0.d , /etc/rc1.d , /etc/rc2.d , /etc/rc3.d & /etc/rcS.d directories . All the files of a particular run level are executed in the alphanumeric order .Those files beginning with letter S starts the processes and those beginning with K stops the processes.

These files are hard linked to the files in /etc/init.d in order to provide a central location for all these files and eliminating the need to change the run level in case these scripts needs to be run separately . The files in /etc/init.d directory are without any S , K and numeric prefix instead a stop / start argument has to be supplied whenever these scripts are to be executed .

By default system has a number of rc scripts needed for run level transition but sometimes it becomes necessary to start some custom scripts at the booting time and turn them off at the shutdown . Custom scripts can be put in any of the required rc directory but following major considerations has to be kept in mind :

  • The sequence number of the file should not conflict with other files.
  • The sevices needed should be available by previously executed scripts. 
  • File should be hard linked to the /etc/init.d directory .
  • The system looks for only those files beginning with letter K & S , any thing else is ignored , therefore, to make a file inactive simply changing uppercase K or S to lower case will cause system to ignore it .

6. Next Steps 

This  article  covered Solaris booting process  . Booting process  is the starting task of all the sysadmin activities to be carried out later like user creation , network configuration etc. While most of the sysadmin aspects are covered in this site still it pays to have a  system administration book handy .   There are some good books available on unix and Solaris administration  which broaden your understanding of Solaris & unix and there by helping  in your day today work and providing you satisfaction of work.

Following books available for online buying from Amazon.com . You should have following two books in your bookshelf  for ready reference  if you are involved in Unix system administration  . 

If you are  interested in knowing more about unix  its architecture & internals you can choose the books from following list of selected best  books in this field  :

If you already own these books the amazon display panel below shows some of the best-selling books for System Administration  and you can choose the book here or visit my other website besttechbooks.com for more books on domain name service  from Amazon.com.

You can show your appreciation by  buying the books for yourself and encouraging the  friends to buy  using amazon links below or anywhere at adminschoice.com  or besttechbooks.com . Thanks for your appreciation in advance.

 

 

Copyright © 2000-2007 , Adminschoice.com . All Rights Reserved. Site Comment/Suggestions   Privacy

Post a Comment about this article :

 

 
 Posted by :LK VishwakarmaDate Posted:  March 1, 2008, 5:19 am
  Good explanation for all.
 Posted by :Milind KingeDate Posted:  February 6, 2008, 10:41 pm
  Good explanatio for boot process. if possible describe more on run levels like what activity we can do with diffrent diffrent run level
 Posted by :KirubakaranDate Posted:  October 4, 2007, 10:32 am
  It's a very good site to study for quick reference. Try to update some flowcharts.

Thank You,
Kiruba