How can I boot with an older ker

2024-11-18  本文已影响0人  SmalltalkVoice

Get the currently installed kernel menu entries using below command.

ubuntu:~$ sudo grub-mkconfig | grep -iE "menuentry 'Ubuntu, with Linux" | awk '{print i++ " : "$1, $2, $3, $4, $5, $6, $7}'

0 : menuentry 'Ubuntu, with Linux 5.4.0-80-generic' --class ubuntu
1 : menuentry 'Ubuntu, with Linux 5.4.0-80-generic (recovery mode)'
2 : menuentry 'Ubuntu, with Linux 4.15.0-159-generic' --class ubuntu
3 : menuentry 'Ubuntu, with Linux 4.15.0-159-generic (recovery mode)'
4 : menuentry 'Ubuntu, with Linux 4.15.0-45-generic' --class ubuntu
5 : menuentry 'Ubuntu, with Linux 4.15.0-45-generic (recovery mode)'

Modify the GRUB_DEFAULT=0 value as per your need.

currently my server booted with 5.4.0-80-generic

ubuntu:~# uname -srn
Linux ubuntu 5.4.0-80-generic

so i want to boot my system with 4.15.0-45-generic which is menu entry 4

modified GRUB_DEFAULT="1>4" value in /etc/default/grub executed below command to regenerate a grub config file with modified GRUB_DEFAULT settings.

Explained "1>4" format here

sudo update-grub

rebooted the ubuntu system.

sudo systemctl reboot

post reboot my ubuntu server booted with old kernel 4.15.0-45-generic

ubuntu:~# uname -srn
Linux ubuntu 4.15.0-45-generic
上一篇 下一篇

猜你喜欢

热点阅读