1

I have a pi with a 32g sd.

michael@pi3:/ $ df
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/root       29804860 1773224  26791008   7% /
devtmpfs          468152       0    468152   0% /dev
tmpfs             472760       0    472760   0% /dev/shm
tmpfs             472760    6280    466480   2% /run
tmpfs               5120       4      5116   1% /run/lock
tmpfs             472760       0    472760   0% /sys/fs/cgroup
/dev/mmcblk0p1     64456   22208     42248  35% /boot
michael@pi3:/ $

Plugged the sd into a reader, and copied it.

[Michael@devserver ~]$  sudo dd bs=4M if=/dev/sdf of=greenbean_pi2.img
7416+0 records in
7416+0 records out
31104958464 bytes (31 GB) copied, 1615.61 s, 19.3 MB/s
[Michael@devserver ~]$

Not only did it take a million years, it was too large to place on a 16g sd.

How should I have done this so: 1) I only copy used space? 2) It can be copied to other media which is larger than the used space?

  • Is there any reason not to use compression (e.g. gzip)? – J.J. Hakala Jun 4 '17 at 1:17
  • 1
    @J.J.Hakala No, but I didn't this this was relevant as we are dealing with partition sizes. – user1032531 Jun 4 '17 at 2:34

Your Answer

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

Browse other questions tagged or ask your own question.