Gparted

Gparted is a free partition tool for formatting, resizing, and general partition management. Since it runs outside computer drives it can be installed and used without an operating system. With Gparted, you can create space for new OS, increase or shrink C: drive and even recover data from lost partitions. Gparted can work with or create ext2, ext3, ext4, fat16, fat32, hfs, hfs+, linux-swap, lvm2 pv, nilfs2, ntfs, reiserfs, reiser4,ufs and xfs formats. Gparted is the one of the best hard disk management software for Ubuntu and Linux Base Derivatives. Dec 17, 2020 With GParted, you don't have to worry about that, since you can add partitions or modify the size of those that you already have without losing your information. Just burn GParted to a CD or USB and use it like a boot disk and you'll be able to add new partitions and change the size of existing partitions.

  1. Gparted Iso
  2. Gparted Iso Clone
Gparted download

‘gparted’ is the graphical version of ‘parted’ and is the tool to use to resize the main partition used for raspbian (or you could use use parted if you prefer the command line of course!). It can also be used to check and repair a SD card disk.

To do this you’ll need to put the SD card you want to work on in a USB to SD card adaptor and boot your RPi from a separate SD card. If you’d rather use a windows tool we’ve found that gparted just works whereas all of the windows based partition managers we tried don’t, so better to just get over the hassle factor and use the RPi to do this if you don’t have a separate Linux system.

Installing gparted on the separate Raspbian SD card that will perform the change

From the command line use:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install gparted

Running gparted

To run it use ‘sudo startx’ to load the GUI as gparted needs root user privileges

Then from the start menu select run and enter ‘gparted’

Resizing Your Main Partition

Gparted Iso

From the top bar devices drop down select “dev/sda” (or whatever your external USB adaptor has been called).

Right click somewhere on the graphic and select ‘unmount’ first as operations can’t be carried out on a mounted partition.

Right click the main ‘ext4’ partition and select ‘check’, then click the green tick and let it check the partition for you (this isn’t essential but its a good idea as if there are issues it will likely cause the resize to fail).

Right click the main ‘ext4’ partition and select ‘resize’ then enter the new size you want it to be.

Right click the main ‘ext4’ partition and select ‘check’ (we’ve found this to be necessary to ensure the new partition size is correctly updated in the file system even though it should be done as part of the resize – kept us chasing constantly failed resizes for hours before we discovered this).

Finally click the green arrow button to carry out the changes.

Reboot the RPi (yep its stupid but we’ve found a reboot to be needed even after removing and re-inserting the SD card), sudo startx, run gparted, select the USB drive and check the ext4 partition is locked again (mounted) and has its boot string back.

We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.
Gparted

A friend recently asked me to perform a system recovery on her VAIO laptop. The hard disk was split between a C drive for the OS, and a D drive with 200GB of data. I'm a Linux user, so I was like, come on, at least give me a challenge! Have you heard people saying, be careful what you wish for? Well, 30 seconds into the recovery procedure, I got an Error 333 and a restart button. Both partitions had been deleted.

The good news was that before I started the system recovery procedure, I asked her to backup the most important data, but that was just 5GB out of 200GB—the rest was gone. That's a lot of lost data! Thankfully, I was able to use a cool program called TestDisk to fully recover everything.

In this tutorial, I will show you how to create a bootable GParted Live USB drive, and use TestDisk to recover your partitions. Note that if you are still able to boot normally to your system, and just want to recover your files without creating a bootable disk, you might also want to have a look at Recover Deleted Files Using the Free Open Source Tool PhotoRec.

Create a GParted Live USB drive

Start by downloading the GParted Live ISO. Choose the latest stable release for your computer architecture (if you are not sure choose i686). There are multiple methods you can use to create a bootable USB drive from the ISO file—I prefer UNetbootin.

Gparted Iso Clone

Windows
Gparted

If you are on Windows, just download UNetbootin.

Linux

If you are on Ubuntu, ensure you have the latest version by adding the Ubuntu PPA repository for UNetbootin and install it.

$ sudo add-apt-repository ppa:gezakovacs/ppa
$ sudo apt-get update
$ sudo apt-get install unetbootin

For other distributions, you can find binaries and sources at the official UNetbootin page.

Create bootable USB

After installing, plug-in an empty USB drive and run UNetbootin. Select the GParted ISO you have just downloaded and the drive you wish to use for GParted Live, and then click OK.

Boot into the GParted Live USB

Restart your computer and boot from the USB drive you have created. While GParted is booting it will ask you some questions, e.g. keyboard layout, don't try to be a hero, just accept the defaults by pressing Enter. When the window manager loads, the first open window is the GParted Partition Editor.

Select your disk drive using the drop-down menu on the top-right. I have selected /dev/sdc, which as you can see doesn't have any valid partitions on it, since I accidentally deleted them for this tutorial.

Open the terminal window, by double clicking on the terminal icon on the desktop, and run TestDisk as root:

$ sudo -s
$ testdisk

Follow the steps below:

  1. Select No Log.

  2. Select the disk drive you want to recover, e.g. /dev/sdc.

  3. Select your partition table type. Usually it's Intel.

  4. Select Analyse and Quick Search.

  5. If you get asked whether your partition was created under Vista, answer yes/no.

  6. Your drive will be analysed and you will see a list of all found partitions. If you know what you are doing, you can edit the list, otherwise just press Enter.

  7. On the next screen you have the option to either perform a second Deeper Search, or Write the current partition table to disk. If the quick search was successful, choose Write.

Quit TestDisk, and rescan your devices in the GParted Partition Editor by clicking GPartedRefresh Devices. Select your device from the top-right drop-down menu.

If your deleted partitions were successfully recovered, as in the above screenshot, you can reboot your computer by double clicking on the Exit button.

You can learn more about TestDisk by looking at the official documentation.