How To Manage Storage With GParted Linux

If you’re looking for a partition editor that works for most disk partition types and volumes, the GNOME Partition Editor (GParted) got you covered. GParted Linux provides a clean and intuitive GUI – no more messy and confusing commands, and it takes the guesswork out of managing partitions.

This tutorial will teach you how to manage storage partitions in the GParted Linux tool. In the end, you’ll have created, resized, moved, and deleted disk partitions all within GParted.

What are you waiting for? Let’s find out if you’re up to partitioning disks or end up with a dead drive!

Prerequisites

This tutorial will be a hands-on demonstration. If you’d like to follow along, be sure you have the following:

  • A computer where you’ll install or run GParted Linux. This tutorial will be using an Ubuntu 20.04 computer.
  • A storage device, such as a hard disk drive (HDD), solid-state drive (SSD), or flash drive. The examples in this tutorial will be using a 20GB HDD.

Choosing Your GParted Linux Flavor

GParted Linux comes in two flavors. Which one you choose depends on your usage scenario. But don’t worry, the selection criteria are not complicated.

GParted Live – A bootable media (often called a Live CD) containing a small, standalone GNU Linux distribution that you can install on a USB, CD/DVD, or a PXE server. If you don’t have a Linux computer or want to manage partitions outside your PC’s operating system, GParted Live is your best bet.

GParted Linux Package – If you’re already on a Linux PC and don’t want to deal with installing and booting to another OS, this package will serve you best. GParted is available to Linux as an installable package using your respective distro’s package manager.

The examples in this tutorial will be using the GParted Linux Package. But whichever GParted flavor you choose, the usage instructions are essentially the same. As you can see on the comparison image below, the functional interface is the same, apart from the aesthetics.

GParted Live vs. GParted Linux

Installing the GParted Linux Package

Most Linux distros, including Ubuntu, don’t include the GParted Linux tool out of the box. But don’t sweat; installing is quick and convenient. With two command lines, you’ll have GParted running.

To install GParted, follow these steps.

1. On your computer, open a terminal window.

2. Next, run the command below to make sure that your computer’s package repository cache is up-to-date.

3. Now, install the GParted Linux tool by running the below command. The -y option suppresses the confirmation prompt and automatically answers yes.

4. After installing, confirm that the GParted Linux installation is successful and which version you have.

As you can see below, the command returned the installed GParted version.

Verifying the GParted Linux installation and version

Finally, launch the GParted application. The image below shows opening the GParted tool on Ubuntu from the applications overview.

Opening the GParted Linux application

GParted selects the first disk on your computer by default on launch. The first disk typically contains your computer’s operating system. As you can see below, this Ubuntu computer has four partitions with different file systems (fat32, ext4) and mount points.

The GParted Linux application window

Managing Storage with GParted Linux

Now the fun begins! You’ve installed GParted Linux and are ready to take for a spin. To start fresh, the instructions from this point will be using an empty 20GB hard drive on an Ubuntu PC, but the general process should work with other storage devices.

Initializing a Disk

Before creating partitions, a partition table must already exist on the disk. Brand new disks typically do not have a partition table, and you’ll need to initialize the disk to assign a partition type. To initialize a disk and create a partition table, proceed as follows.

1. On the GParted Linux window, select the disk to initialize. To do so, click the drop-down menu on the toolbar and click the storage device from the list.

Selecting a disk

After selecting the disk, the graph area is now showing the disk information. In this example, the disk has 20GB of unallocated space.

Showing the Device Information pane

After selecting the disk, the graph area is now showing the disk information. In this example, the disk has 20GB of unallocated space. If the disk doesn’t have a partition table, you should see a similar output like the screenshot below. The Partition table value is unrecognized.

Confirming the disk have no partition table
Creating a partition table

4. Next, the Create partition table window pops up, warning that this operation will erase all data on the entire disk.

On the Select new partition table type field, click the drop-down and select either msdos or GPT. The example below sets the default partition table, which is msdos. Finally, click Apply.

Create Partition Table

As you can see below, the Partition table value now shows msdos, and the error icon is gone. You have successfully initialized the disk.

Successful partition table creation

Creating New Partitions

You’ve completed the initial task and are a few steps away from making the disk usable by creating new partitions. A disk can have one or multiple partitions if necessary, depending on your requirements.

Perhaps you want to split a disk into two partitions with different file systems. Like, one partition for use in Linux (ext4) and another one for Windows (NTFS)? Yes, you can have a mix of different file systems if you so wish. And to do so, proceed with the following steps.

1. Right-click on the unallocated space and click New.

Adding a new partition

2. On the Create new Partition window that pops up, notice the following details.

Free space preceding (MiB) Specifies the amount of free space to leave in front (to the left) of the new partition. The minimum size is 1 MiB. In most cases, you do not need to adjust this value when creating the first partition.
New size (MiB) This value specifies the new partition size. The default value is the entire available unallocated space. If you only intend to create one partition, you don’t need to adjust this value.
Free space following (MiB) This value is the space you leave at the end of the new partition (to the right). Adjusting the New size value automatically the value of this field.
Align to Determines whether to align the partition precisely to the mebibytes (MiB) or the disk’s cylinder. Keep this value as MiB. The Cylinder alignment is only an option for older operating systems before the year 2000.
Create as Specify the type of partition you’re creating, such as Primary or Extended. In most cases, you’d want to choose the primary partition type. The only significant difference is primary partitions can be bootable.
Partition name This field allows you to name the partition but only applies if the partition table type is GPT.
File system Assign the file system type for the partition. While multiple file systems are available, you can only select those compatible with the disk’s partition table.
Label An optional field that allows you to add a label to the partition.

Since you’re creating two partitions in this case, adjust the New size (MiB) value to approximately half of the current unallocated space.

Set the Create as value to Primary Partition and the File system to ext4. After setting the values, click Add.

Setting the new partition parameters

GParted automatically shows you the Pending Operations pane at the bottom of the window. As you can see below, you now have one pending operation to Create Primary Partition # 1. At this point, do not apply the changes yet.

Pending partition creation

3. Now, right-click the remaining unallocated space and click New.

4. This time, leave the new partition size value as-is, and the partition type should still be Primary Partition. Only change the file system to ntfs. Click Add to queue up this new partition creation.

Adding another partition

5. Now you have two pending operations to create two new partitions. To apply the pending changes, click the green check button on the toolbar.

Applying the pending operations

6. At the following confirmation prompt, click Apply to proceed and wait for the process completion.

Confirming the operation

7. Finally, after completing the operation, click Close.

Applying Pending Operations

Formatting Partitions

After creating the partitions, what if you realized that you should have selected a different file system? Do you need to recreate the partition? No, you don’t. You can reformat a partition, whether with the same file system or with a new file system altogether.

Formatting a partition only takes a few steps. But to remind you, you’ll lose all data on the partition (if any) during the reformatting.

Formatting a partition

2. The format operation now appears on the list of pending operations. To apply the changes now, click the green check button on the toolbar and confirm to proceed with the operation.

Completing the partition format operation

3. Finally, click Close.

Closing the operation details

Deleting and Resizing Partitions

You may, later on, change your mind and decide that you don’t need a second partition. Instead, you want to have one partition that occupies the entire disk size. Deleting and resizing partitions in the GParted Linux application is a breeze.

1. On the GParted window, right-click the partition you want to delete and click Delete.

Deleting a partition

2. Next, right-click the partition to resize and click Resize/Move. In this example, you’re resizing the first partition.

Selecting the partition to resize

3. Now, drag the right arrow on the graph to the right or until the New size value is the same as the Maximum size. After resizing, click Resize/Move.

Adjusting the partition size

4. There are now two pending operations in your queue — delete the second partition and resize the first partition. To apply the changes, click the green check button on the toolbar and answer any confirmation prompts to proceed.

Applying the partition deletion and resizing

5. After the partition deletion and resize operations have been completed, click Close.

Closing the progress window

You now have deleted and resized your disks partitions.

Conclusion

This tutorial aimed to teach you how to get started with tasks like creating, resizing, deleting, and formatting disk partitions. But there are other operations that the GParted Linux app can do, such as moving or copying partitions. Perhaps you can experiment a little more.

Do you think GParted is user-friendly? Is there another, better partition editor tool you would recommend?


— Update: 20-03-2023 — us.suanoncolosence.com found an additional article How to use GParted on Ubuntu from the website linuxhint.com for the keyword how to use gparted linux.

GParted is a graphical tool for managing disks on Linux. It is very powerful. You can do almost any type of partitioning and disk management with GParted. GParted has a simple user interface and it is very easy to use. In this article, I will show you how to use GParted on Ubuntu. So, let’s get started.

GParted is not installed on Ubuntu by default. But it is available in the official package repository of Ubuntu. So, it is easy to install. First, update the APT package repository cache with the following command:

Now, install GParted with the following command:

GParted should be installed.

Starting GParted:

Now that GParted is installed, you can start GParted from the Application Menu of Ubuntu as you can see in the screenshot below.

GParted requires root privileges. To allow root privileges to GParted, type in your login password and click on Authenticate.

GParted should start.

Selecting Storage Device:

The first thing to do in GParted is to select the storage device that you want to work with. To do that, click on the drop down menu on the top right corner of GParted.

Then, select the storage device that you want to work with.

As you can see, I selected my 32GB USB thumb drive.

Source: us.suanoncolosence.com

Creating a New Partition Table:

You will see the following dialog box. From here, you can select your desired partition table type. The most widely known partition table types are msdos and gpt. By default, msdos is selected. But you can click on the dropdown menu to change it.

As you can see, there are so many partition table types to choose from.

Once you’ve selected a partition table type, click on Apply.

An empty partition table should be created as you can see in the screenshot below.

Creating New Partitions:

A new window should appear.

You can move the slider back and forth to change the size of the partition. You can also type in the size of the new partition directly in the New size (MiB) textbox as marked in the screenshot below.

You can also select a file system for your new partition using the File system dropdown menu. By default, ext4 is selected. This is one of the thing I like about GParted. It formats the partition to your desired file system when you create a new partition.

As you can see, GParted supports a lot of file systems. The file systems that are installed on your computer should be enabled here. The ones that are not installed are disabled at the moment. To enable the disabled ones here, you will have to install the file systems on your computer.

You can also type in a Partition name and a Label for your new partition. These are used to make it easy for yourself to identify the partition, nothing else. You can also leave them empty if you want. These are completely optional.

As you can see, a partition is created. But the changes are not saved permanently. To save the changes, click on the tick icon as marked in the screenshot below.

Now, click on Apply.

The new partition is being formatted.

Once it’s done, click on Close.

As you can see, a new partition is created.

Resizing Partitions:

There are 2 resize operations that you can perform on a partition, Extend and Shrink. In order to extend a partition, you must have unallocated free spaces after that partition. To resize a partition, right click on the partition and click on Resize/Move.

Now, you can use the handle to extend or shrink the partition. You can also type in the new size of the partition directly on the New size (MiB) textbox.

Once you’re done, click on Resize/Move.

If everything is alright, then click on the tick icon to save the changes permanently.

Now, click on Apply to confirm the operation.

The changes should be applied. Now, click on Close.

As you can see, the partition has been resized.

Deleting Partitions:

I created a new partition to demonstrate how partitions are deleted with GParted. Right now, the partition table looks as follows:

To delete a partition, right click on the partition and click on Delete.

Now, to save the changes permanently, click on the tick icon as marked in the screenshot below.

Now, to confirm the operation, click on Apply.

Once the operation is complete, click on Close.

As you can see, the partition is deleted.

Formatting a Partition with GParted:

To format a partition with GParted, right click on the partition and click on Format to and select the filesystem type which you want the partition to be formatted to.

Now, to save the changes permanently, click on the tick icon as marked in the screenshot below.

Now, click on Apply.

Once the operation is complete, click on Close.

As you can see, the partition is formatted to the newly selected filesystem type.

So, that’s how you use GParted on Ubuntu to do basic partitioning and disk management. Thank you for reading this article.

Source: https://adamtheautomator.com/gparted-linux/

Article post on: us.suanoncolosence.com

Leave a Comment

Your email address will not be published. Required fields are marked *