LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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

Reply
 
Search this Thread
Old 01-07-2010, 09:25 AM   #1
mohsleem
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Rep: Reputation: 0
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
 
Old 01-07-2010, 01:16 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,137

Rep: Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457Reputation: 2457
Quote:
Originally Posted by mohsleem View Post
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.
Old 01-07-2010, 03:33 PM   #3
mohsleem
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
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
 
Old 01-07-2010, 03:46 PM   #4
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
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.
 
Old 01-08-2010, 03:02 PM   #5
mohsleem
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
I have another VPS running and working fine, I can take the coreutils from there, but where can I find the coreutils files? thanks
 
Old 01-08-2010, 04:04 PM   #6
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
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.
 
Old 01-09-2010, 12:46 AM   #7
mohsleem
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 01-09-2010, 08:21 AM   #8
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,024
Blog Entries: 1

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
Hi,

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


Reply

Tags
bin, deleted, directory


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
yum install flash ... yum: command not found ... which yum ... /usr/bin/yum tg3793 Fedora 8 04-13-2011 11:25 AM
Yum Update On BIND Killed It neoform Linux - Server 12 07-09-2009 09:42 AM
"yum update" killed my DNS zones on VMware Server 1.0.3 girarde Linux - Server 4 04-20-2009 10:22 PM
FC4 yum update killed video - dell laptop xlancealotx Linux - Laptop and Netbook 3 09-28-2005 11:04 PM
yum update kernel* = deleted grub?? lucastic Linux - General 4 03-27-2004 01:23 PM


All times are GMT -5. The time now is 06:21 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration