The directory name is invalid – file system RAW

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
Post Reply
Message
Author
xJamie
Posts: 2
Joined: 27 Sep 2025, 21:16

The directory name is invalid – file system RAW

#1 Post by xJamie »

The directory name is invalid – file system RAW

Hello dears,

first things first:
- the external hard drive is a 1 TB WD My Passport WDBYNN0010BBK-0B
- the OS is Windows 10 Home 64-bit x64, version 22H2, build 19045.6396

What happened?
After doing a backup of all my files onto the external hard drive (due to a clean windows installation), I tried to get the backup back on the pc. However, the system is not able to open the external hard drive path. Yet it is visible but without the storage:
Image

- when trying to access the external hard drive, the following error pops up:
Location is not available.
E:\ is not accessible.
The file or directory is corrupted and unreadable.
Checking the disk management of Windows I see the hard drive with file system RAW / error-free (base partition):
Image

However, after a little research I found TestDisk (v7.2) to try to get access to the hard drive.

Which steps did I already do?:

- Proceed with the corrupted hard drive:
Image

EFI GPT partition table type has been detected:
Image

1. Advanced path:

1.1 Checking the advanced path to see the partition and boot sector status – both are on status OK:
Image

Since both status are OK, I went for the repair MFT:
Image

Yet I still could not access the external hard drive.

2. Next on the list was the Analyse path:

2.1 Quick Search result:
Image

Code: Select all

search_part()
Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - CHS 121597 255 63
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=1048576, part_size=1000168488960, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
file_win32_pread(572,11,buffer,1953458170(121597/37/35)) read err: read after end of file
file_win32_pread(572,8,buffer,1953458173(121597/37/38)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458164(121597/37/29)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458165(121597/37/30)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458166(121597/37/31)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458167(121597/37/32)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458168(121597/37/33)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458170(121597/37/35)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458172(121597/37/37)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458174(121597/37/39)) read err: read after end of file

Results
   P MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
NTFS Volume is dirty. 
2.2 Listing files (P):
Image

Code: Select all

dir_partition inode=5
   P MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
ntfs_readdir failed for cluster 5: Input/output error
Directory /
       5 dr-xr-xr-x     0      0         0 27-Sep-2025 09:36 .
       5 dr-xr-xr-x     0      0         0 27-Sep-2025 09:36 .. 
2.3 Deeper Search result:

Code: Select all

search_part()
Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - CHS 121597 255 63
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=1048576, part_size=1000168488960, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
check_FAT: Bad jump in FAT partition
check_FAT: Bad jump in FAT partition
check_FAT: Bad jump in FAT partition
check_FAT: Bad jump in FAT partition

SYSV4 Marker at 75883/200/5

Below is the full tesdisk.log file with all the mentioned steps included.

Code: Select all

Sat Sep 27 22:57:42 2025
Command line: TestDisk

TestDisk 7.2, Data Recovery Utility, February 2024
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Windows 8 (9200)
Compiler: GCC 11.2, Cygwin 3001.4
ext2fs lib: 1.45.3, ntfs lib: available, reiserfs lib: none, ewf lib: 20140608, curses lib: ncurses 6.1
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive0)=1000204886016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive1)=240057409536
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive2)=1000170586112
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\C:)=239464076288
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\D:)=1000148566016
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\E:)=1000168488960
Hard disk list
Disk \\.\PhysicalDrive0 - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - TOSHIBA HDWD110, S/N:Y8SRGUJNS, FW:MS2OA8R0
Disk \\.\PhysicalDrive1 - 240 GB / 223 GiB - CHS 29185 255 63, sector size=512 - Patriot Burst, S/N:742D079307B700154698, FW:SBFM61.3
Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - CHS 121597 255 63, sector size=512 - WD My Passport 25E1, S/N:WXK1A57HU2YT, FW:1019

Partition table type (auto): EFI GPT
Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - WD My Passport 25E1
Partition table type: EFI GPT

