Date: Tue, 27 Sep 2016 00:36:22 +0900 From: Ngie Cooper <yaneurabeya@gmail.com> To: Ernie Luzar <luzar722@gmail.com> Cc: "Hartmann, O." <ohartman@mail.zedat.fu-berlin.de>, FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: Destroy GPT partition scheme absolutely, how? Message-ID: <5484D815-4B17-456B-BA60-CC6F4E97AFE3@gmail.com> In-Reply-To: <57E92726.2020605@gmail.com> References: <20160926150109.0d0d793e@hermann> <57E92726.2020605@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Sep 26, 2016, at 22:48, Ernie Luzar <luzar722@gmail.com> wrote:
...
> This little script has been posted before. Maybe it will be what your look=
ing for. Called gpart.nuke
>=20
> #! /bin/sh
> echo "What disk do you want"
> echo "to wipe? For example - da1 :"
> read disk
> echo "OK, in 10 seconds I will destroy all data on $disk!"
> echo "Press CTRL+C to abort!"
> sleep 10
> diskinfo ${disk} | while read disk sectorsize size sectors other
> do
> # Delete MBR and partition table.
> dd if=3D/dev/zero of=3D/dev/${disk} bs=3D${sectorsize} count=3D1
> # Delete GEOM metadata.
> dd if=3D/dev/zero of=3D/dev/${disk} bs=3D${sectorsize} oseek=3D`expr $sect=
ors - 2` count=3D2
> done
Why not just use "gpart destroy -F provider"?
Cheers,
-Ngie=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5484D815-4B17-456B-BA60-CC6F4E97AFE3>
