安装内核
sudo sed -i '$a\deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse \
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse \
' /etc/apt/sources.list
sudo apt update
sudo apt-get install linux-headers-5.4.0-90-generic linux-image-5.4.0-90-generic linux-modules-extra-5.4.0-90-generic -y
更新开机引导
sudo cat /boot/grub/grub.cfg | grep menuentry
选择图中高亮Ubuntu, with Linux 5.4.0-90-generic
修改 /etc/default/grub
sudo sed -i 's\^GRUB_DEFAULT.*\GRUB_DEFAULT="Ubuntu, with Linux 5.4.0-90-generic"\' /etc/default/grub
执行sudo update-grub
,选择高亮部分参数,再次修改 /etc/default/grub
sudo sed -i 's\^GRUB_DEFAULT.*\GRUB_DEFAULT="gnulinux-advanced-69d45584-f881-4acc-ac17-cfc591751841>gnulinux-5.4.0-90-generic-advanced-69d45584-f881-4acc-ac17-cfc591751841"\' /etc/default/grub
sudo update-grub
锁定版本
sudo apt-mark hold linux-headers-5.4.0-90-generic linux-image-5.4.0-90-generic linux-modules-extra-5.4.0-90-generic
重启即可
标签:5.4,grub,generic,sudo,内核,linux,90,Ubuntu18.04,切换 From: https://www.cnblogs.com/YueQAQ/p/17635622.html