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

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



Am Thu, 10 Feb 2011 17:48:36 +0000
schrieb maximilian attems <max@stro.at>:

> On Thu, Feb 10, 2011 at 05:18:46PM +0100, Benedikt Spranger wrote:
> > 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.
> 
> what does on that box 'ldconfig -p' show?

I can send the over 1600 lines, but i think it is very useless.
Another try to explain the problem:

1) I have a local installed gcc:
$ ls -l /usr/local/lib/libgcc*
lrwxrwxrwx 1 root staff     13 12. Jan 15:56 /usr/local/lib/libgcc_s.so -> libgcc_s.so.1
-rw-r--r-- 1 root staff 451923 12. Jan
15:56 /usr/local/lib/libgcc_s.so.1

2) "lvm" needs "libgcc_s.so.1"
$ ldd /sbin/lvm
        linux-gate.so.1 =>  (0xb7852000)
        libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb782b000)
        libreadline.so.5 => /lib/libreadline.so.5 (0xb77f8000)
        libdevmapper.so.1.02.1 => /lib/libdevmapper.so.1.02.1 (0xb77d5000)
        libudev.so.0 => /lib/libudev.so.0 (0xb77c7000)
        libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7681000)
        /lib/ld-linux.so.2 (0xb7853000)
        libncurses.so.5 => /lib/libncurses.so.5 (0xb7647000)
        libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 (0xb762a000)
        libselinux.so.1 => /lib/libselinux.so.1 (0xb760e000)

3) create a initramfs:
$ /usr/sbin/mkinitramfs -o /tmp/fooo.bad 2.6.32-5-686

4) uncompress and extract /tmp/fooo.bad
# mkdir initramfs
# cd initramfs
# gzip -cd /tmp/fooo.bad | sudo cpio -i

5) move libgcc_s.so.1 from /usr/local/lib to /usr/lib
# mv usr/local/lib/libgcc_s.so.1 usr/lib

6) archive and compress the initrd
# find . | cpio -H newc -o > /tmp/fooo.1
# gzip -9f /tmp/fooo.1
# mv /tmp/fooo.1.gz /tmp/fooo.good

7) reboot and use initramfs fooo.bad
ERROR: lvm cannot start due to
lvm: error while loading shared libraries: libgcc_s.so.1:
cannot open shared object file: No such file or directory.

ends up in initramfs shell.

8) reboot and use initramfs fooo.good
Everything works fine.

Regards
    Bene



Reply to: