CentOS Series Start-Up process (5 Series, 6 series, 7 Series)
Source: Internet
Author: User
1. Linux boot kernel file
1. Composition of Linux system
Dynamic perspective: kernel + root file system
Static perspective: disk partition + related files
2. Kernel features
(1) Support a certain block: .ko (kernel object) file
The ko file of centos7:
The ko file of centos6:
note:
Linux kernel module files are usually named as <module name.ko>
The kernel modules of the centos6 system are gathered under the / lib / modules / ‘uname -r’ / directory
The kernel modules of the centos7 system are collected under the / usr / lib / modules / ‘uname -r’ / directory
(2) Support dynamic loading or unloading when the module is running;
Module related commands:
a) Load the module: insmod modprobe
The difference between insmod and modprobe:
When the a module and the b module have a dependency relationship, it is assumed that the a module must be installed before installing the b module.
If you use the insmod command, you need to first insmod a.ko and then insmod b.ko.
If you use the modprobe command, you can directly use modprobeb.ko.
Which / lib / modules / "kernel version number" /modules.dep records the dependencies between modules.
The kernels loaded by modprobe are valid in the current computer, and need to be reloaded after the computer restarts to be effective.
If you want to automatically mount the kernel after booting, you need to write the modprobe command in the /etc/rc.sysint file
b) Uninstall the module: rmmod modprobe -r
rmmod: You only need to call the module name. For example, inmod a.ko is installed when the installation is completed. The name of the module in the kernel is a. Then uninstall the module only by rmmod a.
modprobe -r: can uninstall dependent modules together
[[email protected] ~] # modprobe ip_vs #Dynamic loading ip_vs module
[[email protected] ~] # lsmod | grep ip_vs #Check if the module is loaded successfully
[[email protected] ~] # lsmod | grep ip_vs #The module has been uninstalled cleanly
c) View module: lsmod
Output three columns of information
Whether the memory occupied by the module is called
If the third column is 0, the module can be uninstalled at any time.
Summary: Linux kernel draws on the advantages of multi-core design on a single-core design model and uses a modular design
Single-core design: integrate all functions into the same program; such as Linux
Microkernel design: each function is implemented using a separate subsystem; such as Windows, Solaris
3. Kernel composition
(1) Core file
1) / boot / vmlinuz-VERSION-release
Note: The last z in vmlinuz represents the kernel file in compressed format
2) Ramdisk (intermediate temporary file root system, dynamically created, uses buffering and caching to speed up file access on disk)
The files temporarily generated after installing the operating system can scan the hard disk drive of the current operating system and load the corresponding module
A memory-based disk device used to implement system initialization, using a section of memory as memory
CentOS 5: /boot/initrd-VERSION-release.img
Tool program: mkinitrd
CentOS 6,7: /boot/initramfs-VERSION-release.img
Tool program: dracut, mkinitrd
note:
a) It is not necessary. When self-compiling the kernel and knowing the hard disk interface, compile the hard disk drive into the kernel, ramdisk is not needed
b) initrd, ramdisk-based disk image file; initramfs, ramdisk-based file system
When initrd is started, use free to view the memory, there is a space occupied by buffers and cached, and the secondary cache
This article is from the "2913680" blog, declined to reprint!
CentOS series startup process (5 series, 6 series, 7 series)
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.