List directories and files -> Floating point exception (core dumped)

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
Post Reply
Message
Author
Krummelz
Posts: 2
Joined: 29 Jan 2026, 12:53

List directories and files -> Floating point exception (core dumped)

#1 Post by Krummelz »

Hi,

So I've had the Windows NTFS partition of my drive become RAW overnight. I can boot into WinRE, but chkdsk says it can't do anything with a RAW partition.

I've managed to boot into my Linux OS to use TestDisk. I've followed the instructions I found in the docs to repair an NTFS partition here:https://www.cgsecurity.org/testdisk_doc ... oot-sector but once I choose the List option after the RepairBS option, Testdisk crashes with "Floating point exception (core dumped).

I have also tried going the Analyse route, doing a Quick Scan, and then it shows duplicate partitions and all are marked as Deleted. Looking at the partition labelled [Windows] and the duplicate below it, when I try to list files for one of these, Testdisk also crashes with the same exception. Listing files on the other duplicate partition says "Can't open filesystem. Filesystem seems damaged."

Below is my log file. Let me know if you want the coredumps as well?

Are there any other steps I can take? I'm worried if I just repair the boot sector and write it, that it might brick my drive and/or cause data loss.

Code: Select all



Thu Jan 29 14:19:05 2026
Command line: TestDisk

