I am trying to clone a persistent Lubuntu 16.10 installation on a 16Gb Sandisk USB memory stick to a Sandisk 16Gb Micro SD card. I did this:

dd if=/dev/sdb of=sdimage.img bs=4M
dd if=sdimage.img of=/dev/sdc bs=4M

Where /dev/sdb was the USB memory stick and /dev/sdc was the target Micro SD card. After several hours the job ended with:

dd: error writing /dev/sdc: no space left on device
3799+0 records in
3798+0 records out
15931539456 bytes (16GB, 15 GiB) copied, 10604 s, 1.5 MB/s

So it seems that the real capacity of the Micro SD card is smaller than that of the USB memory stick with the same nominal capacity. Can anyone recommend a way of cloning the O/S from the USB stick to the SD card which will work with the slightly "smaller" SD card?


The best way to do this is to use GParted to shrink the partitions on the sdimage.img file.

  1. Do sudo losetup /dev/loop0 sdimage.img
  2. sudo gparted /dev/loop0 (Install GParted if you haven't already)
  3. Edit the last partition to be slightly smaller.

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.