Saturday, May 12, 2018

partitioning - Ubuntu Live CD does not recognize a Windows partition with data on it



OK, in my desktop I have 2 HDD each one with several partitions.
In windows I've renamed the partition of one drive that I've wanted to delete to make a clean Ubuntu 14.04 install. To make sure that I wouldn't loose precious data, I've removed the other HDD.



When I've booted from CD I wanted to make sure, again, that I wouldn't lose data, so I've entered the "Try Ubuntu". I've did a quick format of the partition renamed in windows (actually by it's size) and being paranoid of not loosing data I've checked again if the other partition is still there. Well, it's not!



Please, can anyone help me recover the data?




Unfortunately it seems you accidentally partitioned your whole drive replacing your Windows partitions with a single Ubuntu partition.




You will not be able to recover these partitions by restoring Vista with the recovery CD. In fact every write attempt to your hard drive will make things worse as remnants of your data may get more and more overwritten.



Encrypted partitions can not be recovered




You may however be able to recover your partitions with testdisk Install testdisk but you may not be able to recover all of your data. You can temporarily install testdisk on a live session too (however this will then not be a permanent installation).





  • Please have an external drive ready to save your recovered data before you proceed. You can't recover the data on the same drive.


  • Install testdisk from a live session ("Try Ubuntu") by:




    1. Adding the "Universe" repository to your software sources



      enter image description here


    2. Updating your apt cache in a terminal with




      sudo apt-get update


    3. browsing to above link, or by typing



      sudo apt-get install testdisk


      in a terminal.



  • Mount your external backup drive in the live session (e.g. with Nautilus) to be able to store recovered data later.



  • Follow the concise step by step guide on the Testdisk Wiki which will help you to recover lost partitions.


  • If you are not able to recover from an image of your overwritten drive (this will need an external drive with more than double the free space than your laptop's hard drive) you need to save all your data on an external drive soon after recovery.


  • You will not be able to recover your Windows installation, as this was overwritten by Ubuntu.


  • Only if you fail to recover partitions you may be able to recover single data file using PhotoRec from the TestDisk suite but this will not recover filenames, folder structures or time stamps of your files.


  • Do not use the drive before you were able to recover your lost data.







Copy data from the live system to an external drive




To be able to save our data to an external drive we need to mount both, the recovered partitions, and the external USB drive in the live environment. The below picture shows how the USB drive will be mounted on insertion (the internal partitions will be mounted on selecting them):



enter image description here



We can then copy & paste (or drag & drop) our rescued files from the internal drive to the external drive (e.g. by opening a separate Nautilus window, or in releases < 13.04 by adding an extra pane with F3 ). From the command line we can issue:



copy -a //* /media/ubuntu/



After sucessful copy we need to unmount the drives to avoid data loss. This will be done in Nautilus from a right click context menu or on the command line:



sudo umount /media/ubuntu/





Copy single files using testdisk



In case we were unable or did not want to recover the partition table we may try to copy selected files or directories with testdisk from the Filesystem Utils menu:




enter image description here



In above example I had selected examples.desktop and rsynctest folder by pressing : . To copy these files we press C for the next menu giving the file hierarchy of our running system. We have to browse to the mountpoint of our external drive (here /media/23GB_USB but this will probably be /media/ubuntu/ in your case). The content of our USB is now listed, and can be browsed for deeper directories:



enter image description here



When we press C in the example above our above selected example.desktop, and the folder rsynctest will be copied to the external USB drive.



To verify we had succeeded we can now open Nautilus in our live system and see the content of the rescued files. After we are done, do not forget to unmount the USB drive.



No comments:

Post a Comment

11.10 - Can&#39;t boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...