11

Yesterday I installed Ubuntu on my laptop, and due to my bad luck, I accidentally deleted the partition. The data on the disk was very important to me. I tried TestDisk to recover partition but that didn't work for me.

Someone suggested to try software on Windows. But if I install Windows on my laptop then it will overwrite the data, so I'm planning to clone the hard drive by using the 'dd' commands and use that external hard drive to recover data on Windows.

Will it work ?

6
  • Did you only delete the partition or also overwrite it (eg. creating a new partition there)? If the former, it should be relatively easy to create a new partition at exactly the same boundaries, and not having overwritten the contents, all the data would be there. – Ángel Jun 29 '16 at 21:42
  • 1
    Actually while installing ubuntu, I chose the 2nd option ( replace windows with Ubuntu). Their was a warning also that it will delete all images and videos but I thought it would only format the drive in which windows is installed. But Ubuntu formated the data and made a single partition. – Danizen Jun 30 '16 at 0:35
  • If you are trying to do data recovery, generally you won't do that with Windows. Since you said you formatted the computer while installing Ubuntu, I assume you pruned Windows. Therefore you should have a look at NTFS recovery. See askubuntu.com/a/776317/271 for instructions or softwarerecs.stackexchange.com/a/31377/19806 for more guidance and comparison of several tools. – Andrea Lazzarotto Jun 30 '16 at 10:34
  • Regarding your question about dd, see also: superuser.com/a/1076597/278831 – Andrea Lazzarotto Jun 30 '16 at 10:35
  • Can you confirm weather this dd command is correct or not.. "sudo dd if=/dev/sda1 of=/dev/sdb1" (I want to clone sda1 on sdb)...as in this link softwarerecs.stackexchange.com/questions/7424/… command are different for cloning. – Danizen Jun 30 '16 at 16:16
15

Yes, dd clones every bit on the drive, including deleted files and free space.

You could also look into CloneZilla, which is a user-friendly LiveCD for cloning and restoring disks, though I'm not sure its disk-image format would be compatible with your Windows software. http://clonezilla.org/

13
  • 6
    Note that Clonezilla will not clone free space (deleted files). And indeed - Clonezilla images can only be restored with Clonezilla, and aren't compatible with anything else. Also note that images of Ext4 partitions (whatever way they were made) are not compatible with most Windows file recovery apps. – JonasCz Jun 29 '16 at 20:13
  • 2
    @JonasCz Clonezilla does allow you to use dd to clone drives, which would in turn clone the deleted files. However, by default Clonezilla does what you state, which is to not clone the free space. – chue x Jun 30 '16 at 0:18
  • So should I go for clonezilla or just do it with terminal ? – Danizen Jun 30 '16 at 1:17
  • Either way should work; if you're comfortable using dd it might be simpler. However, before you do any of this, you might want to check if the Windows disk recovery software supports ext3/ext4 filesystems – Nick Weinberg Jun 30 '16 at 1:22
  • Can you suggest any windows recovery software ? – Danizen Jun 30 '16 at 2:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.