I had a problem with the pi not booting into the pi user account when I followed the method of moving the /home/pi folder to /tmp (mounted in ram) in this blog:
I have solved the problem (I think) but I'm not sure why the problem disappeared. I would like to know what happened in case there are still some hidden issues.
What I did was as follows:
In order to move the contents of the home folder to /tmp, I had the following lines in a script run from rc.local, then renamed /home/pi to /home/base and rebooted.
cd /home rm -f pi # remove old link mv base pi # temporary rename rsync -aR pi /tmp/home # copy pi to tmp/home mv pi base # reverse temporary rename ln -s /tmp/home/pi pi # create link to home in tmp chown -h pi:pi pi # change owner of link to pi
The idea of the temporary rename was just to allow rsync to create /tmp/home/pi using the R option. No particular reason to do it this way, just the first way I tried.
After many hours trying to find why this didn't work I stumbled upon changing the script by removing the temporary renaming of the base folder and adding mkdir -p /tmp/home/pi and then changing the rsync line to : rsync -a /home/base/ /tmp/home/pi
This appears to solve the problem and the pi boots into the LXDE desktop pi user account. Without this change I had to manually log in.
When it wasn't working I assumed it was because some process was run prior to rc.local which was expecting something in /home/pi which it couldn't find because /home/pi didn't exist. I guess there must be some config where pi was mentioned. However this doesn't explain why it would then work with my altered code in rc.local. Any ideas what this could be down to would be most welcome. Also any suggestions as to a better place to put my script.