Is there a file that contains the option of the GRUB2 menu that was chosen for the current boot? This question is different from obtaining the Kernel boot sequence, for example, to differentiate two boot options with the same boot sequence.
Asked
Active
Viewed 834 times
1 Answers
1
I belive if you have set the grub to save the default grub boot, like so:
/etc/default/grub:
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
Then you will find it in the /boot/grub2/grubenv file
# more /boot/grub2/grubenv
# GRUB Environment Block
saved_entry=CentOS Linux (3.10.0-693.21.1.el7.x86_64) 7 (Core)
For more info, please go here https://www.gnu.org/software/grub/manual/grub/html_node/Environment-block.html

PhoenixCoder
- 45
GRUB Environment Block
next_entry = #######...#########
– R Cassani Oct 22 '18 at 18:13grub2-editenv list
– PhoenixCoder Oct 23 '18 at 03:58