I am trying to make a copy of my SD-Card so I can move it to my 64GB SD-Card. I have done this with the SD-Card of a Raspberry Pi, no problems there.
The SD-Card consists of two partitions: BOOT(fat32) and linux(ext4)
I have tried to make an image of the whole SD-Card using:
sudo dd of=Images/orangepi.img if=/dev/sdd bs=1M status=progress
And putting it back on a SD-Card:
sudo dd if=Images/orangepi.img of=/dev/sdd bs=1M status=progress
I could not mount the image since it consisted of 2 partitions. So I imaged BOOT and linux separately using:
sudo dd of=linux.img if=/dev/sdd2 bs=1M status=progress
sudo dd of=BOOT.img if=/dev/sdd1 bs=1M status=progress
As you can see in the screenshot I added, the image created(on the right) from the SD-Card does not match the SD-Card(on the left).
My question is: why does this happen and how do I make a proper image of my SD-Card?
My SD-Card's home folder has a folder called Music containing folders with mp3 files.
My image has a x-font.ttf with the name Music. Folders seem to change into random files when imaged.
The SD-Card is a working Ubuntu disk for my orangepi PC and is working at this moment.
$ sudo apt install dcfldd
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda2 8:2 0 465.8G 0 part /media/Shared
sdb 8:16 0 238.5G 0 disk
├─sdb1 8:17 0 500M 0 part
├─sdb2 8:18 0 116.8G 0 part
├─sdb3 8:19 0 117.3G 0 part /
├─sdb4 8:20 0 1K 0 part
└─sdb5 8:21 0 3.9G 0 part [SWAP]
sdc 8:32 1 7.5G 0 disk
├─sdc1 8:33 1 64M 0 part /media/fhfs/BOOT
└─sdc2 8:34 1 7.4G 0 part /media/fhfs/linux
sdg 8:96 0 465.8G 0 disk
└─sdg1 8:97 0 465.8G 0 part /media/fhfs/0c91eeb6-7199-47b6-a603-04432a091fdc
sr0 11:0 1 1024M 0 rom
**ls -lha /dev | grep sd**
brw-rw---- 1 root disk 8, 0 Oct 18 14:54 sda
brw-rw---- 1 root disk 8, 2 Oct 18 14:54 sda2
brw-rw---- 1 root disk 8, 16 Oct 18 14:54 sdb
brw-rw---- 1 root disk 8, 17 Oct 18 14:54 sdb1
brw-rw---- 1 root disk 8, 18 Oct 18 14:54 sdb2
brw-rw---- 1 root disk 8, 19 Oct 18 14:54 sdb3
brw-rw---- 1 root disk 8, 20 Oct 18 14:54 sdb4
brw-rw---- 1 root disk 8, 21 Oct 18 14:54 sdb5
brw-rw---- 1 root disk 8, 32 Oct 20 18:11 sdc
brw-rw---- 1 root disk 8, 33 Oct 20 18:11 sdc1
brw-rw---- 1 root disk 8, 34 Oct 20 18:11 sdc2
brw-rw---- 1 root disk 8, 48 Oct 18 14:54 sdd
brw-rw---- 1 root disk 8, 64 Oct 18 14:54 sde
brw-rw---- 1 root disk 8, 80 Oct 18 14:54 sdf
brw-rw---- 1 root disk 8, 96 Oct 18 14:54 sdg
brw-rw---- 1 root disk 8, 97 Oct 18 14:54 sdg1
$ sudo dcfldd if=/dev/sdc2 of=linuxdcfl.img hash=md5,sha1 hashlog=hashlog.txt
242944 blocks (7592Mb) written.
243056+1 records in
243056+1 records out
**sudo dcfldd if=/dev/sdc2 vf=linuxdcfl.img verifylog=verify.log**
0 - 0: Mismatch
Total: Mismatch
I tried dcfldd
and got a mismatch, no error log though. verify.log
is empty. hashlog
just has the sha and md5 sums.
dcfldd
instead ofdd
, it has verification that a target drive is a bit-for-bit match of the specified input file or pattern.ddrescue
(packagegddrescue
).sdd
was mounted at the time you attempted to image it, but as per your comments, it apparently was. I second the answer which says to umount and make sure it stays unmounted for the duration of the imaging.