I'm trying to install Fedora alongside Windows 10 on a new laptop. The laptop has two 512GB SSD disks, which in the Disk Management tool showed as just one 1TB disk. I shrunk the partition on which Windows is installed to 200GB, as well as creating a 500GB partition meant as a pure data partition, leaving 200+ GB for Fedora.
When I then tried to install Fedora, the installer didn't see any of the drives, only the USB drive. After some Googling I found out that I probably had to change the "SATA Mode Selection" setting to AHCI in the BIOS (the default, and only other possible value, is "Intel RST Premium With Intel Optane System Acceleration"), so I did. After that I reinstalled Windows 10 (with AHCI still enabled).
Now, when I open the Disk Management tool in Windows, it shows two disks (as opposed to previously just one), one of which shows 953.75GB when it really is 512GB (or 476.92GB like the other one.. never understood where all those missing GBs go.. anyway).
So I suspect I put the disk in a weird state when partitioning before switching to AHCI mode. Now if I try to delete the 500GB partition (through the Disk Management tool), I get the error message "The parameter is incorrect", and when I try to format the partition I get an error message saying "The format did not complete successfully".
Using fdisk/gdisk through the Fedora Live USB drive also suggests something's amiss.
So what I want to accomplish is, preferably, undoing the partitioning I did (keeping the Windows recovery partition, and the other ones too whatever those are), so that I have the one empty disk, and the other one with four partitions; the 300MB one, the 900MB one the 15.60GB one, and the one with Windows taking up the rest of the 512GB SSD, so that I can try again, now using AHCI from the beginning. But just getting the disk working again would also be great.
I tried simply deleting the 500GB partition using gdisk, but that didn't cause the sector indexes of partition 5 and 6 to shift left, so it was of no use (and I got an error when trying to save the changes).