Segmentation error when trying to rebuild BS with TestDisk

Using TestDisk to repair the filesystem
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
johnmac150
Posts: 7
Joined: 21 Oct 2021, 22:15

Segmentation error when trying to rebuild BS with TestDisk

#1 Post by johnmac150 »

I've been trying to recover a windows 10 C: drive using Ubuntu 20.04.4 and TestDisk. Drive became RAW for no apparent reason. I created a disk image using dd (sudo dd if=/dev/sdb of="/media/jmac150/New Volume/image.dd" bs=4K conv=noerror,sync status=progress) and ran TestDisk against it. TestDisk advised that both boot sector and backup were ok. However, when I tried to rebuild the boot sector, it failed with "Segmentation fault". I have attached screenshot of Segmentation fault.
Screenshot from 2022-03-20 14-57-12.jpg
Screenshot from 2022-03-20 14-57-12.jpg (34.96 KiB) Viewed 3636 times
Any advice gratefully received.

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

Re: Segmentation error when trying to rebuild BS with TestDisk

#2 Post by recuperation »

Use Testdisk 7.2 WIP.
Are you using Testdisk in a virtualized environment?

johnmac150
Posts: 7
Joined: 21 Oct 2021, 22:15

Re: Segmentation error when trying to rebuild BS with TestDisk

#3 Post by johnmac150 »

I'll try 7.2
I am using Ubuntu in a dual-boot environment

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: Segmentation error when trying to rebuild BS with TestDisk

#4 Post by cgrenier »

It may be a bug fixed in April 2020: https://github.com/cgsecurity/testdisk/ ... 1529827fed
Please let me know of the results with latest TestDisk 7.2-WIP.

johnmac150
Posts: 7
Joined: 21 Oct 2021, 22:15

Re: Segmentation error when trying to rebuild BS with TestDisk

#5 Post by johnmac150 »

Hi

I've been trying to install testdisk-7.2-WIP.linux26-x86_64.tar.bz2.
Extracted it and checked the README.md file.
It advises "To build from source, read [INSTALL](INSTALL)" but I cannot find INSTALL in the folder. Can you help?

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

Re: Segmentation error when trying to rebuild BS with TestDisk

#6 Post by recuperation »

Read the manual testdisk.pdf.

johnmac150
Posts: 7
Joined: 21 Oct 2021, 22:15

Re: Segmentation error when trying to rebuild BS with TestDisk

#7 Post by johnmac150 »

Eventually found that all I need to do is run sudo ./testdisk_static. No installation needed (I don't think...)

johnmac150
Posts: 7
Joined: 21 Oct 2021, 22:15

Re: Segmentation error when trying to rebuild BS with TestDisk

#8 Post by johnmac150 »

TestDisk 7.2-WIP solved the Segmentation problem and I managed to rebuild the BS. However, when I tried to rebuild the MFT, error message was that "MFT and MFT mirror are bad". Is there anything I can do to recover the disk?
Thanks.

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

Re: Segmentation error when trying to rebuild BS with TestDisk

#9 Post by recuperation »

If the dammage exceeds what Testdisk could repair, third party software could still be able to evaluate the remains of metadata such as MFT in case of having used NTFS as file system.

Locked