On Fri, Oct 25, 2002 at 02:20:31PM -0400, Robert wrote: > On Friday 25 October 01:06, nate wrote: > > Robert said: > > > Help. I just did a major patition reshuffle and I've wiped out > > > /var/lib/apt and also /var/cache/apt -- and now dpkg and apt are > > > broken, Can't reinstall them either. Any suggestions or humorous > > > comments welcome :( > > > > does not sound serious to me. the critical stuff is in /var/lib/dpkg. > > > > you should just be able to re-create the directory structure: > > > > drwxr-xr-x 3 root root 4096 Oct 23 18:21 > > /var/cache/apt drwxr-xr-x 3 root root 8192 Oct 23 > > 18:21 /var/cache/apt/archives drwxr-xr-x 3 root root > > 4096 Jun 25 10:52 /var/lib/apt drwxr-xr-x 3 root root > > 4096 Aug 24 16:44 /var/lib/apt/lists drwxr-xr-x 2 root root > > 4096 Oct 14 13:12 > > /var/lib/apt/lists/partial/ > > > > and try running apt-get update see what happens > > > > nate > > Thanks for your reply. > > Sorry, should have been more explicit. /var/lib/dpkg is gone too. It > was late at night and I forgot that I had made /var a symlink to a > partition I was cleaning out. So, there is nothing left of apt or dpkg > in /var, and only thought of it halfway throught he carnage. > > So now I guess apt knows nothing about the installed packages on my > system. None of the apt commands will run without an error about > missing files in /var/*. > > Reinstall the only solution? Or is another copy of this info kept > elsewhere on the system? Unfortunately, I did not back up /var as > part of a backup strategy. (good lesson I guess). > > all the best, > Robert_L I take it you totally wiped everything in /var and don't have a backup. Or do you still have file /var/backups/dpkg.status.0? If you are using ext2fs and haven't reformated the partition, you may be able to recover files by mounting the partition on /mnt and using mc "Undelete files" command. Also check /usr/share/doc/HOWTO/en-txt/mini/Ext2fs-Undeletion.gz. -- Jerome
Attachment:
pgpIRpIjeN3QH.pgp
Description: PGP signature