Today we are going to discuss about disk partition. It’s one of the best topics in Linux. This allow users to resize the active root partition in Linux.
Is it safe to use GParted on a Mac drive? I've used this for formatting external drives to HFS+ which worked fine on Mac. Had to install some HFS additional package, but was a cinch thru apt. Click flash button. Then just boot your computer to the USB drive, and it’ll boot up the Linux OS. There will be a way to install from. GParted is developed on x86 based computers using GNU/Linux. It can be used on other operating systems, such as Windows or Mac OS X, by booting from media containing GParted Live. In other words you will need a Linux operating system for the install version of GParted.
In this article we will teach you how to resize the active root partition on Linux using Gparted utility.Just imagine, our system has 30GB disk and we didn’t configure properly while installation the Ubuntu operating system.
We need to install another OS in that so we want to make secondary partition on that.
Its not advisable to resize active partition. However, we are going to perform this as there is no way to free up the system.
Note : Make sure you should take backup of important data before performing this action because if something goes wrong (For example, if power got failure or your system got rebooted), you can retain your data.
What is Gparted
GParted is a free partition manager that enables you to resize, copy, and move partitions without data loss. We can use all of the features of the GParted application is by using the GParted Live bootable image. GParted Live enables you to use GParted on GNU/Linux as well as other operating systems, such as Windows or Mac OS X.
1) Check disk space usage using df command
I just want to show you about my partition using df command. The df command output clearly showing that I only have one partition.
2) Check Disk Partition Using fdisk Command
I’m going to verify this using fdisk command.
3) Download GParted live ISO image
Use the below command to download GParted live ISO to perform this action.
4) Boot your system with GParted live installation media
Boot your system with GParted live installation media (like Burned CD/DVD or USB or ISO image). You will get the output similar to below screen. Here choose GParted Live (Default settings) and hit Enter.
5) Keyboard selection
By default it chooses the second option, just hit Enter.
6) Language selection
By default it chooses 33 for US English, just hit Enter.
![Install Gparted On Usb Mac Install Gparted On Usb Mac](/uploads/1/2/6/2/126274297/261247125.png)
7) Mode selection (GUI or Command-Line)
By default it chooses 0 for GUI mode, just hit Enter.
8) Loaded GParted live screen
Now, GParted live screen is loaded. It is showing the list of partition which was created by me earlier.
![Gparted Gparted](/uploads/1/2/6/2/126274297/696055416.jpg)
9) How to resize the root partition
Choose the root partition you want to resize, only one partition is available here so I’m going to edit that partition to install another OS.
To do so, press Resize/Move button to resize the partition.
Here, enter the size which you want take out from this partition in first box. I’m going to claim 10GB so, I added 10240MB and leave rest of boxes as default, then hit Resize/Move button
It will ask you once again to confirm to resize the partition because you are editing the live system partition, then hit Ok.
It has been successfully shrink the partition from 30GB to 20GB. Also shows Unallocated disk space of 10GB.
Finally click
Apply
button to perform remaining below operations.e2fsck
e2fsck is a file system check utility that automatically repair the file system for bad sectors, I/O errors related to HDD.resize2fs
The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system located on device.e2image
The e2image program will save critical ext2, ext3, or ext4 filesystem metadata located on device to a file specified by image-file.
e2fsck
e2fsck is a file system check utility that automatically repair the file system for bad sectors, I/O errors related to HDD.resize2fs
The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system located on device.e2image
The e2image program will save critical ext2, ext3, or ext4 filesystem metadata located on device to a file specified by image-file.All the operation got completed and close the dialog box.
Now, I could able to see 10GB of Unallocated disk partition.
Reboot the system to check this.
10) Check free space
Login to the system back and use fdisk command to see the available space in the partition. Yes I could see 10GB of Unallocated disk space on this partition.
Suggested Read : How To Manage Disk Partitions Using Parted Command