Skip to contentSkip to conversation

Dracut fails to install libraries on Debian / Ubuntu systems

DISCUSSION Florian Feldhaus 2 participants 4 messages Feb 4, 2013 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

Due to the multiarch approach of debian [1] some libraries such as libnss_files* are not located in /lib64 but instead in /lib/x86_64-linux-gnu . As the dracut function inst_libdir_file() only searches in the /lib and /lib64 folders without checking their subfolders, some required libraries are not included on Debian / Ubuntu systems. There is an unsolved bug report on Ubuntu launchpad from 2011 with more details [2].

I would like to propose two different solutions and be glad to create a patch for one of them, as soon as I could get some feedback what approach would be best:
1) Include /lib/x86_64-linux-gnu when detecting the libdirs in dracut-functions.sh
2) Change inst_libdir_file() to recursively search the lib folders for the required libraries e.g. by using the find utility

I would be glad if we could solve this issue, as it blocks using dracut with NFSv3 on Debian / Ubuntu systems.

--Florian

[1] http://wiki.debian.org/Multiarch/TheCaseForMultiarch
[2] https://bugs.launchpad.net/ubuntu/+source/dracut/+bug/882282

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

2013/2/4 Florian Feldhaus <[email protected]>:

Quoted 16 lines

Due to the multiarch approach of debian [1] some libraries such as libnss_files* are not located in /lib64 but instead in /lib/x86_64-linux-gnu . As the dracut function inst_libdir_file() only searches in the /lib and /lib64 folders without checking their subfolders, some required libraries are not included on Debian / Ubuntu systems. There is an unsolved bug report on Ubuntu launchpad from 2011 with more details [2].

I would like to propose two different solutions and be glad to create a patch for one of them, as soon as I could get some feedback what approach would be best:
1) Include /lib/x86_64-linux-gnu when detecting the libdirs in dracut-functions.sh
2) Change inst_libdir_file() to recursively search the lib folders for the required libraries e.g. by using the find utility

Quoted 2 lines

I would be glad if we could solve this issue, as it blocks using dracut with NFSv3 on Debian / Ubuntu systems.

http://git.kernel.org/?p=boot/dracut/dracut.git;a=commit;h=c9143a63fef0d6f2dfd7cc37b09fc68d744d900f

Regards,

JonAn.

#3 lore raw
Quoted 22 lines · Jon Ander Hernandez

2013/2/4 Florian Feldhaus <florian.feldhaus@...>:

Quoted 18 lines

Due to the multiarch approach of debian [1] some libraries such as libnss_files* are not located in /lib64 but instead in /lib/x86_64-linux-gnu . As the dracut function inst_libdir_file() only searches in the /lib and /lib64 folders without checking their subfolders, some required libraries are not included on Debian / Ubuntu systems. There is an unsolved bug report on Ubuntu launchpad from 2011 with more details [2].

I would like to propose two different solutions and be glad to create a patch for one of them, as soon as I could get some feedback what approach would be best:
1) Include /lib/x86_64-linux-gnu when detecting the libdirs in dracut-functions.sh
2) Change inst_libdir_file() to recursively search the lib folders for the required libraries e.g. by using the find utility

I would be glad if we could solve this issue, as it blocks using dracut with NFSv3 on Debian / Ubuntu systems.

http://git.kernel.org/?p=boot/dracut/dracut.git;a=commit;h=c9143a63fef0d6f2dfd7cc37b09fc68d744d900f

Thanks for the link. I wasn't aware of the paramter --libdirs, probably as it is not shown when calling dracut --help. Besides that, I expected that dracut would by default search all relevant lib locations for Debian.

I will try to create a patch for updating the help and the documentation.

Is there a reason why /lib/x86_64-linux-gnu is not included by default in the libdirs?

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 7 lines

Thanks for the link. I wasn't aware of the paramter --libdirs, probably as it is not shown when calling dracut --help. Besides that, I expected that dracut would by default search all relevant lib locations for Debian.

I will try to create a patch for updating the help and the documentation.

:-)

Quoted 2 lines

Is there a reason why /lib/x86_64-linux-gnu is not included by default in the libdirs?

IMHO multiarch triplets are something only related to Debian and can change or be extended in the future, so it is better to guess them

I see that Thomas didn't add a configuration file to add the multiarch paths, as I did to my packages

/etc/dracut.conf.d/multiarch.conf
libdirs+="$(sed 's/#.*//' /etc/ld.so.conf.d/*-linux-gnu.conf 2>/dev/null)"

Regards,

JonAn.