Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jul 2017 17:34:06 -0700
From:      Doug Hardie <doug@mail.sermon-archive.info>
To:        galtsev@kicp.uchicago.edu
Cc:        "freebsd-questions@freebsd.org Questions" <freebsd-questions@freebsd.org>
Subject:   Re: Unusual Question
Message-ID:  <BF16E1CF-A889-4734-981E-2B68115FCD3C@mail.sermon-archive.info>
In-Reply-To: <52627.76.193.16.95.1499645892.squirrel@cosmo.uchicago.edu>
References:  <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info> <52627.76.193.16.95.1499645892.squirrel@cosmo.uchicago.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

> On 9 July 2017, at 17:18, Valeri Galtsev <galtsev@kicp.uchicago.edu> =
wrote:
>=20
>=20
> On Sun, July 9, 2017 4:57 am, Doug Hardie wrote:
>> I have a FreeBSD 9.3 remote server that needs to be purged.  I know =
that
>> rm -rf / will remove all the directory entries, but I need to write =
over
>> the drive.  I thought that dd if=3D/dev/zero of=3D/dev/ada0 might do =
the
>> trick,
>=20
> If you were able to execute this, it still will not do the trick. What
> will happen is the following: the command at some point will descend =
into
> /dev and will delete block device / filesystem lives on, and after =
that
> point the command will just fail. I have vague recollection that that =
was
> one of the tricky questions on some sysadmin exam (Linux probably). I =
knew
> someone who actually did that on multi-user box he administered (space
> just snuck in after leading slash of absolute path). I happened to =
help
> him: we just mounted partitions on another machine and apart from /bin
> /boot and portion of /dev all still was there, so it was nothing like =
the
> disaster on can picture from nasty appearance of this command.
>=20
> Someone at some point mentioned that rm command goes into directories =
and
> subdirectories NOR in alphabetical order, so I left that out, but in
> incident I mention nothing but what alphabetically is before the =
device /
> filesystem lives on (/dev/hda2 was our case I believe) was lost.
>=20
> I hope, you had fun reading this ;-)
>=20
> Valeri
>=20
>> but it gives an not permitted error.  The whole thing can crash and
>> burn at the end.  This is an unmanned site so moving drives is not =
viable.
>> _______________________________________________

Thanks for the info.  I've never tried the rm approach, but the dd =
approach seems to work.  After a couple hours the machine became =
unresponsive and ssh sessions were terminated.  I think the drive is now =
empty.  I'd like to be able to get it back to verify, but that won't =
happen.  I still have 3 more systems to do this to.  The others will =
have to wait for awhile as I may still need them for a few more days.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BF16E1CF-A889-4734-981E-2B68115FCD3C>