From: John E. <jo...@co...> - 2008-04-26 18:38:22
|
On Sat, Apr 26, 2008 at 03:43:44PM +0200, Gilles Espinasse wrote: > From: "John Edwards" <jo...@co...>: >> Hi >> I've been trying to track down the problems with Pentium I CPUs not being >> able to boot the initramfs and have found that the busybox used in the >> initramfs is dynamically compiled: >> ------------------------------------------------------------------------ >> chroot trunk-r1332_built/build_i486/ipcop ldd usr/lib/mkinitramfs/bin/busybox >> linux-gate.so.1 => (0xb7ef2000) >> libc.so.6 => /lib/libc.so.6 (0xb7db7000) >> /lib/ld-linux.so.2 (0xb7ef3000) >> ------------------------------------------------------------------------ >> >> Would it not be a lot safer to statically compile this? > On DIY site under binutils pass1, there is a link to a note by Ulrich > Drepper (a glibc developper) which claim static linking is not safer and > inferior to dynamically linking. > http://www.diy-linux.org/reference-build/temptools2.html That talks about not static linking binutils and GCC, but not busybox. The words "busybox" or "initramfs" does not appear on that webpage. > http://people.redhat.com/drepper/no_static_linking.html Again the webpage does not talk busybox or initramfs. Drepper's prefers dynamic libraries is for the following reasons: 1) Easier security fixes. => But busybox is only used in initramfs and then dropped. 2) Address randomisation allows for some protection against stack attacks. => Again busybox is only being used at boot. 3) Efficient use of memory. => Busybox will only run at boot. 4) Can use locale information. => We don't use locale in the initramfs. 5) Can use NSS modules. => We don't use NSS modules in the initramfs. 6) Easier to find license violations. => Busybox only uses libc and kernel (LGPL & GPL) so not a problem. 7) Use to use debugging and profiling libraries. => These libraries are not availble in initramfs. Everything he says is good advise for general use. But busybox in initramfs is *not* general use, it's going to run once at boot and only uses libc. Also the RedHat/Centos version of busybox is *statically* compiled: ---------------------------------------------------------------------- $ file /sbin/busybox /sbin/busybox: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, statically linked, for GNU/Linux 2.6.9, stripped ---------------------------------------------------------------------- On the search for more test machines I can confirm the same problem booting a Pentium 75 with 32MB RAM on an Intel FX motherboard. And thanks to Josef Vogt for being the first to submit a test report on a Pentium 200 with 32MB RAM on a PA-2010+ motherboard (VIA chipset I think). The machine can boot IPCop 1.4.18, but fails to boot with my test image at: checking if image is initramfs... it is This is earlier than the other machines we have tested on, which uses Intel motherboards, and probably a related problem. -- #---------------------------------------------------------# | John Edwards Email: jo...@co... | #---------------------------------------------------------# |