This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: SD card cloning

Part Number: AM5728

Tool/software: Linux

Hi,

I want to create a backup/copy of all of the contents on my sd card that i am using on my am5728 board. Simply copying and pasting all the files doesn't seem to work since there are permission settings tied to them. Is there a different way to make a copy of the boot and rootfs partitions on the sd card? Please let me know. 

Thanks,

Eeshan

  • Hello Eeshan,

    The best way will be the use of dd command to make a mirror copy of your SD card.

    Put the SD card on your host computer and type this line to make a backup copy.
    # dd if=/dev/sdX of=./am57xx_sdcard_backup.img

    But since the size of SD cards is 16GB it will create an image with a lot of empty space inside, so you can use this command instead and compress that image.
    # dd if=/dev/sdX | xz > ./am57xx_xz_compressed_sdcard_backup.img.xz

    Use these commands to writhe the image back to SD card:
    # dd if=./am57xx_sdcard_backup.img of=/dev/sdX
    or for compressed image
    # xz -dc ./am57xx_xz_compressed_sdcard_backup.img.xz | dd of=/dev/sdX

    Note: /dev/sdX must point your SD card device, so be careful here hence you can wipe your HDD, also these commands are kind of advanced so you must double check your pipe and think about what it does before pressing enter.

    Best regards,
    Kemal

  • If you're looking for a Windows alternative, use Win32DiskImager so create an img of your drive.