upgrade-from-grub-legacy: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/sbin/upgrade-from-grub-legacy - from package: grub-pc

You may install the required package with command apt-get install {package}
Error in other languages:
upgrade-from-grub-legacy: bevel nie gevind nie
upgrade-from-grub-legacy: comandă negăsită
upgrade-from-grub-legacy: comando não encontrado
upgrade-from-grub-legacy: commande introuvable
upgrade-from-grub-legacy: command not found
upgrade-from-grub-legacy: käsku ei ole
upgrade-from-grub-legacy: không tìm thấy lệnh
upgrade-from-grub-legacy: komanda nerasta
upgrade-from-grub-legacy: Kommando nicht gefunden.
upgrade-from-grub-legacy: kommandot finns inte
upgrade-from-grub-legacy: komut yok
upgrade-from-grub-legacy: nie znaleziono polecenia
upgrade-from-grub-legacy: níor aimsíodh an t-ordú
upgrade-from-grub-legacy: no se encontró la orden
upgrade-from-grub-legacy: no s'ha trobat l'ordre
upgrade-from-grub-legacy: opdracht niet gevonden
upgrade-from-grub-legacy: parancs nem található
upgrade-from-grub-legacy: perintah tidak ditemukan
upgrade-from-grub-legacy: príkaz nenájdený
upgrade-from-grub-legacy: příkaz nenalezen
upgrade-from-grub-legacy: команда не найдена
upgrade-from-grub-legacy: командата не е открита
upgrade-from-grub-legacy: 命令找不到
upgrade-from-grub-legacy: コマンドが見つかりません