This tool is available from LoxBerry 2.2
This article explains the LoxBerry tool
clone_sd.pl, that can be used to clone your running LoxBerry to another SD card. As part of the cloning the
/boot partition is enlarged to the current default of 256 MB.
- A Raspberry with original LoxBerry image (the script isn't tested against vm's or on any manual change of the partition layout!)
- A second SD card as destination of the clone. The destination SD card needs to big enough to store all data of your LoxBerry.
- An USB card reader
The new SD card can be smaller or bigger than the original. The new partitions are adjusted to the size of the new SD card.
- Plug in your USB card reader to any USB plug of your Raspberry, with your destination card inside.
- Login to LoxBerry with Putty and get root (Eine SSH-Verbindung mit putty aufbauen / Shell-Zugriff)
Run /opt/loxberry/sbin/clone_sd.pl - this doesn't start any cloning but shows what destination devices are available.
As DESTINATION, all possible destination devices are listed. (in the screenshot, this is one device,
For your information, also all partitions are listed. If the card is empty, no partitions are shown.
Care on multiple data devices
If the tool shows multiple destinations, LOOK ACCURATE to find the correct device in the list. If you have multiple devices connected, and are unsure, disconnect all other data devices.
Start of cloning
Destination data are destroyed
All data on your destination device are permanently deleted. Care what you are doing!
To Starten the cloning process:
where <Device> is the name of your sd card device. Example:
Everything else runs automatically. You see some information what currently happens.
Copying the data may take an hour or more!
If everything is finished, an OK message is shown.
Whether or not you directly use your new card - it is necessary to finally reboot your LoxBerry.
Keep your old card as long as you know if the new card works!
Use card clone
- Shut down LoxBerry (
poweroff) and disconnect the power cord.
- Disconnect the card reader.
- Remove the card from your Raspberry and keep it stored! (in case the new card won't work!)
- Insert the clone card to your Raspberry.
- Plug in the power cord. LoxBerry now should boot up.
Data that were added or changed during the cloning may be missing on the clone. Likewise after the boot "strange" things may happen with plugins (e.g. the MQTT Gateway plugin possible re-transmits data that were already be sent).
Before or during the cloning
- The program runs several checks if cloning is feasible. If the program fails, check it's error message. Possibly you retry it after a fresh reboot of LoxBerry.
- During cloning, you may see messages that some files couldn't be copied or were changed. This is quite normal.
SD card doesn't boot
If LoxBerry doesn't boot with your clone sd card, you need to connect a display to your Raspberry to track the boot process.
- Display view: Rainbow colors→ The SD card doesn't even start to boot.
- Display view: Boot up process with raspberries in the left upper corner, but at some point it is hanging → The card boots, but cannot allocate your data partition.
LoxBerry boots up but is not reachable from network
Check if your LoxBerry hasn't got a new IP address. Check your router to verify LoxBerry's IP.