Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fixing a broken system with ncurses missing [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
jonfr
l33t
l33t


Joined: 20 Jul 2003
Posts: 923
Location: Denmark

PostPosted: Sun Mar 24, 2013 8:39 pm    Post subject: Fixing a broken system with ncurses missing [solved?] Reply with quote

I am trying to fix a system that I did break during my attempt to upgrade it from earlier version. I did unmerge ncurses and that did break the system. But I have also unmerged udev-1.51 that was installed on the system. But I was unable to setup newer version due to circular dependencies.

I am now trying to copy the needed files from an stage 3 package so I can chroot into the system and repair it. But I am getting hit by this error.

Code:
chroot /mnt/gentoo /bin/bash
Segmentation fault


I have copy this files into the broken system already.

Code:
cp -av libncurses.* /mnt/gentoo/lib/
cp: overwrite '/mnt/gentoo/lib/libncurses.so.5'? y
removed '/mnt/gentoo/lib/libncurses.so.5'
'libncurses.so.5' -> '/mnt/gentoo/lib/libncurses.so.5'
'libncurses.so.5.9' -> '/mnt/gentoo/lib/libncurses.so.5.9'


Also this files.

Code:
cp -av libc.* /mnt/gentoo/lib/
cp: overwrite '/mnt/gentoo/lib/libc.so.6'? y
removed '/mnt/gentoo/lib/libc.so.6'
'libc.so.6' -> '/mnt/gentoo/lib/libc.so.6'


I rather would not overwrite it with an newer stage3 package. But if that is the only way to fix it. I am going to do so. But I fear it might break more then what I am now trying to fix. At least I think so.

Thanks for the help.


Last edited by jonfr on Sun Mar 24, 2013 9:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32442
Location: 56N 3W

PostPosted: Sun Mar 24, 2013 9:02 pm    Post subject: Reply with quote

jonfr,

Make friends with the tinderbox.
This contains individual binary packages for various architectures - be sure to choose the arch you need.

You can use it on two ways, the first is to make a portage tree stub in /usr/portage/packages and put the binary packages you need into the categories there.
The next step is to do
Code:
emerge -K =<catagory>/<package>-<version>
which installs from the binaries in your /usr/portage/packages dir.

If portage is broken, so the above won't work, treat each individual tarball as if it was a mini stage3.
Code:
tar -xpf /path/to/tarball -C /
This extracts all the files in the tarball to your root directory, which puts them in the right places in your file system.
Ignore the warning from tar about extra garbage at end of file ignored. Thats portage specific information.

Whichever method you are forced to use, rebuild all the packages you install from the tinderbox because your USE flags are not respected, the packages may not be the versions you need, etc.
If you do this with gcc, you need to run gcc-config to select the gcc.

You must not downgrade glibc this way - but as you are not using portage, nothing stops you. Just don't do it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
jonfr
l33t
l33t


Joined: 20 Jul 2003
Posts: 923
Location: Denmark

PostPosted: Sun Mar 24, 2013 9:30 pm    Post subject: Reply with quote

I did go with the solution to just extract the binary stage3 package over the root. Since this server needs to get up soon as possible. I am now in the progress of rebuilding parts of it before I can rebuild the main system it self. It is going to take few moments.

Thanks for the link. It is going to be useful in the future.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 32442
Location: 56N 3W

PostPosted: Sun Mar 24, 2013 10:38 pm    Post subject: Reply with quote

jonfr,

The binary stage3 packages may well be the same binaries.

Making a dir, unpacking a stage3 into the dir, bind mounting your portage tree etc then chrooting into the new stage3 works too.
You can quickpkg anything already built or turn on FEATURES="buildpkg" and build other things.

When you have rescued your main system, delete the dir holding the temporary rescue system.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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