LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Urgent, /bin directory is deleted after I killed yum update command (https://www.linuxquestions.org/questions/linux-newbie-8/urgent-bin-directory-is-deleted-after-i-killed-yum-update-command-780544/)

mohsleem 01-07-2010 10:25 AM

Urgent, /bin directory is deleted after I killed yum update command
 
Hello Gurus, I have a serious problem on my VPS

I ran "yum update" and then hit the Ctrl+C to cancel when I realized that I need to specify a package to update, not all of them, but when the console returned suddenly I lost the connection, when I try to reconnect to the machine, it says /bin/bash not found !! even when I try to issue commands from the VPS control panel, it reports that the commands are not there

I can issue a ticket for the ISP to resolve this, but I need to know the risks before I do this, I have no backup on MySQL and 2 live web applications, although they are still running, I am afraid if I restarted the VPS everything will be gone, please give me some advices


Any help will be highly appreciated, thanks

TB0ne 01-07-2010 02:16 PM

Quote:

Originally Posted by mohsleem (Post 3817597)
Hello Gurus, I have a serious problem on my VPS

I ran "yum update" and then hit the Ctrl+C to cancel when I realized that I need to specify a package to update, not all of them, but when the console returned suddenly I lost the connection, when I try to reconnect to the machine, it says /bin/bash not found !! even when I try to issue commands from the VPS control panel, it reports that the commands are not there

I can issue a ticket for the ISP to resolve this, but I need to know the risks before I do this, I have no backup on MySQL and 2 live web applications, although they are still running, I am afraid if I restarted the VPS everything will be gone, please give me some advices

Don't flag your posts as urgent. This isn't urgent for anyone but you..we volunteer our time here, and answer what we want, when we want..telling us to hurry up, is rude.

If your bash shell is gone, how are you logging in? Do you get shell access at all? If so, and you can actually run things, take a mysqldump of your databases ASAP, and move them off to a safe location. If you can't do that, you can first try to copy your mysql files to another location, BEFORE YOU SHUT DOWN THE DATABASE. Your actual db files will be referenced in your mysql config file...get the ENTIRE directory, subdirectories and all. After you do that copy, shut down the database, and do it again. Why? If MySQL is running, there's a good chance the copy you make won't be in a good state, but that may be the only one you can get. Shutting it down puts it 'cold', and that copy has a much better chance of working. A mysqldump is the best way to go, though.

And there's no way of US knowing the risks of what you're doing, since we don't know the details of your ISP, your hosting contracts, or what they're going to do to resolve the problem.

mohsleem 01-07-2010 04:33 PM

Quote:

Originally Posted by TB0ne (Post 3817836)
Don't flag your posts as urgent. This isn't urgent for anyone but you..we volunteer our time here, and answer what we want, when we want..telling us to hurry up, is rude.

If your bash shell is gone, how are you logging in? Do you get shell access at all? If so, and you can actually run things, take a mysqldump of your databases ASAP, and move them off to a safe location. If you can't do that, you can first try to copy your mysql files to another location, BEFORE YOU SHUT DOWN THE DATABASE. Your actual db files will be referenced in your mysql config file...get the ENTIRE directory, subdirectories and all. After you do that copy, shut down the database, and do it again. Why? If MySQL is running, there's a good chance the copy you make won't be in a good state, but that may be the only one you can get. Shutting it down puts it 'cold', and that copy has a much better chance of working. A mysqldump is the best way to go, though.

And there's no way of US knowing the risks of what you're doing, since we don't know the details of your ISP, your hosting contracts, or what they're going to do to resolve the problem.


Sorry for that topic, I had this problem in a critical time since I am responsible about the server, so I wasn't thinking at all when I wrote this post !! I was so WTFed just like when someone drowns shouting: F1 F1 F1 :)


But I asked nicely at the end :) thanks a lot for the answer and your time,...

I wasn't able to access my files through the control panel, but it seems the control panel software was down for maintenance without notifying me though, anyway when I logged in (using CP not SSH) I was able to see the bin directory, it is there, but I don't know why the sshd reports it is not when I try to SSH:
Code:

#ssh XXXX@XXXXXX.XXX
 XXXX@XXXXXX.XXX's password:
Last login: Thu Jan  7 05:24:55 2010 from XXX.XXX.XXX.XXX
/bin/bash: No such file or directory
Connection to XXXXXX.XXX closed.

but the /bin/ssh is there I am 100% sure of that

One more thing to mention if it maybe useful to solve the problem, when I try to download files from the CP, I get a text file containing the following:

An error occurred when downloading the file: 'cat' execution fails with exit code 32512: execvp : [errno=2] No such file or directory

Tried to look around through the internet, but wasn't lucky, I tried this on several files with more than 30KB size, so I concluded that was a text HTTP response and the browser just wrapped it into a text file with no extension


I hope I described everything, thanks again for your time :)

Web31337 01-07-2010 04:46 PM

if it is possible try to copy your data first, then ask hoster to help. or try to copy a base coreutils there from a working system.

mohsleem 01-08-2010 04:02 PM

I have another VPS running and working fine, I can take the coreutils from there, but where can I find the coreutils files? thanks

Web31337 01-08-2010 05:04 PM

i meant the /bin folder contents. coreutils actually is a set of base programs like cp,rm,sed, etc...
if you can do so, yeah, you can try copying your /bin dir from other server.

mohsleem 01-09-2010 01:46 AM

Problem was solved by the hosting company, they charged me for that but I am happy to restore my VPS, one of the developers was trying to install the 64-bit version on the VPS which caused the damaged, they were able to fix this by restoring some libraies


Thanks for your time and posts, have a nice day

onebuck 01-09-2010 09:21 AM

Hi,

As the OP you can mark the thread as [Solved] via the thread tools. Please do so.


All times are GMT -5. The time now is 08:30 AM.