handson Make Your Disks Future-proof for Free by Upgrading Them to GPT GPT has something for everyone, whether they be a multi-boot system administrator or an end-user constantly on the with a large portable hard drive. In many cases, you can convert existing hard disks to GPT without data loss, for free — Hiren Mehta

hanges are happening in hardware technologies to the MBR-based partition table, which although work in that are having a far-reaching effect on the many cases, are inconsistent and result in compatibility storage media which we use. Behind one such issues across hardware and . Cchange is BIOS getting replaced with UEFI You also cannot have than 3 primary partitions (Unified Extensible Firmware Interface). UEFI allows for and 1 extended partition in the MBR partition style. GPT (but doesn’t mandate) a disk partitioning style called as allows you to overcome this limitation. Use of a GUID itself GUID (globally unique identifier) partition table, or GPT removes identification ambiguities about resolving parti- in short. This is an alternative to the MBR (master boot tion names/numbers in a persistent manner. There is no record) partitioning style which most of the systems use way to make out the drive letter of a partition solely from today and is often termed as UUID on Linux systems. (Linux it’s UUID or vice versa. GPT also allows for more efficient offers several options to identify a partition on a hard disk, utilization of space but this occurs on a much lesser scale such as by device name, by filesystem , by UUID, etc.) to be noticable by the user. GPT also makes use of backup This is not to say that BIOS-based systems simply cannot partition tables and checksums for the same in order to access GPT disks all. It depends on your operating ensure integrity and redundancy of critical data structures system. We had talked about this while reviewing the needed for booting the disk. Deskstar 7K4000 hard disk drive ( http://bit.ly/XGSZGi ), It is also possible to safely use GPT disks in combination which offers 4 TB of unformatted capacity in a single 3.5” with MBR disks. When trying to access a GPT disk from an form factor, although not using GPT. OS that supports only MBR disks, the GPT disk, thanks to the protective MBR at the beginning of the disk, will be MBR and its limitations compared to identified as one single partition having an unknown file. GPT and its benefits Master boot record (MBR) disks use the standard BIOS How to change an MBR disk to a GPT partition table. Making use of GPT in place of MBR disk in Windows allows for a virtually unlimited number of partitions In Windows, if you do not want to make use of any for most practical purposes, although the Windows’ third-party tool, you can change a disk from MBR to GPT implementation limits this to 128. It’s like the move from partition style as long as the disk does not contain any IPv4 to IPv6: the number of addresses available in IPv6 partitions or volumes. (To know how to convert a disk by are too large to be considered as limited and sooner preserving the existing partitions, read the next section). or later the migration to native IPv6 support must take To change a master boot record disk into a GUID partition place. The case with GPT is similar. Depending on the table disk using the Windows interface, you will need to block size chosen while partitioning, you can have an make use of the `Disk Management’ snap-in(under the arbitrarily large number of partitions on the disk, usually Storage branch) of the `Computer Management’ MMC in multiples of 128. And also, as you increasingly come . You access `Computer Management’ by ` (Control across partitions that are individually larger than 2.2 Panel) > Administrative Tools > Computer Management’. TBs(and we inevitably will do so, especially for external 1. Back up or move the data on the basic master boot hard drives which usually have a single large partition), record (MBR) disk you want to convert into a GUID using GPT is much safer than tinkering with workarounds partition table (GPT) disk.

60 PCQuest M A Y 2 0 1 3 pcquest.com twitter.com/pcquest facebook.com/pcquest linkd.in/pcquest [email protected] 2. If the disk contains any partitions or volumes, right-click Although the tool is command-line based, for our any volumes on the disk and then click Delete Partition purpose (of making a conversion), it couldn’t have been or Delete Volume. simpler and is absolutely easy. You obviously do need to be 3. Right-click the MBR disk that you want to change into the root user for this as it deals with partitions. Once supe- a GPT disk, and then click Convert to GPT Disk. Note ruser authorization is established, you need to invoke the that you need to right-click in the grey area to the left `gdisk’ command as shown in the figure below and then of the graphical view (which stands for the whole disk) issue the file name (complete ) of the device as per it’s and not in the white area(s) representing partition(s) representation in the Linux filesystem. on the disk. You begin the actual conversion process by issuing `w’ After the conversion is complete, the change can be at the gdisk prompt, which will once again prompt you for confirmed by again right-clicking in the same area, which confirmation of the entire process and then drop you back will lead to an option `Convert to MBR Disk’ replacing the at the Linux shell automatically after a succesful conver- earlier `Convert to GPT Disk’. Once done, you can use the sion. The `w’ command in gdisk simply writes the partition `’ utility to manage the partitions on the GPT disk. table to the disk, with the default/pre-selected operation recommends using the NTFS filesystem on GPT being to convert the chosen device’s partition table to GPT disks, although the `’ command-line tool can still be when faced with an MBR disk. used to override this behaviour. You can confirm successful conversion to GPT by run- Please keep in mind that in many cases, the conversion ning the command again (and supplying the same device from MBR to GPT is not reversible. For instance, undesir- filename), upon which gdisk will inform you that a valid able logical partitions (which should have otherwise been GPT partition table has been detected. primary) may crop up if you decide to convert a GPT disk What is worth noting is that this successful conversion back to MBR. And while most known Linux operating breaks two popular myths about GPT: systems can boot safely from within an extended partition, 1. You cannot use removable USB media with GPT: This Windows’ operating systems require their system drive to is a myth atleast as far as Linux is concerned. The be primary. `disk’ which we have chosen here (represented by /dev/sdb in the sample) is actually a 4 GB micro-SD How to change an MBR disk to a GPT card, fed in via USB through the netbook’s built-in disk in Linux card reader. In Linux(as well as across most other OSs) you can use the 2. In-place conversion (preserving existing data) is cross-platform gdisk program (which is a part of the GPT not possible at all: This too is a myth. Although data suite and is a FOSS solution) for the task. GPT fdisk loss/overwriting of partition contents is likely in many has certain important issues with Windows and *BSD cases(which are nicely documented with possible solu- systems, as well as a few special case exceptions with tions at the GPT fdisk website linked above) depend- Macs. However, with Linux there are no major issues. GPT ing on your existing hard disk’s partition table and fdisk can be obtained from http://bit.ly/12RJm5V . geometry, gdisk can (and in this case, has been able to) convert the partition style in a non-destructive manner. If you look closely at the last image above, we have chosen to show the partition table of the disk after the conversion was over, which reveals (alongwith the UUID) an approx. 2 GB (Linux filesystem) parti- tion on the converted disk, which wouldn’t have been possible if the partitions were overwritten. Soon after the conversion, openSuse’s automounter automatically brought up the explorer window, revealing the contents of the partition to be intact. In any case, it is always advisable to back-up your data before dealing with partitions. For best results, clone all of the hard disks in the system as-is using imaging software and try to save the backups to multiple locations. There are freely available open-source tools such as CloneZilla which can be run in live mode, and thus can be used even if your Converting a disk from MBR to GPT using gdisk in openSuse 12.3 is failing to boot. pcquest.com twitter.com/pcquest facebook.com/pcquest linkd.in/pcquest [email protected] M A Y 2 0 1 3 PCQuest 61