How to Recover Linux Data After Reinstalling the Operating System or Formatting the Hard Disk
Tags: beginners, testing, test, tutorial
Published: 2021-10-04 20:55:09

Read this article to find out how to recover lost data from your Linux operating system after reinstalling it or formatting the hard disk. How to install VMware on Linux, how to configure it, and how to create a Windows 10 virtual machine.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vll2etfb8hzrub8cykkw.png)

Almost every novice user knows how it feels to lose data after reinstalling the operating system. You may have forgotten to copy important information from the system disk before you start the reinstallation process, and now all that data is gone. Everyone knows that bitter feeling of trying to find important data and discovering is doesn’t exist anymore. Fortunately, there are many solutions nowadays that can help you get your data back. One of them is [Hetman Partition Recovery](https://hetmanrecovery.com/hard-drive-data-recovery-software), a well-tried and reliable utility globally recognized for successful data recovery.

At the moment, there is no special distributive for Linux, so this article contains directions on how to run this application on Linux and how to use it to recover data from Linux partitions.

YouTube: {% youtube 6uklgkUb4ME %}

##How to install VMware on Linux
To make Hetman Partition Recovery work in this environment, we need a virtual machine with a Windows OS. Currently, a specialized version of Hetman Partition Recovery for Linux is not available, but the existing version for Windows can recover files from Linux disks as well. It supports almost every file system used in Linux. This program recovers data from devices working with such file systems as FAT/exFAT, NTFS/ReFS, APFS/HFS+, Ext2/3/4/ ReiserFS and XFS/UFS.

To run it on Linux you need a virtual machine with a Windows OS, and you can create one with the help of another application, VMware. This is one of the most popular virtual machines, and you shouldn’t have any difficulty installing it. VMware is not distributed with open source code, but it comes in two variants – a commercial Pro version and a free version with basic functionality. The Pro version has a trial limitation of 30 days, and that should be enough to recover the lost data.

In this tutorial, I’ll describe how to install VMware, create a virtual machine with Windows 10 and recover your lost data from Ubuntu version 18.04.

To install VMware, download the installation file. You can find the latest stable verison on its official website.

https://www.vmware.com/products/workstation-pro/workstation-pro-evaluation.html

We need a version for Linux.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i596xvk1lep59fi6p2fc.png)

Select to save the file and wait until it is downloaded.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dda0acej695igujz6pb0.png)

Also, you have to add such components as GNU Complier Collection and Build Essential, required to install VMware.

You need to set permissions for the downloaded file. Right-click on the file you need and open Properties.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/okzj8617x6k338hoj76i.png)

Jump to the tab Permissions and check the box for Allow executing file as program.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aotxliknfn2sjq7634ha.png)

Go to the downloads folder and run the Terminal from there. Do it by right-clicking on an empty area in the folder and selectingOpen in Terminal.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nmewny4u5pxv3ebyfaz5.png)

Before installing any software, you need to update the package repository with the following command.

`sudo apt update`

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zuilr80vxfdquljhl1i7.png)

After that, install the required components, GNU Complier Collection and Build Essential, that will be used for VMware installation. Here is the command to use:

`sudo apt install gcc build-essential`

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwyq09i752erw8k9oet9.png)

Hit Yes to confirm your action, and then Enter.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4vetb3wlx0kkj4lsest4.png)

For further actions, you need the full name of the VMware package file.

For this purpose, list the files in your downloads folder with the following command:

`ls`

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lnrsklmm878az9wl0658.png)

Copy the full name of the downloaded file. You’ll need it to extract the files from the package.

In the Terminal, type

`sudo ./`

and paste the package name.

This is how the command looks like.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/18iuwpxjkwqj39e7gmvs.png)

Enter.

When the files are extracted, the VMware installation window should appear. If it doesn’t, go to the list of installed applications and launch it from there.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/veic4ihy7vqqia5g7p3o.png)