User Tools

Site Tools


restore_g25

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

restore_g25 [2016/06/14 18:35] (current)
Line 1: Line 1:
 +===== FoxBox G25 restore procedure =====
 +This article explains the restore procedure for the Foxbox G25 internal microSD.
  
 +==== #0: Requirements ====
 +In order to follow this guide you need just:
 +  * a FoxBox G25 (with LCD screen)
 +  * a PC with Linux installed (here will be used an Ubuntu distribution);​
 +  * a microSD reader linked to your pc;
 +  * a Phillips (Cross) screwdriver.
 +
 +==== #1: Reach the internal microSD ====
 +With the screwdriver extract the four screws from the back panel, and after having took off the electronic board, extract the microSD card pressing on it. See this image for its position:
 +\\ {{http://​www.smsfoxbox.it/​fb/​FoxBoxG25MicroSD.jpg?​550x370}}
 +
 +==== #2: Insert the microSD into your card reader ====
 +Using a common Linux distribution,​ the three internal partitions (//​kernel//,​ //rootfs// e //data//) will be automatically mounted and shown. Their addresses into your PC's filesystem are:
 +  * /​media/​kernel
 +  * /​media/​rootfs
 +  * /media/data
 +
 +==== #3: Backup your relevant data ====
 +:!: Below there is a list of most commonly saved files, anyway please remember to save all of your other custom configurations,​ changes to the GUI, etc.
 +
 +To save the "​Address book", backup the file:
 +\\ // /​media/​data/​dbs/​gsmbox //
 +
 +To save the "​Incoming SMS" list, backup the file:
 +\\ // /​media/​data/​dbs/​gsmin //
 +
 +To save the "​Outgoing SMS" list, backup the file:
 +\\ // /​media/​data/​dbs/​gsmout //
 +
 +To save the "​Incoming MMS" list, backup the files:
 +\\ // /​media/​rootfs/​mnt/​flash/​root/​db/​mmsbox.sqlite //
 +\\ // /​media/​rootfs/​mnt/​flash/​root/​documents/​* //
 +
 +To save the "Valid users" list, backup the file:
 +\\ // /​media/​data/​dbs/​users //
 +
 +Obviously, after the restore you just need to copy back these files to the original folder.
 +==== #4: Start the software restore ====
 +:!: This step will restore the filesystems,​ formatting the partitions. ​
 +So before doing it please verify that:
 +
 +  * You have saved all the relevant files and configurations in the previous step. If not, they will be lost.
 +  * You know the extact path of the microSD devices (you can discover it with the command //dmesg// from terminal, usually the partitions are from// /dev/sdb1/ //to// /dev/sdb4/ //). Note that if you launch the next script on the wrong device you could compromise its operativity. See this image as an example:
 +{{http://​www.smsfoxbox.it/​fb/​TerminaleVerC.jpg?​705x100}}
 +\\ \\
 +Firstly you have to format properly the microSD card.  Usually, we do it with GParted (available on official repository) following this structure (we assume the usage of a 2GB card, for the 4GB one follow the dimensions in brackets):
 +
 +^  SMS/MMS & Sms2Mail Versions ​ ^^^
 +^  Label  ^  Filesystem ​ ^  Dimension (MB)  ^
 +|  kernel ​ |  Fat16  |  32 (32)  |
 +|  rootfs |  ext4  |  800 (1700) ​ |
 +|  data |  ext4  |  950 (1700) ​ |
 +|  swap |  linux-swap ​ |  Unused space  |
 +^  EasyG2 & Icinga Versions ​ ^^^
 +^  Label  ^  Filesystem ​ ^  Dimension (MB)  ^
 +|  kernel ​ |  Fat16  |  32 (32)  |
 +|  rootfs |  ext4  |  1000 (1700) ​ |
 +|  data |  ext4  |  750 (1700) ​ |
 +|  swap |  linux-swap ​ |  Unused space  |
 +
 +Then you have to download the required files. They are:
 +  - The Bash script called //​restoreG25.sh//,​ available [[http://​www.kdev.it/​FoxBoxRestore/​restoreG25.tar.bz2|here]].
 +  - The files to fill the partitions, available under request to KDEV staff [[http://​www.smsfoxbox.it/​en/​contacts/​|here]].
 +
 +Please place all of them in the same folder (later, as an example, we will use// /home/test/ //). 
 +
 +Now you have to substitute inside the script the string// ./​rootfsXYZ.tar.bz2 //with the name of the rootfs file provided, and the same for the strings// ./​dataXYZ.tar.bz2 //and// ./​kernelXYZ.tar.bz2 //.
 +
 +Note that, only if your microSD is not in// /dev/sdbX/ //, you have to substitute also the wrong occurences in the script with the right ones.
 +==== #5: Execute the restore ====
 +Firstly, open a Console and move into the folder containing the files (with// cd /home/test/ //).
 +
 +Then, launch the script with root-priviledges (with// sudo ./​restoreG25.sh //).
 +
 +At the end of the procedure, a message //== Restore procedure successful ==// will be prompted.
 +If some error occured during the restore, you will see the message //!! Restore failed (cod: N) !!//. Please look into the script when this happened (so, when that code is generated) and fix the problem.
 +
 +:id1: Note that you can already set the IP address of the device editing the file// /​media/​rootfs/​etc/​network/​interfaces //.
 +
 +==== #6: Reinsert the microSD ====
 +Just follow backwards the steps you made during phase 1 to reach the internal microSD.
 +
 +==== #7: Your FoxBox is back! ====
restore_g25.txt ยท Last modified: 2016/06/14 18:35 (external edit)