On Sun, Jun 01, 2003 at 12:19:58PM -0700, Nick Donnelly wrote: > I recently had a drive fail in one of my boxes. Most of that drive was part > of a RAID 5 array, so I will be able to recover that partition relatively > easily. My question is about recovering the /usr partition on that drive. > All my other major system directories are on partitions on other drives, so > I still have an intact /var/lib/dpkg/status. I haven't used dpkg --audit > previously, so I am assuming when it discovers a fresh, completely empty > /usr, it will mark pretty much everything as needing reinstallation I have > never had a package marked in need of reinstallation before. . Where will I > go from there? What should my next command be?
Using dpkg --audit will not do what you want---its purpose is to identify packages that are not fully installed. Missing files from installed packages will not be found. I have had situations like yours before. As I recall, I recovered by reinstalling every package. (I just grabbed the list from dpkg -L, but if dpkg is broken you could look for filenames in /var/lib/dpkg/info, remove suffixes, then pipe through sort -u. Either way, proceed by saving the list of packages to a file, then reinstal using 'cat package-list | xargs apt-get install --reinstall'.) There is not much point in culling any packages from the list because every Debian package has at least one item in /usr (even it it is just the docs*). * I believe Mike has a post in the archives somewhere about the excellent trick of recovering a missing /var/lib/dpkg by exploiting Debian's requirement that all packages must have an entry in /usr/share/doc. -- Henry House The attached file is a digital signature. See <http://romana.hajhouse.org/pgp> for information. My OpenPGP key: <http://romana.hajhouse.org/hajhouse.asc>.
pgp00000.pgp
Description: PGP signature
