l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
April 21: Google Glass
Next Installfest:
TBD
Latest News:
Mar. 18: Google Glass at LUGOD's April meeting
Page last updated:
2003 Jun 01 22:38

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] recovering /usr with dpkg
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] recovering /usr with dpkg



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>.

Attachment: pgp00000.pgp
Description: PGP signature



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.