leon@ubuntu:~/drivers_leon/for_linux3.4.2/demo$ uname -r
4.4.0-040400-generic
2. 选择大于自己版本号的版本,下载安装包。 如果你的系统是ubuntu的,内核的下载可以去ubuntu的内核下载地址,但一定要匹配到适合自己电脑硬件架构(amd64、i386、armhf、ppc64)的内核版本: 确定好架构之后,需至少要下载3个安装包(第1、2、4个安装包),即linux-headers-xxx-xxx_all.deb 、linux-headers-xxx-generic_xxx_i386.deb 、linux-image-xxx-generic_xxx_i386.deb
3. 安装 1. 命令格式:sudo dpkg -i ***.deb 2. 安装顺序: 1. linux-headers-xxx_xxx_all.deb 2. linux-headers-***-generic_***_[amd64/i386/armhf/ppc64el].deb 3. linux-modules-***-generic_***_[amd64/i386/armhf/ppc64el].deb //有些版本,modules文件是没有的,也不需要安装,可以忽略。 4. linux-image-***-generic_***_[amd64/i386/armhf/ppc64el].deb
4. 卸载旧的内核
leon@ubuntu:~/$ dpkg --get-selections| grep linux
console-setup-linux install
libselinux1:amd64 install
libselinux1:i386 install
linux-base install
linux-firmware install
linux-generic install
linux-headers-4.4.0-22 install
linux-headers-4.4.0-22-generic install
linux-headers-4.4.0-24 install
linux-headers-4.4.0-24-generic install
linux-headers-4.4.0-28 install
linux-headers-4.4.0-28-generic install
linux-headers-4.4.0-31 install
linux-headers-4.4.0-31-generic install
linux-headers-4.4.0-34 install
linux-headers-4.4.0-34-generic install
linux-headers-4.4.0-36 install
linux-headers-4.4.0-36-generic install
linux-headers-4.4.0-38 install
linux-headers-4.4.0-38-generic install
linux-headers-4.4.0-42 install
linux-headers-4.4.0-42-generic install
linux-headers-generic install
linux-image-4.2.0-21-generic deinstall
linux-image-4.2.0-22-generic deinstall
linux-image-4.4.0-31-generic deinstall
linux-image-4.4.0-34-generic install
linux-image-4.4.0-36-generic install
linux-image-4.4.0-38-generic install
linux-image-4.4.0-42-generic install
linux-image-extra-4.2.0-21-generic deinstall
linux-image-extra-4.4.0-31-generic deinstall
linux-image-extra-4.4.0-34-generic deinstall
linux-image-extra-4.4.0-36-generic deinstall
linux-image-extra-4.4.0-38-generic install
linux-image-extra-4.4.0-42-generic install
linux-image-generic install
linux-libc-dev:amd64 install
linux-sound-base install
pptp-linux install
syslinux install
syslinux-common install
syslinux-legacy install
util-linux install1234567891011121314151617181920212223242
可以看到系统已经安装了多个内核版本,包括 headers 和 image ,可以删除这些来卸载旧的内核。 比如删除 4.4.0-22 内核,我们看到上面只有 headers,因此可以这样:
sudo apt-get remove --purge linux-headers-4.4.0-22
sudo apt-get remove --purge linux-image-4.2.0-22-generic123
...
sudo apt-get autoclean
sudo apt-get autoremove
5. 重启之后查看系统版本 执行sudo reboot 重启系统,在执行uname -r 或者uname -a 查看自己的版本号是否已经升级成功。
更多精彩文章,请关注leon的博客小站
|