When trying to extend a partition from my SSD (which contained my Arch Linux partition), Windows converted it to a dynamic drive, which messed up my GRUB boot since apparently Linux can't read dynamic drives. I reverted back to a simple drive using AOMEI Partition Assistant as suggested on a couple posts.
However, it seems to have messed up the partition table since I still can't boot into GRUB and when checking from a bootable USB, gdisk shows both MBR and GPT partition tables available. Here's all outputs from gdisk:
Disk info:
[[email protected] ~]$ sudo gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.9.1
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: present
Found valid MBR and GPT. Which do you want to use?
1 - MBR
2 - GPT
3 - Create blank GPT
MBR:
Disk /dev/nvme0n1: 1953525168 sectors, 931.5 GiB
Model: Samsung SSD 970 EVO Plus 1TB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 1A0E603E-51F0-4487-B502-11E625DF814E
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 211840366 sectors (101.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 1426096128 1427144703 512.0 MiB 0700 Microsoft basic data
2 1427144704 1741717503 150.0 GiB 0700 Microsoft basic data
5 32768 1426096126 680.0 GiB 0700 Microsoft basic data
GPT:
Disk /dev/nvme0n1: 1953525168 sectors, 931.5 GiB
Model: Samsung SSD 970 EVO Plus 1TB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): A9089CC8-91CB-4A00-AB2F-F39D643718A8
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 8-sector boundaries
Total free space is 211807631 sectors (101.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 34 2081 1024.0 KiB 4201 LDM metadata partition
2 2082 32767 15.0 MiB 0C01 Microsoft reserved ...
3 32768 1426096127 680.0 GiB 4200 LDM data partition
4 1426096128 1427144703 512.0 MiB EF02
5 1427144704 1741717503 150.0 GiB 8300
It appears the GPT table is from before I converted back to simple volume since it contains LDM data as before. The MBR table is correct in how my partitions where distributed before the disk was converted to dynamic but all partitions show as Microsoft basic data, so I'm not sure if I should just roll back to that.
When opening gparted
the drive appears fine, the 150Gb partition even shows using ext4 filesystem (gparted screenshot) which is correct and I can even mount it from command line, however, I can't mount them from the bootable's File manager GUI. In fact, I can't mount any partition from that drive from GUI. GRUB also seems to have been corrupted on some step of the way because my PC boots to "Selected boot device failed. Press any button to reboot" when I select that boot partition. I can still boot to Windows since it was installed in another drive. Also, every disk but this one has a GPT partition table, I'm not sure if this one was GPT or MBR before I messed up with the Windows dynamic drive thing.
I'm not sure what to do here, is there a way to recover my old partition table and not lose any data?
Note: I'm using Arch Linux (EndeavourOS) on dual boot with Windows 10.
Edit 1: After converting back to Simple drive, my arch partition is visible (but of course not accessible) from both Windows' explorer and partition manager, where it shows as RAW.