Bug 4103

Summary: Stop using linux live and replace with read-only rootfs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jason Wessel <jason.wessel>
Component: deploymentAssignee: Chen Qi <Qi.Chen>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Medium CC: Qi.Chen, richard.purdie, sgw
Version: unspecified   
Target Milestone: 1.5 M4   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Bug Depends on:    
Bug Blocks: 4106, 4344, 4883, 4885, 4886, 4887, 4888    

Description Jason Wessel 2013-03-25 16:13:57 UTC
Using the boot loader plus an initrd and a kernel with a unionfs like feature compiled it needs to be possible to do the following:
   * Boot the kernel with the initrd
      * The initrd will contain an opimimized boot script and any
        kernel modules needed for the boot media device
      * The initrd will contain a static busybox with pivot_root
   * The initrd script will check all the labels on the boot media to
     find the one that it needs to mount
   * The initrd script will mount the boot media read-only
   * The initrd script will pivot to the boot media
   * The boot media init must account for the fact it was booted read-only and
     correctly bind mount any part of the file system that needs to be read-write
      * Alternatively it could re-mount things read-write if it is not an ISOFS
Comment 1 Chen Qi 2013-06-21 10:57:02 UTC
(In reply to comment #0)

>      correctly bind mount any part of the file system that needs to be
> read-write

It's really hard to determine which parts of the system need to be 'read-write'.

When the user takes a tour in the liveCD distro, every part of the system is possible to be written to, his/her home directory, the /etc/ directory and the /var/ directory.

Or maybe the user wants to make a directory under /.

So I think maybe we should still use the 'union mount' method.

Please see bug#4761 for some additional info.
Comment 2 Saul Wold 2013-07-16 18:47:59 UTC
We should review all packages and recipes and ensure that they do not write to the Read-Only FS, at this point we should not worry about persistent data, so for home directory example it would just be linked to /tmp which is reall /var/tmp and on ramfs.

We should find any packages that write into /etc and patch that for the Read-Only FS.
Comment 3 Chen Qi 2013-07-17 08:26:03 UTC
The goal is to make live images workable even if a unionfs like feature is not compiled into kernel. Right?

//Chen Qi
Comment 4 Chen Qi 2013-07-22 02:49:40 UTC
Add several bugs to the block list.
Comment 5 Chen Qi 2013-08-19 01:57:41 UTC
merged into poky/master: 2b204500bd20621d29762f23204a000eadc88e00