Bug 4888

Summary: Take into consideration that possibility of /var/lib on a separate writable media in case of a read-only rootfs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Chen Qi <Qi.Chen>
Component: coreAssignee: Chen Qi <Qi.Chen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: liezhi.yang, mark.hatle, meta.mr.watcher, meta.watcher, sgw, yi.zhao
Version: 1.4   
Target Milestone: 1.5 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Bug Depends on: 4103    
Bug Blocks:    

Description Chen Qi 2013-07-22 02:47:48 UTC
Packages in our system may need to write to some directories to function correctly. In read-only rootfs, these directories should be made writable.

We should figure out a convenient and uniform way to handle such situations.

Some related bugs:
bug#4887 : openssh not working well with read-only rootfs
bug#4886 : /etc/rc5.d/S20irattach: /etc/sysconfig/irda: Read-only file system
bug#4885 :  lighttpd: /www directory should be writable in read-only rootfs

//Chen Qi
Comment 1 Chen Qi 2013-08-19 02:09:25 UTC
The only directory that is needed bind mount with tmpfs is /var/lib.

Other packages should be patched separately.

//Chen Qi
Comment 2 Chen Qi 2013-08-26 06:31:25 UTC
Considering the overhead brought in by checking the /proc/mounts or /etc/fstab in each boot script, the READ_ONLY_ROOTFS value in /etc/default/rcS is still useful. However, we should at least add a check for conflicting configurations between /etc/fstab and /etc/default/rcS.
Comment 3 Chen Qi 2013-08-26 06:34:25 UTC
The only directory that is *necessary* to be bind mounted with tmpfs is /var/lib.
Other packages should fix themselves to fit for read-only rootfs.

So I changed the title of this bug to "Take into consideration that possibility of /var/lib on a separate writable media in case of a read-only rootfs".

//Chen Qi
Comment 4 Chen Qi 2013-08-27 04:31:27 UTC
merged into poky/master: 1dff47b097615771bc144f14c31ea137aa562c70

http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=86ac10995fd08226f82d87e23fda5d4898c3190f