TestDisk 7.3-WIP, Data Recovery Utility, September 2025
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Linux, kernel 6.16.4-116.bazzite.fc42.x86_64 (#1 SMP PREEMPT_DYNAMIC Wed Oct 15 21:00:46 UTC 2025) x86_64
Compiler: GCC 14.2
ext2fs lib: 1.47.0, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: 20120504, curses lib: ncurses 6.4
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 123 GB / 114 GiB - CHS 14955 255 63, sector size=512 - SanDisk 3.2Gen1, FW:1.00
Disk /dev/nvme0n1 - 4000 GB / 3726 GiB - CHS 3815447 64 32, sector size=512 - Corsair MP600 CORE, S/N:220979090001303820BB

Partition table type (auto): EFI GPT
Disk /dev/nvme0n1 - 4000 GB / 3726 GiB - Corsair MP600 CORE
Partition table type: EFI GPT

Analyse Disk /dev/nvme0n1 - 4000 GB / 3726 GiB - CHS 3815447 64 32
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=7814037167 (expected 7814037167)
hdr_lba_start=34
hdr_lba_end=7814037134
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 1 P MS Reserved                   34     262177     262144
Current partition structure:
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
 1 P MS Reserved                   34     262177     262144
 1 P MS Reserved                   34     262177     262144
 2 P EFI System                264192     878591     614400
Warning: number of heads/cylinder mismatches 255 (NTFS) != 64 (HD)
Warning: number of sectors per track mismatches 63 (NTFS) != 32 (HD)
 3 P MS Data                   878592 7763808255 7762929664 [Windows]
 4 P Windows Recovery Env  7763808256 7765651455    1843200
 5 P Windows Recovery Env  7765651456 7814035455   48384000

search_part()
Disk /dev/nvme0n1 - 4000 GB / 3726 GiB - CHS 3815447 64 32
FAT32 at 129/0/1
FAT1 : 34-632
FAT2 : 633-1231
start_rootdir : 1232 root cluster : 2
Data : 1232-614399
sectors : 614400
cluster_size : 8
no_of_cluster : 76646 (2 - 76647)
fat_length 599 calculated 599
heads/cylinder 255 (FAT) != 64 (HD)
sect/track 63 (FAT) != 32 (HD)

FAT32 at 129/0/1
FAT: cluster=2(0x2), pos=265424
     EFI System                264192     878591     614400 [EFI System Partition] [SYSTEM]
     FAT32, blocksize=4096, 314 MB / 300 MiB
NTFS at 429/0/1
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           7762929657
sectors_per_cluster       8
mft_lcn                   762552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=449839104, part_size=3974619984384, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 429/0/1
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           7762929657
sectors_per_cluster       8
mft_lcn                   762552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                   878592 7763808248 7762929657 [Windows]
     NTFS, blocksize=4096, 3974 GB / 3701 GiB
NTFS at 3790921/63/32
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           7762929657
sectors_per_cluster       8
mft_lcn                   762552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                   878599 7763808255 7762929657
     NTFS found using backup sector, blocksize=4096, 3974 GB / 3701 GiB
NTFS at 3790921/63/32
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           7762929657
sectors_per_cluster       8
mft_lcn                   762552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data               7763808255 15526737911 7762929657
     NTFS, blocksize=4096, 3974 GB / 3701 GiB
This partition ends after the disk limits. (start=7763808255, size=7762929657, end=15526737911, disk end=7814037168)
NTFS at 3790922/0/1
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           1843193
sectors_per_cluster       8
mft_lcn                   14552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data               7761965064 7763808256    1843193
     NTFS found using backup sector, blocksize=4096, 943 MB / 899 MiB
NTFS at 3790922/0/1
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           1843193
sectors_per_cluster       8
mft_lcn                   14552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data               7763808256 7765651448    1843193 [WinRE tools]
     NTFS, blocksize=4096, 943 MB / 899 MiB
NTFS at 3791821/63/32
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           1843193
sectors_per_cluster       8
mft_lcn                   14552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data               7763808263 7765651455    1843193
     NTFS found using backup sector, blocksize=4096, 943 MB / 899 MiB
NTFS at 3791821/63/32
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           1843193
sectors_per_cluster       8
mft_lcn                   14552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data               7765651455 7767494647    1843193
     NTFS, blocksize=4096, 943 MB / 899 MiB
NTFS at 3815446/63/25
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           48383993
sectors_per_cluster       8
mft_lcn                   636598
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data               7765651456 7814035448   48383993 [BIOS_RVY]
     NTFS found using backup sector, blocksize=4096, 24 GB / 23 GiB
NTFS at 3815446/63/25
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           48383993
sectors_per_cluster       8
mft_lcn                   636598
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS: Can't read MFT
     MS Data               7814035448 7862419440   48383993
     NTFS, blocksize=4096, 24 GB / 23 GiB
This partition ends after the disk limits. (start=7814035448, size=48383993, end=7862419440, disk end=7814037168)
NTFS at 3815446/63/32
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           48383993
sectors_per_cluster       8
mft_lcn                   636598
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data               7765651463 7814035455   48383993
     NTFS found using backup sector, blocksize=4096, 24 GB / 23 GiB
NTFS at 3815446/63/32
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
filesystem size           48383993
sectors_per_cluster       8
mft_lcn                   636598
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS: Can't read MFT
     MS Data               7814035455 7862419447   48383993
     NTFS, blocksize=4096, 24 GB / 23 GiB
This partition ends after the disk limits. (start=7814035455, size=48383993, end=7862419447, disk end=7814037168)
Disk /dev/nvme0n1 - 4000 GB / 3726 GiB - CHS 3815447 64 32
Check the hard disk size: HD jumper settings, BIOS detection...
The hard disk (4000 GB / 3726 GiB) seems too small! (< 7949 GB / 7403 GiB)
The following partitions can't be recovered:
     MS Data               7763808255 15526737911 7762929657
     NTFS, blocksize=4096, 3974 GB / 3701 GiB
     MS Data               7814035448 7862419440   48383993
     NTFS, blocksize=4096, 24 GB / 23 GiB
     MS Data               7814035455 7862419447   48383993
     NTFS, blocksize=4096, 24 GB / 23 GiB

Results
   P EFI System                264192     878591     614400 [EFI System Partition] [SYSTEM]
     FAT32, blocksize=4096, 314 MB / 300 MiB
     MS Data                   878592 7763808248 7762929657 [Windows]
     NTFS, blocksize=4096, 3974 GB / 3701 GiB
     MS Data                   878599 7763808255 7762929657
     NTFS found using backup sector, blocksize=4096, 3974 GB / 3701 GiB
     MS Data               7761965064 7763808256    1843193
     NTFS found using backup sector, blocksize=4096, 943 MB / 899 MiB
     MS Data               7763808256 7765651448    1843193 [WinRE tools]
     NTFS, blocksize=4096, 943 MB / 899 MiB
     MS Data               7763808263 7765651455    1843193
     NTFS found using backup sector, blocksize=4096, 943 MB / 899 MiB
     MS Data               7765651455 7767494647    1843193
     NTFS, blocksize=4096, 943 MB / 899 MiB
     MS Data               7765651456 7814035448   48383993 [BIOS_RVY]
     NTFS found using backup sector, blocksize=4096, 24 GB / 23 GiB
     MS Data               7765651463 7814035455   48383993
     NTFS found using backup sector, blocksize=4096, 24 GB / 23 GiB

Hint for advanced users: dmsetup may be used if you prefer to avoid rewriting the partition table for the moment:
echo "0 614400 linear /dev/nvme0n1 264192" | dmsetup create test0
echo "0 7762929657 linear /dev/nvme0n1 878592" | dmsetup create test1
echo "0 7762929657 linear /dev/nvme0n1 878599" | dmsetup create test2
echo "0 1843193 linear /dev/nvme0n1 7761965064" | dmsetup create test3
echo "0 1843193 linear /dev/nvme0n1 7763808256" | dmsetup create test4
echo "0 1843193 linear /dev/nvme0n1 7763808263" | dmsetup create test5
echo "0 1843193 linear /dev/nvme0n1 7765651455" | dmsetup create test6
echo "0 48383993 linear /dev/nvme0n1 7765651456" | dmsetup create test7
echo "0 48383993 linear /dev/nvme0n1 7765651463" | dmsetup create test8
ntfs_mst_post_read_fixup_warn: magic: 0x00000000  size: 1024   usa_ofs: 0  usa_count: 0: Invalid argument
Record 0 has no FILE magic (0x0)
Failed to load $MFT: Input/output error


Thu Jan 29 14:20:30 2026
Command line: TestDisk

TestDisk 7.3-WIP, Data Recovery Utility, September 2025
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Linux, kernel 6.16.4-116.bazzite.fc42.x86_64 (#1 SMP PREEMPT_DYNAMIC Wed Oct 15 21:00:46 UTC 2025) x86_64
Compiler: GCC 14.2
ext2fs lib: 1.47.0, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: 20120504, curses lib: ncurses 6.4
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 123 GB / 114 GiB - CHS 14955 255 63, sector size=512 - SanDisk 3.2Gen1, FW:1.00
Disk /dev/nvme0n1 - 4000 GB / 3726 GiB - CHS 3815447 64 32, sector size=512 - Corsair MP600 CORE, S/N:220979090001303820BB

Partition table type (auto): EFI GPT
Disk /dev/nvme0n1 - 4000 GB / 3726 GiB - Corsair MP600 CORE
Partition table type: EFI GPT

Interface Advanced
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=7814037167 (expected 7814037167)
hdr_lba_start=34
hdr_lba_end=7814037134
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 1 P MS Reserved                   34     262177     262144
 1 P MS Reserved                   34     262177     262144
 2 P EFI System                264192     878591     614400
 3 P MS Data                   878592 7763808255 7762929664 [Windows]
     NTFS, blocksize=4096, 3974 GB / 3701 GiB
 4 P Windows Recovery Env  7763808256 7765651455    1843200
 5 P Windows Recovery Env  7765651456 7814035455   48384000

ntfs_boot_sector
 3 P MS Data                   878592 7763808255 7762929664 [Windows]
     NTFS, blocksize=4096, 3974 GB / 3701 GiB
NTFS at 429/0/1
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
Info: size boot_sector 7762929657, partition 7762929664
NTFS at 429/0/1
heads/cylinder 255 (NTFS) != 64 (HD)
sect/track 63 (NTFS) != 32 (HD)
Info: size boot_sector 7762929657, partition 7762929664
filesystem size           7762929657
sectors_per_cluster       8
mft_lcn                   762552
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
Boot sector
Warning: number of heads/cylinder mismatches 255 (NTFS) != 64 (HD)
Warning: number of sectors per track mismatches 63 (NTFS) != 32 (HD)
Status: OK

Backup boot sector
Warning: number of heads/cylinder mismatches 255 (NTFS) != 64 (HD)
Warning: number of sectors per track mismatches 63 (NTFS) != 32 (HD)
Status: OK

Sectors are identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.

Krummelz
Posts: 2
Joined: 29 Jan 2026, 12:53

Re: List directories and files -> Floating point exception (core dumped)

#2 Post by Krummelz »

Fixed and working!

Apologies, I had used the latest WIP-7.3 build instead of the latest stable. v7.2 stable was able to list the files just fine, while following the same procedures. I went ahead and chose the option to "write" the new boot sector, and I'm writing this from my Windows OS. Seems the WIP one just has a bug. I still have the coredumps available if needed.

Thanks for this excellent tool!
User avatar
cgrenier
Site Admin
Posts: 5445
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: List directories and files -> Floating point exception (core dumped)

#3 Post by cgrenier »

The bug may be in testdisk or in libntfs-3g.
It's usually hard to fix a bug without a mean to reproduce the problem but please share the gdb output (Run "gdb testdisk_binary core_file" and type "bt full" at the prompt) or the core file, I will see if I can do something.
Post Reply