On Fri 18 Dec 2020 at 09:45:22 (+0300), Reco wrote: > Hi. > > On Thu, Dec 17, 2020 at 06:45:47PM -0600, David Wright wrote: > > > A correction - GRUB_DISABLE_SUBMENU=true should be put into > > > /etc/default/grub. > > > > What sort of weirdness happens? Is the problem with writing > > /boot/grub/grubenv (where the strings reside), or with Grub's > > reading and parsing it? I've not had any problems myself. > > It's the selection of a top level menu instead of a menuentry that can > happen, unless you disable submenus.
Let me just rephrase that, but clarifying the terminology: "It's the selection of a top level menu[entry] instead of a [submenu's] menuentry that can happen". That sounds as if you're using a submenu's menuentry ID without specifying the ID of the submenu itself, as in grub-reboot 'submenuentry-id>menuentry-id' rather than grub-reboot 'menuentry-id' But even then, the top level menuentry's ID strings are typically quite different from the submenu's ones, the latter having the kernel version number, the former lacking it. > While it does allow unattended boot, it does not allow the selection of > an old kernel, for instance. At least, in a easy way. As can be seen from the attached, the submenu's IDs all include the versions of the old kernels. (The top level menu IDs run the default kernel for that system.) Are you possibly compiling custom kernels that don't distinguish themselves in the version string? Cheers, David. The attachment has been reduced to just the menu entries and their ID strings, removing the human label and all the --options. In addition, the UUIDS have been shortened to the first 8 characters, as the strings do get very long. The duplications that are seen are just that, duplications: the top level entry is duplicated by the first advanced entry, for whatever reason, and they get copied in from the other partitions by the osprober.
menuentry $menuentry_id_option 'gnulinux-simple-eea50581' { submenu $menuentry_id_option 'gnulinux-advanced-eea50581' { menuentry $menuentry_id_option 'gnulinux-4.19.0-13-686-pae-advanced-eea50581' { menuentry $menuentry_id_option 'gnulinux-4.19.0-13-686-pae-recovery-eea50581' { menuentry $menuentry_id_option 'gnulinux-4.19.0-12-686-pae-advanced-eea50581' { menuentry $menuentry_id_option 'gnulinux-4.19.0-12-686-pae-recovery-eea50581' { menuentry $menuentry_id_option 'osprober-gnulinux-simple-656f2fc7' { submenu $menuentry_id_option 'osprober-gnulinux-advanced-656f2fc7' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-8-amd64--656f2fc7' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-8-amd64--656f2fc7' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-8-amd64-root=UUID=656f2fc7 ro single-656f2fc7' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-5-amd64--656f2fc7' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-5-amd64-root=UUID=656f2fc7 ro single-656f2fc7' { menuentry $menuentry_id_option 'osprober-gnulinux-simple-d37f69ff' { submenu $menuentry_id_option 'osprober-gnulinux-advanced-d37f69ff' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-9-686-pae--d37f69ff' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-9-686-pae--d37f69ff' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-9-686-pae-root=UUID=d37f69ff ro single-d37f69ff' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-5-686-pae--d37f69ff' { menuentry $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.19.0-5-686-pae-root=UUID=d37f69ff ro single-d37f69ff' {