Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2016 22:58:04 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        "O'Connor, Daniel" <darius@dons.net.au>
Cc:        John Baldwin <jhb@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>,  Ngie Cooper <yaneurabeya@gmail.com>, Ernie Luzar <luzar722@gmail.com>,  "Hartmann, O." <ohartman@mail.zedat.fu-berlin.de>
Subject:   Re: Destroy GPT partition scheme absolutely, how?
Message-ID:  <CANCZdfp%2BOq7cYz681zYB%2B1DWqXPgxcKN5kn_YdsgfyDNuQoEOQ@mail.gmail.com>
In-Reply-To: <C03C20AC-FE67-4D7C-8239-ED48F844EE38@dons.net.au>
References:  <20160926150109.0d0d793e@hermann> <57E92726.2020605@gmail.com> <5484D815-4B17-456B-BA60-CC6F4E97AFE3@gmail.com> <1785064.lgVzRW13Wf@ralph.baldwin.cx> <C03C20AC-FE67-4D7C-8239-ED48F844EE38@dons.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 26, 2016 at 8:46 PM, O'Connor, Daniel <darius@dons.net.au> wrote:
>
>> On 27 Sep 2016, at 06:21, John Baldwin <jhb@FreeBSD.org> wrote:
>> That doesn't always work.  In particular, if a disk was partitioned with GPT
>> and then you use normal MBR on it afterwards, the 'gpart destroy -F' of the
>> MBR will leave most of the GPT intact and the disk will come up with the old
>> GPT partitions, not as a raw disk.
>
> I wonder how feasible it would be to have a command which runs destroy for every known partition scheme on a particular device..
>
> Sure there would be some duplicate zeroing but it's not likely to be significantly slower and considerably more robust.

dd of 2MB of zeros to the start and end of the disk. That will destroy
pretty much everything. For SSDs, sometimes you can do the same with
TRIMs only faster (other times they are slower or unreliable).

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp%2BOq7cYz681zYB%2B1DWqXPgxcKN5kn_YdsgfyDNuQoEOQ>