<?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>1487</bug_id>
          
          <creation_ts>2011-09-16 07:57:32 +0000</creation_ts>
          <short_desc>qemu: when booting from live CD, X cannot be started needs unionfs</short_desc>
          <delta_ts>2013-08-19 01:57:41 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>System Startup</product>
          <component>system-startup</component>
          <version>1.0</version>
          <rep_platform>Other</rep_platform>
          <op_sys>x86</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.5 M3</target_milestone>
          <dependson>686</dependson>
          <blocked>4761</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Bruce Ashfield">bruce.ashfield</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>dvhart</cc>
    
    <cc>gary</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>jingdong.lu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>Qi.Chen</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
    
    <cc>yang.shi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16256</commentid>
    <comment_count>0</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-09-16 07:57:32 +0000</bug_when>
    <thetext>See bug 685 for more discussion on this.

Qemu can&apos;t start X using livecd:
  - I think we should change some init scripts for livecd(read-only system). 

This isn&apos;t purely a kernel / BSP issue and we need to work on system wide changes to support booting X in a read-only CD environment. This would be post 1.1 work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16257</commentid>
    <comment_count>1</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2011-09-16 07:58:02 +0000</bug_when>
    <thetext>update. The referenced bug should have been 686</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16578</commentid>
    <comment_count>2</comment_count>
    <who name="Gary Thomas">gary</who>
    <bug_when>2011-09-30 05:23:07 +0000</bug_when>
    <thetext>*** Bug 1542 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18635</commentid>
    <comment_count>3</comment_count>
    <who name="Jingdong Lu">jingdong.lu</who>
    <bug_when>2012-02-17 01:08:41 +0000</bug_when>
    <thetext>It will hang at the following init scripts.
rm: can&apos;t remove &apos;/tmp&apos;: Read-only file system
...
Running postinst /etc/rpm-postinsts/100...
rm: remove &apos;/etc/rpm-postinsts/100&apos;?

I looked for some ways to resolve this &apos;read-only&apos; problem.
1) I remount /tmp using tmpfs but some scripts also will update /etc.
2) Some popular linux distribution use &apos;aufs&apos; on liveCD.

To realize the 2)
(1) Kernel part: Kernel should support &apos;aufs&apos;
We should checkout &apos;aufs&apos; source code(git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git) into kernel tree and set &apos;CONFIG_AUFS_FS=y&apos; in order to make kernel support &apos;aufs&apos;.
(2) Poky part: 
We also should modify the scripts &apos;meta/recipes-core/initrdscripts&apos;. In this scripts, rootfs.img should be mount as &apos;aufs&apos; and it can be updated on liveCD.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18651</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-02-17 14:00:15 +0000</bug_when>
    <thetext>We also have unionfs available. It&apos;s back in the 3.2 kernel tree. That&apos;s
typically what we have used in the past. Have you considered that as well ?

I do agree in general that using a union filesystem is the approach
to pursue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18681</commentid>
    <comment_count>5</comment_count>
    <who name="Jingdong Lu">jingdong.lu</who>
    <bug_when>2012-02-21 19:18:21 +0000</bug_when>
    <thetext>I found unionfs available in 3.2 kernel tree. I will try it and take place of aufs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18781</commentid>
    <comment_count>6</comment_count>
    <who name="Jingdong Lu">jingdong.lu</who>
    <bug_when>2012-02-28 09:11:19 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=jingdonglu/bug1487

I gave a patch to fix this bug. We use unionfs to mount rootfs and compile a liveCD. I boot up from liveCD and X can be started. But the mouse point can&apos;t be displayed on screen. I think it maybe caused by some reasons which are not relevant with unionfs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18783</commentid>
    <comment_count>7</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2012-02-28 13:53:22 +0000</bug_when>
    <thetext>The patch looks fine to me, as for the pointer not starting, I&apos;d agree that it
wouldn&apos;t be directly related to unionfs, but perhaps just a missing pointer
configuration file ? or one that doesn&apos;t match the hardware ?

One suggestion for the script / is to look for unionfs in the .config of the 
kernel and if unionfs isn&apos;t available, error at build time.

i.e. look for the patches for systemtap/utrace), they do this:

