| Summary: | udev mount.sh writes to /tmp before it is symlinked to /var/tmp | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Marc Ferland <marc.ferland> |
| Component: | core | Assignee: | Chen Qi <Qi.Chen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | jessica.zhang, liezhi.yang, meta.mr.watcher, meta.watcher, Qi.Chen, sgw, yi.zhao, zhenfeng.zhao |
| Version: | 1.4 | ||
| Target Milestone: | 1.5 M1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | Blocked, need some further discussion | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Marc Ferland
2012-11-09 22:36:43 UTC
Symlink /tmp to /var/tmp should be done in populate_volatiles.sh. So I would suggest delete it from bootmisc.sh, add it to /etc/default/volatiles/<config>. Let populate_volatiles.sh handle the details. Something like: --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles @@ -31,6 +31,7 @@ l root root 1777 /var/lock /var/volatile/lock l root root 0755 /var/log /var/volatile/log l root root 0755 /var/run /var/volatile/run l root root 1777 /var/tmp /var/volatile/tmp +l root root 1777 /tmp /var/tmp d root root 0755 /var/lock/subsys none f root root 0664 /var/log/wtmp none f root root 0664 /var/run/utmp none A related bug is Bug#3181. One more problem: udev seems to have a high priority in initscripts that it does no deserve. The udev script states clearly that it needs 'mountvirtfs'. root@beagleboard:/etc/init.d# head udev #!/bin/sh ### BEGIN INIT INFO # Provides: udev # Required-Start: mountvirtfs # Required-Stop: # Default-Start: S # Default-Stop: # Short-Description: Start udevd, populate /dev and load drivers. ### END INIT INFO On the other hand, we can see mountall.sh which provides 'mountvirtfs' has a lower priority then udev. This should be fixed. root@beagleboard:/etc/rcS.d# ls -1 S00psplash.sh S02banner.sh S02sysfs.sh S03udev S04modutils.sh S06alignment.sh S07bootlogd S10checkroot.sh S35mountall.sh S37populate-volatile.sh S38devpts.sh S39alsa-state S39hostname.sh S40networking S43portmap S45mountnfs.sh S55bootmisc.sh udev should have a lower priority than mountall.sh and populate_volatiles.sh. Any suggestion would be welcome. (In reply to comment #1) > Symlink /tmp to /var/tmp should be done in populate_volatiles.sh. So I would > suggest delete it from bootmisc.sh, add it to > /etc/default/volatiles/<config>. Let populate_volatiles.sh handle the > details. > Something like: > --- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles > +++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles > @@ -31,6 +31,7 @@ l root root 1777 /var/lock /var/volatile/lock > l root root 0755 /var/log /var/volatile/log > l root root 0755 /var/run /var/volatile/run > l root root 1777 /var/tmp /var/volatile/tmp > +l root root 1777 /tmp /var/tmp > d root root 0755 /var/lock/subsys none > f root root 0664 /var/log/wtmp none > f root root 0664 /var/run/utmp none > > A related bug is Bug#3181. After a second thought, I realize that updating populate_volatile.sh script described in Bug#3181, together with the changes described above would solve this problem. Blocked due to read-only rootfs support. (I'm somewhat confused about it, for the previous scripts don't support RO rootfs as well.) merged into poky/master: 297906d39cfcaa56009214e8759b9853f82f02d7 http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=12c4acd7ac5a27cf3676065b60f1c8395c96854c Reopen this bug. Because if it's not first boot, /tmp has already been symlinked to /var/volatile/tmp which is not created when udev starts, resulting in touch /tmp/.automount-$name failed. I'll send out a patch to fix this problem soon. Mark the milestone to 1.5 since dylan has been released. merged into poky/master: cab467dfd78e667775a3969350961358acf1daaf |