2. Linux kernel Loading Process

Source: Internet
Author: User

Ii. Process 1 of linux kernel loading. Concepts encountered during linux installation the kernel must be a module vmlinz (about 5 MB) that does not know the hard disk. It was originally necessary to write the same content as that in loader, to load unnecessary modules. Non-essential features of the 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 the 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. since runlevel is 5, only "l5: 5: wait:/etc/rc. d/rc 5 ", and the other rows are skipped 4. set the [ctrl] + [alt] + [del] combination key function 5. set the pf and pr mechanisms for the power-on system; 6. start the six terminals (tty1 ~ Tty6) 7. Finally, start the graphic interface with/etc/X11/perofdm-nodaemon! 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 host name and default gateway. 2. test and mount the memory device/proc and USB device/sys: In addition to mounting the memory device/proc connector, the main fuse will also 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-rootsudo passwd root allow root login gksu/usr/sbin/gdmsetup set source sudo gedit/etc /apt/sources. listsudo 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

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.