Re: Destroy GPT partition scheme absolutely, how?

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Tue, 27 Sep 2016 06:37:26 +0200
On Tue, 27 Sep 2016 00:36:22 +0900
Ngie Cooper <yaneurabeya_at_gmail.com> wrote:

> > On Sep 26, 2016, at 22:48, Ernie Luzar <luzar722_at_gmail.com> wrote:  
> 
> ...
> 
> > This little script has been posted before. Maybe it will be what your
> > looking for. Called gpart.nuke
> > 
> > #! /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=/dev/zero of=/dev/${disk} bs=${sectorsize} count=1
> > # Delete GEOM metadata.
> > dd if=/dev/zero of=/dev/${disk} bs=${sectorsize} oseek=`expr $sectors - 2`
> > count=2 done  
> 
> Why not just use "gpart destroy -F provider"?
> 
> Cheers,
> -Ngie
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"

Yes, why not :-(

Maybe panic and too much swet on the forehead ... ;-) Thanks.
Received on Tue Sep 27 2016 - 02:37:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:08 UTC