From owner-freebsd-questions@FreeBSD.ORG Mon Jan 24 18:02:24 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 3B6B616A4CE for ; Mon, 24 Jan 2005 18:02:24 +0000 (GMT) Received: from altern.org (altern.org [80.67.174.57]) by mx1.FreeBSD.org (Postfix) with SMTP id 6C3BE43D31 for ; Mon, 24 Jan 2005 18:02:23 +0000 (GMT) (envelope-from gregorynou@altern.org) Received: (qmail 7087 invoked by alias); 24 Jan 2005 18:03:24 -0000 Received: from unknown (HELO altern.org) (127.0.0.1) by localhost with SMTP; 24 Jan 2005 18:03:24 -0000 Received: from 193.48.224.208 (proxying for 193.48.225.2) (SquirrelMail authenticated user gregorynou); by altern.org with HTTP; Mon, 24 Jan 2005 19:03:24 +0100 (CET) Message-ID: <38514.193.48.224.208.1106589804.squirrel@altern.org> In-Reply-To: <20050124135833.GA37558@ei.bzerk.org> References: <41F2E3A0.1040103@supelec.fr> <20050124135833.GA37558@ei.bzerk.org> Date: Mon, 24 Jan 2005 19:03:24 +0100 (CET) From: gregorynou@altern.org To: "Ruben de Groot" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal 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 18:02:24 -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 Thx a lot !! that worked ! Actually, I had to do this (just in case somebody would have the same bad idea I had and would read the posts in this list ;)) : 1. copy gzip from /rescue to /usr/bin (maybe not the good location, but I could use it, so..) 2. mkdir /usr/tmp && cd /usr/tmp 3. /rescue/cat /cdrom/base/base.?? > usr.bak 4. /rescue/tar --unlink -xpzf usr.bak And then, I just get what I needed, and had only to copy the missing file. Being able to RTFM again is so great ! Thanks a lot for your tip. -- Grégory