View previous topic :: View next topic |
Author |
Message |
hunky l33t
Joined: 19 Nov 2003 Posts: 910 Location: Alaska
|
Posted: Sun Nov 09, 2014 6:10 pm Post subject: empty portage - no packages installed, system working[FIXED] |
|
|
ok, new install here. I made a typo on my fstab and didn't realize it when I finally booted into the new install. What I did was put / on an SSDrive and /home on a hdd. The typo ended up with /home being on the SSD and therefore I accidentally filled up / when copying over my home files.
So I unmounted /home, deleted the /home still on /, and remounted /home properly. I can now log back into kde and operate a terminal. But if I try to emerge, all my system files show as not installed. So I've damaged portage.. is there any way to get it back without completely starting over?
thanks, JD
[edit] I've looked at the old page about recovering a broken portage but it is too outdated to follow. I also cannot emerge anything (like portage, for instance) because the command emerge shows circular dependencies between gcc/glib/gcc. Still googling around..
[edit-2] Found a guy with what sounds like a very similar problem: https://forums.gentoo.org/viewtopic-p-7637834.html so I'm working through that. Hopefully will work out. Doing an emerge -1 gcc-config glibc now, then try the Code: | emerge --sync
emerge --metadata
emerge -uND world |
[edit-3] ok- problem when doing the emerge -avuND @world:
Code: | Emerging (1 of 205) dev-libs/libffi-3.1-r3::gentoo
* libffi-3.1.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ]
* The linker reported linking against -lffi to be working while it shouldn't have.
* This is wrong and you should find and delete the old copy of libffi before continuing.
* ERROR: dev-libs/libffi-3.1-r3::gentoo failed (setup phase):
* The system is in inconsistent state with unknown libffi installed.
*
* Call stack:
* ebuild.sh, line 93: Called pkg_setup
* libffi-3.1-r3.ebuild, line 34: Called die
* The specific snippet of code:
* die "The system is in inconsistent state with unknown libffi installed."
*
* If you need support, post the output of `emerge --info '=dev-libs/libffi-3.1-r3::gentoo'`,
* the complete build log and the output of `emerge -pqv '=dev-libs/libffi-3.1-r3::gentoo'`.
* The complete build log is located at '/var/tmp/portage/dev-libs/libffi-3.1-r3/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-libs/libffi-3.1-r3/temp/die.env'.
* Working directory: '/usr/lib64/python2.7/site-packages'
* S: '/var/tmp/portage/dev-libs/libffi-3.1-r3/work/libffi-3.1'
>>> Failed to emerge dev-libs/libffi-3.1-r3, Log file:
|
And when I try to unmerge libffi, it shows as not being emerged since portage shows pretty much empty so far. Ideas on what I can delete or how to move forward? emerge --resume --skipfirst throws lots of dependency errors.
[edit-4] Ok, just found the libraries, deleted them, and am proceeding til next issue.
Last edited by hunky on Mon Nov 10, 2014 5:42 pm; edited 1 time in total |
|
Back to top |
|
|
DawgG l33t
Joined: 17 Sep 2003 Posts: 866
|
Posted: Mon Nov 10, 2014 10:00 am Post subject: |
|
|
i don't think there should be any big problem if the system was running before and nothing was deleted.
1. backup any important data (ie stuff you want to keep and configs, maybe /var/lib/portage/world) if you haven't already
2. boot from a rescue-medium (i like www.sysresccd.org)
3. correct paths and configfiles so they point to the right places
4. reboot into "old" system and check that everything works. in case it does not - you don't need to burn any coal re-emerging packages. if the system was running before you can just re-emerge the binary packages.
GOOD LUCK! _________________ DUMM KLICKT GUT. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Mon Nov 10, 2014 12:03 pm Post subject: Re: empty portage - no packages installed but system working |
|
|
Hello.
hunky wrote: | ok, new install here. I made a typo on my fstab and didn't realize it when I finally booted into the new install. What I did was put / on an SSDrive and /home on a hdd. The typo ended up with /home being on the SSD and therefore I accidentally filled up / when copying over my home files.
So I unmounted /home, deleted the /home still on /, and remounted /home properly. I can now log back into kde and operate a terminal. But if I try to emerge, all my system files show as not installed. So I've damaged portage.. is there any way to get it back without completely starting over? |
I think you are making assumptions here, and not providing any useful data to back them up.
So what does this mean?
Quote: | all my system files show as not installed |
In other words, what command did you use to check that? I am trying to define what the real problem is, since what you state above makes no sense. Obviously, if your system was so badly broken as you seem to imply, portage wouldn't even offer you this kind of output:
Quote: | because the command emerge shows circular dependencies between gcc/glib/gcc. Still googling around.. |
Blockers and circular dependencies are not sign of a broken system. Not at all. They have many causes and if that's your only problem, please, show us the output along with your emerge --info so we can see the real problem, and not your digest of it. |
|
Back to top |
|
|
hunky l33t
Joined: 19 Nov 2003 Posts: 910 Location: Alaska
|
Posted: Mon Nov 10, 2014 5:36 pm Post subject: |
|
|
thanks guys for the responses. Always helpful.
i92guboj: What I meant was this. My subject on the thread was over dramatic - more my poor sense of humor I guess. But the problem was this:
If I tried to emerge anything, all the system files would show up as dependencies and they were all marked as "N" as in not installed. Over 200 packages. If I tried to un-merge anything, it would show error of "not installed" or "not found" whichever. When I would reboot, dmesg showed some programs like cronie, syslog-ng, things I had added to rc-update, as not loading because they were not found, even though I had installed them from chroot on the installation disk (systemrescuecd) - and, their config files were onboard. The command I used was a simple emerge -av <some package>. That would return the long list of system files needing to be installed indicated by that "N".
I knew my system was save-able because I could boot into it. Some things in kde - basic navigation and whatnot - would work but seemed kinda broken - would freeze up and whatnot. I had installed kde already before discovering my fstab error and before the root partition got filled up 100% by me putting my home partition on it by mistake. So all programs/packages would show as "not installed", including all of kde, all of xorg-x11, etc.
I was hoping to find a way to re-point or re-initialize portage so it would see the installed packages again but did not find a solution. There probably is one, I just didn't find it. I was hoping that this page:https://www.gentoo.org/proj/en/portage/doc/manually-fixing-portage.xml would fix it but the line (using the latest portage snapshot): Code: | # cd /root/portage-recover/portage-2.2.7
# rm -rf /usr/lib/portage/*
# cp -R pym bin /usr/lib/portage/ | stumped me because those files I couldn't find. Not sure it would have cured the problem anyway.
So I ended up re-emerging everything after fixing the circular dependencies using that thread linked in my first message. I had to re-emerge several hundred packages to get the system back (get portage to recognize them as installed). And even though all the packages showed as not installed, they all had file collisions when I re-emerged them since they indeed were installed. I did this from being logged in to KDE and using a terminal there.. so the system was working.. just didn't recognize any packages as installed. Things seem to be working fine now - still have a little cleanup to do - run revdep-rebuild and see what happens and go through dmesg and fix what still shows up broken there - but mostly it looks good.
I had posted this here hoping for a quick fix but needed to get this done over the weekend so forged ahead just re-emerging.
DawgG: your #3 probably would have been key but I didn't know which paths and config files would re-point portage back at the packages it was no longer seeing as installed. Then I would not have had to burn coal re-emerging. But now it is pretty much done.
thanks, JD |
|
Back to top |
|
|
hunky l33t
Joined: 19 Nov 2003 Posts: 910 Location: Alaska
|
Posted: Mon Nov 10, 2014 5:56 pm Post subject: |
|
|
by the way DawgG or anyone, if you know what I should have done to correct this (what might have worked anyway) feel free to post it even though I marked this as FIXED. (I didn't put [Solved] because I don't think I really found the correct solution. Maybe just being pedantic). I am curious though I don't expect this to ever happen to me again. May happen to someone else. /jd |
|
Back to top |
|
|
dol-sen Retired Dev
Joined: 30 Jun 2002 Posts: 2805 Location: Richmond, BC, Canada
|
Posted: Mon Nov 10, 2014 10:43 pm Post subject: |
|
|
It sounds like your installed pkg db was trashed. It is in /var/db/pkg/* . If it was trashed, your only recourse is to re-emerge everything. It is these directories and files that contain all the information about what pkgs are installed and what files each installed,...
Glad you got it working. If it wasn't working enough, you would have had to unpack a stage3 over your system and begin rebuilding from there. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
Back to top |
|
|
hunky l33t
Joined: 19 Nov 2003 Posts: 910 Location: Alaska
|
Posted: Tue Nov 11, 2014 2:29 am Post subject: |
|
|
thanks Brian (dol-sen),
that makes sense, that the database got trashed. When I first started investigating I was shocked to see /var as mostly completely empty when the disk was showing 100% full, even though it was on it's own partition on a second hdd. When I corrected the home partition - removed it from the root partition, the files and directories again showed up on /var. But maybe a few, as you suggest, did get trashed. Don't have a clue what happened there. Hopefully I've got everything working and somewhat lucky I didn't have to start again from stage 3. Though it may not have been that much extra effort at this point.
cheers, JD |
|
Back to top |
|
|
DawgG l33t
Joined: 17 Sep 2003 Posts: 866
|
Posted: Tue Nov 11, 2014 9:12 am Post subject: |
|
|
i think i once deleted /var/db/pkg, too, but i can't quite remember how i got it fixed - only that it was much easier than it first seemed. again, PKGs already in PKGDIR don't need to be recompiled - i think Code: | emerge -aveDK world | should do (most of) the job even if /var/db/pkg is gone.
glad you got it working. _________________ DUMM KLICKT GUT. |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Tue Nov 11, 2014 2:54 pm Post subject: |
|
|
Well, that makes sense. I am also glad that you got it working. |
|
Back to top |
|
|
|
|
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
|
|