On Wed, Jan 27, 2021 at 05:50:07PM +0200, Samarul Meu wrote:
> I was playing with some script trying to create an encrypted image and
> accidentally I did bioctl -d sd0 where sd0 is the disk with my OpenBSD
> install. Of course the system hanged. When I tried to reboot it no longer
> ask me for my passphrase.
> [...]
> Using a usb drive with *FuguIta* I managed to do a fsck on all partitions
> (some errors appeared, but I cleaned them).
> 
> I was even able to mount them and everything seems fine, I recovered what I
> was working on, but I have no luck in booting. Again and again the above
> error.

> I am a little puzzled that there is no failsafe mechanism for commands like
> bioctl or fdisk on the already mounted disk. For me the obvious think was
> that the system complains when trying bioctl -d sd0.

Perhaps. But that would require not-trivial WORK, maybe a LOT, which
someone would have to DO, probably for FREE.

I suspect detaching a running encrypted root disk is somewhat uncharted
territory. In a perfect world the same command might've offered a
"failsafe" mechanism and performed logout, shutdown, umount and sync and
whatnot in the case of an affirmative response, but not in ours. Such a
perfect world might not even be preferable given how much added code
complexity and size such "failsafe" mechanisms could involve.

For now, consider yourself lucky to have recovered your data. That is
the most important thing and I'm happy on your behalf to hear that you
managed so.
 
Regards

Reply via email to