Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2005 14:58:33 +0100
From:      Ruben de Groot <mail25@bzerk.org>
To:        gregory.nou@metz.supelec.fr
Cc:        freebsd-questions@freebsd.org
Subject:   Re: A stupid thing I've done...
Message-ID:  <20050124135833.GA37558@ei.bzerk.org>
In-Reply-To: <41F2E3A0.1040103@supelec.fr>
References:  <41F2E3A0.1040103@supelec.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050124135833.GA37558>