The correct command for grub-mkconfig is:
Code:
sudo grub-mkconfig -o /path/to/grub2_dir/grub.cfg
If you have a standard installation, then:
Code:
sudo grub-mkconfig -o /boot/grub/grub.cfg
will generate the new configuration file
grub.cfg in
/boot/grub.
Note that the command:
is simply a wrapper script for grub-mkconfig. This command is standard only on Debian-based distros.
On some distro, Fedora and openSUSE for example, the command is grub2-mkconfig.