Bug 4490

Summary: run-postinsts fails on directdisk image
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jonathan Liu <net147>
Component: coreAssignee: Jonathan Liu <net147>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: bluelightning, meta.mr.watcher, meta.watcher, Qi.Chen
Version: 1.4   
Target Milestone: 1.5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Jonathan Liu 2013-05-13 03:34:44 UTC
distro conf:
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_graphical_init_manager = ""
VIRTUAL-RUNTIME_init_manager = "systemd"
PACKAGE_CLASSES = "package_ipk"

image bb:
SYSLINUX_ROOT ?= "root=/dev/sda2"
SYSLINUX_PROMPT = "0"
SYSLINUX_TIMEOUT = "1"
SYSLINUX_LABELS = "boot"
LABELS_append = " ${SYSLINUX_LABELS} "
do_bootdirectdisk[depends] += "${PN}:do_rootfs"
inherit boot-directdisk

# systemctl status run-postinsts
run-postinsts.service - Run pending postinsts
          Loaded: loaded (/lib/systemd/system/run-postinsts.service; disabled)
          Active: failed (Result: exit-code) since Mon 2013-05-13 11:07:03 UTC
         Process: 76 ExecStart=/etc/rcS.d/S98run-postinsts (code=exited, status=1/FAILURE)

May 13 11:07:03 myhost S98run-postinsts[76]: /etc/rcS.d/S98run-postinsts: line 3: can't create /var/log/postinstall.log: Read-only file system
May 13 11:07:03 myhost S98run-postinsts[76]: rm: can't remove '//etc/rcS.d/S98run-postinsts': Read-only file system
May 13 11:07:03 myhost systemd[1]: run-postinsts.service: main process exited, code=exited, status=1/FAILURE
May 13 11:07:03 myhost systemd[1]: Failed to start Run pending postinsts.
May 13 11:07:03 myhost systemd[1]: Unit run-postinsts.service entered failed state

It looks like run-postinsts is executed before checkroot remounts root as rw.