From owner-freebsd-questions@FreeBSD.ORG Sat Mar 1 03:14:48 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D8CF72D for ; Sat, 1 Mar 2014 03:14:48 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0F3921885 for ; Sat, 1 Mar 2014 03:14:47 +0000 (UTC) Received: from r56.edvax.de (port-92-195-11-141.dynamic.qsc.de [92.195.11.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id C78BF3CB7C; Sat, 1 Mar 2014 04:14:39 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id s213EGgl021439; Sat, 1 Mar 2014 04:14:16 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sat, 1 Mar 2014 04:14:16 +0100 From: Polytropon To: ajtiM Subject: Re: a big mistake-deleted etc Message-Id: <20140301041416.015b5929.freebsd@edvax.de> In-Reply-To: <50AC4930-2F20-4CDD-918F-765BBD3A82C5@gmail.com> References: <50AC4930-2F20-4CDD-918F-765BBD3A82C5@gmail.com> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Mar 2014 03:14:48 -0000 On Fri, 28 Feb 2014 12:56:31 -0500, ajtiM wrote: > Hi! > > I have a big problem. > I did accidental deleted /etc… and I cannot start a system. > Is it a way that I get /etc back without lost everything, please? Usually not. Files deleted from UFS are typically gone. You can try to use a tool like photorec (install the "testdisk" port) to try to get the _data_ back, but the file names will be lost. Another option is to boot from a USB or CD live system and to to /usr/src/etc and run "make install". This should install the required files into /etc, but you'll have to manually adjust some of them, most importantly the /etc/fstab file, but also probably the passwd user databases (both text and binary). If you're like me, you could have a CVS repository with your changes to /etc where you can checkout the lasted versions of modified files. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...