@ernest said in One method to encrypt /home/phablet:
@trainailleur
Lomiri cannot restart thus the screen remains black, while ssh access works fine.
I ran into the same problem on my Nexus 5.
The solution is to lock the screen (Power Button) before initiating the force-reload.
For some reason lightdm does not come back when it was shut down while the display was lit. (It took me quite a while and several WTFs to stumble over this. 😆 )
Thus my script is as follows:
#!/bin/bash
cryptsetup luksOpen /home/phablet.img phablet
e2fsck /dev/mapper/phablet
mount /dev/mapper/phablet /home/phablet && \
echo "Lock the screen now!"
echo "Restart in"
for ((t=5;t>0;t--))
do
echo "$t s"
sleep 1
done
cd /tmp
nohup /etc/init.d/lightdm force-reload </dev/null >/dev/null 2>&1 &