0

There's a laptop I bought about 10 years ago, it arrived with Windows 7 (which I almost never used) and back then I installed Ubuntu in dual-boot (last update was to Ubuntu 16.04). So It had three major partitions: One only for Windows, second only for Ubuntu, and third which both OS's could read and write to (I'm not sure which file system I used for it, back then). The actual number of partitions is actually bigger, since there's also one for Linux Swap, and a couple of Windows/Vendor (Lenovo) recovery and such: sorry for the crappy quality of the "screenshot"

After a few good years, I haven't used this laptop for several years. Recently I opened it - booted into Windows, I could see the shared partition (Called 'Media'). Then I rebooted into Windows again (in order to install some updates), during the boot process it executed ScanDisk (or similar). After that, the Media partition seemed to be wiped!

I already tried using TestDisk (using this guide), but it couldn't list any deleted files. However, I did notice that when TestDisk lists the now-wiped Media partition (partition 7 in the attached screenshot below), just before it - there's another (lost?) partition (highlighted in the screenshot below), which ends in the same sector as partition 7, but starts a few sectors before it. TestDisk's list of partitions result of running 'sudo fdisk -l'

I have a feeling that Windows' ScanDisk made something to the Master File Table (or something similar) of this partition, like reset or perhaps somehow skip/ignore it, if that makes sense. So, can it be that I should shift partition 7 to start where this mysterious X partition starts, and this might recover the whole file system mappings for the Media partition? How can I do that, and what/how should I backup prior to that?

Or if you have any other ideas, that would be highly appreciated as well.

EDIT - in the wiped Media partition, I found a file named 'Chkdsk20220324123958.log' which contains these messages:

One of your disks needs to be checked for consistency. You
may cancel the disk check, but it is strongly recommended
that you continue.
Windows will now check the disk.                         
Unable to query LCN from VCN 0x4 for attribute of type 0x80.
The non resident attribute of type 0x80 is inconsistent.  The valid data
length is 0xb658000, file size 0xb658000, and allocated length 0x4000.
The non resident attribute of type 0x80 is inconsistent.  The valid data
length is 0xb658000, file size 0x4000, and allocated length 0x4000.

CHKDSK is verifying files (stage 1 of 3)... Deleted corrupt attribute list entry with type code 48 in file 0. Unable to find child frs 0x10 with sequence number 0x10. Deleted corrupt attribute list entry with type code 128 in file 0. Unable to find child frs 0x11 with sequence number 0x11. The attributes with same type code 0x80 but different instance tags 0x1 and 0x0 have non-contiguous VCN numbers 0x4 and 0xaa64 respectively in file 0x0. Deleted corrupt attribute list entry with type code 128 in file 0. Unable to locate attribute with instance tag 0x1 and segment reference 0x1000000000000. The expected attribute type is 0x80. Deleting corrupt attribute record (128, "") from file record segment 0. Unable to locate attribute with instance tag 0x0 and segment reference 0xf00000000000f. The expected attribute type is 0x80. Deleting corrupt attribute record (128, "") from file record segment 15. 16 file records processed.

File verification completed. 0 large file records processed.

0 bad file records processed.

0 EA records processed.

Correcting file name errors in system file record segment 0. 0 reparse records processed.

CHKDSK is verifying indexes (stage 2 of 3)... An index entry of index $I30 in file 0x5 points to file 0x25 which is beyond the MFT. Deleting index entry $RECYCLE.BIN in index $I30 of file 5. An index entry of index $I30 in file 0x5 points to file 0x1f1b which is beyond the MFT. Deleting index entry .Trash-1000 in index $I30 of file 5. An index entry of index $I30 in file 0x5 points to file 0xd9b8 which is beyond the MFT. ( !! ... and it goes on and on for what seems to be almost every folder in that partition... !! ) Index entry $Quota of index $I30 in file 0xb points to unused file 0x18. Deleting index entry $Quota in index $I30 of file 11. 22 index entries processed.

Index entry $Reparse of index $I30 in file 0xb points to unused file 0x1a. Deleting index entry $Reparse in index $I30 of file 11. Index entry $RmMetadata of index $I30 in file 0xb points to unused file 0x1b. Deleting index entry $RmMetadata in index $I30 of file 11. Index entry $UsnJrnl of index $I30 in file 0xb points to unused file 0x28. Deleting index entry $UsnJrnl in index $I30 of file 11. Index verification completed. CHKDSK is scanning unindexed files for reconnect to their original directory. 1 unindexed files scanned.

CHKDSK is recovering remaining unindexed files. 1 unindexed files recovered.

Creating object id file. Inserting an index entry into index $I30 of file 11. Creating index $O for file 18. The object id in file 0x3 does not appear in the object id index in file 0x12. Inserting an index entry into index $O of file 18. Creating reparse point file. Inserting an index entry into index $I30 of file 11. Creating index $R for file 19. Creating quota file. Inserting an index entry into index $I30 of file 11. Creating index $O for file 20. Creating index $Q for file 20. Inserting default quota record into index $Q in file 20. CHKDSK is verifying security descriptors (stage 3 of 3)... 24 file SDs/SIDs processed.

Cleaning up 21 unused index entries from index $SII of file 0x9. Cleaning up 21 unused index entries from index $SDH of file 0x9. Cleaning up 21 unused security descriptors. Security descriptor verification completed. Inserting data attribute into file 0. Inserting data attribute into file 15. 5 data files processed.

The MFT mirror is different from the MFT. Correcting errors in the Master File Table (MFT) mirror. Correcting errors in the master file table's (MFT) DATA attribute. Correcting errors in the master file table's (MFT) BITMAP attribute. CHKDSK discovered free space marked as allocated in the volume bitmap. Windows has made corrections to the file system.

84165628 KB total disk space. 16 KB in 9 indexes. 0 KB in bad sectors. 68552 KB in use by the system. 65536 KB occupied by the log file. 84097060 KB available on disk.

  4096 bytes in each allocation unit.

21041407 total allocation units on disk. 21024265 allocation units available on disk.

  • Windows in BIOS/MBR mode which your Windows 7 would be is known not to recognize Linux partitions in an extended partition. Typically it just is the partition table entry missing & data is still there. Your testdisk will find all the old versions of partitioning you may have done. You can only have one extended partition. Primary partitions are 1 thru 4.http://ubuntuforums.org/showthread.php?t=2288988 & http://ubuntuforums.org/showthread.php?t=2290190 & https://askubuntu.com/questions/665445/upgraded-to-windows-10-on-dual-boot-and-cant-boot-to-ubuntu-partition – oldfred Mar 26 '22 at 16:50
  • @oldfred Thanks! But I'm not sure that I fully understood.. The link you posted here are all about the Linux/Ubuntu main partition gone or mis-referenced which makes it non-bootable. Here I have a problem with another partition, do you mean that it originates from the same reason? Also, not sure what it means about "you can only have one extended partition".. what should I actually do at the current state? – Yoav Feuerstein Mar 26 '22 at 18:00
  • The issue with testdisk is that it shows all the old versions. So if you changed partitions multiple times, you have to carefully select the correct combination of partitions to restore. Or if only one partition to restore thee correct size that is inside the one extended partition that has your other logical partitions and has correct start & end sectors. – oldfred Mar 26 '22 at 18:38

0 Answers0