| Summary: | qemu: when booting from live CD, X cannot be started needs unionfs | ||
|---|---|---|---|
| Product: | [Runtime] System Startup | Reporter: | Bruce Ashfield <bruce.ashfield> |
| Component: | system-startup | Assignee: | Chen Qi <Qi.Chen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Low | CC: | bluelightning, dvhart, gary, jessica.zhang, jingdong.lu, kevin.tian, liezhi.yang, mark.hatle, Qi.Chen, richard.purdie, ross.burton, sgw, yang.shi |
| Version: | 1.0 | ||
| Target Milestone: | 1.5 M3 | ||
| Hardware: | Other | ||
| OS: | x86 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
| Bug Depends on: | 686 | ||
| Bug Blocks: | 4761 | ||
|
Description
Bruce Ashfield
2011-09-16 07:57:32 UTC
update. The referenced bug should have been 686 *** Bug 1542 has been marked as a duplicate of this bug. *** It will hang at the following init scripts. rm: can't remove '/tmp': Read-only file system ... Running postinst /etc/rpm-postinsts/100... rm: remove '/etc/rpm-postinsts/100'? I looked for some ways to resolve this 'read-only' problem. 1) I remount /tmp using tmpfs but some scripts also will update /etc. 2) Some popular linux distribution use 'aufs' on liveCD. To realize the 2) (1) Kernel part: Kernel should support 'aufs' We should checkout 'aufs' source code(git://aufs.git.sourceforge.net/gitroot/aufs/aufs3-standalone.git) into kernel tree and set 'CONFIG_AUFS_FS=y' in order to make kernel support 'aufs'. (2) Poky part: We also should modify the scripts 'meta/recipes-core/initrdscripts'. In this scripts, rootfs.img should be mount as 'aufs' and it can be updated on liveCD. We also have unionfs available. It's back in the 3.2 kernel tree. That'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. I found unionfs available in 3.2 kernel tree. I will try it and take place of aufs. 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't be displayed on screen. I think it maybe caused by some reasons which are not relevant with unionfs. The patch looks fine to me, as for the pointer not starting, I'd agree that it
wouldn't be directly related to unionfs, but perhaps just a missing pointer
configuration file ? or one that doesn't match the hardware ?
One suggestion for the script / is to look for unionfs in the .config of the
kernel and if unionfs isn't available, error at build time.
i.e. look for the patches for systemtap/utrace), they do this:
+do_compile_uprobes() {
+ if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config
If you can get X startup working, conditional on unionfs, I'd suggest that the
patch can be sent while you work on the pointer issue.
This bug is much more harder than what we thought first. Sent out a fix to Yocto mailing list, so far we don'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'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'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'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 += "live" 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 "/home/yshi/yocto/poky/bitbake/lib/bb/server/process.py", line
122, in ProcessServer.idle_commands(delay=0.1):
try:
> retval = function(self, data, False)
if retval is False:
File "/home/yshi/yocto/poky/bitbake/lib/bb/cooker.py", line 1130, in
buildTargetsIdle(server=<ProcessServer(ProcessServer-1, started)>,
rq=<bb.runqueue.RunQueue instance at 0x74e4638>, abort=False):
try:
> retval = rq.execute_runqueue()
except runqueue.TaskFailure as exc:
File "/home/yshi/yocto/poky/bitbake/lib/bb/runqueue.py", line 947,
in RunQueue.execute_runqueue():
self.rqexe = RunQueueExecuteDummy(self)
> if self.rqdata.prepare() == 0:
self.state = runQueueComplete
File "/home/yshi/yocto/poky/bitbake/lib/bb/runqueue.py", line 719,
in RunQueueData.prepare():
procdep.append(self.taskData.fn_index[self.runq_fnid[dep]] + "." +
self.runq_task[dep])
> 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 "/home/yshi/yocto/poky/bitbake/lib/bb/siggen.py", line 153, in
SignatureGeneratorOEBasicHash.get_taskhash(fn='/home/yshi/yocto/poky/meta/recipes-sato/images/core-image-sato.bb',
task='do_bootimg', deps=[], dataCache=<bb.cache.CacheData object at
0x2148490>):
k = fn + "." + task
> data = dataCache.basetaskhash[k]
self.runtaskdeps[k] = []
KeyError: '/home/yshi/yocto/poky/meta/recipes-sato/images/core-image-sato.bb.do_bootimg'
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(-)
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? merged into poky/master: 29e55997caeb9c6367f9a340e153f829228f36ed http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ba5e437bc7335468a70ea293496f78e1a9d66287 http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3cd6fedd815688b2f3fd97a56feb5f8696ebeace |