KDE Partition Manager clears a Hybrid MBR created by gdisk and replaces the whole thing with a GPT Protective Partition. Reproducible: Always Steps to Reproduce: 1. Use gdisk to create a partition, then add it to the hybrid MBR. 2. Use gdisk to print the protective MBR table before writing to disk. 3. Create another partition, or edit the disk with KDE Partition Manager. 4. Verify with gdisk that the hybrid MBR is gone. Actual Results: The hybrid MBR is gone. Expected Results: Ask the user what to do with the MBR This bug caused me to lose my Windows install and I had to reinstall Windows from scratch.
I don't think Partition Manager would support hybrid MBRs (usage of hybrid MBRs is definitely not encouraged) but at least it would be nice if Partition Manager detected them and aborted instead of eating all the data (although, I think it should be possible to recover it with gdisk, after all GPT still contains a valid partition table). Note: gparted behaves in exactly the same way.
libparted does not support hybrid MBR, so nothing we can do for now... It might be possible to replace libpartedbackend with something like sfdisk. But some information is hard to obtain without libparted, e.g. which are the first/last usable sectors in GPT partition table...
I've now replaced libpartedbackend with sfdisk in KDE Partition Manager (although sfdisk backend is not in the released version yet). So I'm reopening this bug. It might be possible to fix it now.
I tested it with partition manager from master (that uses sfdisk). It seems to preserve protective MBR. If it still does not work, please reopen this bug.