I'm working on some bash scripts to install and boot into custom Linux kernels across several distros (but mostly Arch and Fedora). Is there a standard way of checking if a machine is configured with grub legacy instead of grub2? I was thinking of checking the output of `which grub-mkconfig` but I'm curious if there is a better solution.
You could check output of grub-install -v.
That looks like it'll work, thank you!
If anybody else needs this, grub-legacy gives:
$ grub-install -v grub-install (GNU GRUB 0.97)
And grub2 gives:
$ grub-install -v grub-install (GRUB) 2.00