-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsd_notes.txt
22 lines (17 loc) · 970 Bytes
/
sd_notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Make an image of the SD card
https://stackoverflow.com/questions/19355036/how-to-create-an-img-image-of-a-disc-sd-card-without-including-free-space
$ sudo dd if=/dev/mmcblk0 bs=1M status=progress | gzip > ommatidia_sd_shrunk.img.gz
12269719552 bytes (12 GB, 11 GiB) copied, 807 s, 15.2 MB/s
dd: error reading '/dev/mmcblk0': Input/output error
11701+1 records in
11701+1 records out
12269719552 bytes (12 GB, 11 GiB) copied, 868.477 s, 14.1 MB/s
original partition size was ~10G, reduced to ~7G, but the resulting gzip was 100M larger... (3.8M vs 3.9M, compression ratio is < 1 for both)
Write said image to SD card
$ cat ommatidia_sd_shrunk.img.gz | gunzip | sudo dd of=/dev/mmcblk0 status=progress
gunzip -c /image.img.gz | dd of=/dev/hdb
7968514560 bytes (8.0 GB, 7.4 GiB) copied, 2256 s, 3.5 MB/s
dd: writing to '/dev/mmcblk0': No space left on device
15564801+0 records in
15564800+0 records out
7969177600 bytes (8.0 GB, 7.4 GiB) copied, 2269.9 s, 3.5 MB/s