10 years later
finally converting my mbr windows partition to gpt... many years in the waiting i guess? this has all been working on moving my windows disk to a gpt formatted disk after moving from a dual booted computer to one dedicated to gaming. this adventure has been a number of years in the making as this pc first started as a windows 7 pc and then eventually became what it is now.
attempts at conversion
i first tried to use mbr2gpt and made an attempt at fixing the partition. this kind of worked. after moving the partition around with gparted i tried to use mbr2gpt a couple times and it always complained about no free space. i tried 500mb and 700mb at the beginning and plenty of space at the end. each time i moved the partition in gparted to had to go through the dance of
mbr2gpt /convert - couldnt find space
bootrec /scanos - found an os
bootrec /rebuildbcd -found the os and it asked to add it to the boot rec. i could now boot to this partition at this point ok as well
mbr2gpt /validate - validated ok!
mbr2gpt /convert - couldnt find space....
so i started doing some research on what mbr2gpt actually does, and found a pretty good microsoft article that gave some ideas
https://learn.microsoft.com/en-us/windows/deployment/mbr-to-gpt
i was able to see that my partitions do not match what it appeared to be expecting in the examples. so with that detail i went with trying to change the partitions and volumes to something that aligned with the example.
DISKPART> list volume
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 F CENA_X64FRE UDF DVD-ROM 4027 MB Healthy
Volume 1 C System Rese NTFS Partition 499 MB Healthy
Volume 2 D Windows NTFS Partition 58 GB Healthy
Volume 3 E Recovery NTFS Partition 612 MB Healthy Hidden
DISKPART> select volume 2
Volume 2 is the selected volume.
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 Primary 499 MB 1024 KB
* Partition 2 Primary 58 GB 500 MB
Partition 3 Recovery 612 MB 59 GB
DISKPART> detail partition
Partition 2
Type : 07
Hidden: No
Active: No
Offset in Bytes: 524288000
Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
* Volume 2 D Windows NTFS Partition 58 GB Healthy
DISKPART> exit
but the data
so doing this setup i did have to nuke the partition i was trying to work with. that was fine though, i had a backup snapshot that i had been working from since all of this was in my nas and not doing this on the actual gaming box yet.
after the new partitions were written i used the dd commands that i mentioned in a previous article to image the actual data partition which contained the original c drive. but they were slightly different since they were remote dd commands over ssh. since i was going from a remove filesystem onto this one i had to tell it where to seek but it was a little different than the other article. the skip had to be on the input section.
ssh root@remoteserver dd if=/dev/zd288 skip=endOfPartitionYouDontWant | sudo dd of=/dev/nvme0n1p3 status=progress
Well this didnt work because i ran out of space on the drive, so now i have to resize the partition. but i didnt want to do that on the zvol on the nas so i dumped the partition to disk and resized with parted. more to come...