2

I have a fully working system which is on one of my SD-cards(#1). I would like to copy everything to another sd card(#2). There are a few problems here:

1) I don't know which version of NOOB or jessie I have. So I don't know which I have to download in order to fully replicate the system

2) The approach I'd like to try: download and install the same version of NOOB or jessie (I think I have tried them all so far...) and remove the kernel from #2 and replace it with the good kernel from #1 so I have two fully identical systems.

How can I find out which version of jessie or NOOB I have? Can I just replace the kernel with my own one? Should I only replace kernel.img or also kernel7.img?

I am aware that those are a lot of questions all at once, but I have tried may things so far....

Thank you

EDIT:

My good sd card is divided in 2 partitions (when using linux I can see that, I can't see that when reading the SD card from my windows system ). One with the kenel image and special files while the other partition contains the linux file system. I thus tried to just naively copy everything from both partitions. However my linux system prohibits me to copy the linux file system to the second SD-card.

6
  • 1
    This all sounds very complicated. You're just trying to clone one SD card onto another SD card here right? Am I missing something?
    – goobering
    Apr 6, 2017 at 22:54
  • Why are you trying to replace kernel anyway?
    – Milliways
    Apr 7, 2017 at 0:12
  • 1
    @goobering I have an SD card of 16Gb and one of 32Gb. When I try to just clone the content of the sd card of 32 Gb is creates an image of 30Gb, which is too big for the sd card of 16 Gb... I tried Win32 but it crashes every single time when trying to read my sd card
    – ohiliouh
    Apr 7, 2017 at 1:05
  • @Milliways how else could I do it?
    – ohiliouh
    Apr 7, 2017 at 1:05
  • @ohiliouh What is "it"? This appears to be an XY problem. It seems you want to copy an image to a smaller card, so this is the question you should have asked.
    – Milliways
    Apr 7, 2017 at 1:40

2 Answers 2

0

The simplest method is to use the Win32DiskImager program.

It will Read a card to make an .IMG file containing the entire contents of the card. Restoring is just as simple as putting in a new card and clicking the Write command.

The program is OS and partition-agnostic. It simply works with entire images of the cards.


Note that this is simplest. For more demanding copies there are a couple of options, and both require the assistance of a Linux machine.

First is using dd to make a copy, so the source and target cards do not need to be the exact same size:

Win32diskImager "Not enough space on disk Size: 62652416 sectors. Available: 62333952"

Second involves actually mounting the .IMG file produces by Win32DiskImager and manipulating the internal partitions directly.

2
  • Does this work when cloning to a smaller card?
    – Wilf
    Apr 14, 2018 at 13:06
  • 1
    Note my answer says simplest. What you want is not so simple, but can be done. Moving it to a smaller card can be done, but not with this program. Best is to actually mount the card into a Linux system then use the dd command to copy the partitions. Here is a Q&A where I run through the procedure: raspberrypi.stackexchange.com/questions/82347/…
    – SDsolar
    Apr 14, 2018 at 18:28
0

Try the rpi-clone program. It can handle differently sized source/target. What I do is connect a USB card reader/writer to my RPi and then run this. It takes about 15 min for a 32GB card.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.