Unable to Install/Run TestDisk on Linux Mint 20.3

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
Richa999
Posts: 2
Joined: 15 Dec 2022, 05:02

Unable to Install/Run TestDisk on Linux Mint 20.3

#1 Post by Richa999 »

I am following the instructions in TestDisk Documentation Release 7.1 on https://www.cgsecurity.org/testdisk.pdf

I followed this section:-
2.1.9 Ubuntu
As root on the Ubuntu system,
apt update
apt install testdisk

This appeared to run successfully with the last part showing

Code: Select all

The following NEW packages will be installed:
  testdisk
0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded.
Need to get 362 kB of archives.
After this operation, 1,457 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 testdisk amd64 7.1-5 [362 kB]
Fetched 362 kB in 2s (220 kB/s)    
Selecting previously unselected package testdisk.
(Reading database ... 321593 files and directories currently installed.)
Preparing to unpack .../testdisk_7.1-5_amd64.deb ...
Unpacking testdisk (7.1-5) ...
Setting up testdisk (7.1-5) ...
Processing triggers for man-db (2.9.1-1) ...
richard@Linux-Box:~$
I then looked in the Mint Menu for TestDisk but couldn't find it so I went to Section 6.3 Running TestDisk, PhotoRec under Linux
Here it says:-
You need to be root to run TestDisk.
cd testdisk-7.1
sudo ./testdisk_static

Problem is the cd does not work probably because I can't find any trace of a folder called testdisk-7.1 or similar.

Where has it installed TestDisk?

I'm a relative newbie to Linux so would appreciate any pointers as to what I am doing wrong.

Thanks
recuperation
Posts: 3004
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: Unable to Install/Run TestDisk on Linux Mint 20.3

#2 Post by recuperation »

Thank you for the good problem description!
The manual is not precise here what made you mixing up both alternatives as described below:

Alternative 1: running the precompiled binaries
=========================================

If you download

https://www.cgsecurity.org/testdisk-7.2 ... 64.tar.bz2

from here:
https://www.cgsecurity.org/wiki/TestDisk_Download

you will get the so-called precompiled binaries.
The handbook is referring to them.
You unpack the bz2-archive and open up the folder with the archive content.
You navigate ("cd") into the unpacked folder and key in:
sudo ./testdisk_static

Alternative 2: Installing Testdisk using the Linuxmint installer
======================================================
After installation as described by you running
sudo testdisk
in a terminal should start Testdisk.
Richa999
Posts: 2
Joined: 15 Dec 2022, 05:02

Re: Unable to Install/Run TestDisk on Linux Mint 20.3

#3 Post by Richa999 »

Great, thanks for the quick response.

Used your alternative 2 seeing as I was half way there and started TestDisk fine.

I had already started Gparted > Data Rescue. That just has a status bar going backwards and forwards for the last 48hrs +, not sure whether it's actually progressing as status bar doesn't show actual progress. Manual and forums say it can take a while so I'll leave for another night but if it hasn't finished in the morning I'll cancel it and try TestDisk to recover my RAID array.
Locked