Interface Advanced
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953458175 (expected 1953458175)
hdr_lba_start=34
hdr_lba_end=1953458142
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
 1 P MS Data                     2048 1953456127 1953454080 [My Passport] [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB

ntfs_boot_sector
 1 P MS Data                     2048 1953456127 1953454080 [My Passport] [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
NTFS at 0/32/33
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
Boot sector
Status: OK

Backup boot sector
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.
repair_MFT
NTFS at 0/32/33
MFT and MFT mirror match perfectly.
MFT and MFT mirror match perfectly.

ntfs_boot_sector
 1 P MS Data                     2048 1953456127 1953454080 [My Passport] [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
NTFS at 0/32/33
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
Boot sector
Status: OK

Backup boot sector
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.

Analyse Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - CHS 121597 255 63
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=1953458175 (expected 1953458175)
hdr_lba_start=34
hdr_lba_end=1953458142
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
Current partition structure:
 1 P MS Data                     2048 1953456127 1953454080 [My Passport] [My Passport]

search_part()
Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - CHS 121597 255 63
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=1048576, part_size=1000168488960, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
file_win32_pread(572,11,buffer,1953458170(121597/37/35)) read err: read after end of file
file_win32_pread(572,8,buffer,1953458173(121597/37/38)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458164(121597/37/29)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458165(121597/37/30)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458166(121597/37/31)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458167(121597/37/32)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458168(121597/37/33)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458170(121597/37/35)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458172(121597/37/37)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458174(121597/37/39)) read err: read after end of file

Results
   P MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
NTFS Volume is dirty.


dir_partition inode=5
   P MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
ntfs_readdir failed for cluster 5: Input/output error
Directory /
       5 dr-xr-xr-x     0      0         0 27-Sep-2025 09:36 .
       5 dr-xr-xr-x     0      0         0 27-Sep-2025 09:36 ..

interface_write()
 1 P MS Data                     2048 1953456127 1953454080 [My Passport]

search_part()
Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - CHS 121597 255 63
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS part_offset=1048576, part_size=1000168488960, sector_size=512
NTFS partition cannot be added (part_offset<part_size).
NTFS at 0/32/33
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB
check_FAT: Bad jump in FAT partition
check_FAT: Bad jump in FAT partition
check_FAT: Bad jump in FAT partition
check_FAT: Bad jump in FAT partition

SYSV4 Marker at 75883/200/5

recover_sysv4
       0 0000 0000 00 00 00 00 00 00 00 00
     Unknown               1219072999 18827966944230 18826747871232 [Öš 8!]
     SysV4, 9639 TB / 8766 TiB
       0 0000 0000 00 00 00 00 00 00 00 00
Partition not added.
NTFS at 121597/5/8
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
     MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS found using backup sector, blocksize=4096, 1000 GB / 931 GiB
NTFS at 121597/5/8
filesystem size           1953454080
sectors_per_cluster       8
mft_lcn                   786432
mftmirr_lcn               2
clusters_per_mft_record   -10
clusters_per_index_record 1
NTFS: Can't read MFT
     MS Data               1953456127 3906910206 1953454080
     NTFS, blocksize=4096, 1000 GB / 931 GiB
This partition ends after the disk limits. (start=1953456127, size=1953454080, end=3906910206, disk end=1953458176)
file_win32_pread(572,11,buffer,1953458170(121597/37/35)) read err: read after end of file
file_win32_pread(572,8,buffer,1953458173(121597/37/38)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458164(121597/37/29)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458165(121597/37/30)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458166(121597/37/31)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458167(121597/37/32)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458168(121597/37/33)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458170(121597/37/35)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458172(121597/37/37)) read err: read after end of file
file_win32_pread(572,14,buffer,1953458174(121597/37/39)) read err: read after end of file
Disk \\.\PhysicalDrive2 - 1000 GB / 931 GiB - CHS 121597 255 63
Check the hard disk size: HD jumper settings, BIOS detection...
The hard disk (1000 GB / 931 GiB) seems too small! (< 2000 GB / 1862 GiB)
The following partition can't be recovered:
     MS Data               1953456127 3906910206 1953454080
     NTFS, blocksize=4096, 1000 GB / 931 GiB

Results
   P MS Data                     2048 1953456127 1953454080 [My Passport]
     NTFS, blocksize=4096, 1000 GB / 931 GiB

interface_write()
 1 P MS Data                     2048 1953456127 1953454080 [My Passport]
simulate write!

TestDisk exited normally.
---

To be honest, I was able to somehow recover files using PhotoRec, however, since I got ~511 GB of data (~82k files) and PhotoRec doesn’t sort the files (instead it renames all files and puts them in random folders), I will not be able to sort all the corresponding files to the original folders/paths.

I really hope the situation is not too bad and it is somehow possible to recover the hard drive with the original folder structure.

Many thanks for going through the post. I would also be very grateful, if any expert has an idea how to solve this.

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

Re: The directory name is invalid – file system RAW

#2 Post by recuperation »

xJamie wrote: Yesterday, 09:38 The directory name is invalid – file system RAW

Hello dears,

first things first:
- the external hard drive is a 1 TB WD My Passport WDBYNN0010BBK-0B
- the OS is Windows 10 Home 64-bit x64, version 22H2, build 19045.6396

What happened?
After doing a backup of all my files onto the external hard drive (due to a clean windows installation), I tried to get the backup back on the pc. However, the system is not able to open the external hard drive path. Yet it is visible but without the storage:
Image

- when trying to access the external hard drive, the following error pops up:
Location is not available.
E:\ is not accessible.
The file or directory is corrupted and unreadable.
Laut der Logdatei von TestDisk ist mindestens ein Cluster nicht lesbar.
=>
Bitte die Logdatei von smartmontools erzeugen und hier veröffentlichen:
viewtopic.php?f=5&t=10910

Es wäre sinnvoll, die Festplatte unter Linux mit ddrescue zu klonen, wie im Handbuch beschrieben.

Wenn Testdisk mit der P-Taste nicht in der Lage war, das Wurzelverzeichnis inklusive Inhalt anzuzeigen, sollten Sie irgendeine andere kommerzielle Software zur Datenrettung verwenden - ich gehe davon aus, dass CHKDSK diesen Defekt nicht beheben kann.
To be honest, I was able to somehow recover files using PhotoRec, however, since I got ~511 GB of data (~82k files) and PhotoRec doesn’t sort the files (instead it renames all files and puts them in random folders), I will not be able to sort all the corresponding files to the original folders/paths.
PhotoRec ist das letzte Mittel, wenn alles andere nicht funktioniert, weil Metadaten nicht verfügbar sind. PhotoRec benötigt keine Metadaten. Es versucht, Dateien aufgrund von Fingerabdrücken zu identifizieren.

PhotoRec durchsucht die Festplatte von vorne nach hinten.
Die gefundenen Dateien werden in Anlehnung an ihren Fundort auf der Festplatte benamt und der Reihe nach (nicht zufällig!) in Ordnern abgelegt.
xJamie
Posts: 2
Joined: 27 Sep 2025, 21:16

Re: The directory name is invalid – file system RAW

#3 Post by xJamie »

Vielen Dank für die schnelle Antwort!

recuperation wrote: Yesterday, 14:47 Laut der Logdatei von TestDisk ist mindestens ein Cluster nicht lesbar.
Bekommt man bei diesem Fehler die Festplatte gerettet, damit man wieder normalen Zugriff hat?

recuperation wrote: Yesterday, 14:47 Bitte die Logdatei von smartmontools erzeugen und hier veröffentlichen:
viewtopic.php?f=5&t=10910
Hier die logs:

smartctl -a /dev/sdc > myreport1.txt
(.../sdc, da Datenträger 2)

Code: Select all

Smartctl open device: /dev/sdc [SAT] failed: \\.\PhysicalDrive2: Open failed, Error=5

smartctl -a -d sat,12 /dev/sdx > myreport2.txt
smartctl -a -d sat,16 /dev/sdx > myreport3.txt

Code: Select all

Smartctl open device: /dev/sdx [SAT] failed: \\.\PhysicalDrive23: Open failed, Error=2

smartctl -a /dev/hdc > myreport4.txt

Code: Select all

Warning: Limited functionality due to missing admin rights
=== START OF INFORMATION SECTION ===
Device Model:     WD My Passport 25E1
Serial Number:    WXK1A57HU2YT
Firmware Version: 1019
Device is:        Not in smartctl database
ATA Version is:   [No Information Found]
Local Time is:    Mon Sep 29 16:39:55 2025 MS
SMART support is: Available - device has SMART capability.
                  Enabled status cached by OS, trying SMART RETURN STATUS cmd.
SMART support is: Disabled

SMART Disabled. Use option -s with argument 'on' to enable it.
(override with '-T permissive' option)
=> Ich besitze volle Adminrechte, trotzdem wird vor fehlenden Adminrechten gewarnt.


smartctl -s on -a /dev/hdc > myreport5.txt

Code: Select all

Warning: Limited functionality due to missing admin rights
=== START OF INFORMATION SECTION ===
Device Model:     WD My Passport 25E1
Serial Number:    WXK1A57HU2YT
Firmware Version: 1019
Device is:        Not in smartctl database
ATA Version is:   [No Information Found]
Local Time is:    Mon Sep 29 17:13:07 2025 MS
SMART support is: Available - device has SMART capability.
                  Enabled status cached by OS, trying SMART RETURN STATUS cmd.
SMART support is: Disabled

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
Read SMART Data failed: Function not implemented


=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Function not implemented
SMART overall-health self-assessment test result: UNKNOWN!
SMART Status, Attributes and Thresholds cannot be read.

SMART Error Log not supported

SMART Self-test Log not supported

Selective Self-tests/Logging not supported

The above only provides legacy SMART information - try 'smartctl -x' for more

smartctl -x -s on -a /dev/hdc > myreport6.txt

Code: Select all

Warning: Limited functionality due to missing admin rights
=== START OF INFORMATION SECTION ===
Device Model:     WD My Passport 25E1
Serial Number:    WXK1A57HU2YT
Firmware Version: 1019
Device is:        Not in smartctl database
ATA Version is:   [No Information Found]
Local Time is:    Mon Sep 29 17:14:53 2025 MS
SMART support is: Available - device has SMART capability.
                  Enabled status cached by OS, trying SMART RETURN STATUS cmd.
SMART support is: Disabled
AAM feature is:   Unavailable
APM feature is:   Unavailable
Rd look-ahead is: Unavailable
Write cache is:   Unavailable
DSN feature is:   Unavailable
ATA Security is:  Unavailable

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
Read SMART Data failed: Function not implemented


=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Function not implemented
SMART overall-health self-assessment test result: UNKNOWN!
SMART Status, Attributes and Thresholds cannot be read.

Read SMART Log Directory failed: Function requires admin rights

General Purpose Log Directory not supported

SMART Extended Comprehensive Error Log (GP Log 0x03) not supported

SMART Error Log not supported

SMART Extended Self-test Log (GP Log 0x07) not supported

SMART Self-test Log not supported

Selective Self-tests/Logging not supported

SCT Commands not supported

Device Statistics (GP/SMART Log 0x04) not supported

Pending Defects log (GP Log 0x0c) not supported

SATA Phy Event Counters (GP Log 0x11) not supported
recuperation wrote: Yesterday, 14:47 Es wäre sinnvoll, die Festplatte unter Linux mit ddrescue zu klonen, wie im Handbuch beschrieben.
Leider habe ich keinen Zugriff auf ein Linux-System. Würde sich hier ein Windows Subsystem für Linux (WSL) anbieten?
Welchen Sinn hat das Klonen, außer ein Backup der korrupten Festplatte zu haben?

recuperation wrote: Yesterday, 14:47 Wenn Testdisk mit der P-Taste nicht in der Lage war, das Wurzelverzeichnis inklusive Inhalt anzuzeigen, sollten Sie irgendeine andere kommerzielle Software zur Datenrettung verwenden - ich gehe davon aus, dass CHKDSK diesen Defekt nicht beheben kann.
Da ich die Dateien über PhotoRec wieder herstellen konnte, benötige ich eigentlich keine andere (kommerzielle) Software, oder?
Oder gehen mit PhotoRec ggf. Daten/Dateien verloren?

recuperation wrote: Yesterday, 14:47 PhotoRec ist das letzte Mittel, wenn alles andere nicht funktioniert, weil Metadaten nicht verfügbar sind. PhotoRec benötigt keine Metadaten. Es versucht, Dateien aufgrund von Fingerabdrücken zu identifizieren.

PhotoRec durchsucht die Festplatte von vorne nach hinten.
Die gefundenen Dateien werden in Anlehnung an ihren Fundort auf der Festplatte benamt und der Reihe nach (nicht zufällig!) in Ordnern abgelegt.
Das heißt, die Dateien sind (mehr oder weniger) sortiert?
Leider besteht trotzdem das Problem, dass alle Dateien umbenannt sind (z. B. f0525168.jpg), weswegen ich gerne den Zugriff auf die Festplatte hätte.
Post Reply