|
|
|
|
|
by jabberwcky
1953 days ago
|
|
GPT along with most filesystems store a bunch of stuff at random places around the disk, for many filesystems it's even configurable. The most usual problem with your approach is recreating a set of partition tables exactly matching the old tables, while failing to wipe out a filesystem signature buried halfway into the disk. One reboot later, and magic header bytes start to be recognized as valid filesystems by whatever OS installer or BIOS utility you happen to be using. Even worse if you're been taking some hacky shotgun approach to blowing holes in the drive by zeroing out random sectors that belong to one of those recognized filesystems. So once again, > The only portable, reliable, robust way to accomplish this is wiping the drive |
|
This is not remotely accurate. GPT is at the beginning of the disk, with a backup copy at the end of the disk. Wiping the GPT makes the layout of filesystem structures within partitions completely irrelevant. Wiping the primary GPT at the beginning of the disk is usually (possibly always) sufficient to make an OS installer believe the disk to be empty. The backup GPT at the end of the disk is something I've only seen used by manual partitioning tools that are more powerful and complex than the automatic partitioning tools that are part of OS installers.
> The most usual problem with your approach is recreating a set of partition tables exactly matching the old tables, while failing to wipe out a filesystem signature buried halfway into the disk. One reboot later, and magic header bytes start to be recognized as valid filesystems by whatever OS installer or BIOS utility you happen to be using.
Rebooting and re-detecting everything between partitioning and mkfs is not part of any ordinary OS installation procedure. Do you have any evidence that this failure mode can actually occur in practice with real shipping operating systems?
Remember, for the purposes of this hypothetical, we have to assume that at least one of the user or the OS installler is actually trying to make the process work. You can't assume that they're both trying to interfere with the process and are both going out of their way to cause problems.