Re: SuSE 9.3 64-Bit and problems with booting from usb-stick

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

 



Peter_22@xxxxxx wrote:
> Ok, now it works! It was file /lib64/ld-2.3.4.so that missed.
> build-initrd.sh couldn´t get that file because insmod and losetup need file
> /lib64/ld-linux-x86-64.so.2. But this file is only a link to above
> /lib64/ld-2.3.4.so! So you could call that braindamage.

The symlink is not the problem here. Problem is that ldd program output
format was changed in incompatible way.

This is what ldd output used to look like on a sane box:

        libc.so.6 => /lib/libc.so.6 (0x4001e000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Notice how every library file dependence is preceeded by '=>' in uniform
way. The build-initrd.sh script from loop-AES-v3.0c and older expect to find
that '=>' before a file that needs to be copied.

I don't run Red Hat / Fedora distros myself, but I have been told that on
Fedora Core 3, the ldd program pukes out something like this:

        linux-gate.so.1 =>  (0xffffe000)
        libc.so.6 => /lib/tls/libc.so.6 (0x42c2b000)
        /lib/ld-linux.so.2 (0x42c12000)

First line lists a dependency on some library file that does not even exist.
Score: 10 brain damage points. Third line no longer has that '=>' that some
scripts expect to be there. 3 points.

OTOH, above ldd output format breakage seems to be well in-line with Linux
business model, which seems to be something like this:

1)  Intentionally make something incompatible or break some API.
2)  Find customers whose products or servers were broken by said change.
3)  Profit.

Anyway, below is a patch for build-initrd.sh script that makes it work with
sane old ldd output format as well as not-so-sane new ldd output format.

-- 
Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD


--- ../loop-AES-v3.0c/build-initrd.sh	Sat May  8 10:36:31 2004
+++ ./build-initrd.sh	Sun Apr 24 21:37:28 2005
@@ -740,7 +740,7 @@
 for x in ${z} ; do
     echo Copying ${SOURCEROOT}${x} to ${DESTINATIONROOT}${DESTINATIONPREFIX}
     cp -p ${SOURCEROOT}${x} ${DESTINATIONROOT}${DESTINATIONPREFIX}
-    y=`ldd ${SOURCEROOT}${x} | perl -ne 'if(/ => ([^ ]*) /){print "$1\n"}'`
+    y=`ldd ${SOURCEROOT}${x} | perl -ne 'if(/([^ ]*) \(0x/){print "$1\n"}'`
     for a in ${y} ; do
         echo Copying ${SOURCEROOT}${a} to ${DESTINATIONROOT}${DESTINATIONPREFIX}
         cp -p ${SOURCEROOT}${a} ${DESTINATIONROOT}${DESTINATIONPREFIX}

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/



[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux