Long story short, I have an external USB hard drive formatted using a MBR partition table, and I want to install Ubuntu in UEFI mode in a ~23.40 GB unallocated space before a ~442.33 GB NTFS partition that I need to keep:
To install Ubuntu in UEFI mode I need the partition table of the drive to be formatted as gpt.
I don't think there's an easy / direct way to convert a MBR partition table to a gpt partition table, so I'm also looking for the complicated / indirect way.
For example I think something can be done by noting down the NTFS partition start, writing the new partition table and adding the NTFS partition to the new partition table, but I've never done this and I have no idea where to start; furthermore I don't wish to try this for the first time in this case, since I'm not really confident with this stuff and I can't afford losing the NTFS partition I need to keep.
There actually is an easy way to do it: Run
gdisk
on the disk and then typew
to save the changes (which, if you do nothing else, consist of converting from MBR to GPT, whichgdisk
does automatically). That said, there are a few caveats:For more on this subject, see my GPT fdisk documentation on MBR-to-GPT conversions. (Note: I'm the author of
gdisk
, which is installed by default with recent versions of Ubuntu; so that page can be considered official documentation.)