Hi to all

My computer was running on a windows xp OS with three paritions (Drive C, D and E). In an attemt to install ubuntu on the system, it formatted the whole system. I just dont underatand how this happedned. all important files that i need are in Drive D and E. When i noticed this, i did not install any OS again.
So there is no OS in the machine.

Please i need your help in recovering these files. All my projects are in this machine.

Thanks in advance.

Dani AI

Generated

Brief, practical next steps for the situation described by : stop any writes to the affected disk (no OS installs, no partitioning). Removing the drive and connecting it to a working PC is a safe option (as noted), or boot the machine from a Live USB ("Try Ubuntu") and work from there. Work always onto a separate external disk: first make a full image, then attempt recovery from that image. Imaging preserves the original and keeps professional options open.

Safe workflow (high-level):

  1. Identify the disk from a Live session:
    sudo lsblk -o NAME,SIZE,FSTYPE,MODEL
    sudo fdisk -l
  2. Mount an external drive with enough free space and install recovery utilities:
    sudo apt-get update
    sudo apt-get install gddrescue testdisk
  3. Create a byte-for-byte image (example; replace /dev/sdX and mount point as appropriate):
    sudo ddrescue -f -n /dev/sdX /mnt/external/disk-image.img /mnt/external/disk-image.log
  4. Attempt partition recovery first (preserves filenames/structure) with TestDisk:
    sudo testdisk /mnt/external/disk-image.img

    Follow Analyze -> Quick Search -> Deeper Search; only write a recovered partition table after confirming results.

  5. If partition recovery fails, use PhotoRec (file carving) to extract files to the external disk:
    sudo photorec /mnt/external/disk-image.img

    Note: PhotoRec often recovers file content but not original filenames or hierarchy.

Cautions and context: commercial Windows tools exist (as mentioned), but they should be run against an image or from another system to avoid writes. If the drive shows mechanical failure (clicking, loud noise) or imaging fails repeatedly, stop and consult a professional — further software attempts can make recovery harder. Starting with an image and then trying TestDisk gives the best balance between safety and likelihood of restoring partitions intact.

Recommended Answers

All 5 Replies

The formatting deleted all the partitions.

if you simply formatted drive c, but left D and E intact, then all you need to do is resinstall Windows XP or later on drive C again. Once you have the OS installed and you log in, you will be able to access drive D and E.

Assuming that D & E are formatted NTFS and you had set some type of restrictive permissions....Even if you encounter an permissions issue when trying to access data on those drives, you simply access the properties of the drive, security tab, and take ownership of all files and folders.

If you are concered about making a mistake trying to reinstall the OS and overwritting your data on D & E, you can always take the hard drive out of this computer and connect it to another working PC to get access to those partitions.

Thanks for your quick reply, JorgeM. All the partitions were deleted. Right now, the drive is no longer partitioned. I noticed this when i used an Ubuntu CD, this time i did not intend to install it but just to try it and see whether the partitions were there but there was none. What can i do?

There is a lot of options out there with regards to data recovery. If this is really important to you, you may consider having professionals work with your drive. It may be pricey but if all you did was delete partitions, the data should be recoverable since you haven't overwritten on it.

MiniTool Power Data Recovery This works like a charm!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.