Error: Unable to execute bash: No such file or directory

You may receive “Unable to execute bash: No such file or directory” error message while starting a VPS and the reason is either the binaries from /bin OR /usr/bin are missing OR corrupted.

To fix the issue, you either copy the directories /bin and /usr/bin from a working VPS OR from the OS template the VPS is using.

1) Copy directories from a working VPS:

cp -pR /vz/private/VEID1/fs/root/bin /vz/private/VEID/fs/root/
cp -pR /vz/private/VEID1/fs/root/usr/bin /vz/private/VEID/fs/root/usr/

VEID1 is the working VPS
VEID is the VPS having problems.

2) Copy directories from the OS template. The OS templates are stored under /vz/template/cache directory.

a) Extract the template file the VPS is using

# cd /vz/template/cache/
# tar -zxf os-templatename.tar.gz

b) Copy the directories to the VPS private area

cp -pR /vz/template/cache/root/bin /vz/private/VEID/fs/root/
cp -pR /vz/template/cache/root/usr/bin /vz/private/VEID/fs/root/usr/

Once copied, make sure you are out of the VPS private area and restart the VPS.

# vzctl start VEID

It will re-calculate the quota of the VPS and will start the VPS.

This entry was posted on Saturday, June 12th, 2010 and is filed under VPS Management. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.