{"id":929,"date":"2010-06-12T04:27:08","date_gmt":"2010-06-12T08:27:08","guid":{"rendered":"http:\/\/linuxhostingsupport.net\/blog\/?p=929"},"modified":"2013-03-20T08:42:47","modified_gmt":"2013-03-20T12:42:47","slug":"error-unable-to-execute-bash-no-such-file-or-directory","status":"publish","type":"post","link":"https:\/\/linuxhostingsupport.net\/blog\/error-unable-to-execute-bash-no-such-file-or-directory","title":{"rendered":"Error: Unable to execute bash: No such file or directory"},"content":{"rendered":"<p>You may receive &#8220;<strong>Unable to execute bash: No such file or directory<\/strong>&#8221; error message while starting a VPS and the reason is either the binaries from \/bin OR \/usr\/bin are missing OR corrupted.<\/p>\n<p>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.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>Solutions:<\/strong><\/span><br \/>\n<span style=\"color: #0000ff;\"><strong>1)<\/strong><\/span> Copy directories from a working VPS:<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">cp -pR \/vz\/private\/VEID1\/fs\/root\/bin \/vz\/private\/VEID\/fs\/root\/<\/span>\r\n<span style=\"color: #0000ff;\">cp -pR \/vz\/private\/VEID1\/fs\/root\/usr\/bin \/vz\/private\/VEID\/fs\/root\/usr\/<\/span><\/pre>\n<\/blockquote>\n<p>where,<br \/>\nVEID1 is the working VPS<br \/>\nVEID is the VPS having problems.<\/p>\n<p><span style=\"color: #0000ff;\"><strong>2)<\/strong><\/span> Copy directories from the OS template. The OS templates are stored under \/vz\/template\/cache directory.<\/p>\n<p><strong>a)<\/strong> Extract the template file the VPS is using<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># cd \/vz\/template\/cache\/<\/span>\r\n<span style=\"color: #0000ff;\"># tar -zxf os-templatename.tar.gz<\/span><\/pre>\n<\/blockquote>\n<p><strong>b)<\/strong> Copy the directories to the VPS private area<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\">cp -pR \/vz\/template\/cache\/root\/bin \/vz\/private\/VEID\/fs\/root\/<\/span>\r\n<span style=\"color: #0000ff;\">cp -pR \/vz\/template\/cache\/root\/usr\/bin \/vz\/private\/VEID\/fs\/root\/usr\/<\/span><\/pre>\n<\/blockquote>\n<p>Once copied, make sure you are out of the VPS private area and restart the VPS.<\/p>\n<blockquote>\n<pre><span style=\"color: #0000ff;\"># vzctl start VEID<\/span><\/pre>\n<\/blockquote>\n<p>It will re-calculate the quota of the VPS and will start the VPS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You may receive &#8220;Unable to execute bash: No such file or directory&#8221; error message while starting a VPS and the reason is either the binaries from \/bin OR \/usr\/bin are missing OR corrupted.<br \/>\nTo 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.<br \/>\nSolutions:<br \/>\n1) Copy directories from a working VPS:<\/p>\n<p>cp -pR \/vz\/private\/VEID1\/fs\/root\/bin \/vz\/private\/VEID\/fs\/root\/<br \/>\ncp -pR \/vz\/private\/VEID1\/fs\/root\/usr\/bin \/vz\/private\/VEID\/fs\/root\/usr\/<\/p>\n<p>where,<br \/>\nVEID1 is the working VPS<br \/>\nVEID is the VPS having problems.<br \/>\n2) Copy directories from the OS template. The OS templates are [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[884,882,883,880,885,881],"_links":{"self":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/929"}],"collection":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/comments?post=929"}],"version-history":[{"count":5,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/929\/revisions"}],"predecessor-version":[{"id":2201,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/posts\/929\/revisions\/2201"}],"wp:attachment":[{"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/media?parent=929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/categories?post=929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostingsupport.net\/blog\/wp-json\/wp\/v2\/tags?post=929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}