--- /usr/lib/linux-boot-probes/mounted/40grub2 2021-07-11 04:43:50.000000000 +0200 +++ /root/40grub2 2024-02-04 15:19:36.925512910 +0100 @@ -93,7 +93,12 @@ entry_result } -if [ -e "$mpoint/boot/grub/grub.cfg" ] && \ +# If fresh grub.cfg.new exists, we where in update-grub/grub-mkconfig generation cycle +GRUB_NEW=$(find ${mpoint}/boot/grub/ -maxdepth 1 -type f -name grub.cfg.new -mmin -5 || true) +if [ -n "${GRUB_NEW}" ];then + debug "parsing grub.cfg.new" + parse_grub_menu "$mpoint" "$partition" "$bootpart" < "$mpoint/boot/grub/grub.cfg.new" +elif [ -e "$mpoint/boot/grub/grub.cfg" ] && \ ([ ! -e "$mpoint/boot/grub/menu.lst" ] || \ [ "$mpoint/boot/grub/grub.cfg" -nt "$mpoint/boot/grub/menu.lst" ]); then debug "parsing grub.cfg"