Re: Rebuilding Corrupt Debian
On Friday 25 August 2006 02:59, Aaron Goodman wrote:
[...]
>
> Any way to do this quickly and just reinstall the same packages I had
> before? I have var, usr, home all on seperate partitions.
If you are able to run
#dpkg -l | awk '/ii/ {print $2}' > somefile
in your existing system, which will give you a list of installed packages
in "somefile", you could then backup, do a Debian base-install,
copy "somefile" into it (from wherever you've saved it), and do
#apt-get update
#apt-get install $(cat somefile)
You could speed this up if the contents of /var/cache/apt/archives exist and
could be copied from the old system to the new one beforehand.
After that, you could try copying some or all of your /home and /etc to get
your settings etc. back; obviously, check that what you copy isn't corrupt.
(Depending on how you copy, you may have to change permissions in /home to be
able to access it later as a user.)
Sounds simple, doesn't it? :) There would probably be a few hiccups here and
there, esp. the apt-get part which may need to be run a few times to resolve
dependencies. But worth a try?
Hopefully others on the list will add caveats or better ideas...
HTH,
John
Reply to: