6.3.5 Rescue system after crashing /var
Since the /var directory contains regularly updated data such as
mail, it is more susceptible of corruption than, e.g., /usr/.
Putting /var/ on a separate partition reduces risks. If disaster
happens, you may have to rebuild the /var directory to rescue your
Debian system.
Obtain the skeleton content of the /var directory from a minimum
working Debian system based on the same or older Debian version, for example
var.tar.gz, and
place it in the root directory of the broken system. Then
# cd /
# mv var var-old # if any useful contents are left
# tar xvzf var.tar.gz # use Woody skeleton file
# aptitude # or dselect
This should provide a working system. You can expedite the recovery of package
selections by using the technique described in Recover package selection data, Section 6.3.4.
([FIXME]: This procedure needs more experiments to verify.)