Chapter III Starting and shutting down the AIX operating system

Source: Internet
Author: User
Tags tmp file

first, when the small machine starts, can reboot the process, chooses the different system operation mode:

1) boot system from tape or CDROM into maintenance mode (single user mode)

2) Enter into maintenance mode (single user mode) and Normal mode (multi-user mode) from the hard drive boot system

3) Enter System Management Maintenance mode (SMS Mode: System Management Services)

Overview of the two or one-like boot process

The classic RS6000 machine (MCA) structural system hardware self-test is divided into two phases: the internal device self-Test stage (BIST) and the power-on self-test phase (POST), and for PCI machines, a separate power-on self-test (POST) completes the hardware check.

After a hardware check, the system tries to load the boot logical volume (Blv:boot Logical Volume) and Ramfs in memory and gives control to BLV, but because no LVM is loaded in memory (logic Volume Manager , LVM), so the system must correctly locate the BLV data on the hard disk without the use of LVM. The correct BLV address information (including offsets and lengths) is stored on the first physical sector of the boot disk (this sector has a block of 512 bytes), which is called the boot record.

==========ram File System ===============

Ramfs is part of the boot image, fully resident memory, and contains many programs that allow the boot to continue. The init process running in the Ram file system is actually an SSH (simple shell) program, This program to control the system boot process by invoking the Rc.boot script, the first step of the Rc.boot script determines which device the operating system boots from, the boot device should be in the Ram file system configuration (Rc.boot script to find the boot device, from the Ram file system bar with the corresponding program to configure)
====================================

The Boot logical Volume BLV also becomes the boot image , which includes the following sections:

1) Software Ros--ros is "read-only Memory" meaning, the software Ros only exist in the PCI machine, perform some system initialization work, the PCI machine Ros do not provide software Ros, and provided by Aix

2) The AIX kernel--aix kernel is always loaded from BLV. /unix (soft connect to/USR/LIB/BOOT/UNIX_MP or unix_up) is a copy of the kernel that is used to build the Hd4 file system (also known as the root filesystem). When the system boots, the kernel image is read from the Hd4 file system.

3) Rc.boot--rc.boot is a shell command file, which is a script that configures the system, during system boot, the INIT process executes this script three times:

====================================

When BLV is loaded, since ROOTVG is not activated and is not available, the information required for booting is included in the BLV used to create the Ram file system in memory, after which the INIT process is loaded and the INIT process begins to configure the basic information: This is the first boot phase, this stage, When Init executes the rc.boot, take a parameter 1.

The next step is the second boot phase (when Init executes rc.boot, with a parameter of 2), the main purpose is to activate ROOTVG (which is also the most prone to problems, such as file system or jsflog corruption), then give control to the INIT process in ROOTVG and then release the Ram file system.

In the third boot phase, the INIT process (the INIT process loaded from disk, not the init process in BLV) with parameter 3 executes the Rc.boot script to configure the remaining devices and start other processes from/etc/inittab

====================================

4) Simplified odm--provides only the most basic equipment configuration information

5) Boot commands-such as Cfgmgr and Bootinfo

three, PCI-based system boot mode

PCI-based only two boot modes, namely normal mode and service mode, multi-user mode generally from the internal hard disk boot, single-user mode can be from disk, CDROM or hard disk boot.

Boot the system in maintenance mode, it will enter the system diagnostic status, the user can view and change the system's equipment and configuration, can perform system diagnosis and maintenance work. There is only one root user in the system, so this is called single-user mode. The maintenance mode of the PCI system is divided into two types: Independent diagnostic mode (from tape or CDROM boot to maintenance mode). The other is on-line diagnostic mode (booting from hard disk)

The boot mode is determined at post, and the system is guided by a list of boot devices, such as a "floppy disk-cdrom-hard drive-network device" that is similar to a device. Users can modify the boot device list themselves (with the bootlist command) or use SMS to customize the boot device list. The list of custom boot devices is saved in NVRAM, and the default boot list is stored in Ros.

