[yocto] Password updates to compressed root image in flash

David Bilsby dbilsby at tekmicro.co.uk
Mon Feb 1 03:47:23 PST 2016

We have a project which will use a Xilinx Zynq running embedded Linux 
built by Yocto (probably kernel 4.0). The system will boot from QSPI, 
this will contain the FSBL, u-boot, compressed kernel and compressed 
rootfs. The rootfs will be expanded into an initramfs which will then be 
used as the running systems rootfs (rw).

How given this arrangement do you make passwd updates persistent across 
reboots as currently the update will only affect the RAM copy of 
/etc/passwd and not get written back to the password file stored in the 
compressed rootfs image in flash?
Similarly how can things like the public key which DropBear generates at 
boot time be stored permanently so it does not get regenerated every time?

This seems like such an obvious question, however I have not found an 
answer when searching. I thought it may be possible to split the rootfs 
into effectively a read-only part (read-write but non-persistent) and a 
read-write part (persistent) and the splice the two together, but I'm 
not sure how best to do this. Flash space is very tight on this system 
so keeping the rootfs in flash uncompressed is not an option.

Any suggestions as to how this is best handled very much appreciated.


More information about the yocto mailing list