I lost /bin

I was compiling the ‘fxruby’ gem…

I was doing everything ‘sudo’, and I was messing with its Makefile
(because it didn’t compile cleanly),

ANYWAY,

the ‘fxruby’ gem is now installed succesfully.

The bad news is that somehow my ‘/bin’ folder got deleted.

If anybody here is using Ubuntu and is willing to do ‘ls /bin’ and
paste the results to http://pastebin.com/, so I see what I need to
restore, I’ll be extremely thankful!

Albert S. wrote:

The bad news is that somehow my ‘/bin’ folder got deleted.

If anybody here is using Ubuntu and is willing to do ‘ls /bin’ and
paste the results to http://pastebin.com/, so I see what I need to
restore, I’ll be extremely thankful!

http://pastebin.com/m6c9a3f7

Albert - you are probably going to encounter unrecoverable damage if
you have lost /bin. Even the default shell for root (/bin/sh) is in
the directory that you lost.

Gregg Kang wrote:

Albert - you are probably going to encounter unrecoverable damage if
you have lost /bin. Even the default shell for root (/bin/sh) is in
the directory that you lost.

Maybe he can boot from an ubuntu cd and copy stuff over.

Hey, first time I’ve ever used pastebin, and it was to paste bin. I feel
special.

YEEEEEEEEEEEHHHHHHAAAAAAA!!!

I did it! I’m back! :slight_smile:

Joel, thanks! (I couldn’t find my ubuntu cd.)

Gregg Kang

Albert - you are probably going to encounter unrecoverable damage if
you have lost /bin. Even the default shell for root (/bin/sh) is in
the directory that you lost.

I lost ‘cp’ and ‘rm’ too. Fortunately for me, I had gazillions of
terminals open with Midnight Commander. I copied the most basic commands
from an old Fedora partition that was mounted (it’s always mounted, so I
didn’t have to have ‘mount’). Its ‘bash’ didn’t work on my ubuntu (it
was compiled against termcap), so I logged in to where my website is
hosted, becuase it uses Debian, and taken ‘bash’ (which serves as ‘sh’
too) from there.

I restored enough commands so that my ‘apt-get’ worked again.

Then, to find out all the packages that had files installed in /bin/ I
did “dpkg -S ‘/bin/*’”. I reinstalled them all with “sudo apt-get -y
–reinstall install …”.

That’s all. My system even survived a reboot!

It was so invigorating an experience! So empowering! I recommend
deleting your /bin once in a while (or, alternatively, installing
‘fxruby’) for sport.

first time I’ve ever used pastebin, and it was to paste bin

LOL!

On May 22, 10:05 am, Albert S. [email protected] wrote:

YEEEEEEEEEEEHHHHHHAAAAAAA!!!

I did it! I’m back! :slight_smile:
[…]
I lost ‘cp’ and ‘rm’ too. Fortunately for me, I had gazillions of
terminals open with Midnight Commander. I copied the most basic commands
from an old Fedora partition that was mounted (it’s always mounted, so I
didn’t have to have ‘mount’). Its ‘bash’ didn’t work on my ubuntu (it
was compiled against termcap), so I logged in to where my website is
hosted, becuase it uses Debian, and taken ‘bash’ (which serves as ‘sh’
too) from there.

Now that you have successfully recovered is the time to read this
classic:
http://groups.google.com/group/comp.dcom.telecom/msg/b0f6e6d80da01121

Vidar

This taught you :wink:

Always keep copies of the fundamental commands to restore a f*cked up
system!

On Thu, May 22, 2008 at 8:46 AM, Joel VanderWerf
[email protected] wrote:

Gregg Kang wrote:

Albert - you are probably going to encounter unrecoverable damage if
you have lost /bin. Even the default shell for root (/bin/sh) is in
the directory that you lost.

Maybe he can boot from an ubuntu cd and copy stuff over.

Hey, first time I’ve ever used pastebin, and it was to paste bin. I feel
special.
I need I site call pinoint to say how you did that well;)
BTW you are special, I am special, we all are special, ahem …


vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407


http://ruby-smalltalk.blogspot.com/


Whereof one cannot speak, thereof one must be silent.
Ludwig Wittgenstein