0

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
  • 1
    It seems unlikely that /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. – Milliways Jan 13 '18 at 0:16
0

to perform SD card backup:

  1. shutdown the Raspberry Pi

  2. remove the SD card

  3. insert SD card into the card reader of your linux pc (do not mount the SD card - unmount the SD card in case it got mounted automatically)

  4. run sudo dd bs=4M if=INPUT of=OUTPUT status=progress conv=fsync; sync (replace INPUT and OUTPUT according to your setup, i.e. /dev/sdX or /path/to/your/backup.img)

  5. after step 4 has finished, you can remove the SD card

You can find a very detailed guide here and here.

  • and for restoring the same or simply sudo dd bs=4M if=raspbian.img of=/dev/mmcblk0 ? – Luca Scalvi Jan 13 '18 at 0:12
  • Didn't work. I got "Waiting for SD (settings partition)" message – Luca Scalvi Jan 13 '18 at 0:21
  • Yes, pi is off and I've put the microSD in my laptop. I have a news to report: I succesfully restored an image on a new microSD using Clonezilla. The first try was not so good but this time worked 100%. I can feel satisfied now but I'm very curious to understand why I can not use dd or Win32di – Luca Scalvi Jan 13 '18 at 20:02
  • Sorry. For "new" microSD I mean another microSD. One of the 2 I've tested before. Anyway I can try – Luca Scalvi Jan 14 '18 at 11:19
0

In case your OS is Raspbian, I'm wondering why you just don't use the built-in copier?

Print screen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.