linux kernel

linux内核组成部分:核心文件、模块文件

 

grub]# ls /boot/

grub]# ls /boot/
config-3.10.0-123.el7.x86_64
grub
grub2
initramfs-0-rescue-7f28c3a9e20047db9ede37e2b0c3bcfa.img
initramfs-3.10.0-123.el7.x86_64.img
initramfs-3.10.0-123.el7.x86_64kdump.img
initrd-plymouth.img
symvers-3.10.0-123.el7.x86_64.gz
System.map-3.10.0-123.el7.x86_64
vmlinuz-0-rescue-7f28c3a9e20047db9ede37e2b0c3bcfa
vmlinuz-3.10.0-123.el7.x86_64

 grub]# ls /lib/modules 模块文件

[root@localhost grub]# ls /lib/modules
3.10.0-123.el7.x86_64

 [root@localhost grub]# ls /lib/modules

[root@localhost grub]# ls /lib/modules
3.10.0-123.el7.x86_64
[root@localhost grub]# ls /lib/modules/3.10.0-123.el7.x86_64/
build              modules.builtin      modules.modesetting  source
extra              modules.builtin.bin  modules.networking   updates
kernel             modules.dep          modules.order        vdso
modules.alias      modules.dep.bin      modules.softdep
modules.alias.bin  modules.devname      modules.symbols
modules.block      modules.drm          modules.symbols.bin

 [root@localhost grub]# ls /lib/modules/3.10.0-123.el7.x86_64/kernel

[root@localhost grub]# ls /lib/modules/3.10.0-123.el7.x86_64/kernel
arch  crypto  drivers  fs  kernel  lib  mm 内存管理功能  net网络功能  sound 声音相关的驱动程序

 [root@localhost grub]# ls /lib/modules/3.10.0-123.el7.x86_64/kernel/fs

[root@localhost grub]# ls /lib/modules/3.10.0-123.el7.x86_64/kernel/fs
binfmt_misc.ko  cifs    exofs  fscache  isofs  mbcache.ko  nfsd    squashfs
btrfs           cramfs  ext4   fuse     jbd2   nfs         nls     udf
cachefiles      dlm     fat    gfs2     lockd  nfs_common  pstore  xfs

 Boot Sequence:按次序查找各引导设备,第一个有引导程序的设备即为本次启动要用到的设备。

bootloader : 引导加载器,程序;windows:ntloader;

Linux: LILO: Llnux Loader

MBR: Master Boott Record

446bytes : bootloader

  64bytes : fat

   2bytes : 55AA

GRUB :

          bootloader : 1st stage

           partition : filesystem driver.1.5stage

           partition :  /boot/grub, 2nd stage

 

init 程序的类型:CentOS 7:Systemd

          配置文件: /usr/lib/systemd/system/   ,  /etc/systemd/system/

 

 

 

[root@localhost etc]# ls /etc/rc.d
init.d  rc0.d  rc1.d  rc2.d  rc3.d  rc4.d  rc5.d  rc6.d  rc.local

 

 

[root@localhost etc]# ls /etc/rc.d/rc3.d
K50netconsole  S10network  S20iprinit  S20iprupdate  S21iprdump  k:关闭 S:启动  数字50优先级

 

 

 1 /etc/rc.d---->/etc/init.d
 2 
 3 [root@localhost etc]# ls /etc/rc.d
 4 init.d  rc0.d  rc1.d  rc2.d  rc3.d  rc4.d  rc5.d  rc6.d  rc.local
 5 
 6 [root@localhost rc.d]# ls /etc/rc.d/init.d = /etc/init.d
 7 functions  iprdump  iprinit  iprupdate  netconsole  network  README
 8 
 9 
10 
11 
12 /etc/rc.d
13 [root@localhost etc]# ls -l  /etc/rc.d/rc3.d
14 总用量 0
15 lrwxrwxrwx. 1 root root 20 5月  14 19:11 K50netconsole -> ../init.d/netconsole
16 lrwxrwxrwx. 1 root root 17 5月  14 19:11 S10network -> ../init.d/network
17 lrwxrwxrwx. 1 root root 17 5月  14 19:12 S20iprinit -> ../init.d/iprinit
18 lrwxrwxrwx. 1 root root 19 5月  14 19:12 S20iprupdate -> ../init.d/iprupdate
19 lrwxrwxrwx. 1 root root 17 5月  14 19:12 S21iprdump -> ../init.d/iprdump
20 
21 /etc/init.d
22 [root@localhost init.d]# ls -l /etc/init.d
23 总用量 44
24 -rw-r--r--. 1 root root 13430 4月   2 2014 functions
25 -rwxr-xr-x. 1 root root  2256 6月  10 2014 iprdump
26 -rwxr-xr-x. 1 root root  2247 6月  10 2014 iprinit
27 -rwxr-xr-x. 1 root root  2269 6月  10 2014 iprupdate
28 -rwxr-xr-x. 1 root root  2989 4月   2 2014 netconsole
29 -rwxr-xr-x. 1 root root  6354 4月   2 2014 network
30 -rw-r--r--. 1 root root  1160 6月  10 2014 README
View Code

 

 

 

      

 

posted @ 2018-05-29 17:15  bin_WSJ  阅读(193)  评论(0编辑  收藏  举报