We are committed to providing fast, efficient, and affordable software solutions that set new standards in the software development industry.
  • Data Recovery from an Encrypted Linux Disk after a System Crash

An Ubuntu 14.04 computer was in a system software updating process when it struck a power outage. The computer cannot boot anymore. Looks like this is an easy case for data recovery? Not exactly. There is bad news: the system was installed over an encrypted LVM file system. The good news is though, the password isn't forgotten. Here comes the challenge: retrieve the user's files.

The first natural move is to create an Ubuntu startup disk, boot the computer, mount the file system, and copy the files to another disk. Then, the operating system on the computer can be repaired or re-installed. This will work only if the file system is intact. If not, what has to be done when the files become inaccessible?

It's possible to use another Linux machine with installed R-Studio for Linux, but it may not be easily available. So, this article will show how to use R-Studio for Windows instead. We also provide some information on how to work with Ubuntu for those who aren't very familiar with that OS.

Windows systems cannot directly access encrypted Linux partitions, therefore we need to use data recovery over network. So, we need two computers connected to a network: a Windows machine with R-Studio Network installed and the affected Ubuntu computer. We also need a place to store recovered data. It may be any disk visible to the Windows system, or an external hard drive connected to the Ubuntu computer. In addition to all native Linux file systems, such a drive can be formatted as an NTFS device.

Data recovery process
Creating an Ubuntu startup disk
1. Download the Ubuntu 14.04 install image and create a USB startup disk. The official Ubuntu site explains it in detail: Download Ubuntu Desktop and How to create a bootable USB stick on Windows.

Please, note, that although it's enough to have a 2GB USB stick to install Ubuntu, we'll need much more disk space to perform data recovery. We'll use a 32GB SSD device as a startup disk.

Working with the Ubuntu computer
2. Start the Ubuntu computer using the Ubuntu startup disk and select Try Ubuntu on the Install window.
Ubuntu startup screen
Fig.1. Ubuntu startup screen
Click image to enlarge

3. Locate the encrypted disks.
Encrypted and external disks in Ubuntu
Fig.2. Encrypted and external disks in Ubuntu
Click image to enlarge

Unlock them by clicking and entering the password.
Unlocking the encrypted disks
Fig.3. Unlocking the encrypted disks
Click image to enlarge

Locate the external disk and double-click it to mount.

4. Move the cursor to the upper left corner, click the Find button, enter Ter, and run the Terminal program.
Starting the Terminal
Fig.4. Starting the Terminal
Click image to enlarge 5. In the Terminal, enter sudo -i to obtain the superuser privileges.

6. Determine the IP address of the computer by entering ip addr show
Finding the IP address
Fig.5. Finding the IP address
Click image to enlarge

7. Run Firefox, go to r-tt.com and download R-Studio Agent for Linux.
URL for R-Studio Agent for Linux
Fig.6. URL for R-Studio Agent for Linux
Click image to enlarge

By default, Firefox will place it to the Downloads folder. Close Firefox.

8. Click the Folder button, go to the Downloads folder, and double-click the downloaded file. Extract the rsagent file.
Extracting R-Studio Agent for Linux
Fig.7. Extracting R-Studio Agent for Linux
Click image to enlarge

9. Right-click the rsagent file, select the Permission tab, and check that Allow executing file as program is selected.
Setting permissions for R-Studio Agent for Linux
Fig.8. Setting permissions for R-Studio Agent for Linux
Click image to enlarge

Close this window and go back to the Terminal.

10. Go to the Downloads folder:
cd /home/ubuntu/Downloads
then run R-Studio Agent by typing ./rsagent

11. Configure R-Studio Agent. You may enter a very simple password if you work on a local network.
Starting R-Studio Agent for Linux
Fig.9. Starting R-Studio Agent for Linux
Click image to enlarge

You may read more about configuring R-Studio Agent for Linux at R-Studio's help: R-Studio Agent for Linux.

Ignore the Unregistered warning if your R-Studio is properly registered.

Working with the R-Studio computer
12. Connect R-Studio to the Ubuntu computer.
Connecting R-Studio to its Agent for Linux
Fig.10. Connecting R-Studio to its Agent for Linux
Click image to enlarge
See R-Studio's help: Data Recovery over Network for details.

13. Locate the damaged LVM file system.
Damaged encrypted LVM
Fig.11. Damaged encrypted LVM
Click image to enlarge

14. Scan the LVM file system.
Scan parameters for LVM
Fig.12. Scan parameters for LVM
Click image to enlarge
See more about scan parameters on R-Studio's help: Disk Scan.

15. See the scan results and locate the recognized partitions on the LVM file system.
Scan results
Fig.13. Scan results
Click image to enlarge

16. Open the found recognized partition. If the file system is severely damaged, it may take a long time.

17. Locate the user's folders and mark files for recovery.
Recognized partition
Fig.14. Recognized partition
Click image to enlarge
You may use various file search methods to find and mark particular files. See R-Studio's help: Searching for a File and Mass File Recovery for details.

18. Click the Recover Marked button, select a place to store recovered files, and specify other recovery parameters.
Recover parameters and disks to store recovered files on the remote computer
Fig.15. Recover parameters and disks to store recovered files on the remote computer
Click image to enlarge

Then click the OK button on the Recover dialog box, and R-Studio will start file recovery saving the files on the external disk.
Recovered files on the external NTFS disk
Fig.16. Recovered files on the external NTFS disk
Click image to enlarge

Linux Recovery Feedback
15 feedbacks
Rating: 4.9 / 5
Just recovered my old ext4 partition with R-Studio after trying testdisk and R-Linux without success. That partition was overwritten by another ext4 partition and I was losing my hope until I tried R-Studio demo. It detected all my files and directories again!

Bought it and 100% recommend it for anyone with a similar issue.
Hello!
Thank you very much for R-Studio for Linux.
Please pay attention to new Linux package manager `Snappy` => https://snapcraft.io/
Good luck!
Great programm, great service, TOP !A+++
While currently evaluatin R-Studio for Linux i`m quite impressed with how thorough it is.

Regrettably it`s not possible to simply restore the accidently zapped partitions ?

An installer wiped my boot drive without asking and erased LVM and other partitions.
I used R-Linux to recovery my company files after a RAID 1 failure. Not only did it work great in windows 10 but it was free. You guys are awesome!!! A+++++++++++++ I hope I never need your software again:)