Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409167 - sys-kernel/dracut-017-r1: inst_symlink will not create directory containing the symlink
Summary: sys-kernel/dracut-017-r1: inst_symlink will not create directory containing t...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL: http://thread.gmane.org/gmane.linux.k...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-21 12:57 UTC by Martin von Gagern
Modified: 2012-03-26 13:08 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2012-03-21 12:57:26 UTC
Motivated by this recent elog, I'm toying around with dracut and find that it will report error messages during initramfs generation. I'm using the hostonly mode, so I'm not surprised if others will not be able to reproduce this by a simple dracut run.

In any case, here are the messages, from a run of dracut -v:
[...]
I: *** Including module: dm ***
[...]
D: Installing /sbin/dmeventd
ln: failed to create symbolic link `/var/tmp/initramfs.GNt5Io//usr/lib64/libdevmapper-event.so': No such file or directory
ln: failed to create symbolic link `/var/tmp/initramfs.GNt5Io//usr/lib64/libdevmapper-event.so': No such file or directory
D: Installing /usr/lib64/libdevmapper-event.so
[...]

OK, what's happening here? /usr/lib/dracut/modules.d/90dm/module-setup.sh says:
    for _i in {"$libdir","$usrlibdir"}/libdevmapper-event.so*; do
        [ -e "$_i" ] && dracut_install "$_i"
    done
which triggers a call for dracut_install for /usr/lib64/libdevmapper-event.so. That file is a symlink:
/usr/lib64/libdevmapper-event.so -> ../../lib64/libdevmapper-event.so.1.02
So dracut_install will attempt to call inst_symlink, falling back to other means if that fails.

Now that function (found in /usr/lib/dracut/dracut-functions.sh) makes sure to install the target of the symlink before creating the link itself. It will, however, fail to create the directory containing the symlink, i.e. /usr/lib64 in this case. That should be fixed, to ensure symlinks get installed as symlinks, not copied over.
Comment 1 Marcin Mirosław 2012-03-25 13:23:55 UTC
Similar problem: # LANG=en dracut -H --bzip2 initramfs-3.2.12-gentoo.img 3.2.12-gentoo --force
I: *** Including module: dash ***
I: *** Including module: caps ***
I: *** Including module: i18n ***
I: *** Including module: kernel-modules ***
I: *** Including module: mdraid ***
I: *** Including module: resume ***
I: *** Including module: rootfs-block ***
I: *** Including module: terminfo ***
I: *** Including module: udev-rules ***
I: Skipping udev rule: 50-udev.rules
I: Skipping udev rule: 95-late.rules
ln: failed to create symbolic link `/var/tmp/initramfs.VN9nB9//usr/lib64/libnss_files.so': No such file or directory
ln: failed to create symbolic link `/var/tmp/initramfs.VN9nB9//usr/lib64/libnss_files.so': No such file or directory
I: *** Including module: usrmount ***
I: *** Including module: base ***
I: *** Including module: fs-lib ***
I: *** Including module: shutdown ***
I: *** Including modules done ***
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-25 22:14:23 UTC
Patch is ready, sent to upstream. When accepted I'll apply it in ebuilds.
Comment 3 Amadeusz Żołnowski (RETIRED) gentoo-dev 2012-03-26 13:08:30 UTC
Patch applied by upstream and I have fixed it in dracut-017-r2. Thanks for the report!