How to restore deleted files and directories in a NTFS partition

Unix & Linux Asked by elcortegano on January 5, 2022

The other day I deleted by mistake all files in a NTFS basic data partition using rm -rf. This partition is separated from Microsoft reserved partition, and EFI system partition among others, so I can boot my PC normally and select different OS at the GRUB2 menu. However, if I select to boot Windows 8.1 (stored in that partition) nothing happens, and the PC reboots.

I guess that partition table is OK, and I presume that it’s possible to recover all files and the structure of directories they belonged to, so I would be able to restore and use that NTFS partition with Windows.

I think I can achieve this using a debugfs-like tool, but since file system is NTFS it seems to not work (I get Bad magic number in superior-block while opening filesystem error).

I also have read about other tools to recover files in NTFS such as photorec, but for what I’ve seen in some tutorials, it justs recovers files, and does not organise them as they were in their original state.

So the first question is: is it possible to recover not only the deleted files, but the structure of directories they had using Linux from a separated partition/disk? If affirmative, how?

Thank you.

One Answer

No, there is no way to get back the file system structure.

Recovery software typically gets the files from low level information on the hard disk. At that level, the data doesn't have the same structure like the common structure which we see in a file explorer.

Answered by Marvin Velasquez on January 5, 2022

Add your own answers!

Related Questions

Sound on Dell XPS 9570 only works on headphones

1  Asked on November 21, 2021 by josh-holbrook


systemd-resolved browse for mdns services

0  Asked on November 21, 2021 by sila_user


How to switch to a different WiFi channel?

1  Asked on November 21, 2021 by adelegoldberg


Find filenames that contain number

1  Asked on November 21, 2021 by user979974


Same locale, different distrib, inconsistent behavior

0  Asked on November 21, 2021 by ssssteffff


Linux PPTX presentation Viewer

6  Asked on November 19, 2021 by razvan


Ask a Question

Get help from others!

© 2023 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP