I was just wondering if I could run the following command on my mounted OS partition i.e. the one I booted from:sudo dd if=/dev/zero of=/dev/sda bs=1M I can't really experiment with this because you only get to run it once.
Is it possible to overwrite your mounted OS partition with dd?
linux;partition
Yes, there's absolutely nothing stopping you from running that command.However it is entirely possible that in the process of running it, the system will become unstable and you'll get a kernel panic. I can't think of anything that would cause that to happen, and I've done this without running into said issue, but it is theoretically possible (due to memory-mapped files).Note though that as soon as the command completes, and you're dropped back to a shell, you won't be able to do a single thing.Another possible cause of this failing would be if you have a watchdog running (if you don't know what a watchdog is, you probably don't have one). The watchdog is very likely to die, and when it does the system will reboot.