Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
i broke my system [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cagezero
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2005
Posts: 81

PostPosted: Thu May 25, 2006 2:41 am    Post subject: i broke my system [solved] Reply with quote

hi.
here is my story.
my sytem no longer recognizes commands such as: make, emerge, startx, slocate, etc....
this happened while i was removing left over traces of the kxdocker program.
i issued the command rm -r /usr/apps/kxdocker
after that, everything was broken.
i have no idea how the two things could be related.

here is some sample output:

Code:
#emerge
bash: emerge: command not found



Last edited by cagezero on Tue Jul 11, 2006 10:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
stupidkid
Apprentice
Apprentice


Joined: 17 Apr 2006
Posts: 247
Location: 127.0.0.1

PostPosted: Thu May 25, 2006 3:04 am    Post subject: Reply with quote

It's probably because your path is not right.
Execute the following command.
Code:
cd /bin
./echo $PATH
Back to top
View user's profile Send private message
cagezero
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2005
Posts: 81

PostPosted: Thu May 25, 2006 3:09 pm    Post subject: Reply with quote

-stupidkid-
k.
Code:
cd /bin && ./echo $PATH /usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/athena/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.5:
/opt/ati/bin:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/qt/3/bin:
/usr/kde/3.4/bin:/usr/share/karamba/bin:~/bin:


i forgot to show the output of env-update last night (thanx for the reminder)
Code:
env-update
bash: /usr/sbin/env-update: /usr/bin/python: bad interpreter: No such file or directory
Back to top
View user's profile Send private message
at240
l33t
l33t


Joined: 12 Aug 2005
Posts: 603
Location: UK

PostPosted: Thu May 25, 2006 3:33 pm    Post subject: Reply with quote

Can you examine your bash history to verify that your rm -f command didn't include a typo?

It's odd, though. If you'd wiped /bin, then presumably echo wouldn't be available. :?
Back to top
View user's profile Send private message
cagezero
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2005
Posts: 81

PostPosted: Thu May 25, 2006 6:40 pm    Post subject: Reply with quote

-at240-
here is the recent bash history for string "rm".
Code:
180 rm -r /usr/share/apps/kxdocker
182 rm -r /usr/lib/kxdocker
183 rm -r /usr/lib/kxdocker/*
184 rm -r /usr/lib/kxdocker/*cd /usr

i remember that after completing item 180 i tried item 182 (after a slocate kxdocker command)
and the command failed so i tried item 183.
that did not work either.
then i made the item 184 snafu.

***everything in my /usr tree appears to be ok***
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Thu May 25, 2006 7:15 pm    Post subject: Reply with quote

Check the permissions of / it could have been made non-executable, the permissions should be the same as this:

Code:
ls -ld /
drwxr-xr-x  24 root root 4096 Apr  3 19:19 /


If it's not the same this may work:

Code:
cd /bin
./chmod 755 /


If not you'll probably have to do it from a liveCD.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
at240
l33t
l33t


Joined: 12 Aug 2005
Posts: 603
Location: UK

PostPosted: Thu May 25, 2006 7:41 pm    Post subject: Reply with quote

cagezero wrote:
i remember that after completing item 180 i tried item 182 (after a slocate kxdocker command)
and the command failed so i tried item 183.
that did not work either.
then i made the item 184 snafu.

***everything in my /usr tree appears to be ok***

When you say the command failed, do you mean the command itself couldn't be found, or just that the command ran and then failed?

I would have thought 184 would have done major damage to your /usr :?
Back to top
View user's profile Send private message
Dreq
Tux's lil' helper
Tux's lil' helper


Joined: 15 Feb 2004
Posts: 111

PostPosted: Thu May 25, 2006 8:05 pm    Post subject: Reply with quote

Code:
184 rm -r /usr/lib/kxdocker/*cd /usr


That doesn't do what I think it does.. does it? Is /usr blank?
Back to top
View user's profile Send private message
cagezero
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2005
Posts: 81

PostPosted: Thu May 25, 2006 11:05 pm    Post subject: Reply with quote

-tomk-
my permissions are the same as yours.
Code:
drwxr-xr-x  20 root root 4096 Apr  2 18:28 /


-at240-
at240 wrote:
When you say the command failed, do you mean the command itself couldn't be found, or just that the command ran and then failed?

i mean that the command ran and then failed.

at240 wrote:
I would have thought 184 would have done major damage to your /usr

me too. :oops:

-Dreq-
Dreq wrote:
That doesn't do what I think it does.. does it? Is /usr blank?

it appears that it does not do what you (me-we) think it does.
/usr is not blank. :D
i have browsed around my /usr tree and it appears to be undamaged (miraculously).
Back to top
View user's profile Send private message
at240
l33t
l33t


Joined: 12 Aug 2005
Posts: 603
Location: UK

PostPosted: Fri May 26, 2006 9:07 am    Post subject: Reply with quote

cagezero

This is odd. It's hard to see why command 180 would cause these problems. Is there anything else in bash history to suggest why this might have happened?

If there is no evidence that this was caused by a command, then perhaps you're looking at filesystem corruption or hard disk failure of some kind? :(

You gave emerge as an example. Do /usr/bin/emerge exist? If so, what are its permissions? Is PATH still set correctly (it looked OK earlier)? :?
Back to top
View user's profile Send private message
agent_jdh
Veteran
Veteran


Joined: 08 Aug 2002
Posts: 1783
Location: Scotland

PostPosted: Fri May 26, 2006 11:03 am    Post subject: Reply with quote

It sounds like you might need to take a look at

http://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml

Once you've followed the steps there, if you've killed stuff like startx, your only option _might_ be to re-sync portage and run

Code:
emerge -e world


To re-install your whole box. This may take some time!

EDIT: put the URL in
_________________
Jingle Jangle Jewellery
Back to top
View user's profile Send private message
cagezero
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2005
Posts: 81

PostPosted: Sat May 27, 2006 11:06 pm    Post subject: Reply with quote

first of all, thanx to all you guys help'n me out.
-at240-
at240 wrote:
Do /usr/bin/emerge exist?

i have no idea how i missed this when reporting that my /usr tree was fine.
however, it appears that i was wrong.
/usr/bin is officially gone. :(
crap.
Back to top
View user's profile Send private message
at240
l33t
l33t


Joined: 12 Aug 2005
Posts: 603
Location: UK

PostPosted: Sun May 28, 2006 10:10 am    Post subject: Reply with quote

cagezero wrote:
i have no idea how i missed this when reporting that my /usr tree was fine.
however, it appears that i was wrong.
/usr/bin is officially gone. :(
crap.

Oh dear. :( In that case, I think you should follow the guide given by agent_jdh above to get portage working again. Then start rebuilding things... still, don't despair, you can recover from this situation. Good luck.
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9245
Location: beyond the rim

PostPosted: Sun May 28, 2006 10:26 am    Post subject: Reply with quote

If you wiped /usr/bin you're pretty screwed, at least you'll need /usr/bin from a stage3 tarball (maybe more) + emerge -e world, at worst a reinstall.
Back to top
View user's profile Send private message
cagezero
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2005
Posts: 81

PostPosted: Tue Jul 11, 2006 10:03 pm    Post subject: Reply with quote

sorry for the extremly delayed response.
i ended up wiping the drives and starting over.
thanx to all for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum