<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16056</bug_id>
          
          <creation_ts>2025-11-07 08:53:58 +0000</creation_ts>
          <short_desc>populate-volatile.sh fails with read-only-rootfs</short_desc>
          <delta_ts>2026-05-21 15:03:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>5.3</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrea Moretto">moretto.andrea</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>ccasciato</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>moretto.andrea</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>103225</commentid>
    <comment_count>0</comment_count>
    <who name="Andrea Moretto">moretto.andrea</who>
    <bug_when>2025-11-07 08:53:58 +0000</bug_when>
    <thetext>| NOTE: Executing read_only_rootfs_hook ...
| DEBUG: Executing shell function read_only_rootfs_hook
| Populating volatile Filesystems.
| /workdir/build/tmp/work/orange_pi_zero2-poky-linux/core-image-base/1.0/rootfs/etc/init.d/populate-volatile.sh: line 223: /proc/cmdline: Permission denied
| WARNING: /workdir/build/tmp/work/orange_pi_zero2-poky-linux/core-image-base/1.0/temp/run.read_only_rootfs_hook.122:194 exit 1 from &apos;/workdir/build/tmp/work/orange_pi_zero2-poky-linux/core-image-base/1.0/rootfs/etc/init.d/populate-volatile.sh&apos;
| WARNING: Backtrace (BB generated script):
| 	#1: read_only_rootfs_hook, /workdir/build/tmp/work/orange_pi_zero2-poky-linux/core-image-base/1.0/temp/run.read_only_rootfs_hook.122, line 194
| 	#2: main, /workdir/build/tmp/work/orange_pi_zero2-poky-linux/core-image-base/1.0/temp/run.read_only_rootfs_hook.122, line 205
| DEBUG: Python function do_rootfs finished
ERROR: Task (/workdir/build/../sources/poky/meta/recipes-core/images/core-image-base.bb:do_rootfs) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 6617 tasks of which 6616 didn&apos;t need to be rerun and 1 failed.

Summary: 1 task failed:
  /workdir/build/../sources/poky/meta/recipes-core/images/core-image-base.bb:do_rootfs
    log: /workdir/build/tmp/work/orange_pi_zero2-poky-linux/core-image-base/1.0/temp/log.do_rootfs.122
Summary: There was 1 ERROR message, returning a non-zero exit code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103281</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-11-13 15:36:00 +0000</bug_when>
    <thetext>We&apos;re not seeing this on the YP AB.

What distro are you using to build and is  /proc/cmdline readable?
Ultimately, we shouldn&apos;t be reading the host machine /proc/cmdline
so we&apos;ll put a check in place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103287</commentid>
    <comment_count>2</comment_count>
    <who name="Andrea Moretto">moretto.andrea</who>
    <bug_when>2025-11-13 15:56:58 +0000</bug_when>
    <thetext>I am building on docker with image &quot;crops/poky:ubuntu-22.04&quot;.

/proc/cmdline is readable in the host:

pokyuser@1da421201e77:/workdir/build$ cat /proc/cmdline 
BOOT_IMAGE=(hd3,gpt2)/vmlinuz-6.17.7-300.fc43.x86_64 root=/dev/mapper/ssd-root ro rd.lvm.lv=ssd/root rhgb quiet iommu=pt intel_iommu=on
pokyuser@1da421201e77:/workdir/build$ uname -a
Linux 1da421201e77 6.17.7-300.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Nov  2 15:30:09 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
pokyuser@1da421201e77:/workdir/build$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103289</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-11-13 16:13:24 +0000</bug_when>
    <thetext>That&apos;s interesting. I wonder if the problem is that it&apos;s running under pseudo when it breaks.  Can you stat /proc/cmdline inside the container?

However, I have a fix, because checking the kernel flags at rootfs-time is wrong.  Would you be able to verify that https://gitlab.com/rossburton/openembedded-core/-/commit/f9bd584b58757cbf9e66e07b8c77539e09f94157 fixes the build for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>103290</commentid>
    <comment_count>4</comment_count>
    <who name="Andrea Moretto">moretto.andrea</who>
    <bug_when>2025-11-13 16:19:13 +0000</bug_when>
    <thetext>pokyuser@1f6d65711241:/workdir/build$ stat /proc/cmdline
  File: /proc/cmdline
  Size: 136       	Blocks: 0          IO Block: 1024   regular file
Device: 8dh/141d	Inode: 4026532015  Links: 1
Access: (0444/-r--r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2025-11-13 16:16:54.876135386 +0000
Modify: 2025-11-13 16:16:54.876135386 +0000
Change: 2025-11-13 16:16:54.876135386 +0000
 Birth: -

I have patched in a similar way as the patch you suggested (basically checking if the file exists before reading from it), and it fixes the build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105529</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2026-05-21 15:03:55 +0000</bug_when>
    <thetext>Merged in 52a6a9f23587cab65c76b6e9c9ec9721563854e0.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>