Linux startup details

Source: Internet
Author: User
Linux boot details Linux boot process refers to the process from power on the computer to display the user login screen. Step 1: load BIOSBIOS (BasicInputOutputSystem) information and store it on the computer's motherboard, which must be maintained by a lithium battery on the motherboard. Where...
Linux boot details Linux boot process refers to the process from power on the computer to display the user login screen. Step 1: load the BIOS (Basic Input Output System) information and store it on the computer's motherboard, which must be maintained by a lithium battery on the motherboard. It contains the basic information of the CPU, hard disk, memory, and other computers. The computer's BIOS loading has nothing to do with the installed operating system. Step 2 of www.2cto.com: After the mbr bios is loaded, the computer transfers the control to the hard disk 0th track 1st sectors, that is, the hard disk MBR (Master Boot Record), also known as the Master Boot Record. The MBR capacity is very small, generally only 512 bytes. The most important part of the MBR is the partition table and boot program. due to the physical size limit, the partition table can only store information of four hard disk partitions, therefore, hard disks can only have four primary partitions. Boot programs refer to things such as grub and lilo. these programs can be written directly in the hard disk data area instead of in MBR, when installing the system, the system prompts you to select the location of the boot program you want to install. Step 3: The Boot Loader is a small program segment before the kernel is loaded. it helps the kernel prepare some environments and records the kernel address. As mentioned above, the boot program may exist in the MBR or the hard disk data area. Step 4: load the Linux kernel according to the kernel address recorded by the boot program to load the kernel and the plug-in modules of the kernel, as well as swap and other data.
In this step, we can truly enter the Linux world. Step 5: run the init Program www.2cto.com 1. the first file for the init Program is/etc/inittab, which defines the system running level 0-6. Run-level definition 0 shutdown 1 Single User Mode 2 multi-user mode without network support 3 multi-user mode with network support (standard level) 4 reserved, if 5 is not used, the network supports multi-user mode 6 with X-Window support to reboot the system, that is, the restart statement: I am not sure about the order of 2 and 3. 2. the init Program will then load/etc/rc. d/rc0.d ~ Files in the rc6.d Directory, 0 ~ The number 6 indicates the running level of the Directory. the files in the directory are S80postfix and K45named. S indicates start, K indicates kill, and the number indicates sequence. The files in these directories are part of the Linux startup items. They are mainly startup items closely related to the system. we recommend that you do not modify them at will. 3. the init Program loads/etc/rc. d/init. files under the d Directory. these files are generally the startup items generated during rpm installation, mainly binary files. The chkconfig command manages these files. By the way, another directory/etc/init. d is actually soft-linked. in essence, it is the same directory as/etc/rc. d/init. d. 4. after the built-in startup items are loaded, the init Program loads the user-defined startup script. the file is/etc/rc. d/rc. local, open the file and write: www.2cto.com # This script will be executed * after * all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. if you want to load some of your own scripts when the system starts, that's right! Step 6: run the logon program. Not to mention, the/bin/login is attached with a logic diagram to better understand it. The above is the conclusion based on the comprehensive network information and experience. if there is any mistake, please give me some advice. Author: weinianjie1

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.