forked from pbatard/rufus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] work around a Windows bug that may render a disk inaccessible …
…on cleanup * The root of the issue is that Windows IOCTL_DISK_CREATE_DISK does not properly zero all of the MBR/GPT/PBR structure with PARTITION_STYLE_RAW (which is what diskpart uses to clean a disk), and leaves plenty of partition artefacts behind. * This means that, when an image with complex partitioning has been applied, such as Chromium/ChromeOS, you may end up with a drive that can not be repartitioned or reformatted in Windows (and this is completely independent of whether Rufus was used to perform these operations - For instance you will get the same issue if you use Win32DiskImager and diskpart + clean). * The only option left for users then is to reset/repartition their drives in Linux or some other OS, as Windows' VDS becomes incapacitated to handle the drive, as the problem persists independently of reset/re-plug/Windows platform being used. * To work around this, we ensure that we zero the MBR/GPT/PBR sectors BEFORE calling IOCTL_DISK_CREATE_DISK. * Also move zeroing of the drive before partition reset. * Closes pbatard#759
- Loading branch information
Showing
4 changed files
with
25 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters