After configuring my Pi 3, I shut down, put the microSD into my laptop, and basically ran:
sudo dd if=/dev/mmcblk0 of=/home/mike/raspberry.img
Then after a few months, the SD card corrupted, so I found the backup image, put the card back into my laptop, and ran:
sudo dd if=/home/mike/raspberry.img of=/dev/mmcblk0
The Pi now fails to boot. It doesn't even boot a little bit - monitor doesn't even come on. This is also the second time I've had to completely reconfigure the Pi, over a dd backup not working. Am I doing this wrong? I have done backup/restore with dd on laptops before with success, but they were normal hard drives.
- /dev/mmcblk0 is the correct file to dd to/from, right? I'm trying to backup/restore the entire 16GB sd card. I also typically have /dev/mmcblk0p1 and /dev/mmcblk0p2 for the partitions.
- If I instead just backup the main partition (/dev/mmcblk0p2), could I write the plain vanilla installer image (raspbian/jessie) to the card, and then over write just the second partition with my backup? As in copy raspbian-release-whatever.img to /dev/mmcblk0 ... then write my backup-raspbian-part1.img to /dev/mmcblk0p2 ? Trying to figure out a way around this issue.
2016-09-23-raspbian-jessie-lite.img: PTUUID="5a7089a1" PTTYPE="dos"
.. which to me means the image has a partition table, with other inner partitions, thus is a whole-disk image file. But then, I issued: sudo dd if=/path/to/2016-09-23-raspbian-jessie-lite.img of=/dev/mmcblk0 conv=fsync, and then run "blkid" on /dev/mmcblk0 ... the output instead becomes:
/dev/mmcblk0: UUID="f39781f6-b968-4738-93ef-4d1af6861b99" TYPE="ext4"
This is why I think I'm doing something terribly wrong. I've written an image directly to the SD card (I think), but suddenly it's just a partition and no longer a partition table? It *does* work, if I then insert that card into the raspberry Pi. But maybe my understanding of how to properly backup/restore the Pi is severely lacking somehow?
Thank you all for your time. I'm seriously stumped here, and would love to be able to restore my img file without re-configuring everything all over again