我已经下载了最新的内核和头文件,但 Ubuntu 在重启时没有使用它。当我在 Grub 菜单中选择 3.19.0-22 时,只有 3.19.0-22 可以运行。
我可以以某种方式刷新该列表或强制 Ubuntu 选择新的内核 (linux-image-4.6.2-040602-generic)
以下是已安装的图像和标题的列表:
$ dpkg -l | grep linux-headers
ii linux-headers-3.19.8-992 3.19.8-992.201605312242 all Header files related to Linux kernel version 3.19.8
ii linux-headers-3.19.8-992-generic 3.19.8-992.201605312242 amd64 Linux kernel headers for version 3.19.8 on 64 bit x86 SMP
ii linux-headers-4.6.2-040602 4.6.2-040602.201606100516 all Header files related to Linux kernel version 4.6.2
ii linux-headers-4.6.2-040602-generic 4.6.2-040602.201606100516 amd64 Linux kernel headers for version 4.6.2 on 64 bit x86 SMP
$ dpkg -l | grep linux-image
rc linux-image-3.19.0-18-generic 3.19.0-18.18 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP
rc linux-image-3.19.0-21-generic 3.19.0-21.21 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP
ii linux-image-3.19.0-22-generic 3.19.0-22.22 amd64 Linux kernel image for version 3.19.0 on 64 bit x86 SMP
ii linux-image-4.6.2-040602-generic 4.6.2-040602.201606100516 amd64 Linux kernel image for version 4.6.2 on 64 bit x86 SMP
rc linux-image-extra-3.19.0-18-generic 3.19.0-18.18 amd64 Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
rc linux-image-extra-3.19.0-21-generic 3.19.0-21.21 amd64 Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
ii linux-image-extra-3.19.0-22-generic 3.19.0-22.22 amd64 Linux kernel extra modules for version 3.19.0 on 64 bit x86 SMP
$ uname -r
3.19.0-22-generic
我希望有一个人可以帮助我
// 乌尔里克·麦克阿德尔
更新:
sudo update-grub 的输出:
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.6.2-040602-generic
Found kernel: /boot/vmlinuz-3.19.0-22-generic
Found kernel: /boot/memtest86+.bin
Found kernel: /boot/vmlinuz-4.6.2-040602-generic
Found kernel: /boot/vmlinuz-3.19.0-22-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
更新2:
下面是我启动时的 Grub 图像: 启动时我的 Grub
最终解决方案:
我重新安装了 Grub 引导加载程序:
# purge old and reinstall new to sda
sudo apt-get purge grub grub-pc grub-common
sudo mv /boot/grub /boot/grub_backup
sudo mkdir /boot/grub
sudo apt-get install grub-pc grub-common
sudo grub-install --recheck /dev/sda
sudo update-grub
答案1
好的,正如我在帖子中提到的,最终答案是重新安装 Grub:
# purge old and reinstall new to sda
sudo apt-get purge grub grub-pc grub-common
sudo mv /boot/grub /boot/grub_backup
sudo mkdir /boot/grub
sudo apt-get install grub-pc grub-common
sudo grub-install --recheck /dev/sda
sudo update-grub
答案2
您需要重新加载 grub。通常,当您安装新内核时会自动发生此问题,那么您是如何安装内核的?要更新 grub,请使用此命令。
sudo update-grub
然后重新启动计算机。