Reiner Bühl schreef op 2018-07-25 13:02:
I have installed both the 32-bit 686-pae and the 64-bit amd64 kernel
on my system. Grub Update recognizes all of them:
bilbo:~# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.9.0-7-686-pae
Found initrd image: /boot/initrd.img-4.9.0-7-686-pae
Found linux image: /boot/vmlinuz-4.9.0-7-amd64
Found initrd image: /boot/initrd.img-4.9.0-7-amd64
Found linux image: /boot/vmlinuz-4.9.0-6-686-pae
Found initrd image: /boot/initrd.img-4.9.0-6-686-pae
Found linux image: /boot/vmlinuz-4.9.0-5-686-pae
Found initrd image: /boot/initrd.img-4.9.0-5-686-pae
Found memtest86 image: /boot/memtest86.bin
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
done
but if I check the entries in the Grub boot menu with
grep ^menuentry /boot/grub/grub.cfg | cut -d "'" -f2
I only see the following entries:
Debian GNU/Linux
menuentry "Memory test (memtest86)" {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Memory test (memtest86+, experimental multiboot)" {
menuentry "Memory test (memtest86+, serial console 115200,
experimental multiboot)" {
Is there a way - without directly interacting with grub while
physically sitting in front of the system during a boot - to get a
list of all possible selections to use it in grub-set-default?
Best regards,
Reiner
menuentry isn't always the first word on the line. So ^menuentry doesn't
find all matches.
You could try
awk -F"'" '/menuentry/ {print $2}' grub.cfg
(use ' as the delimiter, search for menuentry and print the second
column)
---
Floris