重新安装最新的内核?

在我最新安装的内核上运行时,我使用build / modprobe / make做了一些愚蠢的事情。 现在内核无法启动。 我目前正在运行以前的内核。

我怎样才能清理它? 我想回到apt repo中的“stock”最新内核。

编辑:我应该注意….我试图安装flashcache( https://github.com/facebook/flashcache/ )

我试着这样做

sudo apt-get install --reinstall linux-image-generic linux-image 

这没有解决它; 所以我尝试了“恢复模式”选项,并看到内核恐慌加载flashcache模块….我必须删除一些东西,某处……

在此处输入图像描述

我不知道你是否有网络访问权限,但如果你有,那么:

 sudo apt-get install --reinstall linux-image-generic linux-image 

只需启动到以前的内核版本并键入以下内容,只需将##替换为您尝试启动的内核版本即可。

 sudo update-initramfs -u -k 3.2.0-##-generic-pae 

只需将##替换为您尝试启动的内核版本即可。

跟着它向Grub打招呼,然后重新启动。

 sudo update-grub sudo reboot now 

现在,在引导到新内核时,您不应再看到内核恐慌。

我有VGA驱动程序的问题,而解决方案并不能解决我的问题。

帮助的主要解决方案,它从一开始就删除manulaly和安装

 // remove modules sudo rm -rf /lib/modules/4.13.0-3* remove headers sudo rm -rf /usr/src/linux-headers-4.13.0-3* // clear boot sudo rm -rf /boot/initrd.img-4.13.0-3* sudo rm -rf /boot/vmlinuz-4.13.0-3* sudo rm -rf /boot/System.map-4.13.0-3* sudo rm -rf /boot/config-4.13.0-3* // refresh grub. I reboot after update grub, but maybe is not important sudo update-grub //check the lastes version of linux images sudo apt-cache search linux-image |grep 4.14 # linux-image-4.14.0-1003-azure-edge - Linux kernel image for version 4.14.0 on 64 bit x86 SMP # linux-image-extra-4.14.0-1003-azure-edge - Linux kernel extra modules for version 4.14.0 on 64 bit x86 SMP # linux-image-4.14.0-1004-azure-edge - Linux kernel image for version 4.14.0 on 64 bit x86 SMP # linux-image-extra-4.14.0-1004-azure-edge - Linux kernel extra modules for version 4.14.0 on 64 bit x86 SMP // install the lastes verion sudo apt-get install linux-image-4.14.0-1004-azure-edge linux-headers-4.14.0-1004-azure-edge linux-image-extra-4.14.0-1004-azure-edge // restart pc sudo reboot now