A stupid thing I've done...

Ruben de Groot mail25 at bzerk.org
Mon Jan 24 05:55:45 PST 2005


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



More information about the freebsd-questions mailing list