After screwing it up a little resizing Ubuntu's partition on my pc (the process stopped suddenly and I had to recover boot from initramfs) I am trying to repair grub since now it is installed empty (just as a command line utility).
Now I'm following the instructions from the first answer of this question. Trying to repair my boot with a LiveUSB, when I execute sudo chroot /mnt
I get this error: bash: /usr/bin/groups: cannot execute binary file: Exec format error
Then, when I try to execute update-grub
I get a similar error.
Does anyone know how to solve it? I'm sure I'm using the same OS version on the live session that I have installed (64 bits Ubuntu MATE 17.04). I also have Windows 10.
Thanks in advance