View previous topic :: View next topic |
Author |
Message |
cubancigar11 Guru
Joined: 10 Jan 2005 Posts: 340
|
Posted: Thu Feb 21, 2008 3:36 pm Post subject: PANIC! I deleted /var/db/pkg |
|
|
What to do now Google doesnt help... nothing to be found from forum search. I know this has been asked before and one can do something... help please!!!! |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Thu Feb 21, 2008 3:42 pm Post subject: |
|
|
Umm, you're basically screwed, unless you backed it up. You'll have to emerge world to restore it. If the world file is intact, as it should be, then it should be fixable. Just pretend you changed your CFLAGS or something and you need a full rebuild to achieve maximum rice. _________________ Thomas S. Howard |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Thu Feb 21, 2008 3:44 pm Post subject: |
|
|
/var/lib/portage/world should still contain your worldfile then. Unless portage throws some kind of error, you can just emerge -e system; emerge -e world; to reinstall everything. It will take time to compile everything of course but it will create a new /var/db/pkg for you in the process. It will not, however, get you rid of old packages and files that don't get overwritten by the emerge process (for example if you installed some packages with --oneshot or kept some obsolete dependencies around instead of doing a --depclean). You will have to delete them (semi-)manually. |
|
Back to top |
|
|
cubancigar11 Guru
Joined: 10 Jan 2005 Posts: 340
|
|
Back to top |
|
|
schachti Advocate
Joined: 28 Jul 2003 Posts: 3765 Location: Gifhorn, Germany
|
Posted: Thu Feb 21, 2008 4:02 pm Post subject: |
|
|
To be honest: I think the easiest way is to save /etc and /home and re-install gentoo from sratch. _________________ Never argue with an idiot. He brings you down to his level, then beats you with experience.
How-To: Daten verschlüsselt auf DVD speichern. |
|
Back to top |
|
|
didymos Advocate
Joined: 10 Oct 2005 Posts: 4798 Location: California
|
Posted: Thu Feb 21, 2008 4:06 pm Post subject: |
|
|
I don't think that script will work. It may reconstruct some parts, but the all important CONTENTS will not be there. Without that portage doesn't know what files belong to what package, and you may have very different CONTENTS for the same version of a package depending on the USE flags you've set. To get that back, you have to do an "emerge -e system && emerge -e world" anyway. As to undelete, well you can try, but since you're running a script that's writing stuff into the directory you want to undelete, all I can say is good luck. The last thing you want to do before attempting to undelete is start writing changes to disk.
[edit] Which, I see, is the first thing that page tells you. _________________ Thomas S. Howard |
|
Back to top |
|
|
cubancigar11 Guru
Joined: 10 Jan 2005 Posts: 340
|
Posted: Thu Feb 21, 2008 4:07 pm Post subject: |
|
|
You are a masochist!
So am I. Burn my processor... |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Thu Feb 21, 2008 4:44 pm Post subject: |
|
|
It's not possible to regenerate the list of file(s) and timestamp that were installed for each package by portage.
From the portage logfile it is possible to regenerate the worldfile under circumstances (the log needs to be complete and the parser must be able to cope with cancelled / failed emerges) which in turn allows you to reemerge the packages you had installed in the first place. However you still have your worldfile so you can just skip that step. If you lost your world file as well I'd have recommended a clean reinstall instead, keeping only your config files. |
|
Back to top |
|
|
schachti Advocate
Joined: 28 Jul 2003 Posts: 3765 Location: Gifhorn, Germany
|
Posted: Thu Feb 21, 2008 5:01 pm Post subject: |
|
|
The world file of course can be used to simplify a new install. _________________ Never argue with an idiot. He brings you down to his level, then beats you with experience.
How-To: Daten verschlüsselt auf DVD speichern. |
|
Back to top |
|
|
cubancigar11 Guru
Joined: 10 Jan 2005 Posts: 340
|
Posted: Thu Feb 21, 2008 6:50 pm Post subject: |
|
|
Now it doesn't matter. I have rolled out stage3.
Man, last time I installed gentoo, it was 2006.
Btw, what is the problem with stage1? My bootstrap.sh stopped in middle complaining that gcc cannot create output files. "su" was not working, "which" was not working. coreutils failed in the middle. |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Thu Feb 21, 2008 10:46 pm Post subject: |
|
|
There is no problem with stage1; it's just that it's not required for the supported architectures. Making a stage3 install is easier and gives you the same result as a stage1 install if you re-emerge toolchain and system with your cflags. |
|
Back to top |
|
|
|