* Frank Gevaerts <[EMAIL PROTECTED]> [030217 08:44]: > On Fri, Feb 14, 2003 at 11:08:10AM +0000, John M. Adams wrote: > > Dear Friends, > > > > I recently lost the disk dedicated to /usr. I happened to have plenty > > of extra partition space and a /usr from a recent debian install on > > another partition, so getting back up was only a matter of a few > > minutes; no reboot required. > > > > Needless to say, the package system now requires some attention as > > many things which are still thought to be installed are missing all of > > the files that were in /usr. The state of the package system seems to > > be recorded on /var. > > > > I have been able to remove and reinstall and so forth to bring some > > things back into a good state, but things are not quite there yet. > > For example I wrote a script to recursively check and install or > > reinstall based on dependency info from apt-cache depends. That > > helped somewhat as mozilla is involved in complex dependency > > relationships. The script uses dpkg -L to check whether a package's > > files are really there. Is there some kind of built in validator > > similar to this? > > What I would do is > dpkg --get-selections|grep -w install|cut -f 1|xargs apt-get install --reinstall > > This will basically reinstall all your packages. The only disadvantage I > see is that it will probably ask what to do about just about every > configuration file you have. IIRC the default is to leave the one you > have, so just pressing return should do the trick. > This will take some time (it has to get every package from cd/net and > unpack it again), but I think it is very likely to produce an exact copy > of the system you had. <snip>
I suspect that only a small fraction of your installed packages don't have files in /usr, so the above method probably won't be so slow. One thing that could speed this up is to make sure debconf only asks you "critical" questions and does not re-ask questions you have answered before. Before trying to reinstall everything select these options by running: dpkg-reconfigure debconf Additionally will probably find that some of the packages are no longer available (unless you run stable). So it might be best to put the package list in a file, and edit out the packages that apt-get complains about. eg 1. dpkg --get-selections | grep -w install > pkg.txt 2. apt-get install --reinstall `cat pkg.txt` 3. Delete entries in pkg.txt, go back to 2. Cheers, Nick. -- Debian testing/unstable Linux onefish 2.4.20-lavienx #1 Mon Jan 6 17:03:01 JST 2003 i686 unknown unknown GNU/Linux -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]