FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 02-09-2011, 03:29 PM
Benedikt Spranger
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

Package: initramfs-tools
Version: 0.98.8
Severity: grave

Hi,

mkinitramfs copies libgcc_s.so from /usr/local/lib into the
initramfs. After a reboot lvm charge about a missing library
(libgcc_s.so) and failed to start. Due to an update all initramfs images
went broken. Please ignore /usr/local/ at all, or add /usr/local/lib to
the library search path.

Regards
Bene Spranger

-- System Information:
Debian Release: 6.0
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.37-rc3+ (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages initramfs-tools depends on:
ii cpio 2.11-6 GNU cpio -- a program to manage ar
ii findutils 4.4.2-1+b1 utilities for finding files--find,
ii klibc-utils 1.5.21-1 small utilities built with klibc f
ii module-init-tools 3.12-1 tools for managing Linux kernel mo
ii udev 164-4 /dev/ and hotplug management daemo

Versions of packages initramfs-tools recommends:
ii busybox 1:1.17.1-8 Tiny utilities for small and embed

Versions of packages initramfs-tools suggests:
pn bash-completion <none> (no description available)

-- no debconf information



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110209172907.206bd290@ariane.spranger.biz">http://lists.debian.org/20110209172907.206bd290@ariane.spranger.biz
 
Old 02-09-2011, 08:39 PM
maximilian attems
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

On Wed, Feb 09, 2011 at 05:29:07PM +0100, Benedikt Spranger wrote:
> Package: initramfs-tools
> Version: 0.98.8
> Severity: grave

hmmm, severe misinterpretation.

> mkinitramfs copies libgcc_s.so from /usr/local/lib into the
> initramfs. After a reboot lvm charge about a missing library
> (libgcc_s.so) and failed to start. Due to an update all initramfs images
> went broken. Please ignore /usr/local/ at all, or add /usr/local/lib to
> the library search path.

most likely your box is broken, the lvm from Debian I am looking
at does certainly not depend on libgcc:
$ ldd /sbin/lvm
linux-vdso.so.1 => (0x00007fff9d1ff000)
libdl.so.2 => /lib/libdl.so.2 (0x00007fbcdaa77000)
libreadline.so.5 => /lib/libreadline.so.5 (0x00007fbcda837000)
libdevmapper.so.1.02.1 => /lib/libdevmapper.so.1.02.1 (0x00007fbcda614000)
libudev.so.0 => /lib/libudev.so.0 (0x00007fbcda406000)
libc.so.6 => /lib/libc.so.6 (0x00007fbcda0a5000)
/lib64/ld-linux-x86-64.so.2 (0x00007fbcdac9d000)
libncurses.so.5 => /lib/libncurses.so.5 (0x00007fbcd9e5e000)
libselinux.so.1 => /lib/libselinux.so.1 (0x00007fbcd9c40000)

You'd better check what you have localy compiled in /usr/local/lib
and see that it gets out of the way for ldd.

No libgcc also seen in any of the initramfs around.
Unless this bug report gets backed up with real data on why
mkinitramfs would be misbehaving here, this can be closed soon.

--
maks



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110209213900.GS19835@vostochny.stro.at">http://lists.debian.org/20110209213900.GS19835@vostochny.stro.at
 
Old 02-10-2011, 06:00 AM
maximilian attems
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

[ Keep the bugreport on Cc, this is *not* a private communication
and maybe easily lost there, thank you. ]

On Wed, Feb 09, 2011 at 11:41:58PM +0100, Benedikt Spranger wrote:
> # md5sum /sbin/lvm
> a61f4ebc4f34d2f973925bd5e06bc269 /sbin/lvm
> # ldd /sbin/lvm
> linux-gate.so.1 => (0xb774f000)
> libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb7728000)
> libreadline.so.5 => /lib/libreadline.so.5 (0xb76f5000)
> libdevmapper.so.1.02.1 => /lib/libdevmapper.so.1.02.1
> (0xb76d2000) libudev.so.0 => /lib/libudev.so.0 (0xb76c4000)
> libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb757e000)
> /lib/ld-linux.so.2 (0xb7750000)
> libncurses.so.5 => /lib/libncurses.so.5 (0xb7544000)
> libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0xb7527000)
> libselinux.so.1 => /lib/libselinux.so.1 (0xb750b000)

hmm right forgot to check 32 bit legacy, well there the line is similar,
but
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7595000)

