Two out of three partitions inaccessible after move/resize

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
wsteen
Posts: 5
Joined: 24 Jan 2024, 00:46

Two out of three partitions inaccessible after move/resize

#1 Post by wsteen »

Thanks in advance for any help!

Iirc (edit: If I remember correctly), this is what I did:
* I have a 256 GB SSD on which I have three partitions C/D/E, to which I had assigned 50/25/25% of the space. All three were BitLocker-encrypted.
* I was running out of space on C so decided to change the proportions to 60/20/20% with AOMEI Partition Assistant SE. I used this tool before with no problems.
* First I resized E and moved it to the back.
* After completing successfully, I noticed that it was not completely at the back after all (probably because I was playing around with the size) and moved it to the back once more
* Then I did the same for D
* Only then I noticed that the BitLocker re-encryption for E had failed earlier, and that it failed for D now as well, and that both partitions are inaccessible in Explorer. Unfortunately I forgot to make a screenshot of the BitLocker-error and can't remember them either, or find them with Google.
* During the process I was so confident, I didn't really bother to check in Explorer if all went well at any point :stupid in hindsight:, so I can't tell if things were fine at any point

In AOMEI Partition Assistant SE all looks good and the correct configuration is shown, however Windows itself classifies the file system of both partitions as RAW.
I ran diskpart, chkdsk and TestDisk (Analyze > Quick Search / Boot); some of the output can be seen below.
I can post screenshots (and explain things a bit better maybe) and full log, but I think the moderator / you has to allow me to attach files?
Let me know if I can provide any more details.

Code: Select all

C:\Windows\System32>diskpart

Microsoft DiskPart version 10.0.22621.1

Copyright (C) Microsoft Corporation.
On computer: 

DISKPART> list volume

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     C   OS           NTFS   Partition    118 GB  Healthy    Boot
  Volume 1     D                RAW    Partition     47 GB  Healthy
  Volume 2     E                RAW    Partition     47 GB  Healthy
  Volume 3         SYSTEM       FAT32  Partition    260 MB  Healthy    System
  Volume 4         Recovery     NTFS   Partition    990 MB  Healthy    Hidden

DISKPART> select volume 1

Volume 1 is the selected volume.

DISKPART> attributes volume
Read-only              : No
Hidden                 : No
No Default Drive Letter: No
Shadow Copy            : No

DISKPART> attributes disk
Current Read-only State : No
Read-only  : No
Boot Disk  : Yes
Pagefile Disk  : Yes
Hibernation File Disk  : No
Crashdump Disk  : Yes
Clustered Disk  : No

DISKPART> exit

Leaving DiskPart...

Code: Select all

C:\Windows\System32>chkdsk d: /r /f /x
The type of the file system is NTFS.
Windows cannot run disk checking on this volume because it is write protected.

Code: Select all

Wed Jan 24 00:24:59 2024
Command line: TestDisk

TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org
OS: Windows 8 (9200)
Compiler: GCC 6.4, Cygwin 2009.0
ext2fs lib: 1.43.1, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: 20140608, curses lib: ncurses 6.0
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(/dev/sda)=256060514304
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\PhysicalDrive0)=256060514304
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\C:)=127365890048
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\D:)=50947387392
disk_get_size_win32 IOCTL_DISK_GET_LENGTH_INFO(\\.\E:)=50952871936
Hard disk list
Disk /dev/sda - 256 GB / 238 GiB - CHS 31130 255 63, sector size=512 - SAMSUNG MZVLQ256HBJD-00BH1, S/N:0025_38D7_2187_8EA9., FW:HPS1NFAV

Partition table type (auto): EFI GPT
Disk /dev/sda - 256 GB / 238 GiB - SAMSUNG MZVLQ256HBJD-00BH1
Partition table type: EFI GPT

Interface Advanced
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=500118191 (expected 500118191)
hdr_lba_start=34
hdr_lba_end=500118158
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 2 P MS Reserved               534528     567295      32768 [Microsoft reserved partition]
check_part_gpt failed for partition
 3 P MS Data                   567296  249328799  248761504 [Basic data partition]
 1 P EFI System                  2048     534527     532480 [EFI system partition]
 2 P MS Reserved               534528     567295      32768 [Microsoft reserved partition]
 3 P MS Data                   567296  249328799  248761504 [Basic data partition]
 4 P MS Data                299066040  398572655   99506616 [Basic data partition] [Database]
     NTFS, blocksize=4096, 50 GB / 47 GiB
 5 P MS Data                398572656  498089983   99517328 [Basic data partition] [Data]
     NTFS, blocksize=4096, 50 GB / 47 GiB
 6 P Windows Recovery Env   498089984  500117503    2027520

