Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-07-2010, 10:25 AM
|
#1
|
LQ Newbie
Registered: Aug 2009
Posts: 6
Rep:
|
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
|
|
|
01-07-2010, 02:16 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,414
|
Quote:
Originally Posted by mohsleem
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.
|
|
1 members found this post helpful.
|
01-07-2010, 04:33 PM
|
#3
|
LQ Newbie
Registered: Aug 2009
Posts: 6
Original Poster
Rep:
|
Quote:
Originally Posted by TB0ne
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
|
|
|
01-07-2010, 04:46 PM
|
#4
|
Member
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Rep:
|
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.
|
|
|
01-08-2010, 04:02 PM
|
#5
|
LQ Newbie
Registered: Aug 2009
Posts: 6
Original Poster
Rep:
|
I have another VPS running and working fine, I can take the coreutils from there, but where can I find the coreutils files? thanks
|
|
|
01-08-2010, 05:04 PM
|
#6
|
Member
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Rep:
|
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.
|
|
|
01-09-2010, 01:46 AM
|
#7
|
LQ Newbie
Registered: Aug 2009
Posts: 6
Original Poster
Rep:
|
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
|
|
|
01-09-2010, 09:21 AM
|
#8
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,971
|
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 04:08 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|