1, 内核升级,编译安装
只编译某子目录 |
cd 源码根目录: make path/to/dir |
只编译某模块 |
cd 源码根目录: make path/to/xx.ko.xz |
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.7.tar.xz
tar -xf linux-5.4.7.tar.xz -C /usr/src/
cd /usr/src
ln -sf linux-5.4.7 linux
[root@c7 ~]
[root@c7 linux]
arch COPYING Documentation include Kbuild lib Makefile net scripts tools
block CREDITS drivers init Kconfig LICENSES mm README security usr
certs crypto fs ipc kernel MAINTAINERS modules.builtin samples sound virt
[root@c7 linux]
[root@c7 linux]
[root@c7 linux]
[root@c7 linux]
[root@c7 linux]
[root@c7 linux]
[root@c7 linux]
CPU(s): 4
On-line CPU(s) list: 0-3
NUMA node0 CPU(s): 0-3
[root@c7 linux]
[root@c7 linux]
There are screens on:
20301.make_kernel (Detached)
[root@c7 linux]
[root@c7 ~]
menuentry 'CentOS Linux (5.4.7) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-bbfa535e-0ced-4bad-83d1-be2900ecd4c5' {
menuentry 'CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-bbfa535e-0ced-4bad-83d1-be2900ecd4c5' {
menuentry 'CentOS Linux (0-rescue-a7986f397aa74c2384dac379c3367818) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-a7986f397aa74c2384dac379c3367818-advanced-bbfa535e-0ced-4bad-83d1-be2900ecd4c5' {
[root@c7 ~]
[root@c7 ~]
[root@c7 ~]
saved_entry=CentOS Linux (5.4.7) 7 (Core)
2, 内核模块管理,内核参数
[root@c7 ~]
Module Size Used by
ip6t_rpfilter 12595 1
ipt_REJECT 12541 2
nf_reject_ipv4 13373 1 ipt_REJECT
ip6t_REJECT 12625 2
[root@c7 ~]
3.10.0-957.el7.x86_64
[root@c7 ~]
arch crypto drivers fs kernel lib mm net sound virt
[root@c7 ~]
filename: /lib/modules/3.10.0-957.el7.x86_64/kernel/net/ipv6/netfilter/ip6t_rpfilter.ko.xz
description: Xtables: IPv6 reverse path filter match
author: Florian Westphal <[email protected]>
license: GPL
retpoline: Y
rhelversion: 7.6
srcversion: 7F2EAB75EFD6D085D98EB70
depends:
intree: Y
vermagic: 3.10.0-957.el7.x86_64 SMP mod_unload modversions
signer: CentOS Linux kernel signing key
sig_key: B7:0D:CF:0D:F2:D9:B7:F2:91:59:24:82:49:FD:6F:E8:7B:78:14:27
sig_hashalgo: sha256
[root@c7 ~]
cifs.ko.xz
[root@c7 ~]
[root@c7 ~]
[root@c7 ~]
cifs 703764 0
dns_resolver 13140 1 cifs
[root@c7 ~]
[root@c7 ~]
[root@c7 ~]
filename: /lib/modules/3.10.0-957.el7.x86_64/kernel/fs/cifs/cifs.ko.xz
description: VFS to access servers complying with the SNIA CIFS Specification e.g. Samba
...
depends: dns_resolver
[root@c7 ~]
filename: /lib/modules/3.10.0-957.el7.x86_64/kernel/net/dns_resolver/dns_resolver.ko.xz
depends:
parm: debug:DNS Resolver debugging mask (uint)
[root@c7 ~]
[root@c7 ~]
[root@c7 ~]
cifs 703764 0
dns_resolver 13140 1 cifs
[root@c7 ~]
[root@c7 ~]
[root@c7 ~]
dns_resolver 13140 0