View previous topic :: View next topic |
Author |
Message |
jonfr Veteran
Joined: 20 Jul 2003 Posts: 1008 Location: Denmark
|
Posted: Sun Mar 24, 2013 8:39 pm Post subject: Fixing a broken system with ncurses missing [solved?] |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54028 Location: 56N 3W
|
Posted: Sun Mar 24, 2013 9:02 pm Post subject: |
|
|
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 |
|
|
jonfr Veteran
Joined: 20 Jul 2003 Posts: 1008 Location: Denmark
|
Posted: Sun Mar 24, 2013 9:30 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54028 Location: 56N 3W
|
Posted: Sun Mar 24, 2013 10:38 pm Post subject: |
|
|
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 |
|
|
|