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

Re: I've removed /etc. How can I restore it?



On Wed, 17 Feb 1999, Conrado Badenas wrote:

> Please, don't laugh at me until you have read the message!
> 
> I was doing some maintanance tasks, removing old files with rmold (it is
> an alias for "rm -rf *~ .*~"). I noticed (with "ll /etc|less") that /etc
> had some old files and I did "rmold /etc", unknowing of the catastrofic
> effects: It removed the whole directory!
[...]
dselect says I only have 134 packages.
> I remember the name of the last five or six packages installed previous
> week, but nomore.
[...]
> How can I get a list of packages I really DO have installed in order to
> reinstall again in order dselect to know the truth?

Conrado:

Someone may laugh, but I share with you a screwup back
in the SysVr2 days. I deleted the devices file. 

I had tried to test a printer with cat  file > /dev/lpr
but that overwrote the lpr device. I noticed a file 
(evidently created with some attempt to write directly
to device). no thought: rm /dev/* All of /dev/*. All 
gone.  I erased, reinstalled and restored the weekly 
backup. This is too easy to do. :)

You may be able to determine what packages you ahve installed
by
 
	ls /var/lib/dpkg/info/*.list 

This will give you the names of the packages. Perhaps then
you can dselect these packages and install. 

I thought about
            dpkg --get-selections >myselections

This won't work given that dselect says you only have 134 packages.  

I do this periodically, against disaster, to keep a record of
packages for reinstall.

Lots of luck!

--David Teague dbt@elentari.cs.wcu.edu
Debian GNU/Linux  Because Debian developers and users CARE. 
		  Thanks guys!


On Wed, 17 Feb 1999, Conrado Badenas wrote:

> Please, don't laugh at me until you have read the message!
> 
> I was doing some maintanance tasks, removing old files with rmold (it is
> an alias for "rm -rf *~ .*~"). I noticed (with "ll /etc|less") that /etc
> had some old files and I did "rmold /etc", unknowing of the catastrofic
> effects: It removed the whole directory!
> 
> I tried to use dselect to configure all packages installed but dselect
> didn't executed. Then I had a panic, the system freezed and I booted.
> But then initd refused to go on (I had no /etc/init.d files!).
> 
> Then I tried to install Debian again with the Hamm CDROM, but when
> installing base system some errors ocurred and I couldn't finished. I
> couldn't see the errors because messages were covered down with error
> mesages that explained that something failed but not where it failed!
> Then, I decided to make a SuSe boot disk in order to install the Minimal
> system and then trying again with Debian, but SuSe also failed.
> 
> Again I tried out with Debian Hamm. Then, when "mounting already
> initialized partitions" (I didn't want to format them and loose the work
> of six months!) I noticed a warning message: I shouldn't mount
> partitions before checking them. So I unmounted and checked them. There
> were plenty of errors due (I suposse) to the first reset, when the
> system hanged and I had panic). So I e2fsck'ed them various times in
> order to have them right, I went on with instalation, and finally I had
> the base system installed.
> 
> I didn't use dselect in order to install the standard packages because I
> had them already installed, but then, and after rebooting, I tried to
> use dselect in order to configure all my packages installed in these
> last six months. Dselect told me that I had installed almost no
> packages!
> 
> I've lost the list of packages installed in these months! How could I
> restore it?
> 
> Then I remembered that two months ago I tar'ed the /etc directory for a
> friend, searched the diskette, found it, and untar'ed it. Thus, I had
> the /etc of 23 december 1998. In order to obtain newer versions of /etc
> files for packages installed I dselect'ed and installed via ftp all
> packages listed (the base system). Then configured them, by choosing
> between the package /etc files and those already installed.
> 
> Now I have a running system, but dselect says I only have 134 packages.
> I remember the name of the last five or six packages installed previous
> week, but nomore.
> 
> How can I get a list of packages I really DO have installed in order to
> reinstall again in order dselect to know the truth?
> 
> Thanks, now you can laugh!
> 
> -- 
> Conrado Badenas (Assistant Lecturer)
> Department of Thermodynamics. University of Valencia
> c/. Doctor Moliner, 50       | e-m: Conrado.Badenas@uv.es
> 46100 Burjassot (Valencia)   | Phn: +34-63864350
> SPAIN                        | Fax: +34-63983385
> 
> 
> -- 
> Unsubscribe?  mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
> 


Reply to: