Date: Mon, 24 Jan 2005 19:03:24 +0100 (CET) From: gregorynou@altern.org To: "Ruben de Groot" <mail25@bzerk.org> Cc: freebsd-questions@freebsd.org Subject: Re: A stupid thing I've done... 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>
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 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38514.193.48.224.208.1106589804.squirrel>