Koozali.org: home of the SME Server

help me, i deleted /sbin

Ted

help me, i deleted /sbin
« on: September 24, 2002, 01:40:43 AM »
I was playing around with rsync (--delete), and I accidently deleted the sbin directory!!!!

what are my options?  can i restore from cdrom, or from someone elses system?

Ron de Boer

Re: help me, i deleted /sbin
« Reply #1 on: September 24, 2002, 04:08:56 AM »
Hi,

Not sure, but you can try from CD ROM and upgrade to same version.  You can also try from the Create Installation Diskette if you created one.  This should in theory re-install E-Smith without re-formatting but.....

Your main issue will be what other RPM's you have loaded since the original install if you are going to upgrade from CD ROM.  I haven't ever tried the creating a system from the create diskette but it should have all RPM's on it that were loaded prior to you creating the diskette.

You obviously also need handy all those RPM's.

I have upgraded to the same version to overcome issues in the past.

Good luck!

Regards
Ron

Nathan Fowler

Re: help me, i deleted /sbin
« Reply #2 on: September 24, 2002, 06:41:19 AM »
My suggestion:

On another machine, or hard drive (after first DISCONNECTING your production drive), reinstall E-Smith.  Then copy /sbin back over.

You could also (on a working system)
cd /sbin
tar --create --gzip --file=/root/sbin.tgz *

Then (on broken system)
cd /
tar -zxvf sbin.tgz

If you tell me your version of E-Smith perhaps I would be able to mail you the contents of sbin.  Like Ron said, it could be imcomplete assuming you've installed additional RPMs and they installed binaries into /sbin.

Did you not backup your system?  tsk, tsk :)

Hope this helped,
Nathan

Ted

Re: help me, i deleted /sbin
« Reply #3 on: September 24, 2002, 10:16:44 AM »
lol...i was trying to get a backup solution, hence rsync, but got things mixed up...

i would *love it if you could send me the contents of sbin.  i can then reinstall my 2 binaries i use....

my email addy is davider@insite.com

thanks

Schotty

Re: help me, i deleted /sbin
« Reply #4 on: September 24, 2002, 01:16:31 PM »
i cant stop at laughing at this one.....

you use ur produktive server to try out a backup scheme....

without items like this in the forum mornings would be quite dull...


nether the less i wish u luck on getting your sbin back....

Nathan Fowler

Re: help me, i deleted /sbin
« Reply #5 on: September 24, 2002, 04:55:10 PM »
Ted, what version are you? 4.1.2?  5.x?  5.5?

Ted

Re: help me, i deleted /sbin
« Reply #6 on: September 24, 2002, 07:08:30 PM »
5.5, thanks

Nathan Fowler

Re: help me, i deleted /sbin
« Reply #7 on: September 24, 2002, 07:09:45 PM »
Can't help you there, I don't run 5.5 :)

Greg Zartman

Re: help me, i deleted /sbin
« Reply #8 on: September 24, 2002, 08:09:21 PM »
Schotty,

While I agree that Ted shouldn't be "testing" on a production machine, I wouldn't be so quick to judge.  We've all been there and done something  similar in the past.  I recall back to my earlier days of sysadmin and can't believe some of the stuff I did.     It's all part of the learning experience.

Greg

nick

Re: help me, i deleted /sbin
« Reply #9 on: September 24, 2002, 10:15:42 PM »
Hi all,
I was reading mc and noticed you can set it up to recover deleted files. Prior to deleting them of couse. Has any one done this with sucess?
I think it could be a good idea. Also does it solw down the system, by having this recovery in place?
regards
Nick

Nathan Fowler

Re: help me, i deleted /sbin
« Reply #10 on: September 24, 2002, 10:27:29 PM »
It would be my assumption that this function only extends to midnight commander while midnight command is running and the files are deleted from midnight commander....

Scott Smith

Re: help me, i deleted /sbin
« Reply #11 on: September 24, 2002, 10:44:12 PM »
Though too late to help in the current situation, there are several shell scripts and utilities that replace the rm command and provide trash can (or recycle bin or whatever you prefer to call it) functionality.

Most of these work by renaming or relocating the rm command and installing their own. This new rm command, instead of removing the file(s), moves them to the trash can directory. I've seen them from simple (all files go to one trash directory) to moderately complex (the directory structure of the removed files is maintained in the trash can) to the very complex (directory structure maintained, multiple deletes of the same file tracked, etc.)

FWIW

Scott

schotty

Re: help me, i deleted /sbin
« Reply #12 on: September 25, 2002, 02:09:58 PM »
Hi!!
Judge?? I wasnt really acting as aJudge.... I just showed that I was amused at the thought of deleting the /sbin of a prod server....

I indeed have also done my silly things on a prod server......

Just look at the case :

UserA wants to make a concept to save data on server1.
While working on the concept the data (which has to be saved) is lost......

Still i find it a little amusing, althouigh I sincerly hope that Ted manages to get his data back so that he can save it.......


(My rather black humor comes from GB......)

Guck Puppy

Re: help me, i deleted /sbin
« Reply #13 on: September 26, 2002, 03:56:15 AM »
Nathan Fowler wrote:
>
> It would be my assumption that this function only extends to
> midnight commander while midnight command is running and the
> files are deleted from midnight commander....

The midnight commander undelete is a front end to a modified ext2 filesystem :

From http://www.ensta.fr/internet/unix/utilities/Midnight_Commander.html

* Added undelete feature on Linux based GNU systems: now you
       may recover deleted files on ext2 file systems *with the
       Undelete file system feature*.

Also see :
http://amadeus.ece.uprm.edu/~undelete/