[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs



On Thu, Feb 10, 2011 at 11:48:57AM +0100, Benedikt Spranger wrote:
> 
> Just to clarify. The libgcc_s.so.1 is working. The Bug-Report is about
> the library search path. mkinitramfs copies libgcc_s.so.1
> from /usr/local/lib to /usr/local/lib in the generated initramfs, which
> is not in the library search path. Therefor lvm stops working. The
> solution is very easy. Ignore /usr/local at all, or put /usr/local/lib
> it into the library search path. eglibc did this per default.
> 
> for the files:
> > lsinitramfs /boot/path_to_broken_initramfs
[snipp]
> usr/local/lib
> usr/local/lib/libgcc_s.so.1

If you had take time to properly formulate your report, aboves would
have been clearer from message 1.

Please test belows untested patch, adding the lib search path for
homebrewn stuff and running full ldconfig on initramfs:

thank you.

diff --git a/mkinitramfs b/mkinitramfs
index 3a46a10..414a330 100755
--- a/mkinitramfs
+++ b/mkinitramfs
@@ -164,6 +164,11 @@ if [ ! -e "${MODULESDIR}/modules.dep" ]; then
 	depmod ${version}
 fi
 
+# make sure that library links are correct and up to date
+cp -ar /etc/ld.so.conf* "$DESTDIR"/etc
+ldconfig -r "$DESTDIR" || [[ $UID != "0" ]] && \
+	echo "ldconfig might need uid=0 (root) for chroot()" >2
+
 DESTDIR="$(mktemp -d ${TMPDIR:-/tmp}/mkinitramfs_XXXXXX)" || exit 1
 chmod 755 "${DESTDIR}"
 






Reply to: