mkfs.ext2: 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 CentOS possible default full paths are:

/sbin/mkfs.ext2 - from package: e2fsprogs

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/sbin/mkfs.ext2 - from package: e2fsprogs

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