![从 14.04 LTS 升级到 16.04.1 LTS 后,uname 报告错误内核](https://linux22.com/image/1144710/%E4%BB%8E%2014.04%20LTS%20%E5%8D%87%E7%BA%A7%E5%88%B0%2016.04.1%20LTS%20%E5%90%8E%EF%BC%8Cuname%20%E6%8A%A5%E5%91%8A%E9%94%99%E8%AF%AF%E5%86%85%E6%A0%B8.png)
我已经为此苦苦挣扎了几个小时,但还是找不到解决办法。通常我不会在意 uname 是否报告了错误的内核,但在安装 Virtualbox 时,这是一个大问题。输出 cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
输出dpkg -l | grep linux-image:
ii linux-image-3.13.0-32-generic 3.13.0-32.57 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-3.13.0-32-generic 3.13.0-32.57 amd64 Linux kernel extra modules for version 3.13.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-59-generic 4.4.0-59.80 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-virtual 4.4.0.59.62 amd64 Transitional package.
ii linux-image-generic 4.4.0.59.62 amd64 Generic Linux kernel image
And finally the spurious uname output:
Linux bluemountain 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
您对为什么会出现这种差异有任何想法吗?以及可能的解决方案吗?
答案1
在命令行上运行以下命令以确保您拥有最新更新:
sudo apt-get update && sudo apt-get dist-upgrade
并且最好更新 initramfs:
sudo update-initramfs -u
并检查您是否安装了最新的内核,检查 /boot:
ls /boot
并更新引导加载程序脚本以确保它已更新:
sudo update-grub
如果一切正常则重新启动并查看是否有效。