Re: choosing default kernel in grub
Hi Riccardo,
On Wed, 2025-10-15 at 14:46 +0200, Riccardo Mottola wrote:
> trivial question, but couldn't find a good answer.
>
> How do I set a specific kernel to be the default in grub to be booted?
> In debian kernels are in the "advanced" section. So the easy way to set
> the default menu entry in grub is not working.
Edit /etc/default/grub and set GRUB_DEFAULT similar to this:
# 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="gnulinux-advanced-a8314d10-9c39-438b-9dc4-9db2e05a6530>gnulinux-4.19.0-5-sparc64-advanced-a8314d10-9c39-438b-9dc4-9db2e05a6530"
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
The entry names can be found in /boot/grub/grub.cfg:
root@raverin:~# grep gnulinux-advanced /boot/grub/grub.cfg
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-a8314d10-9c39-438b-9dc4-9db2e05a6530' {
root@raverin:~#
Mind the syntax above if you need to use a kernel from the advanced section
with ">", i.e. "gnulinux-advanced...>gnulinux-4.19".
After that, run "update-grub" as root.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: