How To Install & Use Gparted On Raspberry Pi (Partition editor)

1. Install Gparted on Raspberry Pi

First, you need to install Gparted on your Raspberry Pi. To do this, open a terminal window and type the following command:

sudo apt-get install gparted

2. Launch Gparted

Once Gparted is installed, you can launch it by typing the following command in the terminal window:

sudo gparted

3. Select the Disk

Once Gparted is launched, you will be presented with a list of disks. Select the disk you want to partition.

4. Create a New Partition

Once you have selected the disk, you can create a new partition by clicking on the “Create Partition” button.

5. Select the Partition Type

Once you have created the partition, you will be asked to select the partition type. Select the type of partition you want to create.

6. Set the Partition Size

Once you have selected the partition type, you will be asked to set the partition size. Set the size of the partition you want to create.

7. Apply the Changes

Once you have set the partition size, you can apply the changes by clicking on the “Apply” button.

8. Reboot the System

Once you have applied the changes, you will need to reboot the system for the changes to take effect.

And that’s it! You have successfully installed and used Gparted on your Raspberry Pi.

Raspberry Pi OS is installed with two default partitions: /boot which uses about 256 MB, and everything else is available for the system installation (/). But you can change that after the installation, which is particularly useful if you use a big disk like an SSD or a giant SD card/USB drive. I will answer all of your disk partitioning questions in this article.

Gparted is a free, graphic partition manager that is often used on Linux systems. It can be installed on Raspberry Pi via the package manager, and used to reformat the SD card as needed.

I will start with a brief introduction about disk partitioning for those who need a quick reminder, and then I’ll show you how to install and use Gparted. I’ll also answer a few questions you might have, such as, how to do the same thing without a Desktop environment.

If you’re looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.

Disk, partitions and file system: a short recap

If you are an expert, you can probably skip this part. I just want to make sure everybody is up to speed with the words I will use later, and how it applies to the Raspberry Pi.

Vocabulary

All of the data from your computer (or Raspberry Pi) is stored on a disk. On Raspberry Pi, it’s generally an SD card, but you can also use USB drives (USB keys, external drives, etc.) or SATA drives with an extension (like this one on Amazon).

A disk can be split in several partitions, which is a logical division of the entire disk. Partitions are often seen as different disks by the end user. For example, on this screenshot, I have one partition (D:) using a tiny part of the entire disk. But as the rest is unallocated, the end user will only see D: in the file explorer.

Each partition can use a different file system. A file system is like a set of rules to store files on the partition. File systems can differ depending on the operating system you use. So, if you plan to read files on different systems, you need to choose a file system that is compatible with all of them. I’ll clarify this later.

The default setup on Raspberry Pi

When you install Raspberry Pi OS on a SD card or USB drive, it will create two partitions for you:

  • /boot: Contains the file required to start the operating system, like the Raspberry Pi firmware and the configuration file (config.txt). In my case, this was a 256 MB partition, using only about 50 MB.
  • /: Takes up the rest of the available space, and is used to store everything else (system, applications and user files).

The main partition (/) uses ext4 for the file system, while the /boot partition is formatted in FAT32.
EXT4 is a common file system on Linux distributions, but Windows can’t read it. This explains why you can see the system files when you insert an SD card into your computer. The only partition you can read is /boot because FAT32 is a file system invented by Microsoft, and fully supported on any Windows version.

What you can do from there

As you can see in the screenshot, a fresh installation of Raspberry Pi OS with Desktop (not the full version), only uses 4 GB on my USB key but takes up the whole available space (32 GB in this case).

This is where using Gparted can be pretty useful. Maybe not for a 32 GB drive, but more so if you use a bigger drive. For example, if you have a 500 GB SSD drive, you might want to reorganize and create another partition in FAT32 to store your personal files in order to read them from your computer too (if you use Windows).

We can imagine something like:

  • /boot: 256 MB, FAT32
  • /: 50 GB, EXT4 – It should be enough for almost anything.
  • /data: 450 GB, NTFS – Using the rest of the disk in a format that can be read on any operating system.

I’ll show you how to use Gparted on Raspberry Pi OS to easily create a partition.

Note: FAT32 is not ideal when you have bigger disks. In theory, it’s not possible to create partitions bigger than 32 GB and format them in FAT32. Using NTFS or another file system is recommended in this case.

Install Gparted on Raspberry Pi

As explained in the introduction, Gparted is available in the default Raspberry Pi OS repository, so installing it is straightforward.

You can either use a terminal, and simply use the following commands:
sudo apt update
sudo apt install gparted

Or via the graphical tool (“Add/Remove Software”), open the package manager and look for Gparted:

Check the box corresponding to gparted, and click “Apply” to start the installation.

Once installed, Gparted should be available in the main menu, under System Tools:

Note: If you want to modify partitions on a disk where Raspberry Pi OS is already installed, you need to use another media to start Gparted. You can’t use Gparted to make changes on the current system.

Use Gparted on Raspberry Pi

Once you understand how disk partitioning works, and what the default setup is on Raspberry Pi, using Gparted shouldn’t be that complicated.

