Linux system startup process, bootloader, init

Source: Internet
Author: User
Linux system startup process, bootloader, init system startup process take debian6 as an example 1 load BIOS hardware information and perform self-testing, and obtain boot devices (such as hard disks, optical disks, and flash memory) 2. read and execute the bootloader (such as grub) of the MBR in the startup device. 3. boot... linux system boot process, boot loader, init system boot process take debian6 as an example 1 load BIOS hardware information and perform self-testing, and obtain boot devices (such as hard disks, optical disks, and flash memory) 2. read and execute the boot loader (such as grub) of the MBR in the startup device. 3. load the kernel according to the boot loader setting. after the kernel starts to detect the hardware and adds it to the driver 4 hardware driver, kernel will actively call the init Program, and init will get the run-level information 5 init to execute/etc/init. d/rc script to prepare the software execution environment (such as network and time zone) 6 init to execute run-level The startup of each service (in scept mode) of. 7. run/etc/rc in init mode. d/rc. local File 8 init execute the terminal to start the login program. wait for the user to log on to boot loader1. each hard disk MBR has only one 2. each file system (filesystem or partition) will retain one boot sector) 3 by default, each operating system will install boot loader to the boot sector of its own file system. 4 boot loader can be installed in MBR, boot loader can also be installed in boot sector. 5 boot loader can forward the management right to other boot loader init initialization programs and their configuration files/etc/inittab/sbin/init. The main function is to prepare software execution environment, including the system host name, network settings, language processing, file system format, that is, the startup of other services/etc/inittab is/sbin/init configuration Set the default runlevel id: 2: initdefault: 2. the system starts the initialization script si: sysinit:/etc/init. d/rcS3 run the script l2: 2: wait:/etc/init with runlevel 2. d/rc 24 set ctrl + alt + del to restart ca: 12345: ctrlaltdel:/sbin/shutdown-t1-a-r now5 set power management pf: powerwait: /etc/init. d/powerfail start6 start the terminal tty1 1: 2345: respawn:/sbin/getty 38400 tty1 step 1 Detailed Analysis 1 the above table step 2nd calls rsS is actually called/etc/init. d/rc S, also called/etc/ini in step 3rd of the preceding table T. d/rc 22 View/etc/init. d/rc script. the path for calling the corresponding runlevel script based on the runlevel parameter is/etc/rc $ runlevel. d/3/etc/rc $ runlevel. d. the scripts in the path are executed in sequence to start or close the corresponding service/etc/rc $ runlevel. d/S * the service to be enabled/etc/rc $ runlevel. d/K * services to be closed 4/etc/init. d/rc. the local script is at/etc/rc $ runlevel. d/finally run/etc/init. d/rc. the local script is the main syntax of the custom system startup script/etc/inittab, which is separated into four parts (1 id) by the colon. It can contain a maximum of four characters, which indicates the main work of init. it is only a brief description of 2 runlevel. Indicates the runlevel in which the initialization action runs the 3 action. Represents the special initialization action 4 process. Indicates the command to be executed, generally, some scripts are more detailed. for details, refer to man inittab action initialization special action. initdefault indicates the preset runlevel value. sysinit indicates the system initialization action. ctrlaltdel indicates whether to restart wait by pressing the three buttons. the subsequent process commands must be executed before respawn can continue. This means that the subsequent process commands can be regenerated without restrictions. For example, getty starts login. after login is deregistered, this action also starts login runlevel execution level runlevel, which indicates that the system uses different services to start login, for linux instances of different operating environments, you also need to check whether the/etc/inittab0 halt system shuts down 1 single-user maintenance mode, it is used to maintain the multi-user without NFS multi-user text mode when a system problem occurs, no NFS service 3 full multi-user text mode with network functions 4 unused system retain 5X11 multi-user Gui, load related files/boot/vmlinuz-$ (uname-r) linux core files/boot/initrd-$ (uname-r) using X Window6 reboot to restart) at startup, the virtual file system/boot/grub/* boot loader program/etc/inittab init configuration file/etc/init. d/rc initialize the system startup script/etc/rc $ runlevel. d/* corresponding runlevel system startup script/etc/init. d/rc. local user-defined system startup script
Related Article

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.