<?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>11662</bug_id>
          
          <creation_ts>2017-06-14 15:19:10 +0000</creation_ts>
          <short_desc>wic should mount /boot</short_desc>
          <delta_ts>2017-07-30 10:37:58 +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>Scripts and Tools</component>
          <version>2.3</version>
          <rep_platform>x86</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>2.4 M2</target_milestone>
          
          <blocked>11291</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>74149</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-06-14 15:19:10 +0000</bug_when>
    <thetext>wic currently doesn&apos;t add /boot to the fstab, but it should.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74195</commentid>
    <comment_count>1</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-15 12:29:47 +0000</bug_when>
    <thetext>Should be fixed by this patch:
http://lists.openembedded.org/pipermail/openembedded-core/2017-June/138228.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74334</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-19 16:59:05 +0000</bug_when>
    <thetext>looks like my patch uncovered old wic bug:

RP
13:05 ed2: Does wic write to /etc when its building an image?
13:05 ed2: https://autobuilder.yoctoproject.org/main/builders/nightly-arm/builds/1183/steps/BuildImages_1/logs/stdio - &quot;tar: ./etc: file changed as we read it&quot;
13:06 ed2: something changed while do_image_tar was running, the other tasks were do_image_jffs2 and do_image_wic. I was wondering if wic would make changes?

ed2: so how are other tasks meant to run in parallel without the files changing?
13:08 ed2: nothing is meant to write to the rootfs during do_image_xxx :(

Everything looked good so far because wic didn&apos;t update / and /boot partitions and 100% of oe images have only 2 partitions - / and /boot

However, for more than 2 partitions or even for anything different from / and /boot the bug would cause conflicts similar to above.

To properly fix this we need to copy rootfs to temporary directory, update fstab there and make rootfs image out of that directory.

I&apos;m going to do that in the next revision of the patchset.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74346</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-06-19 18:37:22 +0000</bug_when>
    <thetext>Copying the entire rootfs sounds very painful: best case you hardlink the entire thing at it&apos;s just slow.  Can we not use e2fsprogs to manipulate the fs directly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74384</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-20 11:25:09 +0000</bug_when>
    <thetext>yes, that&apos;s what I&apos;m going to do. I&apos;ll use copyhardlinktree API for that. It&apos;s already used in rootfs plugin in the implementation of --exclude option. It works quite fast and doesn&apos;t require a lot of code changes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74385</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-20 11:30:43 +0000</bug_when>
    <thetext>I can use debugfs to modify fstab if harlinking is slow. Will test it on sato image to understand if this is the case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74459</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-22 11:09:44 +0000</bug_when>
    <thetext>tested hardlinking approach. It&apos;s pretty fast from my point of view:
copying sato image takes only 1.3s

$ time PYTHONPATH=../meta/lib/:../bitbake/lib/ python3 -c &apos;from oe.path import copyhardlinktree; import bb; copyhardlinktree(&quot;tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs&quot;, &quot;/tmp/rootfs-sato&quot;)&apos;

real	0m1.328s
user	0m0.632s
sys	0m0.752s

$ du -sh tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs
235M	tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs

$ du -sh /tmp/rootfs-sato/
235M	/tmp/rootfs-sato/

I&apos;m going to use this at least for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74567</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-06-27 10:02:05 +0000</bug_when>
    <thetext>done, please review: http://lists.openembedded.org/pipermail/openembedded-core/2017-June/138771.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75341</commentid>
    <comment_count>8</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-07-27 14:31:35 +0000</bug_when>
    <thetext>Hardlinking roofs directory content using copyhardlinktree API makes do_image_tar task to exit with error &quot;file changed as we read it&quot; as making hardlink changes file ctime.

In v4 we copy rootfs content instead of hardlinking it:
http://lists.openembedded.org/pipermail/openembedded-core/2017-July/140167.html

It&apos;s slower a bit, but not very slow. For example it takes 1.5 sec for core-image-sato-dev rootfs with size around 500Mb.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75382</commentid>
    <comment_count>9</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-07-28 09:55:02 +0000</bug_when>
    <thetext>v5: back to hardlinking: http://lists.openembedded.org/pipermail/openembedded-core/2017-July/140199.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75435</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-07-30 10:37:58 +0000</bug_when>
    <thetext>the patchset has been accepted to poky master. commit id: ae4ee4d51158eb43f770debf6e41646ef8ed9817</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>