• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Solaris 10 boot process : x86/x64

by admin

Solaris 10 boot process : SPARC

In the last post we saw the boot process in solaris 10 on SPARC platform. The boot process on x86/x64 hardware is bit different than the SPARC hardware. The x86/x64 hardware also involves the 5 step boot process, same as the SPARC hardware. Refer the flow diagram below.

Boot process x86

Boot PROM phase

1. The BIOS (Basic Input Output System) ROM runs the power on self test (POST) to test the hardware.
2. BIOS tries to boot from the device mentioned in the boot sequence. (We can change this by pressing F12 or F2).
3. When booting from the boot disk, BIOS reads the master boot program (mboot) on the first sector and the FDISK table.

Boot program phase

1. mboot finds the active partition in FDISK table and loads the first sector containing GRUB stage1.
2. GRUB stage1 in-turn loads GRUB stage2.
3. GRUB stage2 locates the GRUB menu file /boot/grub/menu.lst and displays GRUB main menu.
4. Here user can select to boot the OS from partition or disk or network.
5. GRUB commands in /boot/grub/menu.lst are executed to load a pre-constructed primary boot archive (usually /platform/i86pc/boot_archive in solaris 10).
6. GRUB loads a program called multiboot, which assembles core kernel modules from boot_archive and starts the OS by mounting the root filesystem.

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 /etc/inittab. A sample inittab file looks like below :

ap::sysinit:/sbin/autopush -f /etc/iu.ap
sp::sysinit:/sbin/soconfig -f /etc/sock2path 
smf::sysinit:/lib/svc/bin/svc.startd>/dev/msglog 2<>/dev/msglog /dev/msglog 2<>/dev/msglog

The init tab file as shown above contains four fields :

id:rstate:action:process

The process keyword specifies the process to execute for the action keyword. For example “/usr/sbin/shutdown -y -i5 -g0” is the process to execute for the action “powerfail”

Legacy Run Levels
Run level specifies the state in which specific services and resources are available to users. Below are the run levels available in solaris :

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 according to 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.

Solaris 10 boot process : SPARC
Solaris 10 boot process : x86/x64

Filed Under: Solaris

Some more articles you might also be interested in …

  1. How to configure passwordless ssh in Solaris
  2. Complete hardware reference : T1000 / T2000 / T5120 / T5140 / T5220 / T5240 / T5440
  3. Determining which network interface will be used for jumpstart installation / network boot
  4. Examples of adding static routes in Solaris
  5. Solaris 11 : How to verify whether I’m logged into a Kernel Zone?
  6. How to log SSH login attempts to a file in Solaris
  7. A beginners guide to Service Management Facility (SMF) in Solaris
  8. How to Check and Analyze Memory Usage in Solaris
  9. How to update Solaris 11 system Using IPS
  10. How to make telnet listen to a different port in Solaris

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright