How to clone a Linux hard drive with Gparted

Duplicating hard drive applications can be very tedious, and more if you don't have a tool like Clonezilla or other Linux backup utility. Now, if you are in a hurry, it is much better to use the function built into the Linux editor, called Gparted.

We will also show you how to clone a Linux hard drive with ease using the live Gparted disk. This process can also be done with the version of the program included in many sources of this operating system. But we do not recommend this, as it makes it difficult to modify some file systems.

Create live disk

The Gparted live disk is essential for you, if you are a Linux user and you want to modify the hard drives. Especially, those who have such an operating system. For the disk copy to work, you must follow the step-by-step instructions that we show you below.

First step: Download the Etcher USB recording application on your computer. You just have to download it on its official website.

Second step: open a terminal window by pressing the corresponding keys: CTRL + ALT + T, or CTRL + SHIFT + T. Then, go to the CD in the downloads directory of your PC.

cd ~ / Downloads

Third step: use the command line decompression application to extract the Etcher AppImage.

unzip balena-etcher-electron – * – linux-x64.zip

Fourth step: update the permissions of the Etcher AppImage file so that the system can execute it with the chmod command.

chmod + x balenaEtcher – * .AppImage

Fifth step: use the wget command to download the latest version of the Gparted Live ISO file on your computer.

wget https://downloads.sourceforge.net/gparted/gparted-live-1.0.0-2-amd64.iso

If your operating system is 32 bits, then type:

wget https://downloads.sourceforge.net/gparted/gparted-live-1.0.0-2-i686.iso

Sixth step: Start the Etcher application with the command line.

./balenaEtcher-*-x64.AppImage

Seventh step: connect your USB flash drive and allow the Etcher to select it automatically.

Eighth step: Click on the “select image” button to bring up an “open file dialog” window and look for the Gparted ISO file.

Ninth step: you must click on the "Flash!" Button in Etcher to begin the flashing process. When the process is finished, you must restart your computer with the USB drive connected.

Gparted boot

To start Gparted from the USB, you must configure the BIOS of your PC to load the boot from the USB drive. Once it is loaded, you will see a start menu with several items in the list. Now, look for the “Gparted Live” option (default setting) and press the Enter key to start the live disc.

Once you pass the Grub request for the Gparted Live disk, a window will appear labeled "Configuration Console Data" on the screen. The notice will have several options to choose from. If you need to configure your favorite keymap, click on the "Select keymap from file list" option.

If not, then you must choose the option “Do not touch the keymap” to start the default kernel.

Continuing with the key map, the program will ask you about the language. You should see inside the list and choose the language by entering the number in the message. Otherwise, you can keep it in the default selection by pressing the Enter key.

Similarly, your language and your keymap are set on the live Gparted disk. Also, load the GUI interface by entering the startx command in: “Which mode do you prefer?”.

Copy partitions to the Gparted partition

To copy a partition in Gparted, start by locating the drive you want to work with (also known as the source hard drive). You must use the menu in the upper right corner of the Gparted tool, find the unit from which you want to copy and select it from the menu to access it in the application.

Also, on the source hard disk, locate the partition on the source disk on which you want to copy to the secondary disk (known as the destination hard disk). Once you have found the partition you want to copy, right click on it with the mouse, to reveal the menu with the right click.

Now, go through the menu to “copy” and select it to confirm to Gparted that you want to copy the partition. Then, return to the menu at the top right of the program and choose the destination hard drive.

You should take note of some considerations

As it seems obvious, the partition on the source hard disk should not be larger than the destination disk space. You must make sure you right-click on the partition and select “resize” so you can reduce it, so that the partition you want to copy can fit on the destination drive.

After loading the destination hard drive, right-click on any space to display the right-click menu, go through the menu and select "paste" to copy that partition.

Click on the green icon, which is the check mark to apply the transfer to the new unit. You must make sure to repeat this process as many times as necessary, to copy several partitions.

Finally, when all the hard disk partitions have been copied, you must restart your computer.