But I am pretty sure that you would have to unmount the file system to format it. You can't do anything without a file system mounted. Therefore, this could never happen.
I don't know if linux prevents writing to raw devices while they are mounted, but even if it does, we're talking about putting a file system onto a disk, which you do on the device anyway. You have to format it before it can be mounted in the first place.
There are quite a few operations that won't execute unless the device is unmounted. Resizing partitions is one that I know only works when unmounted. Not positive on what else, but I would imagine formatting wouldn't work.
If the OS is running from that device then you can't unmount it, because you can't unmount it while it is in use. If the OS is running from something else then who gives a fuck if you reformat it?
Unless you boot to a different device, wipe and reformat, and then remove the device then it wouldn't work.
But you couldn't crash anything (like Watson supposedly did in the picture) by doing that. An "rm -rf /" or a dd would get you that sort of screen, I think, but I've never tried so I wouldn't really know.
Oh, well, I think you would be able to scribble over the disk even while it's mounted, which would have pretty much the same effect. I doubt whether it would panic the kernel.
1
u/jetpacktuxedo Feb 22 '11
But I am pretty sure that you would have to unmount the file system to format it. You can't do anything without a file system mounted. Therefore, this could never happen.