Date: Sat, 2 Oct 2004 15:05:54 -0600 From: Tillman Hodgson <tillman@seekingfire.com> To: freebsd-hackers@freebsd.org Subject: Re: Protection from the dreaded "rm -fr /" Message-ID: <20041002210554.GS35869@seekingfire.com> In-Reply-To: <20041002204851.K24332@fw.reifenberger.com> References: <20041002081928.GA21439@gothmog.gr> <200410021123.59811.max@love2party.net> <20041002165155.GP35869@seekingfire.com> <20041002175517.GA2230@gothmog.gr> <20041002204851.K24332@fw.reifenberger.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 02, 2004 at 09:16:08PM +0200, Michael Reifenberger wrote: > On Sat, 2 Oct 2004, Giorgos Keramidas wrote: > ... > >>Exactly. Who would expect `rm -rf /` to actually succeed? It's not only > >>dangerous, it doesn't work in a useful way ;-) > >> > >>If one is thinking about `rm -rf /`, `newfs` is probably the right > >>answer. > > newfs only works if the root is not mounted because otherwise the device is > locked. (Hmm is GEOM too anti foot shooting? But can't you reenable > foot-shooting via sysctl?) whereas `rm -rf /` works allwsys > :-) It'll never work, though, that's the thing. At some point it'll rm something it itself needs and error out. There isn't a way to use `rm -rf /` that /doesn't/ result in foot-shooting. This isn't a sub-tree like /etc or /sbin (which are rooted in /), this is only to treat / itself specially. -T -- "If knowledge creates problems, ignorance will not solve them" -- Isaac Asimov.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041002210554.GS35869>