When the post is started, after the first icon comes out and the last icon comes out, press a key on the keyboard to enter the appropriate mode:

F1/1---->SMS System Management Maintenance Mode

F5/5----> Default boot Device List boot maintenance mode, enter Independent diagnostic mode

F6/6----> Custom boot device List boot maintenance mode, enter online diagnostic mode

F8/8----> Normal mode Boot

On machines that support the AIX operating system, regardless of whether AIX is installed or not, the standalone diagnostics mode can be entered, and only the machine with the system installed can enter the online diagnostic mode, and the diagnostic mode type is determined by what media the system is booting from.

By booting the system through tape, CDROM, and network mode, the ROOTVG volume group is not activated because the root volume group may not exist (reinstall the system). Once you enter the standalone diagnostic mode, you cannot remove the disc, only after power is given to the machine and before the post is completed.

four, multi-user mode START process

+++++++++++ros Kernel initialization phase +++++++++++++

1) First call the microprocessor by the OCS (On-chip Sequencer) to check the system motherboard for problems, then give control to the read-only memory (ROS) and perform the system power-on self-test (POST)

2) Ros initialization loader (IPL) checks the list of user-defined boot devices (boot list), and if no custom list is found or the custom boot device list is incorrect, the default boot list is used and the first device found in the boot list is used to boot.

3) When the first bootable device is found, the first record or physical sector code (psn:physical sector number) on the boot device is detected. If it is a legitimate boot record. It is read into memory and attached to the control block on the initial loader (IPL). The BLV is then loaded into memory based on the Boot Logical volume (BLV) length and BLV address (BLV) on the boot device, as contained in the boot record.

4) The Boot logical volume (that is, the boot image) is read into memory sequentially from the boot device, creating a Ram file System (RAMFS). The Boot Logical Volume (BLV) consists of the "kernel, a Ram file system, and basic initialization device information (simplified ODM)." ”

5) Transfer control to the kernel that starts the system initialization in the Ram file system.

6) The system initializes the kernel to run the INIT program (process number 1), and the INIT process continues to execute the rc.boot script with parameter 1

7) End of kernel initialization phase and hardware detection phase.

++++++ Basic Equipment configuration phase (Rc.boot phase 1th) +++++++

Now, the system completes the hardware detection, finds BLV, resumes the RAM, starts the INIT process in RAM, but ROOTVG is not activated yet. Rc.boot The first stage is to complete the basic equipment configuration

1) The Init process in Ramfs executes the boot script rc.boot with parameter 1, in this process, Rc.boot calls the Restbase command to copy the simplified ODM database on the Boot Logical volume (BLV) to Ramfs, and if this operation is done, the LED panel displays 548.

2) then Rc.boot executes the cfgmgr-f command (Configuration Manager), lets Cfgmgr read the Config_rules class from the simplified ODM database, and in the Config_rules class, a device with a property value of 1 is considered a basic device. The basic device is all the equipment required to access the ROOTVG. Rc.boot This phase executes cfgmgr to configure the base device so that ROOTVG can be activated in the next rc.boot phase.

Here's where this file is located

By the way, you can find the object of this class phrase=1:

(also behind, not listed)

3) At the end of the first boot phase of Rc.boot, execute the bootinfo-b command to detect the last boot device, when the LED is displayed 511.

++++++++++++rc.boot 2nd boot stage ++++++++++++++++++

1) rc.boot execute ipl_varyon command to activate ROOTVG, if this command and execution is unsuccessful, display one of 522, 554, 556

2) After successful execution, check the root filesystem of ROOTVG (located on disk) with fsck-fp/dev/hd4 command and install the ROOTVG root file System (/DEV/HD4) on the temporary installation point of Ramfs (/MNT) Ipl_varyon , this step fails with error code 555, 557

3) Install the/var and/usr file system . If it fails, display 518. Once the/var text is installed, the last dump in the default dump device (/DEV/HD6) is copied to the default copy directory (/var/adm/ras) with the Copycore command, and after the dump is copied, it is uninstalled/ var file system.

