I'm trying to make a system image for a backup of my rpi3 microSD, but when I try to restore it do not works. First method I've tried is dd on Linux with this well known commands:
sudo dd bs=4M if=/dev/mmcblk0 of=raspbian.img
and
sudo dd bs=4M if=raspbian.img of=/dev/mmcblk0
I've tested 2 different microSD card and with both I got Kernel Panic.
kernel panic-not syncing: VFS: unable to mount root fs on
With Windows I used Win32 disk imager and SDformat tool First I've made an img file and tried to restore it but I got
Waiting for SD card (settings partition)
When I open Win32 disk manager I can see 3 partitions (D:\, E:\ and F:) but I've made the image file out of the first partition D:\ and seems that the program create an image file that contains only one partition not the other 2. How can I make the image of the whole SD and not of a single partition?
Third method I've tried is using Clonezilla. With this method I have no errors, the rpi is working, because I'm able to access it via web but I can only see a flashing underscore (top left corner) on a completely black screen.
To add more confusion to my situation I've made a last try:
Downloaded NOOBS
installed a system on a microSD
copied a file on the desktop
make an image of the microSD with Win32di
restored on another microSD
Worked.
I think that the problem is the microSD where actually is installed the system that I want to back up. The system is working perfectly, is It possible that ther's something wrong with that microSD and I'm not able to create a working image?
UPDATE: This the fdisk of the microSD I want to backup
Disk /dev/mmcblk0: 14,9 GiB, 15986589696 bytes, 31223808 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000d2fee
Dispositivo Avvio Start Fine Settori Size Id Tipo
/dev/mmcblk0p1 8192 3275390 3267199 1,6G e W95 FAT16 (LBA)
/dev/mmcblk0p2 3275391 31223807 27948417 13,3G 5 Esteso
/dev/mmcblk0p5 3276800 3342333 65534 32M 83 Linux
/dev/mmcblk0p6 3342336 3483647 141312 69M c W95 FAT32 (LBA)
/dev/mmcblk0p7 3489792 31223807 27734016 13,2G 83 Linux
/dev/mmcblk0
would actually be the location of a mounted SD (except on the Pi itself). Obviously you CANNOT image a SD Card to itself.