Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of Solaris boot process

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

A correct understanding of the boot process of the operating system is very helpful to the system administrator. When there is a problem in the system and can not complete the boot process, we can roughly judge the problem through the understanding of the normal boot process. However, because the complexity of the fault phenomenon often needs to be carefully analyzed in order to find the crux of the problem, this paper introduces the Solaris boot process in detail to help the system administrator correctly understand the system and judge the fault and send the fault.

1. Detailed explanation of boot process

The following details explain the whole process of system boot, mainly taking the SPARC platform as an example:

LPoweron process

Turn on the power switch for the server need to pay attention to the following parts, almost all servers have locks to fix several states: the normal position of the power switch, lock the power switch, boot diagnosis, turn off the power switch, be sure to confirm the location of the key before turning on the power.

LPOST process

After the server is powered on, the system will first enter a process of power-on self-test. Diag-switch? If the switch parameter is set to true, you will be able to see the detailed output from the server's serial port. The diag-level parameter determines the process of POST. The default setting is min, and when set to max, the serial port can see more information output, but the time for the system to enter OBP and boot OS will be greatly delayed! During the POST process, the system will test and diagnose all the hardware one by one. For the system administrator, if there are suspicious hardware faults, it is possible to diagnose them from the POST process.

L system initialization Init SYSTEM

After the end of POST, the system will be further initialized, and the process can be divided into the following parts:

OOBP:OpenBoot PROM customizes some information of the system. After the self-test, the system enters OBP and sets MMU (memory management unit) to enable.

ONVRAM:use-nvramrc? If the parameter is set to true, the system will read the NVRAMRC and execute it, which may include some information about the boot device, such as if the system disk is encapsulated with vxvm or DiskSuite, you will need to modify these scripts to indicate the boot device.

OProbe All: this will detect all SCSI or other types of disks and devices

OInstall Consle: in this state, if the keyboard, mouse and monitor are installed, the display will output and light up. If there is only a serial port, then the serial port can be accessed as a console.

OBanner: after deciding on the console, the system will output Banner information on the console.

OCreate Devices Tree: the device tree for all hardware devices will be created by the OBP program at this time, which is very important and plays a very important role in booting the OS later.

Auto-boot?

After the OBP program creates the device tree, the system will enter the process of booting OS, the PROM parameter auto-boot? If the parameter is set to true,boot, the process will proceed automatically. If you enter the ok > prompt of OBP because the false,boot process will be aborted, the boot will be completed manually by the user.

Note: in auto-boot? When set to true, the boot process is performed automatically, and the boot device is specified by boot-device, but in diag-switch? When set to true, the boot device when booting automatically is determined by the diag-device.

Bootblk

After the OBP program finds the boot device, it directly calls the bootblk stored on the boot device into memory for execution. If the boot block does not exist or has been damaged, the system will not be able to complete boot,Solaris 8 will return a message, The file just loaded can not to be executed. This means that you need to recreate the bootblk, which is very simple, boot the system with the CD drive, mount the root of the original disk system, and use the installboot command to regenerate the bootblk.

Ufsboot:

After executing the bootblk, the system will execute the second program / platform/ `arch-k` / ufsboot, which calls the p_w_picpath file of UNIX's kernel into memory. If the file is corrupted, the system will not be able to continue booting and return a similar message, a bootlbk:Can't find the boot program.

Kernel:

System image p_w_picpath file call and run, in 32-bit and 64-bit systems will call different files, 32-bit system will involve the following two files:

1./platform/ `arch-k` / kernel/unix

2./kernel/genunix

The 64-bit system will involve the following two files

1. / platform/ `arch-k` / kernel/sparcV9/unix

2. / kernel/genunix

The p_w_picpath file of kernel is called into memory and further initialized, and various modules will be loaded, each file will be read using ufsboot, and all the required modules will be called into memory before the mount root system. At this point, ufsboot no longer works, and kernel will use its own driver, and if there is a problem with the root file system, the system will not be able to boot.

/ etc/system:

The / etc/system file, which customizes the system parameters, will be read from the root system by kernel:

Here are several option for customizing system parameters:

Moddir: used to specify and change the path of the system kernel module

Forceload: force the department kernel module to be called into OS

Exclude: used to execute a specific system module

Rootfs: used to specify the system root system type, and the ufs file system is the default

Rootdev: specify the physical path of the root system device

Set: set system parameters that can be adjusted by kernel

If you need to modify the / etc/system file, it is strongly recommended to make a copy and then edit it. Otherwise, if the error of the file is serious, the system will not be able to complete the boot and have a backup. You can use the boot option of-a to select / etc/system.bak to boot the system. If you do not make a backup, you must use boot cdrom-s to mount the system root system and then manually modify the wrong / etc/system file.

Kernel initialized:

After kernel completes all the module calls according to the system file parameters, it first creates the system's first process, sched, with a process number of 0, which is sometimes called "swapper".

Init:

The init process is the second to be created, which reads the / etc/inittab file and / etc/default/init file after creation, which make some provisions for the customization of the system, such as the default run level of the system, system time zone and locale, etc., the process is the parent process of all future processes of the system.

Rc scripts:

After the init process is created, the system executes the relevant startup scripts according to the run level specified in the / etc/inittab file. All startup rc scripts are stored in the / etc/rc#.d directory, and different levels execute different scripts to start the process corresponding to the level. It is important to note that all scripts in the / etc/rc#.d directory will be executed, starting with K, then S, and installing ASCII code in sequence.

The following is the full text of the document I posted in Douding, please brush it for me, so I can earn some beans, so I can write more documents: http://www.docin.com/p-550964558.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report