Tag Archives: partition table

Convert MBR partition table to GPT (Ubuntu)

Since I have some big disks I started using GUID partition table (GPT). However, Ubuntu (12.10 in my case) installed itself using a oldschool MBR partition table (or MS-DOS partition table). There are ways to create a GPT while installing, but I missed that point… So I asked myself is it possible to convert the MBR partition table to a GUID partition table? Yes, and its quite easy…

In order to use GPT with nowadays BIOS there need to be a BIOS boot partition. However there are two prerequisites which you should check before converting: There need to be space between the MBR and the first partition (most  modern partition utilities start the first partition on the 1 MiB boundary):

$ sudo fdisk -l /dev/sda
....
Device    Boot    Start          End     Blocks  Id  System
/dev/sda1 *        2048    117186559   58592256  83  Linux

As you can see, my partition table meet this requirement. We use this partition to store the BIOS boot partition in it (Note: It should also work with a BIOS boot partition at another place, I never tried that).

Second, GRUB need to be 1.97~beta1 or newer. Check this by issuing

$ grub-install --version

If your system meets this requirements you’re ready to go. First backup the old MBR (and all important data, if you have any on the system in question), just in case anything goes wrong

sudo dd if=/dev/sda of=/root/sda-mbr.dd bs=512 count=1

Now it’s time for gdisk, the GPT equivalent to fdisk for the old partition tables. Starting this utility on a system with the old MBR partition table converts this automatically: Read more »