From owner-freebsd-current@freebsd.org Tue Sep 27 04:58:06 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A97ABEB046 for ; Tue, 27 Sep 2016 04:58:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68AB68F0 for ; Tue, 27 Sep 2016 04:58:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id e66so4981504iod.1 for ; Mon, 26 Sep 2016 21:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=BRQsA0tU3W+lDtw6JkY5/ACSortqqPKRMzQwCvPV4PE=; b=iVUlSHRO1oHuNDkjY0jt1dqaBf7uBjg8xGHsX9NuUL3BIWO0QuAroeqwOHeEpeXgji OlaelWNSRgCwtWJJC8K1q30lB2aAltOsCxPn9m2RhyCVMy0cLBiCMkmg9fRgpvU77Vqt keitmFLTL3YAr+WTZwpjzhxj2sJu4emS59WG+iAfgtLIbCnl4Nz4dSiCefp4Jtjt6jwl FAXGbpv5v4aF9Q8vDSTNzF1gYHCAxmSk3p6Vz8iJ5b8r/wbD1aN0tm83tmWZK1Aiz/oC Vn46WI+N2jdz5qAl/sUH5NRpH9vZRg1bMT9wA66Ay3new1OBHfJcGu0lc76b2OxMe+vw QhRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=BRQsA0tU3W+lDtw6JkY5/ACSortqqPKRMzQwCvPV4PE=; b=jcp/uvUR2wJZoDcapqWGxn7QURzUfmpRfc4RGZcYrObHu3Tq9NZkLJ1k6SkSl9iblD 29sFv/F0lVQwOaLFo/5prhe1be6qoXF+IaTUESgg+2vpfFPEyFACpXlijY0LeYIwoulu i+C/k7oDuah+BVqqeMqjt5VmanUiRztjPB1cUVL/GMSgu92dCZuprLd2Tv131cPuTh1E TKNpXa7U9HKpuwcKXBhMghvwUahoBIr/3WrK4OejtYQd3nO4vBRCDTpmzSY6ztLie58L TuhIBiwE6/KUWKAFmq9Pd0zhjXYj3ho6yJYqEf02+kJEcSOcfGWCtmnBywa4GV4psqQi dHwg== X-Gm-Message-State: AE9vXwPIpudBUrmTZi7wOUVr5MJtcBX2DdkCJCi3yhfg7ctW/KgIhRJ1PjYqeUCN4nm9D8KembQtLWTOHjowOA== X-Received: by 10.107.138.200 with SMTP id c69mr26325619ioj.43.1474952285175; Mon, 26 Sep 2016 21:58:05 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Mon, 26 Sep 2016 21:58:04 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <20160926150109.0d0d793e@hermann> <57E92726.2020605@gmail.com> <5484D815-4B17-456B-BA60-CC6F4E97AFE3@gmail.com> <1785064.lgVzRW13Wf@ralph.baldwin.cx> From: Warner Losh Date: Mon, 26 Sep 2016 22:58:04 -0600 X-Google-Sender-Auth: qQVQ0-YYQ4oh88om2C2xBCDO7So Message-ID: Subject: Re: Destroy GPT partition scheme absolutely, how? To: "O'Connor, Daniel" Cc: John Baldwin , FreeBSD Current , Ngie Cooper , Ernie Luzar , "Hartmann, O." Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2016 04:58:06 -0000 On Mon, Sep 26, 2016 at 8:46 PM, O'Connor, Daniel wrote: > >> On 27 Sep 2016, at 06:21, John Baldwin 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