How To Install GParted on CentOS Stream 10
GParted stands as one of the most powerful disk partition management tools available for Linux systems. This graphical partition editor enables users to resize, copy, and move partitions without data loss, making it an invaluable tool for system administrators and regular Linux users alike. CentOS Stream 10, as the latest development branch of the Red Hat Enterprise Linux ecosystem, provides a robust platform for running GParted. This comprehensive guide will walk you through various methods to install GParted on CentOS Stream 10, while also exploring its features, usage scenarios, and best practices.
Understanding GParted and Its Features
GParted (GNOME Partition Editor) is a free and open-source application designed to make disk partition management accessible through a graphical interface. Unlike command-line tools, GParted presents disk information visually, making it easier to understand and modify partition layouts.
Key Capabilities and Features
GParted supports a wide range of file systems, including ext2/ext3/ext4, btrfs, fat16/fat32, NTFS, and xfs. This versatility makes it an excellent choice for managing multi-boot systems or preparing disks for different operating systems.
The software excels at several critical operations:
- Creating, deleting, and formatting partitions
- Resizing partitions without data loss
- Moving partitions to optimize disk space
- Labeling partitions for easier identification
- Setting various partition flags and attributes
- Checking partitions for file system errors
GParted works with numerous storage devices, including traditional SATA/IDE/SCSI drives, modern SSDs, flash memory devices, and even RAID configurations. This compatibility ensures that regardless of your hardware setup, GParted can help manage your disk partitions effectively.
The software’s intuitive color-coding system helps users visually distinguish between different partition types and identify free space at a glance. This visual approach significantly reduces the learning curve compared to command-line alternatives like fdisk or parted.
Prerequisites for Installing GParted
Before proceeding with GParted installation on CentOS Stream 10, ensure your system meets the following requirements:
System Requirements
- A functioning CentOS Stream 10 installation
- Root access or a user account with sudo privileges
- An active internet connection for downloading packages
- At least 100MB of free disk space for the installation
Important Preparations
Before manipulating disk partitions, it’s critical to back up all important data. While GParted is designed to perform operations safely, hardware issues, power failures, or user errors can still result in data loss.
You’ll also need to ensure your system is up-to-date before installation:
sudo dnf upgrade --refresh
This command updates all packages to their latest versions, ensuring compatibility with new software installations.
Installation Methods Overview
There are several approaches to installing GParted on CentOS Stream 10, each with its advantages. The three primary methods are:
- EPEL Repository Installation: The simplest method for most users, utilizing the Extra Packages for Enterprise Linux repository.
- Source Code Installation: Provides the latest version of GParted with customization options.
- GParted Live: A bootable solution that doesn’t require installation and works independently of the installed operating system.
The most suitable method depends on your specific needs, technical comfort level, and whether you need permanent access to GParted or just occasional use.
Method 1: Installing GParted via EPEL Repository
The EPEL (Extra Packages for Enterprise Linux) repository contains additional software packages not included in the standard CentOS repositories, including GParted. This method is recommended for most users due to its simplicity and reliability.
Step 1: Enable the CRB Repository
The Code Ready Builder (CRB) repository is required for many EPEL packages. Enable it with:
sudo dnf config-manager --set-enabled crb
Step 2: Install EPEL Repository
Install the EPEL repository for CentOS Stream 10:
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
This command fetches and installs the EPEL repository configuration files.
Step 3: Update Package Lists
After adding the new repository, update your package lists:
sudo dnf update
Step 4: Install GParted
Now that the EPEL repository is configured, install GParted:
sudo dnf install gparted
This command downloads and installs GParted along with all its dependencies.
Step 5: Verify Installation
Confirm successful installation by checking the GParted version:
gparted --version
If installation was successful, this command should display the GParted version number.
Method 2: Installing GParted from Source Code
For users who need the very latest features or want to customize their installation, building GParted from source code is an excellent option. This approach requires more technical knowledge but provides greater control.
Step 1: Install Build Dependencies
First, install the required development tools and libraries:
sudo dnf install gnome-common yelp-tools glib2-devel gcc-c++ libuuid-devel parted-devel gtkmm30-devel make polkit-devel gettext-devel
These packages provide the necessary components to compile GParted successfully.
Step 2: Download the Source Code
Clone the GParted repository or download the latest source tarball from the official website:
git clone https://github.com/GNOME/gparted.git
cd gparted
Step 3: Configure the Build
Prepare the source code for compilation:
./configure
For a customized build without documentation, use:
./configure --disable-doc
Or, to enable native libparted support for device-mapper RAID:
./configure --enable-libparted-dmraid
Step 4: Compile and Install
Compile the source code and install GParted:
make
sudo make install
To ensure proper PolicyKit integration, also install the policy file:
sudo install -m 644 org.gnome.gparted.policy /usr/share/polkit-1/actions/org.gnome.gparted.local.policy
This allows GParted to obtain the necessary privileges for disk management.
Method 3: Using GParted Live
GParted Live provides a bootable environment with GParted pre-installed. This approach is ideal for:
- Modifying partitions that can’t be changed while in use
- Recovering systems that won’t boot
- Working with partitions without installing software on the host system
Step 1: Download GParted Live
Visit the official GParted website and download the latest GParted Live ISO image.
Step 2: Create Bootable Media
Create a bootable USB drive or DVD using the downloaded ISO. On CentOS Stream 10, you can use the ‘dd’ command for USB drives:
sudo dd if=gparted-live-x.x.x-x.iso of=/dev/sdX bs=4M status=progress
Replace ‘gparted-live-x.x.x-x.iso
‘ with the actual filename and ‘/dev/sdX
‘ with your USB device path. Be extremely careful to identify the correct device path, as using the wrong path can lead to data loss.
Step 3: Boot from GParted Live
Restart your computer and boot from the USB drive or DVD. You may need to adjust your BIOS/UEFI settings to prioritize the bootable media.
Step 4: Use GParted
Once booted into GParted Live, the application will start automatically, allowing you to manage your disk partitions without affecting your installed operating system.
Troubleshooting Common Installation Issues
Even with careful installation, you might encounter challenges. Here are solutions to common problems:
Missing Dependencies
If you see errors about missing libraries:
sudo dnf install libparted gtkmm30 polkit
Repository GPG Key Issues
If you encounter GPG key verification errors:
sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-10
Permission Denied Errors
GParted requires root privileges. If you encounter permission errors when launching:
sudo gparted
Graphics Display Problems
If GParted fails to start due to display issues:
export DISPLAY=:0
sudo gparted
Missing PolicyKit Authentication Agent
If authentication fails when starting GParted:
sudo dnf install polkit-gnome
/usr/libexec/polkit-gnome-authentication-agent-1 &
These troubleshooting steps address the most common issues encountered during GParted installation and initial usage.
Launching and Configuring GParted
Once installed, there are multiple ways to launch GParted on CentOS Stream 10:
From the Terminal
Launch GParted with administrative privileges:
sudo gparted
From the Application Menu
- Click on “Activities” in the top left corner
- Type “gparted” in the search box
- Click on the GParted icon
When GParted launches, it will prompt for your password to obtain the necessary privileges for disk management.
Initial Configuration
Upon first launch, GParted displays all detected storage devices in a dropdown menu in the top-right corner. Select the device you want to manage from this list.
The main interface shows a visual representation of the selected disk, with partitions displayed as colored blocks proportional to their size. The color indicates the file system type, while white space represents unallocated areas.
Basic Usage Guide for GParted
GParted’s interface is designed to be intuitive, but understanding some basics will help you use it effectively:
Viewing Partition Information
The main window displays detailed information about each partition:
- File system type
- Mount point (if mounted)
- Size
- Used space
- Unused space
- Flags
Creating a New Partition
- Select unallocated space on your disk
- Click on “Partition” in the menu bar, then “New”
- Choose the desired file system type
- Set the partition size
- Add a label if desired
- Click “Add”
Resizing a Partition
- Select the partition to resize
- Click on “Partition” in the menu bar, then “Resize/Move”
- Drag the handles to adjust the size, or enter precise values
- Click “Resize/Move”
Deleting a Partition
- Select the partition to delete
- Click on “Partition” in the menu bar, then “Delete”
Applying Changes
GParted operates in a “staged” manner – operations are planned but not executed until you click the “Apply” button (green checkmark). This allows you to review all pending operations before making permanent changes.
Advanced Operations with GParted
Beyond basic partition management, GParted supports several advanced operations:
Creating Partition Tables
To create a new partition table (which erases all data on the disk):
- Select the disk from the device dropdown
- Click on “Device” in the menu bar
- Select “Create Partition Table”
- Choose the partition table type (GPT is recommended for modern systems)
- Confirm the operation
Partition Alignment
For SSDs and advanced storage, proper alignment improves performance:
- Select the partition
- Click “Resize/Move”
- Enable “Align to MiB” option
- Complete the resize operation
Setting Partition Flags
Certain partitions require special flags:
- Select the partition
- Right-click and select “Manage Flags”
- Check the appropriate flags (e.g., “boot” for bootable partitions)
- Click “Close”
Working with LVM Volumes
While GParted has limited support for Logical Volume Management (LVM), it can recognize LVM physical volumes and display them. For comprehensive LVM management, consider using specialized tools like system-config-lvm alongside GParted.
Best Practices and Safety Considerations
Working with disk partitions always carries some risk. Follow these best practices to minimize potential problems:
Always Backup Before Making Changes
Before performing any partition operations, create a complete backup of all important data. External drives, network storage, or cloud services are ideal backup destinations.
Avoid Modifying Mounted Partitions
Whenever possible, unmount partitions before modifying them. GParted will warn you about mounted partitions, but it’s best to unmount them manually:
sudo umount /dev/sdXY
Check Disk for Errors
Before resizing or moving partitions, check them for errors:
- Select the partition
- Click on “Partition” in the menu bar
- Select “Check”
Allow Sufficient Time for Operations
Resizing and moving large partitions can take considerable time. Never interrupt these operations, as doing so may lead to data corruption.
Be Cautious with System Partitions
Exercise extra caution when modifying partitions containing your operating system. Consider using GParted Live for such operations to ensure the partitions aren’t in use.
Congratulations! You have successfully installed GParted. Thanks for using this tutorial for installing the GParted partition editor on your CentOS Stream 10 system. For additional help or useful information, we recommend you check the official Gparted website.