For this installment, I’d like to take a look at a piece of open source software (what else?) that allows you to view and modify hard drive partitions. If you have no idea what I’m talking about, please allow me to elucidate.
Modern hard drives offer an enormous amount of storage space. Imagine a massive warehouse in which you can store things. However, what if you need to section off space for certain things, such as office equipment? You might put in a room to house these things so that you can access them more readily. That’s where hard drives are like warehouses. You don’t always need one big space to store your data. You may want to section off, or partition, space on your hard drive for backup or maybe for personal files. If you use a recent version Microsoft Windows, your hard drive is already partitioned (one partition for your use and one partition for system restore files).
So, how do you partition a hard drive? This is usually done using a program called fdisk prior to installing an operating system. The reason for this being that adding or removing hard drive partitions can erase data on the hard drive in question. The only alternative is to use software designed to allow this process to occur while simultaneously protecting your data. This is where GParted comes into play.
Let’s take a look at the GNOME Partition Editor, or GParted, for short. When you start GParted, the program window will open and immediately start looking for hard drives and hard drive-like devices connected to your computer. Once such devices have been identified, GParted is ready to use. The screenshot on the left shows GParted displaying the partition table for the author’s primary hard drive (/dev/sda).
As you can see, GParted provides information regarding partition type, size and usage. In the case of the author’s hard drive, information regarding unallocated space is also included. Right-clicking on a partition will open a menu providing options such as unmounting the partition in question, resizing/moving the partition and even more information about said partition. Unavailable options are grayed out. Here you can also toggle the partitions from which your computer will try to boot, using boot flags. A toolbar provides moderate functionality, however, the menu bar near the top of the window provides the quickest access to features.
To demonstrate how easily partitions can be created, the author chose to create a partition on a 1 TB external hard drive. Simply right-click on unallocated space on your device and choose New from the menu. This will open the Create New Partition dialog box (as shown in the screenshot at right). Here you can enter such information as the size of the new partition, the file system (operating system type) and even a label for the new partition. When ready, click the Add button and GParted will do all the work.
When the process is completed, you’ll be presented with the main GParted window, which will display your newly created partition (see the screenshot to the left). Looking at the top pane in the screenshot, you can see that my new partition occupies the entire hard drive. Below this, a pane provides specific information. You will notice that the aptly named “New Partition #1” has a fat32 (usually spelled FAT32) file system. I have given it the label “My Passport,” which is the name assigned to this device by the manufacturer. You’ll also notice that its size is 931.48 GB. Used space and unused space are blank and this partition has not been flagged as bootable.
So, what types of partitions does GParted support? The screenshot on the right shows a GParted window displaying compatible file systems. Not all file systems are supported. However there are a few worth noting. The file systems ext2, ext3 and ext4 are the most common Linux/UNIX file systems. You’ll also notice file systems fat16 and fat32, the latter of which I used for my partition on the external hard drive. These file systems were used in DOS and Microsoft Windows 95,98 and ME. Finally, you’ll see ntfs, which was/is used on Microsoft Windows NT, 2000, XP, Vista, 7 and 8.
This leads me to one of GParted’s strongest features -the capacity to possibly restore data from a hard drive. If you’re running GParted in Linux, gpart must be installed. If you’re using a live CD/DVD version of GParted, this shouldn’t be a problem. I used an older EIDE hard drive that had been damaged in a system-wide crash a few years ago. Click on the GParted option on the menu bar, hover over the Devices option and select the desired device from the list that unfurls. GParted will analyze the device and display its report as shown in the screen shot on the left. Clicking the View button next to each file systems found will open a file manager in read-only mode. Here you can peruse the recovered data and even relocate it to a safer place.
The best thing of all is that you don’t need to be using Linux to use GParted. The GParted Web site offers a download for an ISO file that can be burned onto CD/DVD, as mentioned above. Your computer can then boot from this disc into GParted. Once booted up, you can readily partition any hard drives you need to or engage in data recovery in the event of a crash. How cool is that?
GNOME Partition Editor (GParted)
Hakvoort, B., Gedak, C. et al. (2014). GNOME Partition Editor [software]. GNU General Public License.