SD card backup via DD to file in Linux Mint cannot be properly restored

  • Hello.


    My offline backup method for OMV is done by shutting down the RPi, removing the SD card, doing a full DD (all partitions) to an image file (in a Linux Mint installation).


    When trying to restore, by doing DD again from the image file to a new SD card, I can never get the system to boot properly, it complains of an issue in one of the partitions.


    If I do the same exact DD command but directly from an SD card to a new SD card (same size, brand, etc), I can properly boot from the new SD card.


    Any reason why the dd to image and image to new SD card would not work?


    Thanks in advance for any help.

  • You're right, sorry about that.


    Initial backup from SD card to file done with command:
    sudo dd if=/dev/mmcblk0 of=path_and_image_filename.img


    Restore from initial backup to new SD card (same size/brand/etc):
    sudo dd if=path_and_image_filename.img of=/dev/mmcblk0


    No errors occur during the execution of any of the above commands and I always unmount the SD cards before removing it from the card reader.


    This is how far the boot process goes when booting RPi2 from new SD card (restored from image, as per above command):

  • Was the sd card mounted when you performed either or both dd commands? Linux mint typically automounts the cards and that could cause issues especially when writing the card. You don't want to eject the card just unmount all of the partitions before the dd command.
    umount /dev/mmcblk0p1
    umount /dev/mmcblk0p2
    When done reading/writing, you shouldn't have to unmount the cards.


    I would add block size to make it faster:


    dd if=/dev/mmcblk0 of=path_name.dd bs=1M
    dd if=pat_name.dd of=/dev/mmcblk0 bs=1M

    omv 5.6.13 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.2 | kvm plugin 5.1.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!