Dear maintainers,
Please accept attached patch that should fix this behavior.
I am using coreutils sort to sort the list by version. As it is turning this:
/dev/sdb5:/dev/sdb5::/boot/vmlinuz-4.10.0-0.rc2.git2.1.fc26.x86_64:/boot/initramfs-4.10.0-0.rc2.git2.1.fc26.x86_64.img:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz-4.11.0-2.fc26.x86_64:/boot/initramfs-4.11.0-2.fc26.x86_64.img:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz-4.9.0-0.rc0.git7.1.fc26.x86_64:/boot/initramfs-4.9.0-0.rc0.git7.1.fc26.x86_64.img:root=/dev/sdb5
Into this
/dev/sdb5:/dev/sdb5::/boot/vmlinuz-4.11.0-2.fc26.x86_64:/boot/initramfs-4.11.0-2.fc26.x86_64.img:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz-4.10.0-0.rc2.git2.1.fc26.x86_64:/boot/initramfs-4.10.0-0.rc2.git2.1.fc26.x86_64.img:root=/dev/sdb5
/dev/sdb5:/dev/sdb5::/boot/vmlinuz-4.9.0-0.rc0.git7.1.fc26.x86_64:/boot/initramfs-4.9.0-0.rc0.git7.1.fc26.x86_64.img:root=/dev/sdb5
That change is necessary for grub2 to keep the most recent kernel in main menu.
Also, I am not sure how it is working for other distributions, but on Fedora I am seeing the same description for main menu, as well as sub-menus. I was thinking that in this case it should return only the most recent kernel.