Default grub entry centos 7
/boot/grub2/grub.cfg has a list of menuentries with a lot of information in each. Starting at 0 count down to the one you want (you could script this out too). Then take that number and edit /etc/default/grub. In that file, add (or edit) a line:
GRUB_DEFAULT=x
x being the number of the menuentry you picked from looking in /boot/grub2/grub.cfg
Then you have to update the grub.cfg file by running:
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig compiles settings “…using templates
# from /etc/grub.d and settings from /etc/default/grub.”
I understand other systems to have a script called “update-grub” or “update-grub2” but all they do is run the “grub-mkconfig” or “grub2-mkconfig” in turn.