Ubuntu system kernel drop

I installed the system Ubuntu16.04.6 native kernel 4.15.0, but the application only supports the installation of the 4.8.0 kernel, thus requiring lower kernel. PS: drop core risk, please carefully before operating

1, to view the available cores

Enter the command to view the kernel already available

1  grep menu entry /boot/grub/grub.cfg

 I have two cores available, 4.15.0 and 4.8.0, if the kernel is not what you want, you can install separately. Command is as follows:

1 sudo apt-get install linux-headers-x.x.x-x-generic linux-image-x.x.x-x-generic

2, modify the GRUB

Edit /etc/default/grubfiles GRUB_DEFAULT
by defaultGRUB_DEFAULT=0,改为如下代码

1 GRUB_DEFAULT="Advanced options for Ubuntu > Ubuntu, with Linux 4.8.0-36-generic"

3, update and restart GRUB

1 sudo update-grub
2 reboot

4, restart the choice of kernel

During the restart, Ubuntu need to enter the [Advanced Options], select to boot Linux 4.8.0 generic kernel just installed, or can not enter the system

  

5. Remove the extra cores

After selecting the 4.8.0 kernel and into the system, you can use the command uname -r to see if the installation was successful.

Next you need to remove the extra kernels, or else have to select each restart once the kernel is very troublesome.

View all core system

1 dpkg --get-selections| grep linux

 The other version of the kernel to delete, such as (the need to uninstall deinstall with dpkg): restart after the self-loading 4.8.0 kernel

1 sudo apt-get remove linux-headers-4.15.0-45
2 sudo dpkg -P linux-image-4.15.0-54-generic

6, apt-get update source

Since the replacement of the kernel, resulting in some loss of dependencies and packages, may be error when installing an application, it is necessary to update apt-get source

1 sudo apt-get update

If the update fails, reboot, in order to perform the update source

 

Guess you like

Origin www.cnblogs.com/leeqizhi/p/11469309.html