Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 8949

How to reset the state of the system disk from a running Windows?

$
0
0

For test or administration purposes, it can sometimes be required to reset the state of the system disk so that it does not start and the data is not easily accessible anymore, for instance to test installation procedures or prevent any OS to start and boot from an external installation media on the next boot. Especially with consumer PCs, it is very hard to stop the normal boot process when a system is installed, because it is not clear what key to press (I have seen ESC, F2, F8, F9, F10, F11, F12, Enter), how (short or long press), and at what time. Some tablet-like models even require to press a combination of special keys, like power or volume. In addition, UEFI systems behave differently than non-UEFI systems, adding to the complexity.

A quick way to do this would be to just delete the partition table from the running system.

On Linux, this can be achieved easily within a few seconds with two commands:

sudo dd if=/dev/zero of=/dev/sda bs=512 count=32sudo sync

This prevents both UEFI and non-UEFI systems to boot on the next start. It also makes the data on the disk much harder to access and can even cause data loss, be warned.

I am not aware of any equivalent of dd on a standard Windows system. The high-level tool for partitioning on Windows do not allow this, for instance with diskpart:

> select disk 0> cleanVirtual Disk Service error:Clean is not allowed on the disk containing the current boot, system, pagefile, crashdump or hibernation volume.

So is there a way to "reset" the state of the system disk from a running Windows system?

Obviously, it is easy by booting from a different disk, but this takes much longer, and it may be impossible, for the reasons mentioned above.


Viewing all articles
Browse latest Browse all 8949

Trending Articles