Run the passwd command as both your user (usually pi) and as root.
This keeps people from knowing you used the same password twice. Passwords should be reset so that a new salt is used. There are certain unique system identifiers that should be changed as well. You can just copy with dd as suggests, but that's not all you have to do when cloning a system. Note also that items between are placeholders and you have to see for yourself how they match with your environment. Directories and names may vary on other Linux distro's. Note: I checked all these on a Lubuntu machine.
This should give you an exact copy of the original SD card onto the other SD card. Once you confirmed all is fine, you can again remove the n from the rsync command. This is again a dry run, which should show you that the content of in /media/ will be copied to the SD card. Remove the original SD card, put another - correctly formatted- SD card in your Linux machine and execute the following rsync command:
Now you should have an exact copy of your original SD card on your Linux machine. Use the same command for the other partition. To execute for real (after you've confirmed that the dry run is doing what it should do), you can remove the n from the above command (so, rsync -av /media//. You can now copy the content of the first partition o fthe original original SD card by issueing the following rsync command:ĭo not put a / at the end! The above command will "dry run", which means that it will show you what it eventually will do, but will not execute it for real. You have created a temp directory to copy the content of your SD card.Normally, the above mentioned directories should be automatically mounted on /media/ and there should be 2 subdirectories in there (one for partition 1 of the SD card, one for partition 2 of the SD card) Put the SD card into another Linux machine.Shut down your Raspberry Pi in a decent manner (type the command "shutdown", possibly as root).mmcblk0 is the "bare" SD card device, while mmcblk0p1 is the first partition of that SD card containing the kernel image and so on and mmcblk0p2 is the second partition of that SD card containing the root file system.You should see, among other devices, mmcblk0, mmcblk0p1 and mmcblk0p2. On your Raspberry Pi, go to a terminal and then go to the /dev directory.