Is there any way to convert an MBR disk to GPT without losing data?
I don’t think this is possible - the underlying partition tables are incompatible.
Not done myself (although I want to try), but it seems that it is possible: https://superuser.com/questions/1250895/converting-between-gpt-and-mbr-hard-drive-without-losing-data
When you launch gdisk
targeting a MBR disk you are greeted with this warning
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************
Please note the THIS OPERATION IS POTENTIALLY DESTRUCTIVE! sentence.
Prepare yourself by backing up your data.
While I have used gdisk to convert MBR to GPT - it has always resulted in dataloss - there is absolutely no way to warrant this action won’t destroy your data.
gdisk creator has an article about this: Converting to or from GPT
Normally it should work. But in certain cases can be problems.
I know - the developer is very, very good at what he does - but the fact the developer issues the warning when launching gdisk on a MBR disk - should be enough evidence how wrong it can go.
So before doing any thing - ensure you have a backup image of the disk - eg. using clonezilla.
Another thing to consider - the level of expertise from the member asking the question - messing with partition tables without proper precautions is a recipe for disaster.
Yes, of course. I wouldn’t do it in a disk with important data to me without a backup.
Just became aware of this topic: yes it can be done with gdisk
. I’ve done it on 3 system disks in 3 different machines.
Partition table backups should suffice in case anything goes wrong, see arch wiki:
https://wiki.archlinux.org/title/fdisk#Backup_and_restore_partition_table
If one wants to be extra careful, a full backup of all data should put one*s mind at ease.
If you use BIOS legacy, it is not compatible with GPT.