Q.Explore possible ways of recovering deleted data or data from a corrupted device.
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →Data recovery methods range from software-based techniques (file-system scans, carving) to hardware interventions (platter imaging, chip-off forensics), chosen based on the type of failure—logical corruption or physical damage.
Why data recovery is possible
When you delete a file or a storage device becomes corrupted, the actual data often remains physically intact on the disk. Modern file systems mark deleted files by removing their directory entries and flagging their storage blocks as "available," but the underlying bits persist until overwritten. Similarly, corruption may damage metadata (partition tables, file-allocation tables, journals) while leaving user data untouched. Recovery exploits this gap between logical deletion and physical erasure.
The method you choose depends on two factors: the nature of the failure (logical vs. physical) and the storage medium (HDD, SSD, flash memory).
1. Software-based recovery (logical failures)
File-system scan and undelete
Most operating systems maintain a directory structure that points to data blocks. Deletion removes the pointer, not the data. Recovery tools scan the file-system metadata to reconstruct these pointers.
How it works:
- The tool reads the Master File Table (NTFS), inode table (ext4), or File Allocation Table (FAT).
- It identifies entries marked as deleted but whose data blocks are still allocated.
- It rebuilds the directory tree and restores the file.
Tools: Recuva (Windows), TestDisk (cross-platform), Disk Drill, PhotoRec.
This method fails if the storage blocks have been overwritten. Avoid writing new data to the affected drive immediately after deletion.
File carving (signature-based recovery)
When metadata is destroyed (formatted drive, corrupted partition table), file carving scans the raw disk for known file signatures—magic bytes that mark the start and end of specific file types.
Example signatures:
| File type | Header (hex) | Footer (hex) |
|---|---|---|
| JPEG | FF D8 FF | FF D9 |
| PNG | 89 50 4E 47 | 49 45 4E 44 AE 42 60 82 |
25 50 44 46 | 25 25 45 4F 46 | |
| ZIP | 50 4B 03 04 | 50 4B 05 06 |
The tool reads the disk sector-by-sector, identifies these patterns, and extracts the intervening bytes as a file. File names and directory structure are lost, but content is recovered.
Tools: PhotoRec, Foremost, Scalpel.
Carving works best for media files (photos, videos) because they have well-defined headers and are often stored contiguously.
Partition recovery
A corrupted or deleted partition table makes an entire volume invisible to the OS, but the data remains. Partition-recovery tools scan for remnants of partition boundaries (boot sectors, superblocks) and rebuild the table.
Tools: TestDisk, EaseUS Partition Master, MiniTool Partition Wizard.
2. Hardware-based recovery (physical failures)
Disk imaging
Before attempting any recovery on a failing drive, create a bit-for-bit image of the entire disk. This ensures you work on a copy, preserving the original in case of further degradation.
# Using dd (Linux/macOS)
sudo dd if=/dev/sda of=/path/to/image.img bs=4M status=progress
# Using ddrescue (handles bad sectors gracefully)
sudo ddrescue -d -r3 /dev/sda /path/to/image.img /path/to/logfile
All subsequent recovery operations run on the image file, not the physical disk.
Platter transplant and clean-room recovery
For mechanical hard drives with motor failure, head crashes, or controller-board damage, data recovery requires opening the drive in a Class 100 clean room (fewer than 100 particles ≥0.5 µm per cubic foot) to prevent dust contamination.
Procedure:
- Swap the failed controller board with a matching donor (same model, firmware revision).
- If platters are intact, transplant them into a working drive chassis.
- Use specialized hardware (PC-3000, DeepSpar Disk Imager) to read sectors directly, bypassing the drive's firmware.
Never open a hard drive outside a clean room. A single dust particle can cause a head crash and permanent data loss.
Chip-off forensics (flash memory)
SSDs and USB drives store data in NAND flash chips. If the controller fails but the chips are intact, you can desolder the chips and read them directly using a NAND reader.
Steps:
- Heat the chip with a hot-air rework station to melt the solder.
- Remove the chip and place it in a NAND reader (e.g., PC-3000 Flash, Rusolut Visual NAND Reconstructor).
- Dump the raw flash contents.
- Reconstruct the logical data by reverse-engineering the controller's error-correction codes (ECC) and wear-leveling algorithms.
This is highly specialized and typically performed by forensic labs.
3. Cloud and RAID recovery
Cloud backup restoration
If the device synced with a cloud service (Google Drive, iCloud, OneDrive, Dropbox), deleted files often reside in a trash folder for 30–90 days.
Steps:
- Log into the cloud account via a web browser.
- Navigate to "Trash" or "Deleted Items."
- Select files and click "Restore."
RAID array reconstruction …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.