You are not logged in.

#1 2024-09-03 23:40:20

daidahan
Member
Registered: 2024-08-15
Posts: 32

grub how to choose kernel

Greetings community. I have a request. They can help you teach my system to give me the option of choosing the kernel I want to use. thanks for your help.
I already generated the grub.cfg with grub-mkconfig, but nothing appears at startup.
I make edits in /etc/default/grub but they are not reflected.

sudo grub-mkconfig -o /boot/grub/grub.cfg
/usr/bin/grub-editenv: error: no se puede abrir «//boot/grub/grubenv.new»: No existe el fichero o el directorio.
/usr/bin/grub-mkconfig: línea 270: /boot/grub/grub.cfg.new: No existe el fichero o el directorio

I have created the directory and generated the file. but still nothing appears in the start menu.

sudo grub-mkconfig -o /boot/grub/grub.cfg
[sudo] contraseña para daidahan: 
Generando un fichero de configuración de grub...
Encontrada imagen de linux: /boot/vmlinuz-linux-zen
Encontrada imagen de memoria inicial: /boot/initramfs-linux-zen.img
Found fallback initrd image(s) in /boot:  initramfs-linux-zen-fallback.img
Encontrada imagen de linux: /boot/vmlinuz-linux-mainline
Encontrada imagen de memoria inicial: /boot/initramfs-linux-mainline.img
Found fallback initrd image(s) in /boot:  initramfs-linux-mainline-fallback.img
Encontrada imagen de linux: /boot/vmlinuz-linux
Encontrada imagen de memoria inicial: /boot/initramfs-linux.img
Found fallback initrd image(s) in /boot:  initramfs-linux-fallback.img
Aviso: 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.
Adding boot menu entry for UEFI Firmware Settings ...
hecho

What is the problem with installing os-prober?

I run grub-mkconfig but is the same... still nothing appears in the start menu.

Last edited by daidahan (2024-09-04 02:11:04)

Offline

#2 2024-09-04 11:38:10

astralc
Member
Registered: 2022-09-17
Posts: 127

Re: grub how to choose kernel

  • if the /boot/grub directory does not exist it mean you installed grub wrong.
    make sure you run grub-install correctly.

  • grub-mkconfig usage of os-prober is by default disabled, you need to enable it in /etc/default/grub

Offline

#3 2024-09-04 19:27:07

euromatlox
Member
Registered: 2017-02-10
Posts: 149

Re: grub how to choose kernel

Edit  /etc/default/grub, timeout long enough and set output to console.
In my pc setup no menu appeared until I set output to console, maybe same issue here.
(I guess graphical terminal is default, the console however might be more reliable choice.)

GRUB_TIMEOUT=20
GRUB_TIMEOUT_STYLE=menu
GRUB_TERMINAL_INPUT=console
GRUB_TERMINAL_OUTPUT=console

After succesfully booted into Linux, if you have other OS you can uncomment the os_prober line.
OS-Prober does not (usually) detect other OS in live environment..so better keep it disabled till linux is ok.

GRUB_DISABLE_OS_PROBER=false

And important..after modifying /etc/default/grub, remember update grub's config. Then reboot. (sync there just in case)

grub-mkconfig -o /boot/grub/grub.cfg
sync
systemctl reboot

Last edited by euromatlox (2024-09-04 19:31:01)

Offline

Board footer

Powered by FluxBB