Ubuntu Downgrade Kernel
- Find the
$menuentry_id_option
for the submenu:
$ grep submenu /boot/grub/grub.cfg
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-6270b0e3-8dcc-4346-a3f4-5ca5024de21a' {
2. Find the $menuentry_id_option
for the menu entry for the kernel you want to use:
$ grep gnulinux /boot/grub/grub.cfg
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-6270b0e3-8dcc-4346-a3f4-5ca5024de21a' {
submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-6270b0e3-8dcc-4346-a3f4-5ca5024de21a' {
menuentry 'Ubuntu, with Linux 5.4.0-71-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-71-generic-advanced-6270b0e3-8dcc-4346-a3f4-5ca5024de21a' {
menuentry 'Ubuntu, with Linux 5.4.0-71-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-71-generic-recovery-6270b0e3-8dcc-4346-a3f4-5ca5024de21a' {
menuentry 'Ubuntu, with Linux 5.4.0-70-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-70-generic-advanced-6270b0e3-8dcc-4346-a3f4-5ca5024de21a' {
menuentry 'Ubuntu, with Linux 5.4.0-70-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.0-70-generic-recovery-6270b0e3-8dcc-4346-a3f4-5ca5024de21a' {
3. edit /etc/default/grub
mark GRUB_DEFAULT=0 inser new value
example: Kernel 5.4.0-71 → 5.4.0-70
#GRUB_DEFAULT=0
GRUB_DEFAULT="gnulinux-advanced-6270b0e3-8dcc-4346-a3f4-5ca5024de21a>gnulinux-5.4.0-70-generic-advanced-6270b0e3-8dcc-4346-a3f4-5ca5024de21a"
4. Reboot Server & Check Kernel Version Change Success?
$ reboot
boot star after check running kernel version
$ uname -a
Linux TP-WS60 5.4.0-70-generic #78-Ubuntu SMP Fri Mar 19 13:29:52 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
參考來源: https://unix.stackexchange.com/questions/198003/set-default-kernel-in-grub