ntfs_boot_sector
 4 P MS Data                299066040  398572655   99506616 [Basic data partition] [Database]
     NTFS, blocksize=4096, 50 GB / 47 GiB
NTFS at 18616/0/1
filesystem size           99506616 16933922436614835058
sectors_per_cluster       8 13
mft_lcn                   3 9872243876354228446
mftmirr_lcn               639 15804003069625894848
clusters_per_mft_record   -10 -21
clusters_per_index_record 1 -92
Boot sector
Status: OK

Backup boot sector
Status: Bad

Sectors are not identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.
copy original boot sector over backup boot
file_pwrite(4,1,buffer,398572655(24810/0/6)) write err File truncated
Write error: Can't overwrite NTFS backup boot sector

Analyse Disk /dev/sda - 256 GB / 238 GiB - CHS 31130 255 63
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=500118191 (expected 500118191)
hdr_lba_start=34
hdr_lba_end=500118158
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 2 P MS Reserved               534528     567295      32768 [Microsoft reserved partition]
check_part_gpt failed for partition
 3 P MS Data                   567296  249328799  248761504 [Basic data partition]
Current partition structure:
 1 P EFI System                  2048     534527     532480 [EFI system partition]
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
 2 P MS Reserved               534528     567295      32768 [Microsoft reserved partition]
 2 P MS Reserved               534528     567295      32768 [Microsoft reserved partition]
No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker
 3 P MS Data                   567296  249328799  248761504 [Basic data partition]
 3 P MS Data                   567296  249328799  248761504 [Basic data partition]
 4 P MS Data                299066040  398572655   99506616 [Basic data partition] [Database]
 5 P MS Data                398572656  498089983   99517328 [Basic data partition] [Data]
 6 P Windows Recovery Env   498089984  500117503    2027520
Last edited by wsteen on 24 Jan 2024, 15:04, edited 1 time in total.

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

Re: Two out of three partitions inaccessible after move/resize

#2 Post by recuperation »

wsteen wrote: 24 Jan 2024, 11:45 Thanks in advance for any help!

Iirc, this is what I did:
"lirc" is not in my dictionary. Please refrain from using abbreviations, gamer lingo and the like so that I can understand you.

Your posting is missing the main question.
You should be able to upload pictures to this site now.

Please post your testdisk logfile.

Please post your smartmontools log file as well:
viewtopic.php?f=5&t=10910

wsteen
Posts: 5
Joined: 24 Jan 2024, 00:46

Re: Two out of three partitions inaccessible after move/resize

#3 Post by wsteen »

My main question is: can I fix the extra partitions (easily) "in-place", so without deleting them and copying all the data back onto them? For the record, the main partition and the OS are working just fine.

I could only use three attachments, so posted some as code after all. I will post the two logs you asked for in a new post.

This is the configuration in Partition Assistant. PA shows all partitions as working correctly. The file system, total space, used space are as I would expect them to be. (The unallocated space should be added to C, but I did not do this yet.)
Partition Assistant Details
Partition Assistant Details
02_PA_Details.jpg (482.08 KiB) Viewed 1149 times

These are some of the things I already tried/checked with TestDisk:

TestDisk > Analyze > Quick Search
In the first screen TestDisk says: "The harddisk (256 GB / 238 GiB) seems too small!"

Code: Select all

Disk /dev/sda - 256 GB / 238 GiB - CHS 31130 255 63
Check the harddisk size: HD jumper settings, BIOS detection...
The harddisk (256 GB / 238 GiB) seems too small! (< 318 GB / 296 GiB)
The following partitions can't be recovered:
     MS Data                498079258  622453812  124374555
     NTFS, blocksize=4096, 63 GB / 59 GiB
     MS Data                498079265  597585874   99506610
     NTFS, blocksize=4096, 50 GB / 47 GiB
     MS Data                498089983  597607310   99517328
     NTFS, blocksize=4096, 50 GB / 47 GiB

