【Linux 内核】编译 Linux 内核 ⑦ ( 安装内核模块 | 安装内核 | 重启系统 | 查看当前内核版本 )
【摘要】
文章目录
一、安装内核模块二、安装内核三、重启系统四、查看当前内核版本
一、安装内核模块
确保 Linux 内核编译完成 , 没有任何报错之后 ; 参考 【Linu...
一、安装内核模块
确保 Linux 内核编译完成 , 没有任何报错之后 ; 参考 【Linux 内核】编译 Linux 内核 ⑥ ( 安装 OpenSSL | 安装其它依赖库 | 内核编译完成 ) 博客 ;
进入 Linux 内核源码的根目录 , 执行
sudo make modules_install
- 1
命令 , 安装编译好的内核模块 ;
安装成功后命令行最后一页内容 :
完整过程如下 :
root@ubuntu:~# cd kernel/
root@ubuntu:~/kernel# cd linux-5.6.14
root@ubuntu:~/kernel/linux-5.6.14#
root@ubuntu:~/kernel/linux-5.6.14#
root@ubuntu:~/kernel/linux-5.6.14# ls
arch COPYING Documentation include Kbuild lib Makefile modules.builtin.modinfo net scripts System.map virt vmlinux.o
block CREDITS drivers init Kconfig LICENSES mm modules.order README security tools vmlinux
certs crypto fs ipc kernel MAINTAINERS modules.builtin Module.symvers samples sound usr vmlinux-gdb.py
root@ubuntu:~/kernel/linux-5.6.14#
root@ubuntu:~/kernel/linux-5.6.14#
root@ubuntu:~/kernel/linux-5.6.14# sudo make modules_install
INSTALL arch/x86/crypto/aesni-intel.ko
INSTALL arch/x86/crypto/blowfish-x86_64.ko
INSTALL arch/x86/crypto/camellia-aesni-avx-x86_64.ko
INSTALL arch/x86/crypto/camellia-aesni-avx2.ko
INSTALL arch/x86/crypto/camellia-x86_64.ko
INSTALL arch/x86/crypto/cast5-avx-x86_64.ko
INSTALL arch/x86/crypto/cast6-avx-x86_64.ko
INSTALL arch/x86/crypto/chacha-x86_64.ko
INSTALL arch/x86/crypto/crc32-pclmul.ko
INSTALL arch/x86/crypto/crct10dif-pclmul.ko
INSTALL arch/x86/crypto/des3_ede-x86_64.ko
INSTALL arch/x86/crypto/ghash-clmulni-intel.ko
INSTALL arch/x86/crypto/glue_helper.ko
INSTALL arch/x86/crypto/poly1305-x86_64.ko
INSTALL arch/x86/crypto/serpent-avx-x86_64.ko
INSTALL arch/x86/crypto/serpent-avx2.ko
INSTALL arch/x86/crypto/serpent-sse2-x86_64.ko
INSTALL arch/x86/crypto/sha1-ssse3.ko
INSTALL arch/x86/crypto/sha256-ssse3.ko
INSTALL arch/x86/crypto/sha512-ssse3.ko
INSTALL arch/x86/crypto/twofish-avx-x86_64.ko
INSTALL arch/x86/crypto/twofish-x86_64-3way.ko
INSTALL arch/x86/crypto/twofish-x86_64.ko
INSTALL arch/x86/events/intel/intel-cstate.ko
INSTALL arch/x86/events/intel/intel-rapl-perf.ko
INSTALL arch/x86/kernel/cpu/mce/mce-inject.ko
INSTALL arch/x86/kernel/cpuid.ko
INSTALL arch/x86/kernel/msr.ko
INSTALL arch/x86/kvm/kvm-amd.ko
INSTALL arch/x86/kvm/kvm-intel.ko
INSTALL arch/x86/kvm/kvm.ko
INSTALL arch/x86/oprofile/oprofile.ko
INSTALL arch/x86/platform/atom/punit_atom_debug.ko
INSTALL block/bfq.ko
INSTALL block/kyber-iosched.ko
INSTALL crypto/842.ko
INSTALL crypto/aes_ti.ko
INSTALL crypto/af_alg.ko
INSTALL crypto/algif_aead.ko
INSTALL crypto/algif_hash.ko
INSTALL crypto/algif_rng.ko
INSTALL crypto/algif_skcipher.ko
INSTALL crypto/ansi_cprng.ko
INSTALL crypto/anubis.ko
INSTALL crypto/arc4.ko
INSTALL crypto/asymmetric_keys/pkcs7_test_key.ko
INSTALL crypto/async_tx/async_memcpy.ko
INSTALL crypto/async_tx/async_pq.ko
INSTALL crypto/async_tx/async_raid6_recov.ko
INSTALL crypto/async_tx/async_tx.ko
INSTALL crypto/async_tx/async_xor.ko
INSTALL crypto/authenc.ko
INSTALL crypto/authencesn.ko
INSTALL crypto/blake2b_generic.ko
INSTALL crypto/blowfish_common.ko
INSTALL crypto/blowfish_generic.ko
INSTALL crypto/camellia_generic.ko
INSTALL crypto/cast5_generic.ko
INSTALL crypto/cast6_generic.ko
INSTALL crypto/cast_common.ko
INSTALL crypto/ccm.ko
INSTALL crypto/chacha20poly1305.ko
INSTALL crypto/chacha_generic.ko
INSTALL crypto/cmac.ko
INSTALL crypto/crc32_generic.ko
INSTALL crypto/cryptd.ko
INSTALL crypto/crypto_engine.ko
INSTALL crypto/crypto_simd.ko
INSTALL crypto/crypto_user.ko
INSTALL crypto/des_generic.ko
INSTALL crypto/ecc.ko
INSTALL crypto/ecdh_generic.ko
INSTALL crypto/echainiv.ko
INSTALL crypto/essiv.ko
INSTALL crypto/fcrypt.ko
INSTALL crypto/keywrap.ko
INSTALL crypto/khazad.ko
INSTALL crypto/lrw.ko
INSTALL crypto/lz4.ko
INSTALL crypto/lz4hc.ko
INSTALL crypto/md4.ko
INSTALL crypto/michael_mic.ko
INSTALL crypto/pcbc.ko
INSTALL crypto/pcrypt.ko
INSTALL crypto/poly1305_generic.ko
INSTALL crypto/rmd128.ko
INSTALL crypto/rmd160.ko
INSTALL crypto/rmd256.ko
INSTALL crypto/rmd320.ko
INSTALL crypto/salsa20_generic.ko
INSTALL crypto/seed.ko
INSTALL crypto/serpent_generic.ko
INSTALL crypto/sha3_generic.ko
INSTALL crypto/tcrypt.ko
INSTALL crypto/tea.ko
INSTALL crypto/tgr192.ko
INSTALL crypto/twofish_common.ko
INSTALL crypto/twofish_generic.ko
INSTALL crypto/vmac.ko
INSTALL crypto/wp512.ko
INSTALL crypto/xcbc.ko
INSTALL crypto/xor.ko
INSTALL crypto/xxhash_generic.ko
INSTALL crypto/zstd.ko
INSTALL drivers/acpi/acpi_configfs.ko
INSTALL drivers/acpi/acpi_extlog.ko
INSTALL drivers/acpi/acpi_ipmi.ko
INSTALL drivers/acpi/acpi_pad.ko
INSTALL drivers/acpi/apei/einj.ko
INSTALL drivers/acpi/dptf/dptf_power.ko
INSTALL drivers/acpi/ec_sys.ko
INSTALL drivers/acpi/nfit/nfit.ko
INSTALL drivers/acpi/sbs.ko
INSTALL drivers/acpi/sbshc.ko
INSTALL drivers/acpi/video.ko
INSTALL drivers/ata/acard-ahci.ko
INSTALL drivers/ata/ahci.ko
# 省略5000 行
INSTALL sound/usb/line6/snd-usb-toneport.ko
INSTALL sound/usb/line6/snd-usb-variax.ko
INSTALL sound/usb/misc/snd-ua101.ko
INSTALL sound/usb/snd-usb-audio.ko
INSTALL sound/usb/snd-usbmidi-lib.ko
INSTALL sound/usb/usx2y/snd-usb-us122l.ko
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko
INSTALL sound/x86/snd-hdmi-lpe-audio.ko
INSTALL virt/lib/irqbypass.ko
DEPMOD 5.6.14
root@ubuntu:~/kernel/linux-5.6.14#
root@ubuntu:~/kernel/linux-5.6.14#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
- 101
- 102
- 103
- 104
- 105
- 106
- 107
- 108
- 109
- 110
- 111
- 112
- 113
- 114
- 115
- 116
- 117
- 118
- 119
- 120
- 121
- 122
- 123
- 124
- 125
- 126
- 127
- 128
- 129
- 130
- 131
- 132
- 133
- 134
- 135
- 136
- 137
- 138
- 139
- 140
- 141
二、安装内核
内核模块安装完成后 , 执行
sudo make install
- 1
命令 , 安装内核 ;
下面的内核安装过程会持续很长时间 ;
内核安装过程 :
root@ubuntu:~# cd kernel/linux-5.6.14
root@ubuntu:~/kernel/linux-5.6.14#
root@ubuntu:~/kernel/linux-5.6.14# sudo make install
sh ./arch/x86/boot/install.sh 5.6.14 arch/x86/boot/bzImage \
System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.6.14 /boot/vmlinuz-5.6.14
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.6.14 /boot/vmlinuz-5.6.14
update-initramfs: Generating /boot/initrd.img-5.6.14
run-parts: executing /etc/kernel/postinst.d/pm-utils 5.6.14 /boot/vmlinuz-5.6.14
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.6.14 /boot/vmlinuz-5.6.14
run-parts: executing /etc/kernel/postinst.d/update-notifier 5.6.14 /boot/vmlinuz-5.6.14
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.6.14 /boot/vmlinuz-5.6.14
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-5.6.14
Found initrd image: /boot/initrd.img-5.6.14
Found linux image: /boot/vmlinuz-4.15.0-142-generic
Found initrd image: /boot/initrd.img-4.15.0-142-generic
Found linux image: /boot/vmlinuz-4.13.0-36-generic
Found initrd image: /boot/initrd.img-4.13.0-36-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
done
root@ubuntu:~/kernel/linux-5.6.14#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
三、重启系统
执行
reboot
- 1
命令 , 重启 Ubuntu 操作系统 ;
四、查看当前内核版本
重启之后 , 在命令行终端执行
uname -a
- 1
命令 , 查看当前的内核版本 , 发现当前内核版本已经
文章来源: hanshuliang.blog.csdn.net,作者:韩曙亮,版权归原作者所有,如需转载,请联系作者。
原文链接:hanshuliang.blog.csdn.net/article/details/123667921
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)