| Summary: | Missing symlink to /etc/init.d/functions.initscripts on first boot | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Marc Ferland <marc.ferland> | ||||||||
| Component: | core | Assignee: | Saul Wold <sgw> | ||||||||
| Status: | RESOLVED NOTABUG | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | Medium | CC: | meta.mr.watcher, meta.watcher, poky.bs.watcher, poky.watcher, Qi.Chen | ||||||||
| Version: | 1.4 | ||||||||||
| Target Milestone: | 1.4.2 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Multiple | ||||||||||
| Whiteboard: | |||||||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||||||
| Verified: | Documentation change: | --- | |||||||||
| Attachments: |
|
||||||||||
|
Description
Marc Ferland
2013-05-31 14:59:17 UTC
change product to oe-core I just verified a 1.4 core-image-minimal image and found that the functions files is correctly linked to functions.initscripts. lrwxrwxrwx 1 sgw sgw 33 May 6 13:57 functions -> /etc/init.d/functions.initscripts -rw-r--r-- 1 sgw sgw 1391 May 6 13:48 functions.initscripts Can you confirm what your settings are for building your image? Are you using 1.4.1, master? my Head is: 789b2b7, which is the Dylan-9.0.0 tag. (In reply to comment #2) > I just verified a 1.4 core-image-minimal image and found that the functions > files is correctly linked to functions.initscripts. > The symlink exists on my image too, the problem is that it is created at the _end_ of the first boot process i.e.: it's not there early on the first boot. > Can you confirm what your settings are for building your image? > > Are you using 1.4.1, master? my Head is: 789b2b7, which is the Dylan-9.0.0 > tag. I'm using dylan branch, commit:b15bdd842092. The image uses udev/sysv (no systemd). Current layers are: BBLAYERS ?= " \ /home/marc/yocto/build/yocto13/poky/meta \ /home/marc/yocto/build/yocto13/poky/meta-yocto \ /home/marc/yocto/build/yocto13/poky/meta-yocto-bsp \ /home/marc/yocto/build/yocto13/poky/meta-intel \ /home/marc/yocto/build/yocto13/poky/meta-intel/meta-crownbay \ /home/marc/yocto/build/yocto13/poky/meta-sonatest \ /home/marc/yocto/build/yocto13/poky/meta-sonatest/meta-osprey \ /home/marc/yocto/build/yocto13/poky/meta-openembedded/meta-oe \ /home/marc/yocto/build/yocto13/poky/meta-openembedded/meta-networking \ " For example, this fixes the bug for udev (but like I said other scripts are also affected): diff --git a/meta/recipes-core/udev/udev/init b/meta/recipes-core/udev/udev/init index cd87f50..d58ecc5 100644 --- a/meta/recipes-core/udev/udev/init +++ b/meta/recipes-core/udev/udev/init @@ -9,7 +9,7 @@ # Short-Description: Start udevd, populate /dev and load drivers. ### END INIT INFO -. /etc/init.d/functions +. /etc/init.d/functions.initscripts export TZ=/etc/localtime Probably not the right thing to do but it shows what I had to do to get around this issue. Marc, I was looking at the generated rootfs image prior to first boot, by loop-back mount of the .ext3 (in my case). Can you look at your rootfs image, I pulledthe dylan you have since it is a different git tag than what was 9.0.0, it seems to be Dylan Head for 1.4.1 and when I look at the image (prior to first boot) via a loop back mount those files are correctly linked. I double checked my first boot and udev starts up with no issues and the symlinks are correct, can you try a straight up poky build, I wonder if we are chasing some other issue. Thanks Hi Marc, The symlink is created by update-alternatives. It's specified in the postins section of the .spec (take rpm package manager as and example), and is created when installed into the rootfs. In your case, the symlink is not created properly at rootfs time? Could you please check the do_rootfs log to see whether there are any failures? I think maybe the postinst of initscripts failed on your host at rootfs time. Could you please provide more information? Thanks, Chen Qi Created attachment 1241 [details]
log.do_rootfs
Created attachment 1242 [details]
initscripts postinst
I see update-alternatives linking lots of things but no sign of /etc/init.d/functions. I'm not seeing any failures either. I also see this line in my log.do_rootfs: ... Delayed package scriptlet: # initscripts - postinst ... as well as this in my post-install scripts: tmp/work/veo1664-poky-linux/sonatest-image/1.0-r29/rootfs/etc/rpm-postinsts: total used in directory 20K available 423755752 drwxr-xr-x 1 marc marc 96 Jun 4 13:36 . drwxr-xr-x 1 marc marc 1.4K Jun 4 13:37 .. -rwxr-xr-x 1 marc marc 327 Jun 4 13:35 initscripts ... Note: both files attached to bug report. OK, so we need to understand what's different between your setup and ours such that the postinsts is being delayed, looking in my logs I see the following: update-alternatives: Linking /srv/hdd/releases/dylan/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs//boot/bzImage to bzImage-3.8.11-yocto-standard 18:Installing initscripts ######################################## [ 20%] Output from initscripts-1.0-r140@i586: update-alternatives: Linking /srv/hdd/releases/dylan/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/rootfs//etc/init.d/functions to /etc/init.d/functions.initscripts Which is confirmed by the fact that the link exists in my rootfs image. What additional targets are you building from the meta-oe and meta-sonatest? Have you tried with out those layers (as a verification test). Something in those layers might be affecting this. BTW, are you on #yocto on freenode? (In reply to comment #10) > What additional targets are you building from the meta-oe and meta-sonatest? > Have you tried with out those layers (as a verification test). Something in > those layers might be affecting this. > > BTW, are you on #yocto on freenode? I have a couple of images defined in meta-sonatest that I build. They all inherit from core-image. They where working correctly with 1.3. I'll try to build core-image-minimal without these two layers. P.S. No, I'm not on #yocto, I should probably create an account. Got it!
I have a initscripts_1.0.bbappend in my meta-sonatest layer. It defines a pkg_postinst_${PN} function thats used to generate the /etc/hostname on first boot.
It looks like this messes up how update-alternative generates its symlinks.
If I comment out the pkg_postinst function and rebuild, I get:
lrwxrwxrwx 1 marc marc 33 Jun 5 13:56 functions -> /etc/init.d/functions.initscripts
-rw-r--r-- 1 marc marc 1.4K Jun 5 13:55 functions.initscripts
like I was suppose to.
Is this a bug, or did I miss something here?
Great!! If you could attach your .bbappend that might help understand what's really happening. I think a better place to set your hostname would be in the base-files recipe since that's where is created there. We might need to change that to be hostname ?= "openembedded" or maybe even ??= to allow distro and / or local.conf override. You could try from a .bbappend, but I think it will need more. Created attachment 1243 [details]
initscripts bbappend
Thanks for your help on this one! I'll make the change to bbappend base-files instead of initscripts. I am not entirely sure, but I think your bbappend is actaully overriding the default and you should try using _append, but since your would fail on the host it gets deferred to the target which is why you where seeing it happen late. I will close this bug now. |