$ mount /dev/sdaX /mnt
$ mount --bind /dev /mnt/dev
$ mount --bind /dev/pts /mnt/dev/pts
$ mount --bind /proc /mnt/proc
$ mount --bind /sys /mnt/sys
$ chroot /mnt
$ grub-install --boot-directory=/boot/ --recheck /dev/sda$ mount /dev/sdaX
$ grub2-install --boot-directory=/mnt/boot/ --recheck /dev/sda
$ grub2-mkconfig -o /mnt/boot/grub2/grub.cfg-
Inside grub cli
$ set root=(hdX,XxXxXx) $ linux /vmlinux_XXXXX root=/dev/sdaX $ initrd /initrd_XXXXXX $ boot -
On system
$ grub-install /dev/sdaX $ update-grub