[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/54088: "gpt destroy" does not completely destroy the GPT
>Synopsis: "gpt destroy" does not completely destroy the GPT
>Arrival-Date: Fri Mar 29 16:45:00 +0000 2019
>Originator: Martin Husemann
>Release: NetBSD 8.99.36
The NetBSD Foundation, Inc.
System: NetBSD night-owl.duskware.de 8.99.36 NetBSD 8.99.36 (NIGHT-OWL) #659: Fri Mar 29 16:52:48 CET 2019 martin%night-owl.duskware.de@localhost:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
(NB: marked critical/high priority as this behaviour causes un-intuitive
sysinst behaviour in a soon-to-be commited sysinst update)
When removing the GPT from a disk with the "gpt destroy" command, the main
GPT is removed, but the protective MBR is left.
This is very counter intuitive and IMO useless. Changing the code is easy,
but I am not sure why this behaviour has been implemented.
dd if=/dev/zero of=disk.img seek=6g count=1
vnconfig -c vnd0 disk.img
gpt create vnd0
gpt destroy vnd0
Woraround is to add a "dd if=/dev/zero count=100" after gpt destroy.
I volunteer to do the code change if consensus is to zero the PMBR.
Main Index |
Thread Index |