NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/54088: "gpt destroy" does not completely destroy the GPT



>Number:         54088
>Category:       bin
>Synopsis:       "gpt destroy" does not completely destroy the GPT
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 29 16:45:00 +0000 2019
>Originator:     Martin Husemann
>Release:        NetBSD 8.99.36
>Organization:
The NetBSD Foundation, Inc.
>Environment:
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
Architecture: x86_64
Machine: amd64
>Description:

(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.

>How-To-Repeat:

dd if=/dev/zero of=disk.img seek=6g count=1
vnconfig -c vnd0 disk.img
gpt create vnd0
gpt destroy vnd0
fdisk vnd0

>Fix:
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.



Home | Main Index | Thread Index | Old Index