Since I wrote this guide, the installation steps for installing PostmarketOS on a Nexus5 have changed considerably.
I now run docker on two Xiaomi A1 (Tissot) phones and they have performed without problem for over a year. Not only do I use them for Homeassistant, but run SWAG, Jupyter notebook, and othe docker stuff.
An updated guide can be found at bryansplace.
I’m not sure its 100% uptodate regarding PostmarketOS as I installed my systems over a year ago.
Thank you will try this, since the Rasp PI zero is no longer supported I have been looking for a low power server solution to replace it. I use HA in my motorhome so power is important. Will start looking for an old Nexus 5 to give this a try.
Installing PostmarketOS worked. My Nexus5 is not a hammerhead but LGbullhead so you need to select that version in the pmbootstrap init step. Also flashing to the device works a bit different, instructions are here: Google Nexus 5X (lg-bullhead) - postmarketOS
I have can login with ssh into Linux now so ready for the next step
Unfortunately I am stuck. My Pixel5X bullhead has revision 1.0 This requires a new kernel to support Wifi. However if I use the mainstream kernel the device does not boot (stuck in the google bootloader screen.
I was using downstream which boot but no Wifi. I can get internet trough USB and my PC but that does not help, Currently out of idea’s…
Thanks a lot for a great write-up.
I do have a spare Nexus5 and this is perfect to run hass.io.
However, I am running into space issues on the device while installing docker.
n5-console:/tmp$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/dm-1 504576 475228 0 100% /
/dev/dm-0 231143 39180 179522 18% /boot
This is before pulling any docker image.
Can you share the stats on your phone so I could compare.
And any clues to what I might be doing wrong here?
it says in partition layout, “eMMC could be either mmcblk0 or mmcblk1, and it seems to be random for each boot”
To be honest, I don’t really know what that means…
I did this some time ago, I hava a vague feeling I once had memory problem.
But I restarted the build so many times when I was finding my path through the mirad of options.
I can only suggest start over. ( I sometimes went back to the stock rom to start afresh).
Sorry, I can’t provide a fuller answer as I off to do other things today
Mine are way offf.
I tried giving extra space with this command -
pmbootstrap -E 1000 init
but that only gave me a 1Gb space, which is not really enough for running the docker images.
You seem to have 12Gb space there so I am definitely doing something wrong.
I think I figured the problem has to do with flashing the root_fs on userdata partition.
Even in my device, I have a 27G userdata partition and this is exactly where the root partition should be installed (just like yours /dev/mapper/mmcblk1p28p2).
In my case, I just can not convince pmbootstrap to install the root_fs there and it keeps getting installed in the system partition which is tiny ( /dev/dm-1).
I even tried going the route of installing the imgs using adb sideload with this command, but that didn’t help either. $ pmbootstrap install --android-recovery-zip --recovery-install-partition=data
I understand that you are only a consumer of pmbootstrap (like me) so you wouldn’t be able to help me here but still documenting the problem so I can point someone from that team to this. Thanks.
I feel I should update this guide, but I’m not sure I want to wipe my system to retest…
Let me know how things go.
I had a doubtful battery that, even on reduced charge voltage of 3.6V, showed some distress after 6 months.
I now run most of the time with battery totally disconnected by switching the charger batfet, see solution at Command line switch icon for detail.
I reconnect battery only when installing new stuff.
Thanks again for the great write up - it did make my journey a lot easier.
Btw, if you are (or if you ever visit) bay area, I can give you a new nexus5 to alleviate your battery issues