Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HELP! I have majorly borked my system, unable to chroot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
drvik
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2004
Posts: 121
Location: Adelaide, South Australia

PostPosted: Sun Jul 16, 2006 6:34 am    Post subject: HELP! I have majorly borked my system, unable to chroot Reply with quote

Hi everyone,

Athough I am not a nooby, I have managed to totally destroy my gentoo system... I have been running amd64 using gcc 4.1.1 and glibc 2.4 for a few months now.... I initially had problems with file permission issues which was messing up my system then got into problems with the "gcc unable to create executables) so I untarred a 2006.0 64 bit stage 3 over my root partition.... not only did that stop it from booting but now I can't even chroot into my system using the gentoo live cd... or more specifically, I CAN chroot into it, but the following command env-update causes the following error

Quote:
/bin/bash: relocation error: /lib/tls/libc.so.6: symbol _dl_out_of_memory, version GLIBC_PRIVATE not defined in file ld-linux-x86-64.so.2 with link time reference


I then have an unusable command prompt.... attempts at emerging anything are met with
Quote:
-/bin/bash: emerge: command not found


I'm not even sure where to go from here... my only hope I think is my second system (a mythtv frontend) that also runs 64bit gentoo/gcc 4.1.1/glibc 2.4.... I am hoping that copying a stage 3 equivalent from that computer can get my computer to a point where I can rebuild everything....

So does anyone have any suggestions regarding the env-update problem? or perhaps can someone point me to a reference on which files I need to copy across.... thanks in advance...

drvik
Back to top
View user's profile Send private message
Keruskerfuerst
Advocate
Advocate


Joined: 01 Feb 2006
Posts: 2289
Location: near Augsburg, Germany

PostPosted: Sun Jul 16, 2006 6:42 am    Post subject: Reply with quote

In this case, you should think about a new installation...
Back to top
View user's profile Send private message
drvik
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2004
Posts: 121
Location: Adelaide, South Australia

PostPosted: Sun Jul 16, 2006 6:48 am    Post subject: Reply with quote

I really hope thats not the case 8-(... anyone else got any ideas?

drvik
Back to top
View user's profile Send private message
drvik
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2004
Posts: 121
Location: Adelaide, South Australia

PostPosted: Sun Jul 16, 2006 7:59 am    Post subject: Reply with quote

ok,

I am making some headway here...

I have copied all /bin /sbin /lib32 and /lib64 that i could find on my 2nd system... the above message continued however... so then I tool a plunge and deleted /lib/tls since that seemed to be where the problem lay.... now I am able to successfully chroot into my system...

I just wanted to point out to others not to repeat my stupid error.... NEVER EVER copy any Stage 1 2 or 3 archives over your existing system because it overwrites important directories....... as it stands, my moment of stupidity has cost me my most basic config files such as fstab make.conf and my world file....

will keep you posted....

drvik
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sun Jul 16, 2006 8:16 am    Post subject: Reply with quote

drvik wrote:
I really hope thats not the case 8-(... anyone else got any ideas?

drvik

I think he's right.
To fix your system would essentially involve re-emerging world, and depending on the versions you had installed, re-emerging your toolchain twice also.

Since this will take as much as re-installing anyways, recover the files you can, configs, etc and do a re-install.
(You don't have to re-format and can save your /home directory and any other "data" directories.)
Back to top
View user's profile Send private message
drvik
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2004
Posts: 121
Location: Adelaide, South Australia

PostPosted: Sat Jul 22, 2006 4:01 am    Post subject: Reply with quote

Alright... In the spirit of not reinstalling an entire OS (hello Windows) I persevered to prove that I could.... the good news is that I fixed it and and wanted to pass a useful suggestion to others....

as it turns out, part of the problem to my system was that there was an error on my ext3 root partition that obviously involved some important files that formed part of the toolchain, which meant that I was unable to recompile any of the key elements of that toolchain.... after fsck'ing the root partition I put to use my mythfrontend... the following solution was able to work only because I have 2 boxes which are both running amd64 + GCC 4.1.1 + glibc 2.4 (ie the toolchains are the same) not sure how it would go with slightly different toolchains....

essentially I built some binary packages on my myth frontend machine like so

Quote:
# quickpkg binutils gcc-config glibc gcc


This then created binaries in /usr/portage/packages which need to then be copied over to the same spot on the failing system

now on the failing system you can re-emerge the toolchain like so

Quote:
# emerge -K binutils gcc-config glibc gcc
(the -K option forces portage to use the compiled binaries)

Don't forget to actually do what the packages tell you once they are emerged in order to activate the toolchain (ie selecting the compiler, source /etc/profile etc etc etc)

What you now have is a fully working toolchain!!!!!!!!!!!!! This is cause for celebration because at this point I was able to simply
Quote:
# emerge -e system


and the magic began to happen....

Now the other small issue I had is that I lost my world file in the process so emerge wanted to unmerge everything... this problem was easily fixed by running the regenworld script...

Hope this is of use to someone else... remember this when you brake your toolchain like I did :)

drvik
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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