what is your cat /etc/ld.so.conf /etc/ld.so.conf.d/*.conf

> > No libgcc also seen in any of the initramfs around.
> Thats bad. See above. libgcc_s.so.1 is needed.

well the question is why do you have a non working libgcc in /usr/local/lib ??

> > mkinitramfs would be misbehaving here, this can be closed soon.
> I hope the output above can clarify.

Nope, your report is still missing a lot, like
lsinitramfs /boot/path_to_broken_initramfs

and the output of
sh -x /usr/sbin/mkinitramfs -o /tmp/fooo

to backup the claims.

thank you.

--
maks



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210070049.GT19835@vostochny.stro.at">http://lists.debian.org/20110210070049.GT19835@vostochny.stro.at
 
Old 02-10-2011, 06:07 AM
maximilian attems
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

[ Again don't drop Cc on bug report ]

On Thu, Feb 10, 2011 at 12:02:49AM +0100, Benedikt Spranger wrote:
> Am Wed, 9 Feb 2011 21:39:00 +0000
> schrieb maximilian attems <max@stro.at>:
>
> > You'd better check what you have localy compiled in /usr/local/lib
> > and see that it gets out of the way for ldd.
> # gcc --version
> gcc (GCC) 4.6.0 20110112 (experimental)

well, why does this end up in /usr/local, me gets confused, anyway
there are newer packages around afais:
gcc-4.6 | 4.6-20110125-1 | experimental | source, amd64, armel, i386, ia64, mips, s390

> This bug and the default update all initramfs with no backup hits me
> really hard.

So it did work at some point? That is an info you didn't tell yet.
You can easily tell it to do backups in /etc/initramfs-tools/initramfs.conf
anyway why don't you keep another kernel around?
Running unstable one should be able to debug one own's box, that's the rule.
It is working well for thousands other, no idea yet what goes wrong here.

--
maks



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210070724.GU19835@vostochny.stro.at">http://lists.debian.org/20110210070724.GU19835@vostochny.stro.at
 
Old 02-10-2011, 10:06 AM
maximilian attems
 
Default 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}"







--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210110635.GW19835@vostochny.stro.at">http://lists.debian.org/20110210110635.GW19835@vostochny.stro.at
 
Old 02-10-2011, 12:30 PM
Benedikt Spranger
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

Am Thu, 10 Feb 2011 11:06:35 +0000
schrieb maximilian attems <max@stro.at>:

> diff --git a/mkinitramfs b/mkinitramfs

Two minor nits:
1) $DESTDIR should be set before using it.
2) "$DESTDIR"/etc should exist.

changed your patch to
---8<---
--- mkinitramfs.orig 2011-01-28 15:09:09.000000000 +0100
+++ mkinitramfs 2011-02-10 12:32:14.335290358 +0100
@@ -167,6 +167,12 @@
DESTDIR="$(mktemp -d ${TMPDIR:-/tmp}/mkinitramfs_XXXXXX)" || exit 1
chmod 755 "${DESTDIR}"

+# make sure that library links are correct and up to date
+mkdir -p "$DESTDIR"/etc
+cp -ar /etc/ld.so.conf* "$DESTDIR"/etc
+ldconfig -r "$DESTDIR" || [[ $UID != "0" ]] &&
+ echo "ldconfig might need uid=0 (root) for chroot()" >2
+
# do not execute cache_run_scripts() if mounted with noexec
NOEXEC=""
fs=$(df -P $DESTDIR | tail -1 | awk '{print $6}')
---8<---

$ lsinitramfs /boot/initrd.img-2.6.32-5-686
/boot/initrd.img-2.6.32-5-686
.
etc
etc/ld.so.conf
etc/ld.so.conf.d
etc/ld.so.conf.d/i486-linux-gnu.conf
etc/ld.so.conf.d/libc.conf
etc/ld.so.cache
etc/modprobe.d
etc/modprobe.d/aliases.conf
...

Sadly the generated initramfs has the same problem.

Regards
Bene



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210143054.0d48fdc8@ariane.spranger.biz">http://lists.debian.org/20110210143054.0d48fdc8@ariane.spranger.biz
 
Old 02-10-2011, 12:52 PM
maximilian attems
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

On Thu, Feb 10, 2011 at 02:30:54PM +0100, Benedikt Spranger wrote:
> Am Thu, 10 Feb 2011 11:06:35 +0000
> schrieb maximilian attems <max@stro.at>:
>
> > diff --git a/mkinitramfs b/mkinitramfs
>
> Two minor nits:
> 1) $DESTDIR should be set before using it.
> 2) "$DESTDIR"/etc should exist.

not enough coffee this morning right, was meant to be done
*after* depmod run, there both "nits" are ok, added in maks/lib
branch see
http://git.debian.org/?p=kernel/initramfs-tools.git;a=shortlog;h=refs/heads/maks/lib

> changed your patch to
> ---8<---
> --- mkinitramfs.orig 2011-01-28 15:09:09.000000000 +0100
> +++ mkinitramfs 2011-02-10 12:32:14.335290358 +0100
> @@ -167,6 +167,12 @@
> DESTDIR="$(mktemp -d ${TMPDIR:-/tmp}/mkinitramfs_XXXXXX)" || exit 1
> chmod 755 "${DESTDIR}"
>
> +# make sure that library links are correct and up to date
> +mkdir -p "$DESTDIR"/etc
> +cp -ar /etc/ld.so.conf* "$DESTDIR"/etc
> +ldconfig -r "$DESTDIR" || [[ $UID != "0" ]] &&
> + echo "ldconfig might need uid=0 (root) for chroot()" >2
> +
> # do not execute cache_run_scripts() if mounted with noexec
> NOEXEC=""
> fs=$(df -P $DESTDIR | tail -1 | awk '{print $6}')
> ---8<---
>
> $ lsinitramfs /boot/initrd.img-2.6.32-5-686
> /boot/initrd.img-2.6.32-5-686
> .
> etc
> etc/ld.so.conf
> etc/ld.so.conf.d
> etc/ld.so.conf.d/i486-linux-gnu.conf
> etc/ld.so.conf.d/libc.conf
> etc/ld.so.cache
> etc/modprobe.d
> etc/modprobe.d/aliases.conf
> ...
>
> Sadly the generated initramfs has the same problem.

which would be what, can we have the error message please?
(if not possible to keep logging netconsole comes handy).

does lvm work (pvscan, vgscan, lvscan, ..)?

thank you

--
maks



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210135227.GB5230@vostochny.stro.at">http://lists.debian.org/20110210135227.GB5230@vostochny.stro.at
 
Old 02-10-2011, 02:14 PM
Ben Hutchings
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

On Thu, Feb 10, 2011 at 02:30:54PM +0100, Benedikt Spranger wrote:
[...]
> +# make sure that library links are correct and up to date
> +mkdir -p "$DESTDIR"/etc
> +cp -ar /etc/ld.so.conf* "$DESTDIR"/etc
> +ldconfig -r "$DESTDIR" || [[ $UID != "0" ]] &&
> + echo "ldconfig might need uid=0 (root) for chroot()" >2
[...]

I think you mean >&2 not >2, right?

Ben.

--
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
- Albert Camus



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210151425.GA28659@decadent.org.uk">http://lists.debian.org/20110210151425.GA28659@decadent.org.uk
 
Old 02-10-2011, 02:37 PM
maximilian attems
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

On Thu, Feb 10, 2011 at 03:14:25PM +0000, Ben Hutchings wrote:
> On Thu, Feb 10, 2011 at 02:30:54PM +0100, Benedikt Spranger wrote:
> [...]
> > +# make sure that library links are correct and up to date
> > +mkdir -p "$DESTDIR"/etc
> > +cp -ar /etc/ld.so.conf* "$DESTDIR"/etc
> > +ldconfig -r "$DESTDIR" || [[ $UID != "0" ]] &&
> > + echo "ldconfig might need uid=0 (root) for chroot()" >2
> [...]
>
> I think you mean >&2 not >2, right?

good catch, fixed in git, but the ldconfig shouldn't be the game changer.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210153744.GB5862@vostochny.stro.at">http://lists.debian.org/20110210153744.GB5862@vostochny.stro.at
 
Old 02-10-2011, 03:18 PM
Benedikt Spranger
 
Default Bug#612633: initramfs-tools: mkinitramfs creates non working initramfs

Am Thu, 10 Feb 2011 13:52:27 +0000
schrieb maximilian attems <max@stro.at>:

> > Sadly the generated initramfs has the same problem.
>
> which would be what, can we have the error message please?
> (if not possible to keep logging netconsole comes handy).
lvm: error while loading shared libraries: libgcc_s.so.1: cannot open
shared object file: No such file or directory.

If I copy "libgcc_s.so" from /usr/local/lib to /usr/lib in the
initramfs image everything works fine.

Regards
Bene



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110210171846.709bc862@ariane.spranger.biz">http://lists.debian.org/20110210171846.709bc862@ariane.spranger.biz
 

Thread Tools




All times are GMT. The time now is 01:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org