Skip to main content

Solaris 10 boot process : SPARC

The boot process for SPARC platform involves 5 phases as shown in the diagram below. There is a slight difference in booting process of a SPARC based and x86/x64 based solaris operating system.
SPARC boot flowchart

Boot PROM phase

1. The boot PROM runs the power on self test (POST) to test the hardware.
2. The boot PROM displays the banner with below information
– Model type
– processor type
– Memory
– Ethernet address and host ID
3. Boot PROM reads the PROM variable boot-device to determine the boot device.
4. Boot PROM reads the primary boot program (bootblk) [sector 1 to 15] and executes it.
Boot program phase
1. bootblk loads the secondary boot program ufsboot into memory.
2. ufsboot reads and loads the kernel. The kernel is composed of 2 parts :
  • unix (platform specific kernel)
  • genunix (platform independent kernel)
3. ufsboot combines these 2 kernel into one complete kernel and loads into memory.

Kernel initialization phase

1. The kernel reads the configuration file /etc/system.
2. Kernel initializes itself and loads the kernel modules. The modules usually reside in /kernel and /usr/kernel directories. (Platform specific drivers in /platform/‘uname -i‘/kernel and /platform/‘uname -m‘/kernel directories)

Init phase

1. Kernel starts the /etc/init daemon (with PID 1).
2. The /etc/init daemon starts the svc.startd process which is responsible for starting and stopping the services.
3. The /etc/init daemon uses a file called /etc/inittab to boot up the system to the appropriate run level mentioned in this file.
Legacy Run Levels
Run level specifies the state in which specific services and resources are available to users.
0         - system running PROM monitor (ok> prompt)
s or S    - single user mode with critical file-systems mounted.(single user can access the OS)
1         - single user administrative mode with access to all file-systems.(single user can access the OS)
2         - multi-user mode. Multiple users can access the system. NFS and some other network related daemons does not run
3         - multi-user-server mode. Multi user mode with NFS and all other network resources available.
4         - not implemented.
5         - transitional run level. Os is shutdown and system is powered off.
6         - transitional run level. Os is shutdown and system is rebooted to the default run level.

svc.startd phase

1. After kernel starts the svc.startd daemon. svc.startd daemon executes the rc scripts in the /sbin directory based upon the run level.
rc scripts
Now with each run level has an associated script in the /sbin directory.
# ls -l /sbin/rc?
-rwxr--r--   3 root     sys         1678 Sep 20  2012 /sbin/rc0
-rwxr--r--   1 root     sys         2031 Sep 20  2012 /sbin/rc1
-rwxr--r--   1 root     sys         2046 Sep 20  2012 /sbin/rc2
-rwxr--r--   1 root     sys         1969 Sep 20  2012 /sbin/rc3
-rwxr--r--   3 root     sys         1678 Sep 20  2012 /sbin/rc5
-rwxr--r--   3 root     sys         1678 Sep 20  2012 /sbin/rc6
-rwxr--r--   1 root     sys         4069 Sep 20  2012 /sbin/rcS
Each rc script runs the corresponding /etc/rc?.d/K* and /etc/rc?.d/S* scripts. For example for a run level 3, below scripts will be executed by /sbin/rc3 :
/etc/rc3.d/K*
/etc/rc3.d/S*
The syntax of start and stop run scripts is
S##name_of_script - Start run control scripts
K##name_of_scrips - Stop run control scripts
Note the S and K in caps. Scripts starting with small s and k will be ignored. This can be used to disable a script for that particular run level.

Comments

Popular posts from this blog

How to create and configure solaris 10 zones

Solaris zones enables a software partitioning of solaris 10 OS to support multiple independent, secure OS environments to run in the same OS. Each environment has separate process space, resource allocation and users. Zones are widely used in production environments as it is easy to setup and doesn’t require any special hardware like ldoms does. Zone types Global zone  – every installed OS acts like a global zone, which is present by default. All non-global zones can only be intalled, configured and administered from global zone. Non-global zone  – They share the functioning of the kernel booted under the global zone. All the software and other resources are inherited from the global zone. Whole Root zone (Big zone)  – It gets their own writable copy of all the file systems like /opt, /usr. It takes more disk space. Sparse root zone (Small zone)  – File systems like /opt, /usr are shared from global zone as loopback file-system (you only have a read-only access...

How to Identify Sparse or Whole Root Zones

First question in your mind is to identify the Non-Global Zone whether they Sparse or Whole Root Zone in real time. This post will help you to find those details in handy ways. Theoretically everyone having good knowledge about Sparse and Whole Root Zones. But in real time.....Please follow the Steps. Here We have 2 Non-Global zone, but we are not sure which one is Sparse or Whole Root Zones. Let we identify them. [root@unixrock ~]# zoneadm list -cv ID NAME STATUS PATH BRAND IP 0 global running / native shared 1 unixrockLZ running /export/zones/unixrockLZ native shared 2 unixrockLZ1 running /export/zones/unixrockLZ1 native shared [root@unixrock ~]# There is a Command called "pkgcond" allows you to determine the type of target being operated on (global zone, non-global zone). more details you can refer man Page of pkgcond. I'm executing the c...