Boot Process Sol10
Boot Process Sol10
The boot process in SOLARIS 10 has five stages which are discussed below:
1. Boot PROM phase: When we power on the server it displays banner which includes host
id, MAC address, PROM Chips (release & version name) and physical memory information. It then starts POST (Power On Self Test) on all the connected devices. After successful completion of POST, it starts booting into program phase.
2. Boot Program phase: Here it starts searching for the default boot deviceand starts
reading the boot program which is available in 1-15 sector of the hard drive. This 1-15 sector of hard drive also contains Unix File Systemwhich is responsible to load another secondary boot program called UFS boot loader.
3. Kernel Initialization phase: UFS boot loader loads the kernel into the memory. After
loading kernel into the memory it starts un-mounting the UFS boot loader and locates Operating System modules & finally starts mounting root file system.
4. Init Initialization phase: The init phase starts when, after initializing itself, the kernel starts
the /sbin/init process, which in turn starts/lib/svc/bin/svc.startd to start the system services to do the following: 1. 2. 3. Check and mount file systems. Configure network and devices. Start various processes and perform tasks related to system maintenance. The svc.startd process also executes run control (rc) scripts for backward compatibility 5. svc.startd: Its discussed above. Note: In Solaris 10 svc.startd is a separate booting phase whereas in SOLARIS 9 and earlier versions it was the part of Init Initialization phase. Step-by-step boot process of Solaris 10 1. Power on 2. Banner: Displays basic system information 3. POST (Power On Self Test)
4. Boot PROM Phase Boot Device boot block (1-15 Sectors) 5. UFS Boot loader 6. Kernel Initialization Phase Loads the kernel Unmaps the UFS bootloader Mount
root file system. 7. Init Initialization phase /sbin/init 8. /lib/svc/bin/svc.startd 9. Start all services. 10. Configure network services
But from SOLARIS 10 it is not possible, because this file acts as a script which is under control of SMF.
Commonly used Open Boot Prompt (OBP) commands ok> .speed : It displays the speed of the processor. ok> .enet-addr : It displays the MAC address of the NIC ok> .version : It displays the release and version information of PROM chip. ok> show-devs : It displays all the connected devices. ok> show-disks : It displays all the connected disks/CD-ROM ok> page : To clear the screen ok> probe-ide : It displays all the IDE drives connected to the system. ok> probe-scsi : It displays all the SCSI drives connected to the system. ok> probe-scsi-all : It displays all the SCSI drives connected internally and externally to the server. ok> reset-all : Resets the system. It's equivalent to performing a power cycle. ok> set-defaults <var> : It sets the value of the variable to its default value. ok> watch-net : It displays the NIC status. ok> test-all : It is nothing but performing POST i.e. self testing all the connected devices. ok> show-devs : Displays the list of all the devices in the OpenBoot device tree. Creating an alias name for device in Solaris 1. Use the show-disks command to list all the disks connected. Select and copy the location of the disk for which the alias need to be created. 2. Use the following command to create the alias : nvalias <alias name> <physical path> The physical path is the location copied in step 1. The alias name can be anything of user choice. Working with the Environment Variables : The environment variables are also known as NVRAM variables as they are stored in NVRAM (Non-volatile Random Access Memory). Their values are consistent across the different power cycles. printenv : To display the value stored under the environment variable. e.g. printenv auto-boot? : This command displays the value of auto-boot variable. e.g. printenv oem-banner? : This command displays the status of variable oem-banner. e.g. printenv oem-banner : This command displays customized OEM banner information. e.g. printenv oem-logo? : This displays the status of the variable oem-logo. e.g. printenv oem-logo : This displays the oem-logo. e.g. printenv boot-device : It displays the default boot device. setenv : It is use to assign the value to the environment variable. e.g. setenv auto-boot? false : This command sets the value of variable auto-bootto false. e.g. setenv oem-banner? true : This command sets the value of variable oem-banner to true. By default its value is false. e.g. setenv oem-banner <customized message> : This command sets the customized message for the OEM banner. e.g. setenv oem-log? true : It sets value of oem-logo? to true/false. e.g. setenv oem-logo <logo name> : It sets customized logo name. e.g. setenv boot-device cdrom/disk/net : It sets the default boot device. Emergency Open Boot Prompt commands (OBP) Stop : Bypass POST.
Stop + A : Abort. Stop + D : Enter diagnostic mode. Enter this command if your system bypasses POST by default and you don't want it to. Stop + N : Reset NVRAM content to default values. Performing system shutdown and reboot in Solaris 10 There are two commands used to perform the shutdown in Solaris 10. The commands are init and shutdown. It is preferred to use shutdown command as it notifies the logged in users and systems using mounted resource of the server. Example of shutdown command: /usr/sbin/shutdown [-y] [-g <gracePeriod>] [-i <initState>] [<message>] -y : Pre-answers the confirmation questions so that the command continues without asking for your intervention. -g <gracePeriod> : Specifies the number of seconds before the shutdown begins. The default value is 60. - i <initState> : Specifies the run level to which the system will be shut down. Default is the singleuser level: S. <message> : It specifies the message to be appended to the standard warning message. If the <message> contains multiple words, it should be enclosed in single or double quotes. Example: shutdown -i 0 -g 120 "!!!! System Maintainence is going to happen, plz save your work ASAP!!!" If the -y option is used in the command, you will not be prompted to confirm. If you are asked for confirmation, type y. Do you want to continue? (y or n): y Some shutdown scenarios and commands to be used: 1. Bring down the server for anticipated outage: shutdown -i5 -g300 -y "System going down in 5 minutes." 2. You have changed the kernel parameters and apply those changes: shutdown -i6 -y 3. Shutdown stand alone server: init 0 4. Immediate shutdown: halt poweroff