I made a full disk image with 'DD' of a 64GB usb. Of course, there were some free space.

I moved/copied pasted the file created with the 'graphical interface'.

Now the file is only 50GB (I guess it didn't copy the free space)

I tried to mount it with 'kpartx' and 'losetup' and I see an error saying the disk is smaller than expected.

I guess this is because of the copy-paste made by the graphical interface.

Am I true ? I am just trying to add some zeros at the end in order to extent to more than the real size because now, I cannot access to my files because I cannot mount the partition.

Thank you.

  • Which software do you mean exactly by "DD with the graphical interface"? – lemonslice Sep 25 '16 at 9:19
  • The whole disk image is made with 'dd' but I copied this one with the grapgical interface (copy... paste) of XUbuntu. – Alexis_FR_JP Sep 25 '16 at 9:32
  • If you right-click/copy, the file will be copied to the clipboard first. That is some space in your physical memory. The file is really big, maybe bigger than your free RAM so that could be the problem. I am not sure for this, but it might be the right direction... – mook765 Sep 25 '16 at 14:18

There are several possibilities.

No.1: The data inside of the RAM hasn't completely synced to ur hard drive yet, so system might be reading a corrupted image, thus prompt error. To avoid that, always run the "sync" command with root permission (normal user might work as well but just in case) after cloning the image with "dd", wait till it finishes (it'll just throw the command prompt back to u after it's done), then unmount the USB drive properly.

No.2: U've got a bad USB stick! This usually happens with cheap USB sticks that u can find on eBay, and they've modified the firmware on ur USB stick to trick the computer to show a number of storage that is larger than it actually is, but data that exceeds the actual storage will just overwrite previous data, thus cause corrupted files. So make sure u get ur USB stick from proper retailers.

No.3: Try other imaging solutions! In terms of backing up ur data, dd is probably the least effective solution. Try Clonezilla for example at HERE. There are way more options in Clonezilla that u can choose from, plus it only backs up the data part, throws the empty bytes away completely, and u can choose to apply compression on top of it.

Hope it'll help u out.

  • 1. I thought everything were finished, I will do a test by copying the file with dd and with interface. 2. It is an Sandisk Extreme at >60$. Very fast and didnt have any problem with this. 3. I want bit cloning with the partition table. 4. I extended the file with dd /dev/zero and I could mount it without any problem now. The interface copy in a weird way make a file smaller than it really is. – Alexis_FR_JP Sep 25 '16 at 9:58

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.