CVSROOT:        /cvs
Module name:    src
Changes by:     k...@cvs.openbsd.org    2022/12/18 06:10:09

Modified files:
        sys/dev        : softraid.c 

Log message:
Prevent detaching the boot volume

bioctl(8)'s -d has no sanity checks and happily "deletes" any volume,
whether currently in use or not.

For now, refuse to detach the boot volume as a (too) simple safety guard,
until proper logic around mounted file systems on top is implemented.

Found the hard way through "bioctl -d sd1" with sd1 hosting /, after which
it took both fsck(8) and installboot(8) from a miniroot USB to recover.

regress/sys/dev/softraid also triggers it if root is on softraid.

OK claudio op jsing

Reply via email to