Cloning SD Card for ARM device

Discussion in 'SBC, ARM, Home Automation' started by drmike, Nov 2, 2014.

  1. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    About to monkey with a custom bootable SD card for an ARM device.  Got ahold of such part of a gear purchase... The normal dance moves to get this going are more time and patience than I have to spare.

    Since I am prone to trying stuff and blowing things away, would like to preserve the original SD card image and copy it back or to other SD cards when doing reinstall.

    Any recommend best process / tool for this?  Want to make complete replica of the SD card.  It's a bootable SD card with the OS.
     
  2. rds100

    rds100 New Member Verified Provider

    733
    300
    May 18, 2013
    Assuming the sd card appears as /dev/sdb when you plug it in your PC, you can do:

    dd if=/dev/sdb of=sdcard-backup.img bs=1M

    and to write it back to the SD card:

    dd if=sdcard-backup.img of=/dev/sdb bs=1M

    Of course you should check what device it is first, you don't want to start dd-ing some hard disk.
     
    fixidixi and drmike like this.
  3. drmike

    drmike 100% Tier-1 Gogent

    8,573
    2,709
    May 13, 2013
    Interesting approach.   My first merry go round on this since I always use standard prebuilt stuff that is a download away.   This whole custom built image thing has been frightened that I'll modify something, wipe the OS and image will be fubared..  Cause that's how things work the first couple of times ;)
     
  4. Francisco

    Francisco Company Lube Verified Provider

    2,476
    1,770
    May 15, 2013
    "DD can be used for something besides running sequential write benchmarks??"
     
    rds100, JahAGR, drmike and 1 other person like this.