Cloning SD card

Discussion in 'Other technical not related to ADSBx Feeding' started by gcopter1, Jun 15, 2018.

  1. gcopter1

    gcopter1 Member

    I have a working sd card that I wish to clone into another so that I can re use the current working one.

    I use a Mac but I also have Windows 7 available to me, running inside a virtual machine on the Mac.

    I've tried using the disk utility in the Mac, creating an image of the current working sd card, then I take this image a copy it to the new sd card using Etcher.

    However, when I insert this new sd card onto the pi, it won't work.

    By "not working" I mean that when I use PuTTY to communicate with the pi, it won't see it.

    Does anyone here have tried this and found a working way to clone/duplicate an sd card?
     
  2. MDA

    MDA Administrator Staff Member

    If you can access Pi locally but SSH is not working, you should go to raspi-config and enable it. If Pi can't even boot try win32disk imager, save image of your card and burn it on new one.
     
  3. gcopter1

    gcopter1 Member

    win32disk imager downloaded as an .src file. Unzipped it but, except for the Unix executable, there's nothing there for me to run, as in an ".exe" file.
    I clicked on the Unix executable file, a terminal window opened on my Mac, some scrolling text and that was it. Nothing I could make sense of.
     
  4. MDA

    MDA Administrator Staff Member

    Last edited: Jun 16, 2018
  5. gcopter1

    gcopter1 Member

    Yeah, that's another thing, every time I Google win32disk imager, the main result takes you to a page where the download comes in the form of a .src file.

    I did try using the disk utility in Mac. It seemed to work because it did duplicate the exact contents of the working sd card, however, when I put the duplicate on the pi, it won't do anything.
    The screenshot below shows the contents of both cards.
    The image on the left is the cloned card.
    The image on the right, is the original card.
    As you can see, they're exact, but the one on the left, does nothing in the pi. Screen Shot 2018-06-16 at 4.45.18 AM.png
     
  6. gcopter1

    gcopter1 Member

    I also have ApplePi but I don't have an sd card of the same size as the one that I want to clone. ApplePi requires that cloned cards be the same size as original.
     
  7. MDA

    MDA Administrator Staff Member

    Buy new card, it is not extremelly expensive :D.
    Google a bit and find pishrink, it will allow you to shrink image.
     
    Last edited: Jun 17, 2018
  8. Jhonny Monclair

    Jhonny Monclair Active Member

    Maybe the issue isn't the SD card as for itself, but about software/method used.
    The Raspi SD card contains two partitions.
    Usually the imaging softwares (etcher, win32diskimager, etc) don't care about the logic structure
    of the media they're copying, they simply replicate what they find, one or more partitions it is the same for them.
    But a disk utility could behave different (sorry, i don't know the Mac utility, never had a Mac before),
    maybe the software expects to find one partition only.
    If that is the case, the cloned SD card might be uncomplete.
     
    gcopter1 likes this.
  9. gcopter1

    gcopter1 Member

    Ok, I found the Windows download for win32diskimager.

    Placed the sd card I want to copy, launched win32diskimager and navigated to where the sd card is.

    But, win32diskimager is looking for an image? When I click on where the sd card is, there's 2 images named kernel and kernel7, don't know which to choose. Screen Shot 2018-06-17 at 1.59.17 PM.png
     
  10. MDA

    MDA Administrator Staff Member

    First insert card you want to clone, select path and image name. Click on read and create image of card. Then insert new card, select image you want to burn and click write.
     
    Jhonny Monclair likes this.
  11. gcopter1

    gcopter1 Member

    Yes, but which image?
    As you can see above, "boot" is the card I want to clone.
    When I launch win32diskimager and navigate/select "boot", there's two folders and two disc images (didn't knew kernels were images).
    And, even if I were to guess/choose one of the kernels, what about the folders; ".fseventsd" and "overlays"?
    Are they needed?
     
  12. MDA

    MDA Administrator Staff Member

    Another Teamviewer session?
     
  13. gcopter1

    gcopter1 Member

    Yes, I'd think you can see for yourself. Go ahead.
     
  14. MDA

    MDA Administrator Staff Member

    Run Teamviewer on your Pi first or install Zerotier.
     
  15. MDA

    MDA Administrator Staff Member

    Zerotier is only option, till June 21 I can't connect to your Pi. They suspect that my help is commercial activity.
     
  16. gcopter1

    gcopter1 Member

    Got Zerotier installed.
     
  17. MDA

    MDA Administrator Staff Member

    join my network, later I'll need your login and password (send PM). Run in terminal:
    Code:
    sudo zerotier-cli join c7c8172af1622d48
     
  18. MDA

    MDA Administrator Staff Member

    Installed on your PC or Pi?
     
  19. gcopter1

    gcopter1 Member

    Where is my login info?
    I installed zerotier, got a node ID?
     
  20. gcopter1

    gcopter1 Member

    PC, took out the sd card to try and clone it.