From owner-freebsd-questions@FreeBSD.ORG Mon Jan 24 13:55:45 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1B27D16A4CF for ; Mon, 24 Jan 2005 13:55:45 +0000 (GMT) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0529F43D2D for ; Mon, 24 Jan 2005 13:55:44 +0000 (GMT) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.13.1/8.13.1) with ESMTP id j0ODwXC7037959; Mon, 24 Jan 2005 14:58:33 +0100 (CET) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.13.1/8.13.1/Submit) id j0ODwXHc037958; Mon, 24 Jan 2005 14:58:33 +0100 (CET) (envelope-from mail25@bzerk.org) Date: Mon, 24 Jan 2005 14:58:33 +0100 From: Ruben de Groot To: gregory.nou@metz.supelec.fr Message-ID: <20050124135833.GA37558@ei.bzerk.org> Mail-Followup-To: Ruben de Groot , gregory.nou@metz.supelec.fr, freebsd-questions@freebsd.org References: <41F2E3A0.1040103@supelec.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41F2E3A0.1040103@supelec.fr> User-Agent: Mutt/1.4.2.1i X-Spam-Status: No, score=-2.3 required=5.0 tests=ALL_TRUSTED, FROM_ENDS_IN_NUMS autolearn=failed version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on ei.bzerk.org cc: freebsd-questions@freebsd.org Subject: Re: A stupid thing I've done... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jan 2005 13:55:45 -0000 On Sun, Jan 23, 2005 at 12:37:04AM +0100, Gregory Nou typed: > Hi ! > I've tried to chroot an user, so i create /home/this_user/usr and the > other needed directories, but later, I wanted to delete them (as root of > course) and i typed rm -r /usr instead of rm -r usr ... > It asked me if i wanted to overwrite su, so i saw my mistake, and > cancelled, but i don't have adduser, man, ee and ... make anymore ! > How can I repair that ? can i do something without reinstalling > everything ? (I need at least make... and I'm quite reluctant at > compiling /usr/src/usr.bin/make ... So i hope there is another way) Depending on the branch your system is on (I assume 5.x), you could download the latest release relative to your system, mount the cd and do: /rescue/cat /cdrom/base/base.?? | /rescue/tar --unlink -xpzf - -C / usr/ This will reinstall everything under /usr and probably get you a workable system again. G'Luck, Ruben