Linux Kernel Loading Process

Source: Internet
Author: User

When the Linux kernel is loaded, the kernel module vmlinz (about 5 MB) does not know the hard disk. Originally, the kernel needs to write the same content as the loader to load non-essential modules. Non-essential functions of the www.2cto.com kernel are compiled into modules in/lib/modules (143 M. The current measure is to load initial RAM Disk = initrd to the memory while loading the kernel by the loader. In general, initrd is named/boot/initrd (14 M). It acts as a virtual file system that mounts memory. The kernel loads drivers such as hard disks and mounts the root directory according to the virtual file system, finally, the function module is loaded. At this point, all the kernels are loaded into the memory and resident memory. The first process of kernel calling is sbin/init: Prepare the software execution environment, including the host name, network settings, file system format, runlevel, and so on. The content is www.2cto.com init configured by etc/inittab. The processing flow set by inittab is: 1. first obtain the runlevel, that is, the level of the execution level of the Mo-role (take the test machine as an example, as the number 5); 2. use/etc/rc. d/rc. sysinit system initialization 3. because the worker runlevel is 5, the worker row "l5: 5: wait:/etc/rc. d/rc 5 ", and the other rows are skipped 4. define the [ctrl] + [alt] + [del] combination key function 5. determine the pf and pr mechanisms for power-off systems; 6. six terminals (tty1 ~ Tty6) 7. Finally, start the graphic interface with/etc/X11/perofdm-nodaemon! In www.2cto.com, the second step uses/etc/rc. d/rc. sysinit performs system initialization: 1. obtain the network environment without the host type: Read the network configuration file/etc/sysconfig/network, and obtain the network environment such as the non-modemed host name communication gate (gateway. 2. test whether the memory device/proc and USB device/sys are not mounted: in addition to the memory device/proc connector, the main rack is used to detect whether the system has a usb device, if yes, the usb drive program will be loaded on the primary Eni, and zookeeper tries to mount the usb file system. 3. determine whether to start SELinux: The SELinux we talked about in Chapter 17th performs some detection at this time, and determines whether to help all files rewrite the standard SELinux type (auto relabel ). 4. Start the random number generator of the system. The random number generator can help the inferior system to perform some cryptographic algorithm functions. here we need to start the random number generator twice. 5. set the terminal (console) Font: 6. set to display the welcome screen (text banner) during the renewal process. 7. set the system time (clock) without the time zone: Read/etc/sysconfig/clock to set the value 8. test the Plug and Play (PnP) parameter of the interface standby Detection: based on the core detection results at startup (/proc/sys/kernel/modprobe) start the detection of standby operations, such as line ide/scsi/Network/sound effects, and use the loaded core module to test the parameters of the line PnP device. 9. you can load custom modules in/etc/sysconfig/modules /*. modules is added to a custom module, which is then loaded into the system 10. loading core settings: the system will read/etc/sysctl from the master region. the Configuration value of the conf file makes the core function what we want. 11. Set the host name without initializing the power management module (ACPI) 12. initialize the software disk array: it is mainly set through/etc/mdadm. conf. 13. initialize the file system function of LVM 14. verify the disk file system with fsck: Convert the disk quota of the row "filesystem check15. quota" to "quota" (optional): 16. mount the system disk again in a erasable mode: 17. start the quota function: therefore, we do not need to customize the quotaon quota for 18. start the system virtual random number generator (pseudo-random): 19. clear temporary files during boot: 20. load the boot information to the/var/log/dmesg file. After the first boot, perform several simple settings terminal boot Shortcut Keys ctrl + alt + t set root Password su-root sudo passwd root allow root login gksu/usr/sbin/gdmsetup www.2cto.com set source sudo gedit /etc/apt/sources. list sudo apt-get update (only the software package list is updated and the software is not updated) ctrl + alt + f1 ~ 7 logon terminals ctrl + d = exit

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.