When you start Gparted, you need to type your password (administrator privileges are required).
Then, you’ll get an interface looking like:

Start by picking the disk you want to modify in the top-right corner.
Reminder: It’s not possible to make changes on the disk you are currently using. You have to install Raspberry Pi OS on another device, and then plug the drive you want to edit.

Once done, you can change anything with a right-click on the partition name or in the graphical representation. I will show you how to resize a partition or create a new one.

Resize a partition

You need to unmount the partition before resizing it. That’s why you can resize the system partition once the system is loaded.
As Raspberry Pi OS will automatically mount all partitions, the first step is to right-click on it, and choose “Unmount”:

Then, you have access to the Resize/Move option in the menu:

You can either move the cursor on the graphical representation to resize the current partition or type the new size in the form. Then, click on “Resize/Move” to save your changes.
The last step is to click on the green tick to apply the changes on your disk.

Raspberry Pi OS should now automatically mount the partition each time you plug this drive.
Or you can use the mount command to do the same thing manually:
mount <partition> <destination>
For example:
mkdir /home/pat/usb-drive
sudo mount /dev/mmcblk0p1 /home/pat/usb-drive

If the goal was to resize the system partition, you can now stop the Raspberry Pi, unplug the temporary system drive, and only keep the one you just resized.

Are you a bit lost in the Linux command line? Check this article first for the most important commands to remember, and a free downloadable cheat sheet so you can have the commands at your fingertips.

Create a new partition

Once the disk is selected, make sure you have some unallocated space available to create a new partition. If not, you need to resize an existing partition first (or just delete one if you don’t need it anymore).

Then, click on the unallocated space, and choose “New” in the dropdown menu.
A form will show up. Make sure to check the values where I added a red arrow:

At least, you need to set the new size (it will use all the space by default), the file system (fat32 for a small partition that you want to read on Windows, ext4 if you’ll only use it on the Raspberry Pi).
You can also choose a label, that will be used in the file explorer.

Once done, click “Add”. You’ll directly see the impact of your changes in the graphic representation.
But you need to click on the green check to apply the changes on the disk.
It may take a few minutes, depending on the partition size and hardware you use.
Once done, you’ll get a success message like this one:

If you want to access the new partition within the file explorer, the easiest way is to unplug the drive and plug it in again. Raspberry Pi OS will automatically mount the new partition:

That’s it, you can now use it and create files in this folder.

Want to chat with other Raspberry Pi enthusiasts? Join the community, share your current projects and ask for help directly in the forums.

Q&A

How to use Gparted in a terminal?

Gparted is a graphical application, there is no way to use it directly in a terminal. If you are using a Lite version of Raspberry Pi OS, a combination of commands like fdisk and mkfs can do something similar.

This will require a complete article to give you all the details, but if you want the short version, this video will be pretty useful:

Can you partition an SD card on Raspberry Pi?

It’s possible to change the partitions on a Raspberry Pi by using a tool like Gparted. But Gparted can’t resize the partition for the current system, so you need to use a second SD card with Gparted installed on it to reorganize the partition on the main SD card.

Additional Resources

Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.

Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.

VIP Community
If you just want to hang out with me and other Raspberry Pi fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.

Need help building something with Python?
Create, understand, and improve any Python script for your Raspberry Pi.
Learn the essentials step-by-step without losing time understanding useless concepts.
Get the e-book now.

You can also find all my recommendations for tools and hardware on this page.

How To Install & Use Gparted On Raspberry Pi (Partition Editor)

Gparted is a powerful partition editor that can be used to manage disk partitions on Raspberry Pi. It is a free and open source tool that can be used to create, resize, move, and delete disk partitions. In this tutorial, we will show you how to install and use Gparted on Raspberry Pi.

Prerequisites

  • Raspberry Pi with Raspbian installed
  • Internet connection

Step 1: Update the System

Before installing Gparted, it is recommended to update the system. You can update the system by running the following command:

sudo apt-get update
sudo apt-get upgrade

Step 2: Install Gparted

Once the system is updated, you can install Gparted by running the following command:

sudo apt-get install gparted

Step 3: Launch Gparted

Once Gparted is installed, you can launch it by running the following command:

sudo gparted

Step 4: Create a Partition

Once Gparted is launched, you can create a new partition by right-clicking on the unallocated space and selecting the “New” option. You can then specify the size of the partition and the file system type.

Step 5: Resize a Partition

You can also resize an existing partition by right-clicking on it and selecting the “Resize/Move” option. You can then specify the new size of the partition.

Step 6: Move a Partition

You can also move an existing partition by right-clicking on it and selecting the “Resize/Move” option. You can then specify the new location of the partition.

Step 7: Delete a Partition

You can also delete an existing partition by right-clicking on it and selecting the “Delete” option.

Step 8: Apply Changes

Once you have made the desired changes, you can click on the “Apply” button to apply the changes.

Conclusion

In this tutorial, we have shown you how to install and use Gparted on Raspberry Pi. Gparted is a powerful partition editor that can be used to manage disk partitions on Raspberry Pi. We hope you have found this tutorial helpful.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?