4) Run swapon (/usr/sbin/swapon) command to activate basic page space on ROOTVG (/DEV/HD6)

5) Use the Mergedev command to copy the Ramfs/ Dev directory to the file system on disk, and then use the CP cu*/mnt/etc/bojrepos command bar Ramfs in the user-made ODM database copied to disk, here/mnt/etc/ Bojrepos This path is because the root directory/This is temporarily hanging in the Ramfs in the/mnt this installation point

6) Uninstall/var and ROOTVG root filesystem/dev/hd4from Ramfs (hang on to/mnt)

7) Permanently install the root filesystem of ROOTVG (located on disk) on the installation point where the Ramfs root file system resides, and the Newroot command completes the switchover of the Ram file system to the ROOTVG file system. The file system installation point in the root volume group can be used later to install the/usr and/var file systems in the root volume group to the appropriate installation point

8) There is no console available at this time, all boot information is copied to the error log Alog

9) Exit the Execute Rc.boot script, transfer control to the INIT process in the root volume group, and then release the Ram file system

10) The INIT process on the hard disk will perform the last part of the entire boot process

· because the console is not available, the output information is recorded in the Alog.

The INIT program reads the/etc/inittab file, and if/etc/inittab exists, the INIT program looks for the default system startup initial record in/etc/inittab (the record identifier is INIT, the third field is Initdefault), The entire record contains the processes that are pre-registered in the file/etc/inittab. If the initial record does not exist, the INIT process will require the user to enter a runlevel from the system console (/dev/console). (user input S, s, M, m into single-user mode, only enter the single-user mode is not required/etc/inittab content must be complete)

· If/etc/inittab does not exist, init defaults directly into the system maintenance RunLevel

· The INIT process re-reads the/etc/inittab file every 60 seconds, and if the INIT process has previously read the file, new additions and deletions are made, and this read will also perform these changes.

++++++++++++rc.boot 3rd boot stage ++++++++++++++++++

The first record in the/etc/inittab file is Initdefault, and the second record is the BRC, which instructs Init to perform the 3rd phase of Rc.boot.

The 3rd phase of work is:

1) Install/ tmp file System

2) Sync ROOTVG (by executing command #syncvg-v ROOTVG &), which may take some time, if execution fails, display error code 553

3) If it is normal boot, execute the cfgmgr-p2 command, or execute the cfgmgr-p3 command If it is a maintenance (service) mode boot. Cfgmgr reads the Config_rules class in the ODM database, checks for a device with a property value of 2 or 3, and configures it (the device with a property value of 1 is checked at phase 1th), which configures all remaining devices.

4) Configure the console with the cfgcon command . Different terminal devices, the code displayed on the LED is different.

5) Execute the savebase command in the/(root) file system to save the ODM database in the Boot Logical volume (BLV)

6) Exit the Execute Rc.boot script, and then start the other processes in the /etc/inittab file by the init process sequence

v. Operating system Operation level

The operating system has a true runlevel of 11, which is 0-9, plus a s, S, M, M, where level 2 means multi-user mode, S, S, M, M, which write a level that represents single user mode (Maintenance mode)

vi. init process reread/etc/inittab file

Regardless of why the process is hesitant to stop, the INIT process will receive a signal that the process has stopped running, and the reason for its end to run is recorded in/etc/utmp, and the history of process initiation is also saved in file/var/adm/wtmp.

When the user edits the/etc/inittab file, adds a record or modifies the command field, the INIT process does not immediately reread the file, and the added or modified process is not created immediately, unless one of the following 3 conditions occurs and the new process is created-

1) a process in the descendants of the Init process is over.

2) There is a power failure signal SIGPWR

3) The user sends a signal to change the system runlevel and recheck the/etc/inittab file with the init command

Among them, the simplest of the above three conditions is to use the init command to issue a re-check the/etc/inittab file signal

#init Q

#telinit-Q

Chapter III Starting and shutting down the AIX operating system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.