+do_compile_uprobes() {
+       if grep -q &quot;CONFIG_UTRACE=y&quot; ${STAGING_KERNEL_DIR}/.config

If you can get X startup working, conditional on unionfs, I&apos;d suggest that the
patch can be sent while you work on the pointer issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>19829</commentid>
    <comment_count>8</comment_count>
    <who name="Yang Shi">yang.shi</who>
    <bug_when>2012-04-03 17:41:45 +0000</bug_when>
    <thetext>This bug is much more harder than what we thought first. Sent out a fix to Yocto mailing list, so far we don&apos;t hear feedback from Yocto folks.


Use unionfs to mount rootfs and make root file system can be writen when using liveCD to boot up.
Set UNION_FS variable depending on kenrel config, so that it can work with kernel which doesn&apos;t
have unionfs feature.

Without UNION FS enabled in kernel, minimal liveCD image can be bootup to ignore the failure of mouting
read-only filesystem. For the sato liveCD image, interactive bootup is needed, but psplash prevents from
booting interactively. In such case ISO image is not usable, so remove ISO image and the corresponding
link and throw error info to warn outside to enable unionfs in kenrel.

We tried a lot of different ways to achieve this:

1. Check if ISO image is built in initramfs-live-boot.bb or not, then prevent from generating ISO image.
But, we can&apos;t distinguish minimal image or sato image.

2. Check if x11 feature is included in initramfs-live-boot.bb or not, then prevent from generating ISO image.
But, x11 feature is contained in minimal image as well even though the package is not built.

3. Tried to append some check code in build_iso() in core-image-sato.bb, but poky can&apos;t support append code
in build_xxx functions like what we do for do_xxx funcitons.

So, we came up with current solution. Any new suggestion is appreciated.

One more thing is that if IMAGE_FSTYPE += &quot;live&quot; is not set in conf/local.conf with this fix, we will get below
error when building sato image:

ERROR: Running idle function
Traceback (most recent call last):
  File &quot;/home/yshi/yocto/poky/bitbake/lib/bb/server/process.py&quot;, line
122, in ProcessServer.idle_commands(delay=0.1):
                 try:
    &gt;                retval = function(self, data, False)
                     if retval is False:
  File &quot;/home/yshi/yocto/poky/bitbake/lib/bb/cooker.py&quot;, line 1130, in
buildTargetsIdle(server=&lt;ProcessServer(ProcessServer-1, started)&gt;,
rq=&lt;bb.runqueue.RunQueue instance at 0x74e4638&gt;, abort=False):
                 try:
    &gt;                retval = rq.execute_runqueue()
                 except runqueue.TaskFailure as exc:
  File &quot;/home/yshi/yocto/poky/bitbake/lib/bb/runqueue.py&quot;, line 947,
in RunQueue.execute_runqueue():
                 self.rqexe = RunQueueExecuteDummy(self)
    &gt;            if self.rqdata.prepare() == 0:
                     self.state = runQueueComplete
  File &quot;/home/yshi/yocto/poky/bitbake/lib/bb/runqueue.py&quot;, line 719,
in RunQueueData.prepare():

procdep.append(self.taskData.fn_index[self.runq_fnid[dep]] + &quot;.&quot; +
self.runq_task[dep])
    &gt;                    self.runq_hash[task] =
bb.parse.siggen.get_taskhash(self.taskData.fn_index[self.runq_fnid[task]],
self.runq_task[task], procdep, self.dataCache)

  File &quot;/home/yshi/yocto/poky/bitbake/lib/bb/siggen.py&quot;, line 153, in
SignatureGeneratorOEBasicHash.get_taskhash(fn=&apos;/home/yshi/yocto/poky/meta/recipes-sato/images/core-image-sato.bb&apos;,
task=&apos;do_bootimg&apos;, deps=[], dataCache=&lt;bb.cache.CacheData object at
0x2148490&gt;):
             k = fn + &quot;.&quot; + task
    &gt;        data = dataCache.basetaskhash[k]
             self.runtaskdeps[k] = []
KeyError: &apos;/home/yshi/yocto/poky/meta/recipes-sato/images/core-image-sato.bb.do_bootimg&apos;

NOTE: Preparing runqueue

Bruce pointed out there was a large discussion about this on hte list last week, so this should be a known issue in poky.

The following changes since commit f81b0593e74a31cb2d992df0583948ff57e3ed98:

  gdbm: Activate -enable-libgdbm-compat and add symlinks to headers in include/gdbm (2012-03-23 17:56:29 +0200)

are available in the git repository at:
  git://git.yoctoproject.org/poky-contrib yshi/1487
  http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=yshi/1487

Yang Shi (2):
      initrdscripts: fix init-live.sh and use unionfs
      sato: Remove questioned ISO image

 meta/recipes-core/initrdscripts/files/init-live.sh |   21 +++++++++++++++++--
 .../initrdscripts/initramfs-live-boot_1.0.bb       |    9 +++++++-
 meta/recipes-sato/images/core-image-sato.bb        |   16 +++++++++++++++
 3 files changed, 42 insertions(+), 4 deletions(-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32204</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-04-16 08:22:57 +0000</bug_when>
    <thetext>What is the current status of this one? I know we enabled unionfs, then disabled it. Can we use the readonly rootfs work to complete this one?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34251</commentid>
    <comment_count>10</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2013-07-01 09:10:45 +0000</bug_when>
    <thetext>merged into poky/master: 29e55997caeb9c6367f9a340e153f829228f36ed

http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=ba5e437bc7335468a70ea293496f78e1a9d66287

http://git.openembedded.org/?p=openembedded-core.git&amp;a=commit;h=3cd6fedd815688b2f3fd97a56feb5f8696ebeace</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>