move is_grub() to utils and update grub menu functions to use it.