[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Oops, no more /usr.



Thomas Adam wrote:
On Tue, Aug 24, 2004 at 02:48:34PM -0400, PaulNM wrote:

1: Should I tar /etc before this and overwrite it again afterwards? If so, are there any other directories I should do the same to?


Unless you have made a lot of modifications, no. Of course, if you had made
modifications, you'd have done so via local files under $HOME.

My concern was that some packages might re-ask questions (ie. Xserver related). In this case I'd rather just overwrite the conffile(s) with backups. I just cp -a /etc /root/ in case one or two conffiles need to be overwritten.

2: Is there a way to only reinstall packages with files in /usr? For example, kernel-sources* has files placed in /usr, but kernel-image* do not.


COLUMNS=200 dpkg -l | awk '/^ii/ {print $2}' | xargs apt-get --reinstall install

Should do it for you.

-- Thomas Adam

Hmm, it seems dpkg, awk, and apt-get reside in /usr as none of them are available right now. Otherwise that one-liner is magnificent.

At this point I'm looking at trying one of the following:

1: Download precompiled tarballs of the three and there dependencies, then run the one-liner.

2: Copy over a minimal /usr from Knoppix cd (3.4).

3: Maybe using net-installer cd to reinstall debs (at least base debs).

Number 3 looks most appealing, I'm checking to see if it's possible. Any other suggestions would appreciated.

PaulNM



Reply to: