title learn-used-grub-entry
section 1
project bgscripts-core
volume General Commands Manual
date April 2020
=====
NAME
  learn-used-grub-entry - display which grub entry will be used at next boot
SYNOPSIS
  learn-used-grub-entry [num|kernel|initram]
OPTIONS
If LUGE_OUTPUT is undefined, used provided parameter.
* num number  Show just menu entry number.
* kernel vmlinuz  Show kernel file for used entry.
* initram initrd initramfs  Show initram/initrd file for used entry.

If LUGE_OUTPUT is some other value, or undefined, and the parameter is undefined, display the entire entry.
ENVIRONMENT
* LUGE_GRUB_CFG=<path> Path to grub.cfg. Default is `/boot/grub2/grub.cfg`.
* LUGE_ETC_DEFAULT_GRUB=<path> Path to the "default" directory grub settings. Default is `/etc/default/grub`.
* LUGE_OUTPUT={num,kernel,initram} See OPTIONS.
DESCRIPTION
With grub2, determining what menu entry will be used at next boot became way more difficult. This script attempts to answer the question, "What will happen at next boot?"
BUGS
Can still be duped by grub2.

This script is not useful outside of grub2.
AUTHOR
  <bgstack15@gmail.com>
COPYRIGHT
  CC-BY-SA 4.0
SEE ALSO
`grub(8)`
