# GBDE nuke/destroy not working



## Tracker (Jul 11, 2019)

Hi,

I have been trying to use the GBDE encryption scheme as mentioned in the handbook https://www.freebsd.org/doc/handbook/disks-encrypting.html
However when I try to run the nuke/destroy command it simply doesn't work. Either ends up saying error 22 or says that the  operation is not permitted.

Steps I use
1) Initialize the partition/volume with : gbde init /dev/da0p1 -i -L da0p1.lock
2) Enter password and confirm it in interactive mode as above
3) Attach gbde device using : gbde attach /dev/da0p1 -l da0p1.lock
4) Mount the .bde partition : mount /dev/da0p1.bde /mnt
5) I can read/write to this partition and can even unlock it - BUT the problem is when I use : gbde nuke /dev/da0p1 OR gbde destroy /dev/da0p1
It simply doesn't work and either gives an error (22) or says that the operation is not permitted (yes, I am sudo)

Is it broken ?


----------



## SirDice (Jul 12, 2019)

Did you unmount the filesystem first?


----------



## Tracker (Jul 12, 2019)

Yes I did - in fact I even tried it without mounting it (only attaching it). Here is what I ran and the output.


```
[me@machine ~]$ sudo gbde attach /dev/da0p1 -l freebsd/da0p1.lock
Password:
Enter passphrase:
[me@machine ~]$ sudo gbde destroy /dev/da0p1
gbde: /dev/da0p1: Operation not permitted
[me@machine ~]$ sudo gbde destroy /dev/da0p1.bde
Enter passphrase:
gbde: Error 22 decrypting lock
[me@machine ~]$ sudo gbde nuke /dev/da0p1
gbde: /dev/da0p1: Operation not permitted
[me@machine ~]$ sudo gbde nuke /dev/da0p1.bde
Enter passphrase:
gbde: Error 22 decrypting lock
```


----------



## Tracker (Jul 30, 2019)

Can anybody else successfully get gbde to work ?


----------

