Greetings;
I've noticed that in Fedora 39 at least, grub2-mkconfig does not by default send to stdout as indicated in man pages.
I was in the habit of running the command to what I thought was stdout first by using:
grub2-mkconfig, to look for errors. The reported default behavior is to write to stdout only.
If no errors, I would use:
grub2-mkconfig -o /boot/grub2/grub.cfg
All of this is fine, but I have noticed that grub2-mkconfig alone, without the -o option is writing a new grub.cfg on it's own without using any option at all.
Don't know it it's really a bug or not but....................