1

I recently deleted the Windows 10 from my HP Pavilion Laptop and installed Ubuntu 16.04.1 LTS using a pen drive. In another pen drive, I stored all the important data of Windows 10. But after installing Ubuntu, when I connected the USB to the port on my Laptop. It wasn't showing anything but the following window popped up.

Complete image of "Sorry, This location could not be displayed".

When I connected that pen-drive in another Ubuntu Laptop, I observed that many folders were converted into the binary files. However, I wasn't able to cut and paste those folders from pen drive to my desktop but was successful in copying a few of the folders. What should I do to get back my important data from USB?

  • Did you verify the backup before deleting the data? Try in another Windows machine, but it seems that the USB drive is busted --- they fail quite often, unfortunately. – Rmano Dec 19 '16 at 8:53
  • @Rmano Sorry, but I don't understand what you mean by "verify the backup" here. – TheHungryCoder Dec 19 '16 at 8:54
  • Yes --- after copying your data to the USB, before deleting it, have you re-plugged the USB and checked that all was ok? If the backup drive fails also on Windows, you should consider trying to recover it --- but given that it was made in Windows it would be better to try to recover it on the same operating system, to maximize chances. – Rmano Dec 19 '16 at 8:55
  • @Rmano, yes I verified the data and it was working fine on Windows. But there is no Windows OS in my locality and everyone has an Ubuntu desktop. Now, what should I do? – TheHungryCoder Dec 19 '16 at 9:04
  • Depending on the importance of the data, I would probably reinstall (maybe in a virtual machine) a windows OS and recover it. It's the less risky path. I also would follow the advice in @sudodus' answer and clone the backup disk right now. – Rmano Dec 19 '16 at 9:07
2

Overview

The data are important. This means that you should not mount this drive (only connect it). Then you should clone it to a drive of at least the same size, and do the recovery work on the cloned copy. This method will reduce the risk (that the recovery attempts will destroy data, than are possible to recover).

There are several helpful pages and several tools available via the internet. I wrote the following short page with tips and links to tools, that have worked for me.

Repair the partition table and file system of a pendrive

Details about cloning

Clone a drive to another drive of at least the same size. The drives are represented as block devices.

1. According to example 1 in 'info ddrescue'

Boot from a 'third' drive, for example the internal drive or another USB boot drive with linux.

Install ddrescue

sudo apt-get install gddrescue

It is a two-step procedure, where the second step is only necessary when there are 'difficult' or bad blocks on the source device (the USB drive)

sudo ddrescue -f -n source-device target-device log-file
sudo ddrescue -d -f -r3 source-device target-device log-file

for example

sudo ddrescue -f -n /dev/sdd /dev/sde log-file
sudo ddrescue -d -f -r3 /dev/sdd /dev/sde log-file

but check very carefully and modify the device letters to your particular case.

2. mkusb

If you find this too difficult or risky, we can hope that there are no bad blocks in the source device. Then it is possible to do this with mkusb. It will help you select the target device in order to avoid writing to the wrong one and overwrite valuable data.

Install mkusb:

If you run standard Ubuntu, you need an extra instruction to get the repository Universe. (Kubuntu, Lubuntu ... Xubuntu have the repository Universe activated automatically.)

sudo add-apt-repository universe  # only for standard Ubuntu

sudo add-apt-repository ppa:mkusb/ppa  # and press Enter
sudo apt-get update
sudo apt-get install mkusb mkusb-nox usb-pack-efi

Run mkusb like this:

sudo -H mkusb source-device

To match the example above we assume

sudo -H mkusb /dev/sdd

and mkusb will display information about all devices and later the possible target devices to let you select it via a menu, where additional data is displayed.

01-clone-a-device-overview

mkusb will filter the devices, and only show what are suitable target devices with numbers to help you select the correct one, in this example a Sandisk Extreme pendrive at /dev/sde

02-select-target-device

03-final-checkpoint

04-progress.png

05-work-done

Check in the terminal window, that the whole device was read and all data written (cloned)!

...
99
100
1962864+0 records in
1962864+0 records out
8039890944 bytes (8,0 GB, 7,5 GiB) copied, 440,371 s, 18,3 MB/s
Done
do_n_show: Work done
---------------------------------------------------------------------------
Syncing the device ...
Done :-)
Cleanup after mkusb finished :-)
---------------------------------------------------------------------------
Total time used [by mkusb] = 886 s; 00:14:46

(In this case there was extra total time because I made screenshots.)

  • +1 for the suggestion of cloning the drive. Also look at askubuntu.com/questions/3883/how-to-recover-deleted-files and linked pages from there – Rmano Dec 19 '16 at 8:58
  • @sudodus, thanks for your suggestion. But since, I'm a newbie in Linux, I'm finding your method way too much difficult. Is there any other (easy) method, which can help me to fix my issue? – TheHungryCoder Dec 19 '16 at 9:53
  • What is too difficult? To clone the drive - or the tools to repair the file system and recover your files? Please tell me, and I will try to explain. Is there someone nearby, who can help you 'hands on'? – sudodus Dec 19 '16 at 10:00
  • @DG4 if it is the cloning then you might want to consider Clonezilla, it is easy, well documented, and understandable: clonezilla.org/screenshots/?in_path=/00_Clonezilla – Never.too.old.to.learn Dec 19 '16 at 10:05
  • I am afraid, that Clonezilla is not the best tool, when the drive is corrupted, because it depends on the file system (at least in the standard mode). But there are ways to make the cloning easier than with ddrescue, at least when the drive is physically OK, that the memory cells and the internal programs of the pendrive work. It is possible to use mkusb in linux, and I think Win32 Disk Imager can do it in Windows. – sudodus Dec 19 '16 at 10:44

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.