Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jul 2017 19:18:12 -0500 (CDT)
From:      "Valeri Galtsev" <galtsev@kicp.uchicago.edu>
To:        "Doug Hardie" <doug@mail.sermon-archive.info>
Cc:        "freebsd-questions@freebsd.org Questions" <freebsd-questions@freebsd.org>
Subject:   Re: Unusual Question
Message-ID:  <52627.76.193.16.95.1499645892.squirrel@cosmo.uchicago.edu>
In-Reply-To: <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info>
References:  <888578F8-AD68-4993-823C-152789F3C929@mail.sermon-archive.info>

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

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=/dev/zero of=/dev/ada0 might do the
> trick,

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.

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.

I hope, you had fun reading this ;-)

Valeri

> 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.
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe@freebsd.org"
>


++++++++++++++++++++++++++++++++++++++++
Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247
++++++++++++++++++++++++++++++++++++++++



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