0

I compiled and installed linux-5.15.44 kernel on my ubuntu22.04 (5.15.0-35-generic).

Running

sudo update-grub

shows

xxx@my-vm2204:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.44
Found initrd image: /boot/initrd.img-5.15.44
Found linux image: /boot/vmlinuz-5.15.0-35-generic
Found initrd image: /boot/initrd.img-5.15.0-35-generic
Found linux image: /boot/vmlinuz-5.15.0-33-generic
Found initrd image: /boot/initrd.img-5.15.0-33-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

Ubuntu boots from 5.15.44 as I expected.

Now I want to boot from 5.15.0-35-generic (3rd entry).

I edited GRUB_DEFAULT=2 in /etc/default/grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=2 
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="find_preseed=/preseed.cfg auto noprompt priority=critical locale=en_US"

I saved it and executed "update-grub" again.

sudo update-grub

Finally I rebooted.

But Ubuntu boots from the 7th entry (memtest86+ image: /boot/memtest86+.elf),

not from 3th entry(linux image: /boot/vmlinuz-5.15.0-35-generic)

I don't know whether or not I can pick previous version as a autobooter.

Pls anyone let me know....

Thanks

Dooggy
  • 1
  • 1
  • This https://askubuntu.com/questions/1200278/how-to-edit-grub-in-terminal-ubuntu-18-04/1200356#1200356 works also for a specific kernel – nobody Jun 08 '22 at 06:56
  • Wow!! thanks a lot!! It works fine – Dooggy Jun 08 '22 at 23:37
  • 1
    Does this answer your question? [how to edit grub in terminal ubuntu 18.04](https://askubuntu.com/questions/1200278/how-to-edit-grub-in-terminal-ubuntu-18-04) – Pilot6 Jun 10 '22 at 09:40

0 Answers0