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.
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 ***
Patch is ready, sent to upstream. When accepted I'll apply it in ebuilds.
Patch applied by upstream and I have fixed it in dracut-017-r2. Thanks for the report!