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.

ohiliouh
  • 123
  • 4

2 Answers2

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.

MartinMarty
  • 182
  • 5
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.

SDsolar
  • 2,348
  • 8
  • 25
  • 43
  • Does this work when cloning to a smaller card? – Wilf Apr 14 '18 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: https://raspberrypi.stackexchange.com/questions/82347/win32diskimager-not-enough-space-on-disk-size-62652416-sectors-available-623 – SDsolar Apr 14 '18 at 18:28