TestDisk > Analyze > Quick Search > Continue
The files in the partitions with a checkmark can be listed. For the partitions without a checkmark TestDisk says: "Can't open filesystem. Filesystem seems damaged."
This makes sense; the damaged file systems are old/obsolete. Probably because I moved/resized E twice it is shown three times here, two of which are fine.
However, the main partition C is not listed at all.
TestDisk &gt; Analyze &gt; Quick Search &gt; Continue
TestDisk > Analyze > Quick Search > Continue
06_TestDisk_Analyze_Step02.jpg (162.07 KiB) Viewed 1149 times

TestDisk > Boot
This screenshot also shows the configuration as I would expect it to be
TestDisk &gt; Boot
TestDisk > Boot
10_TestDisk_Boot_Step01.jpg (115.33 KiB) Viewed 1149 times

TestDisk > Boot > Volume 4
When I try to copy the boot sector over the backup sector TestDisk says: "Write error: Can't overwrite NTFS backup boot sector".

Code: Select all

Boot sector
Status: OK

Backup boot sector
Status: Bad

Sectors are not identical.
TestDisk > Boot > Volume 5

Code: Select all

Boot sector
Status: OK

Backup boot sector
Status: OK

Sectors are identical.

wsteen
Posts: 5
Joined: 24 Jan 2024, 00:46

Re: Two out of three partitions inaccessible after move/resize

#4 Post by wsteen »

testdisk_20240124.log
(99.18 KiB) Downloaded 53 times
smartmontools.txt
(3.19 KiB) Downloaded 54 times

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

Re: Two out of three partitions inaccessible after move/resize

#5 Post by recuperation »

In-place repair can only be done in certain scenarios which do not seem to apply here.
Use TestDisk to recover your data to a different location.

As for your database partition, TestDisk considers the boot sector as good, I pretend it is bad. The backup boot sector is already considered as bad (or maybe unreadable).

Could you download the most recent version of TestDisk, version 7.2-WIP, and rerun TestDisk again and post the log file?

What does the support of AOMEI Partition Assistant SE say?

As for your NVME device I noticed the following counter:
"Unsafe Shutdowns: 58"
That tells me that you might try to shutdown your machine in a different way.
Apart from a temperature warning (Is there sufficient cooling?) I did not see anything special but as this is the first NVME log I see, I might be wrong.
Maybe a Samsung tool (Magician?) could provide more information.

wsteen
Posts: 5
Joined: 24 Jan 2024, 00:46

Re: Two out of three partitions inaccessible after move/resize

#6 Post by wsteen »

Thanks for your help so far.

Recovering the data was/is so easy. Any tool can see the files and classifies them as existing (as opposed to lost). That's why fixing the issue seems so trivial, but apparently it is not :oops:

I had not reached out to the support of AOMEI Partition Assistant SE. I just did.

Are there any specific steps in TeskDisk 7.2-WIP you would like me to run?

I did a Google search for unsafe shutdowns and apparently false positives are a common thing and nothing to worry about. I also would have no idea what could cause them.

Oh, for completeness, the error BitLocker gave me was: "The parameter is incorrect"

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

Re: Two out of three partitions inaccessible after move/resize

#7 Post by recuperation »

Here is the standard procedure for lost partitions:

https://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

wsteen
Posts: 5
Joined: 24 Jan 2024, 00:46

Re: Two out of three partitions inaccessible after move/resize

#8 Post by wsteen »

Ah, yeah, I saw it before and followed it. Will do again. It's doing the Quick Search now.

In the meantime I can already post this screenshot (of which the info was already in the log file, but that I did not point out specifically before)
From the example in the guide: "The first partition is listed twice which points to a corrupted partition or an invalid partition table entry."
In my case it's actually two partitions ([2] MS reserved partition and [3] C) and those are the ones that are actually working, while [4] D and [5] E are not.
16_TestDisk_Analyze_Step00.jpg
16_TestDisk_Analyze_Step00.jpg (168.51 KiB) Viewed 1065 times

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

Re: Two out of three partitions inaccessible after move/resize

#9 Post by cgrenier »

It's better to use TestDisk 7.2-WIP than 7.1.
Try TestDisk, Advanced, select the partition Data, List and copy the directory you want to recover on another disk.
Do the same with the partition Data.
Once you have verified that all recovered data is correct and that nothing is missing, run "cmd" (right click run as administrator" and "chkdsk /d e:" (replace e: by the correct drive letter)
Do that for both partitions. If it doesn't work, reformat the partition and restore the data from the copy you have done on the other disk.

Post Reply