升级Linux内核其实很简单,本文介绍的方法只需要一条命令,至少能够升级到Linux 5.5内核版本。当然,脚本当中要是加入新的Linux内核,你就能够升级到那个新内核,也就是说可以升级到Linux 5.5内核(参考Linux 5.5内核发布下载,附新功能及新特性介绍)或Linux 5.5以上版本,可在Deepin、Debian、Ubuntu平台中应用。
一条命令升级Linux内核的方法 先确保你的操作系统安装了curl、wget、unzip这三个工具,如果还没有安装,请先运行sudo apt install curl wget unzip命令安装。 升级Linux内核只需要执行以下命令: curl --proto '=https' --tlsv1.2 -sSf https://gitee.com/2016_12_21/up_kernel/raw/master/get_kernel_zip.sh | sh 等待命令执行完成即可。
使用该命令升级Linux内核会不会使系统崩溃? 现在为你解答该问题:绝对不会,因为安装新的Linux内核,旧的内核也会被保留下来,开机时能选择从哪个Linux内核进入到系统中。如果新安装的内核不可用,可使用旧的内核进入到系统。
可能会出现的错误 如报以下错误: 正在设置 linux-headers-5.5.5-050505-generic (5.5.5-050505.202002191432) ... /etc/kernel/header_postinst.d/dkms: Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information. Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/deepin-anything/0.0/build/make.log for more information. Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/huawei-wmi/1.0/build/make.log for more information. Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/mincores/0.2.0/build/make.log for more information. 正在设置 linux-image-unsigned-5.5.5-050505-generic (5.5.5-050505.202002191432) ... I: /vmlinuz is now a symlink to boot/vmlinuz-5.5.5-050505-generic I: /initrd.img is now a symlink to boot/initrd.img-5.5.5-050505-generic 正在处理用于 linux-image-unsigned-5.5.5-050505-generic (5.5.5-050505.202002191432) 的触发器 ... /etc/kernel/postinst.d/dkms: Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information. Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/deepin-anything/0.0/build/make.log for more information. Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/huawei-wmi/1.0/build/make.log for more information. Error! Bad return status for module build on kernel: 5.5.5-050505-generic (x86_64) Consult /var/lib/dkms/mincores/0.2.0/build/make.log for more information. 解答:采用一条命令升级内核完成了,只是bcmwl、deepin-anything和huawei-wmi这几个内核模块可能不兼容新版本内核,在触发dkms时候编译失败了,新版本Linux内核无法使用这几个模块,不影响使用。
相关主题 |