Why is it possible to overwrite the boot sector so trivially in Windows? I just had a little coding accident involving writing to a raw physical disk, and I messed up the arithmetic and ended up zeroing the boot sector (rookie failure, I admit). Easily fixed though. But shouldn't an OS give some kind of warning when some random program attempts to write on the boot sector (which is arguably the most important section of the hard drive's data, since without it, the hard drive isn't recognized)?
My antivirus didn't even pick up my program, I shudder at the thought of a virus just coming along and innocently overwriting my boot sector. I mean surely this kind of stuff qualifies as "potentially damaging", right?
It's not a big deal but I was surprised to see it was even possible. Are there any ways to have Windows restrict access to the boot sector so that I (or another more nefarious program) cannot screw it up again?