[OE-core] [PATCH 0/2] fixes for read-only rootfs

Patrick Ohly patrick.ohly at intel.com
Mon Nov 27 15:56:40 UTC 2017


When investigating in refkit why /etc/machine-id was getting
permanently modified in a rootfs despite read-only-rootfs in
IMAGE_FEATURES, I noticed two things:
- the boot parameters did not include "ro", the initramfs thus
  mounted the rootfs read/write, and systemd then wrote
  /etc/machine-id before mounting read-only due to the options
  in /etc/fstab; this explains the issue I was seeing
- one bogus check for read-only-rootfs crept into connman.inc

Let's make sure that "ro" gets added to the boot parameters to avoid
the issue. I prefer to keep related functionality together, so I
decided to put that into rootfs-postcommands.bbclass next to the fstab
change. It could also go into image.bbclass itself.

The special case in connman.inc doesn't seem to be needed, therefore I
propose to remove it without trying to find a different solution.

Patrick Ohly (2):
  connman.inc: do not check IMAGE_FEATURES
  rootfs-postcommands.bbclass: ensure that rootfs gets mounted ro

 meta/classes/rootfs-postcommands.bbclass      | 8 ++++++++
 meta/recipes-connectivity/connman/connman.inc | 3 ---
 2 files changed, 8 insertions(+), 3 deletions(-)

base-commit: 3b413a80578caacd9a7f405f3c51a3921d78a60d
-- 
git-series 0.9.1



More information about the Openembedded-core mailing list