3 ms·
Okay, so what's the best way to image an SD card then? I use the following on a 64gb SD card -- is there a better way? dd if=/dev/sda | gzip > img.gz
by StephenSmith 4y ago
Okay, so what's the best way to image an SD card then? I use the following on a 64gb SD card -- is there a better way?
dd if=/dev/sda | gzip > img.gz
dd if=img.gz | gunzip | dd of=/dev/sda
- infinityio 4y agothis is not the point of the article, but you may want to specify blocksize in those commands? ymmv tho
- sfink 4y agoDo these not work?: gzip < /dev/sda > img.gz gunzip < img.gz > /dev/sda Those should give you better block sizes than default dd without bs=128k or whatever.
- usui 4y agoI would install pv (optional) and do cat /dev/mmcblk0 | pv -abtrN Processed | gzip > img.gz cat img.gz | gunzip | pv -abtrN Processed > /dev/mmcblk0
- bzbarsky 4y agoFor your first command: gzip -c /dev/sda > img.gz For your second command: gunzip -c img.gz > /dev/sda are what I suspect the blog post would recommend.