Page 1 of 1

Segmentation error when trying to rebuild BS with TestDisk

Posted: 21 Mar 2022, 14:30
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 8472 times
Any advice gratefully received.

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 21 Mar 2022, 15:40
by recuperation
Use Testdisk 7.2 WIP.
Are you using Testdisk in a virtualized environment?

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 21 Mar 2022, 18:14
by johnmac150
I'll try 7.2
I am using Ubuntu in a dual-boot environment

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 22 Mar 2022, 15:45
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.

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 22 Mar 2022, 23:28
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?

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 23 Mar 2022, 08:44
by recuperation
Read the manual testdisk.pdf.

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 23 Mar 2022, 14:30
by johnmac150
Eventually found that all I need to do is run sudo ./testdisk_static. No installation needed (I don't think...)

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 29 Mar 2022, 16:23
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.

Re: Segmentation error when trying to rebuild BS with TestDisk

Posted: 29 Mar 2022, 17:55
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.