Skip to content

Instantly share code, notes, and snippets.

@sxing
Last active February 28, 2017 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sxing/c06cd2ce8f7280283f87 to your computer and use it in GitHub Desktop.
Save sxing/c06cd2ce8f7280283f87 to your computer and use it in GitHub Desktop.
Got problems with CloningEdisons.md? This is the path I take when things don't work out for some reason.

I'm guessing you've had some problems with the other CloningEdisons instructions (https://gist.github.com/sxing/f02a4a1703b16803a7d4) if you're here. Sorry about that...

This is the path I take when things don't work out, usually related to a completely messed up data corruption that was my fault.

  1. Acquire a microSD card and an Edison breakout that has an microSD card slot, like the Arduino Expansion board. Make sure the microSD card is at least 4GBs in size.

  2. Make sure nothing that needs to be copied over is in your /home folder. This won't be copied over in the process.

  3. Follow these instructions to set up the Edison you want to clone to boot from USB: https://communities.intel.com/thread/61048

  4. Boot to the microSD card.

  5. Make a ext4 image that is the same size as your / partition. If you've already made an image, I recommend not recreating a new image and skip this step to save some time. This gets me pretty close in size without being larger:

    dd if=/dev/zero of=/edison-image-edison.ext4 count=1525 bs=1M
    mkfs.ext4 /edison-image-edison.ext4
  6. Mount the partition to copy and the generated ext4 image to dump all the files in. After doing so, start the copying:

    mkdir /image
    mkdir /emmc
    mount /dev/mmcblk0p8 /emmc
    mount /edison-image-edison.ext4 /image
    rm -rf * /image/*
    cp -r /emmc/* /image/
    umount image
    umount emmc
  7. Transfer the edison-image-edison.ext4 file to your computer. You should follow Steps 3-5 of the CloningEdisons process I referenced above now. I recommend connecting the microSD card to your computer to copy it over.

NOTE: Don't use resize2fs for images built using this path. For some reason, they always shrink size of the the / partition after I flash the image onto an Edison.

Hope this helps! Let me know if I should add anything or clarify stuff by messaging me on twitter @stevencrossing or emailing me at steven.xing@intel.com. Comments are cool too, but I don't think I get the notifications for comments on a Gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment