1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 【Linux 内核】编译 Linux 内核 ⑦ ( 安装内核模块 | 安装内核 | 重启系统

【Linux 内核】编译 Linux 内核 ⑦ ( 安装内核模块 | 安装内核 | 重启系统

时间:2023-11-21 06:00:26

相关推荐

【Linux 内核】编译 Linux 内核 ⑦ ( 安装内核模块 | 安装内核 | 重启系统

文章目录

一、安装内核模块二、安装内核三、重启系统四、查看当前内核版本

一、安装内核模块

确保 Linux 内核编译完成 , 没有任何报错之后 ; 参考 【Linux 内核】编译 Linux 内核 ⑥ ( 安装 OpenSSL | 安装其它依赖库 | 内核编译完成 ) 博客 ;

进入 Linux 内核源码的根目录 , 执行

sudo make modules_install

命令 , 安装编译好的内核模块 ;

安装成功后命令行最后一页内容 :

完整过程如下 :

root@ubuntu:~# cd kernel/root@ubuntu:~/kernel# cd linux-5.6.14root@ubuntu:~/kernel/linux-5.6.14# root@ubuntu:~/kernel/linux-5.6.14# root@ubuntu:~/kernel/linux-5.6.14# lsarch COPYING Documentation include Kbuild libMakefile modules.builtin.modinfo netscripts System.map virt vmlinux.oblock CREDITS drivers initKconfig LICENSESmmmodules.order README security tools vmlinuxcerts crypto fs ipckernel MAINTAINERS modules.builtin Module.symvers samples soundusr vmlinux-gdb.pyroot@ubuntu:~/kernel/linux-5.6.14# root@ubuntu:~/kernel/linux-5.6.14# root@ubuntu:~/kernel/linux-5.6.14# sudo make modules_installINSTALL arch/x86/crypto/aesni-intel.koINSTALL arch/x86/crypto/blowfish-x86_64.koINSTALL arch/x86/crypto/camellia-aesni-avx-x86_64.koINSTALL arch/x86/crypto/camellia-aesni-avx2.koINSTALL arch/x86/crypto/camellia-x86_64.koINSTALL arch/x86/crypto/cast5-avx-x86_64.koINSTALL arch/x86/crypto/cast6-avx-x86_64.koINSTALL arch/x86/crypto/chacha-x86_64.koINSTALL arch/x86/crypto/crc32-pclmul.koINSTALL arch/x86/crypto/crct10dif-pclmul.koINSTALL arch/x86/crypto/des3_ede-x86_64.koINSTALL arch/x86/crypto/ghash-clmulni-intel.koINSTALL arch/x86/crypto/glue_helper.koINSTALL arch/x86/crypto/poly1305-x86_64.koINSTALL arch/x86/crypto/serpent-avx-x86_64.koINSTALL arch/x86/crypto/serpent-avx2.koINSTALL arch/x86/crypto/serpent-sse2-x86_64.koINSTALL arch/x86/crypto/sha1-ssse3.koINSTALL arch/x86/crypto/sha256-ssse3.koINSTALL arch/x86/crypto/sha512-ssse3.koINSTALL arch/x86/crypto/twofish-avx-x86_64.koINSTALL arch/x86/crypto/twofish-x86_64-3way.koINSTALL arch/x86/crypto/twofish-x86_64.koINSTALL arch/x86/events/intel/intel-cstate.koINSTALL arch/x86/events/intel/intel-rapl-perf.koINSTALL arch/x86/kernel/cpu/mce/mce-inject.koINSTALL arch/x86/kernel/cpuid.koINSTALL arch/x86/kernel/msr.koINSTALL arch/x86/kvm/kvm-amd.koINSTALL arch/x86/kvm/kvm-intel.koINSTALL arch/x86/kvm/kvm.koINSTALL arch/x86/oprofile/oprofile.koINSTALL arch/x86/platform/atom/punit_atom_debug.koINSTALL block/bfq.koINSTALL block/kyber-iosched.koINSTALL crypto/842.koINSTALL crypto/aes_ti.koINSTALL crypto/af_alg.koINSTALL crypto/algif_aead.koINSTALL crypto/algif_hash.koINSTALL crypto/algif_rng.koINSTALL crypto/algif_skcipher.koINSTALL crypto/ansi_cprng.koINSTALL crypto/anubis.koINSTALL crypto/arc4.koINSTALL crypto/asymmetric_keys/pkcs7_test_key.koINSTALL crypto/async_tx/async_memcpy.koINSTALL crypto/async_tx/async_pq.koINSTALL crypto/async_tx/async_raid6_recov.koINSTALL crypto/async_tx/async_tx.koINSTALL crypto/async_tx/async_xor.koINSTALL crypto/authenc.koINSTALL crypto/authencesn.koINSTALL crypto/blake2b_generic.koINSTALL crypto/blowfish_common.koINSTALL crypto/blowfish_generic.koINSTALL crypto/camellia_generic.koINSTALL crypto/cast5_generic.koINSTALL crypto/cast6_generic.koINSTALL crypto/cast_common.koINSTALL crypto/ccm.koINSTALL crypto/chacha20poly1305.koINSTALL crypto/chacha_generic.koINSTALL crypto/cmac.koINSTALL crypto/crc32_generic.koINSTALL crypto/cryptd.koINSTALL crypto/crypto_engine.koINSTALL crypto/crypto_simd.koINSTALL crypto/crypto_user.koINSTALL crypto/des_generic.koINSTALL crypto/ecc.koINSTALL crypto/ecdh_generic.koINSTALL crypto/echainiv.koINSTALL crypto/essiv.koINSTALL crypto/fcrypt.koINSTALL crypto/keywrap.koINSTALL crypto/khazad.koINSTALL crypto/lrw.koINSTALL crypto/lz4.koINSTALL crypto/lz4hc.koINSTALL crypto/md4.koINSTALL crypto/michael_mic.koINSTALL crypto/pcbc.koINSTALL crypto/pcrypt.koINSTALL crypto/poly1305_generic.koINSTALL crypto/rmd128.koINSTALL crypto/rmd160.koINSTALL crypto/rmd256.koINSTALL crypto/rmd320.koINSTALL crypto/salsa20_generic.koINSTALL crypto/seed.koINSTALL crypto/serpent_generic.koINSTALL crypto/sha3_generic.koINSTALL crypto/tcrypt.koINSTALL crypto/tea.koINSTALL crypto/tgr192.koINSTALL crypto/twofish_common.koINSTALL crypto/twofish_generic.koINSTALL crypto/vmac.koINSTALL crypto/wp512.koINSTALL crypto/xcbc.koINSTALL crypto/xor.koINSTALL crypto/xxhash_generic.koINSTALL crypto/zstd.koINSTALL drivers/acpi/acpi_configfs.koINSTALL drivers/acpi/acpi_extlog.koINSTALL drivers/acpi/acpi_ipmi.koINSTALL drivers/acpi/acpi_pad.koINSTALL drivers/acpi/apei/einj.koINSTALL drivers/acpi/dptf/dptf_power.koINSTALL drivers/acpi/ec_sys.koINSTALL drivers/acpi/nfit/nfit.koINSTALL drivers/acpi/sbs.koINSTALL drivers/acpi/sbshc.koINSTALL drivers/acpi/video.koINSTALL drivers/ata/acard-ahci.koINSTALL drivers/ata/ahci.ko# 省略5000 行INSTALL sound/usb/line6/snd-usb-toneport.koINSTALL sound/usb/line6/snd-usb-variax.koINSTALL sound/usb/misc/snd-ua101.koINSTALL sound/usb/snd-usb-audio.koINSTALL sound/usb/snd-usbmidi-lib.koINSTALL sound/usb/usx2y/snd-usb-us122l.koINSTALL sound/usb/usx2y/snd-usb-usx2y.koINSTALL sound/x86/snd-hdmi-lpe-audio.koINSTALL virt/lib/irqbypass.koDEPMOD 5.6.14root@ubuntu:~/kernel/linux-5.6.14# root@ubuntu:~/kernel/linux-5.6.14#

二、安装内核

内核模块安装完成后 , 执行

sudo make install

命令 , 安装内核 ;

下面的内核安装过程会持续很长时间 ;

内核安装过程 :

root@ubuntu:~# cd kernel/linux-5.6.14root@ubuntu:~/kernel/linux-5.6.14# root@ubuntu:~/kernel/linux-5.6.14# sudo make installsh ./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.14run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.6.14 /boot/vmlinuz-5.6.14update-initramfs: Generating /boot/initrd.img-5.6.14run-parts: executing /etc/kernel/postinst.d/pm-utils 5.6.14 /boot/vmlinuz-5.6.14run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 5.6.14 /boot/vmlinuz-5.6.14run-parts: executing /etc/kernel/postinst.d/update-notifier 5.6.14 /boot/vmlinuz-5.6.14run-parts: executing /etc/kernel/postinst.d/zz-update-grub 5.6.14 /boot/vmlinuz-5.6.14Generating 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.14Found initrd image: /boot/initrd.img-5.6.14Found linux image: /boot/vmlinuz-4.15.0-142-genericFound initrd image: /boot/initrd.img-4.15.0-142-genericFound linux image: /boot/vmlinuz-4.13.0-36-genericFound initrd image: /boot/initrd.img-4.13.0-36-genericFound memtest86+ image: /boot/memtest86+.elfFound memtest86+ image: /boot/memtest86+.bindoneroot@ubuntu:~/kernel/linux-5.6.14#

三、重启系统

执行

reboot

命令 , 重启 Ubuntu 操作系统 ;

四、查看当前内核版本

重启之后 , 在命令行终端执行

uname -a

命令 , 查看当前的内核版本 , 发现当前内核版本已经

【Linux 内核】编译 Linux 内核 ⑦ ( 安装内核模块 | 安装内核 | 重启系统 | 查看当前内核版本 )

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。