
Knurpht - Gertjan Lettink wrote:
Op zondag 7 mei 2017 16:57:53 CEST schreef Bjoern Voigt:
What is the best way to wipe a GPT partition table completely from an USB key?
(Background: My USB key contains a GPT partition table, probably from an OS installation (FreeNAS, openSUSE installation media ...). Parted, fdisk, gdisk have functions to create a new MSDOS partition table, but they do not wipe the GPT completely. As the result, Grub2 functions (grub2-install, YaST Bootloader) fail. Currently I do "dd if=/dev/zero of=/dev/disk/by-id/<my-usb-key-device> bs=64M", but this takes long.)
Greetings, Björn
You're zeroing the disk with 64MB sized blocks entirely
I use
dd if=/dev/zero of=/dev/sdX bs=1M count=64
See if that changes anything. It only writes the first 64MB, where the partition tables reside.
That is where the primary GPT table resides, the secondary is at the end of the disk. 64M is overkill, 16K is likely more than enough. -- Per Jessen, Zürich (12.9°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org