I was in the need to copy everything from my daily driver L5 to a new one to send the old one for display repair. The new L5 was already prepared:
- Wifi configured
- GnuPG and OpenPGP card configured
- password-store was copied already and crypted with the new OpenPGP card
- applications were installed (I have a list of all what was installed with
apt install ...
in my old L5)
Below are the steps what I did and what makes the new phone working now as the old one. HIH someone in the same situation:
Steps to move from the old L5 to the new L5
guru@unixarea.de, May 2024
1. backup /home/purism with tar (script /home/backupPurism.sh)
the script does in principle as root:
# cd /home
# tar czf backup-purism-20240530.tgz purism
and scp the file backup-purism-20240530.tgz to my laptop C720;
2. remove all files /home/backup-purism-*
3. in the new L5:
- copy over the from C720 the file backup-purism-20240530.tgz to /home
- SSH to the new L5
# mv /home/purism /home/purism.saved
# tar xzf backup-purism-20240530.tgz
4. the config of GnuPG, of the OpenPGP card and the password store
have been already done and are fine in the new L5
and we copy over the dirs resulted from this
configuration for this OpenPGP card:
# rm -r /home/purism/.gnupg /home/purism/.password-store
# cp -Rp /home/purism.saved/.gnupg /home/purism/
# cp -Rp /home/purism.saved/.password-store /home/purism/
5. test the new L5 ([v] means test passed fine):
- [v] SSH into L5
- [v] test USB-tethering
- [v] test MUA mutt (script ~/m.sh)
- [v] test password-store with 'pass test'
- [v] test firefox
crashed on first start, but then worked, RT DE needs entry in /etc/hosts:
89.191.237.195 test.rtde.tech
- [v] test SSH to www.unixarea.de
needs in addition:
export pub SSH key with:
gpg --export-ssh-key guru > export-ssh-key-guru.pub
and add it in remote ~/.ssh/authorized_keys
needs in /etc/ssh/ssh_config: PermitLocalCommand yes
- [v] scp from the old L5 the modified /usr/bin/scp command
- [v] test scp to www.unixarea.de
- [v] test contacts
- [-] test Chatty nok
has only older chats from the cuban SIM, because the SIM is still in
the old L5
- [v] test new L5 as Hotspot
6. copy over the WLAN credentials of NM from the old L5 to the new L5
on old as root run:
# tar cf nm-system-connections.tar /etc/NetworkManager/system-connections/
pull the file to the laptop and scp it to the new L5:
$ scp -p purism@l5:nm-system-connections.tar .
$ scp -p nm-system-connections.tar purism@10.42.0.1:.
on new L5 as root do (to not overwrite already exsiting files):
# tar xf nm-system-connections.tar
# cd etc/NetworkManager/system-connections
# ls /etc/NetworkManager/system-connections/
# rm local.nmconnection cubacel.nmconnection Hotspot.nmconnection tarara.nmconnection
# cd ..
# tar cf system-connections.tar system-connections
# cd /etc/NetworkManager
# tar xf /home/purism/etc/NetworkManager/system-connections.tar
restart Wifi and test SSH to the new L5
remove nm-system-connections.tar and etc/NetworkManager/system-connections
7. power down both L5 and insert SIM and SD into the new L5
8. [v] test WWAN, Call and Chatty (all fine)
Today I did on the old L5 the final removal of security related information before handing it over to the repair shop:
power up the old L5 and do
9. remove all files in /etc/NetworkManager/system-connections/
BUT NOT:
tarara.nmconnection
local.nmconnection
(if you remove local.nmconnection, USB tethering stops working)
10. remove all files and dirs below ~purism/
BUT NOT:
~purism/.ssh
done with as root:
# cd /home
# mkdir npurism
# chown purism:purism npurism
# mv purism/.ssh bpurism
# rm -r purism
# mv npurism purism
11. do a final test to see if SSH and SSH through USB tethering are still working
[v]
12. change the psk values in the files to hidden ones
tarara.nmconnection
psk=xxxxxx
[v]
12. change the psk values in the files to hidden ones
tarara.nmconnection
psk=xxxxxx
[v]
13. power down the old L5 and remove the OpenPGP card
[v]
14. hand-over for repair
We will see how the techies who normally repair iPhones (…) will do the display swap scheduled for today afternoon.