How can I use GParted to convert MBR to GPT without data loss?

Questions about applications and software
Forum rules
Before you post please read how to get help
Matthew_Wai
Level 1
Level 1
Posts: 25
Joined: Sun Jun 07, 2015 10:42 am

How can I use GParted to convert MBR to GPT without data loss?

Postby Matthew_Wai » Tue Mar 14, 2017 11:42 am

I have Linux Mint 17.3 "Rosa" - Cinnamon (64-bit) on a live DVD.
I have an MBR HDD containing a system reserved partition, a Windows partition (C) and a data partition (D).
A new version of Windows 10 will be released next month, and I will clean install it.
Assuming I want to use GParted to convert MBR to GPT without data loss on partition D before clean installation in the UEFI mode, what should I do? Does the following work?
http://slavisa-jovanovic.com/linux/2015 ... o-gpt.html

User avatar
austin.texas
Level 20
Level 20
Posts: 11774
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby austin.texas » Tue Mar 14, 2017 11:59 am

Back up the data you want to keep to an external storage, and use Gparted > Device menu > New partition table > GPT
That will delete all existing data on the hard drive - which is why you need a complete backup.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2017

grizzler
Level 5
Level 5
Posts: 658
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby grizzler » Tue Mar 14, 2017 1:59 pm

Matthew_Wai wrote: Does the following work?
http://slavisa-jovanovic.com/linux/2015 ... o-gpt.html

Yes, in my experience gdisk does work. But do make a backup, just in case.

Matthew_Wai
Level 1
Level 1
Posts: 25
Joined: Sun Jun 07, 2015 10:42 am

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby Matthew_Wai » Thu Mar 16, 2017 6:46 am

Open Terminal after booting it from the Linux DVD and then run the following (sda = my hard disk):

1. sudo gdisk /dev/sda
2. W
3. Y

Is that correct? Do I have to call GParted before running them?

grizzler
Level 5
Level 5
Posts: 658
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby grizzler » Thu Mar 16, 2017 2:18 pm

GParted isn't involved. You need a CD or DVD which has the gdisk command and that could be the GParted Live CD.

Assuming sda is still the hard disk if you boot from the CD/DVD, /dev/sda should be correct. And that looks like a lower case w on the site you linked to.

Sorry, but it's been a while since I converted the partition tables of my machines.

Matthew_Wai
Level 1
Level 1
Posts: 25
Joined: Sun Jun 07, 2015 10:42 am

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby Matthew_Wai » Sat Mar 18, 2017 10:14 am

On GParted there is no way to convert MBR to GPT, but on Terminal there is. See the screenshot below.
What is the difference between gdisk and GParted?
If it were a GPT HDD, would the 'W' command convert it to MBR?
gdisk_775x739.jpg

grizzler
Level 5
Level 5
Posts: 658
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby grizzler » Sat Mar 18, 2017 4:26 pm

What do you mean what's the difference between gdisk and GParted? They're two different programs! Why would you expect them to be the same?

According to gdisk's man page, the w command writes the changes made in the program's memory to disk. So if you started by asking gdisk to change a GPT disk to MBR (assuming there is such a function - I didn't check) then w would be the last step in the process.

Check out the man page for more info on gdisk.

Matthew_Wai
Level 1
Level 1
Posts: 25
Joined: Sun Jun 07, 2015 10:42 am

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby Matthew_Wai » Sun Mar 19, 2017 2:23 am

GParted, Gdisk, and Fdisk are three different partition tools, and all of them are part of Linux Mint, right?
What is the URL of the Gdisk main page?

grizzler
Level 5
Level 5
Posts: 658
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby grizzler » Sun Mar 19, 2017 2:47 am

The gdisk webpage is http://www.rodsbooks.com/gdisk/
It has a link to the man page, among lots of other things, but using the command man gdisk in a terminal should bring that up as well.

Matthew_Wai
Level 1
Level 1
Posts: 25
Joined: Sun Jun 07, 2015 10:42 am

Re: How can I use GParted to convert MBR to GPT without data loss?

Postby Matthew_Wai » Sat May 06, 2017 2:42 am

I did it without data loss.
用 Linux 把 MBR 轉換成 GPT.jpg


Return to “Software & Applications”