Morten and Jim, On Wed, Feb 22, 2006 at 09:45:44AM +0100, Morten Nilsen wrote: > Jim Butler wrote: > > I get lots of "Undefined Reference to" errors - page after page > > http://www.trustix.org/wiki/index.php/TrustixFAQ
Oh well, I was kind of assuming this was another issue since Jim mentioned that it was a new problem coming up. Of course, if that's just this... Sorry for the wasted bits. Just wanted to help. While I'm at it, Jim, you may want to have a look at question 16 in the FAQ Morten mentioned. Personally, I prefer another approach: don't modify the way sysklogd is started and patch the kernel instead. Here's a link to the patch: http://www.mail-archive.com/[email protected]/msg00591.html It applies to all stable 2.6.x kernels I've tried too with some fuzz. I also had to install a newer mkinitrd that the one that comes with TSL 2.2 to load modules dynamically that are required to mount the root filesystem. If all you need to mount your root filesystem is static, you don't need this. I used that one: http://rpmfind.net/linux/RPM/fedora/3/i386/mkinitrd-4.1.18-2.i386.html Some people have argued that this may not be the best way to solve the issue, or that you really shouldn't need anything dynamic to load your root filesystem, but that worked nicely for me. Then I also had to patch /etc/rc.sysinit and /etc/init.d/halt as follows. I'm not claiming these are the right patches. It's just my way. ------------------------- begin rc.sysinit.patch ------------------- *** rc.sysinit.org Tue Oct 4 11:35:42 2005 --- rc.sysinit Tue Oct 4 11:35:42 2005 *************** *** 4,9 **** --- 4,12 ---- # # Taken in part from Miquel van Smoorenburg's bcheckrc. # + # 04-Oct-2005 AlainF Modified to run properly with 2.4 and 2.6 kernels + # Changes mostly taken from rc.sysinit of TSL3 and RHAS3 + # Search for "2.6" for changes. # Rerun ourselves through initlog if [ -z "$IN_INITLOG" -a -x /sbin/initlog ]; then *************** *** 14,19 **** --- 17,26 ---- [ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev HOSTNAME=`/bin/hostname` + # 2.6 + KERNEL_VER=`uname -r` + SUBKERN_VER=`echo ${KERNEL_VER:0:3}` + if [ -f /etc/sysconfig/network ]; then . /etc/sysconfig/network else *************** *** 81,86 **** --- 88,97 ---- # Mount /proc (done here so volume labels can work with fsck) action $"Mounting proc filesystem: " mount -n -t proc /proc /proc + # 2.6 + if [ "$SUBKERN_VER" != "2.4" ]; then + action $"Mounting sys filesystem: " mount -n -t sysfs /sys /sys + fi # Unmount the initrd, if necessary if LC_ALL=C grep -q /initrd /proc/mounts && ! LC_ALL=C grep -q /initrd/loopfs /proc/mounts ; then *************** *** 188,202 **** fi if [ $usb = 1 -a ! -f /proc/bus/usb/devices ]; then action $"Mounting USB filesystem: " mount -t usbdevfs usbdevfs /proc/bus/usb fi needusbstorage= if [ $usb = "1" ]; then ! needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08" /proc/bus/usb/devices 2>/dev/null` LC_ALL=C grep 'hid' /proc/bus/usb/drivers || action $"Initializing USB HID interface: " modprobe hid 2> /dev/null action $"Initializing USB keyboard: " modprobe keybdev 2> /dev/null action $"Initializing USB mouse: " modprobe mousedev 2> /dev/null fi if [ -f /fastboot ] || LC_ALL=C grep -iq "fastboot" /proc/cmdline 2>/dev/null ; then --- 199,225 ---- fi if [ $usb = 1 -a ! -f /proc/bus/usb/devices ]; then + # 2.6 + if [ "$SUBKERN_VER" != "2.4" ]; then + action $"Mounting USB filesystem: " mount -n -t usbfs usbfs /proc/bus/usb + else action $"Mounting USB filesystem: " mount -t usbdevfs usbdevfs /proc/bus/usb + fi fi needusbstorage= if [ $usb = "1" ]; then ! needusbstorage=`LC_ALL=C grep -e "^I.*Cls=08" /sys/bus/usb/devices 2>/dev/null` ! # 2.6 ! if [ "$SUBKERN_VER" != "2.4" ]; then ! LC_ALL=C grep 'hid' /sys/bus/usb/drivers || action $"Initializing USB HID interface: " modprobe usbhid 2> /dev/null ! action $"Initializing USB keyboard: " modprobe usbkbd 2> /dev/null ! action $"Initializing USB mouse: " modprobe usbmouse 2> /dev/null ! else LC_ALL=C grep 'hid' /proc/bus/usb/drivers || action $"Initializing USB HID interface: " modprobe hid 2> /dev/null action $"Initializing USB keyboard: " modprobe keybdev 2> /dev/null action $"Initializing USB mouse: " modprobe mousedev 2> /dev/null + fi fi if [ -f /fastboot ] || LC_ALL=C grep -iq "fastboot" /proc/cmdline 2>/dev/null ; then *************** *** 369,375 **** IN_INITLOG= fi ! if ! LC_ALL=C grep -iq nomodules /proc/cmdline 2>/dev/null && [ -f /proc/ksyms ]; then USEMODULES=y fi --- 392,399 ---- IN_INITLOG= fi ! # 2.6 ! if ! LC_ALL=C grep -iq nomodules /proc/cmdline 2>/dev/null && [ -f /proc/ksyms -o -f /proc/kallsyms ]; then USEMODULES=y fi *************** *** 778,784 **** /bin/uname -a; /bin/cat /proc/cpuinfo; [ -r /proc/modules ] && /bin/cat /proc/modules; ! [ -r /proc/ksyms ] && /bin/cat /proc/ksyms) >/var/log/ksyms.0 # create the crash indicator flag to warn on crashes, offer fsck with timeout touch /.autofsck sleep 1 --- 802,810 ---- /bin/uname -a; /bin/cat /proc/cpuinfo; [ -r /proc/modules ] && /bin/cat /proc/modules; ! # 2.6 ! [ -r /proc/ksyms ] && /bin/cat /bin/cat /proc/ksyms; ! [ -r /proc/kallsyms ] && /bin/cat /proc/kallsyms) >/var/log/ksyms.0 # create the crash indicator flag to warn on crashes, offer fsck with timeout touch /.autofsck sleep 1 ------------------------- end rc.sysinit.patch ------------------- ------------------------- begin halt.patch ------------------- *** halt.org Tue Jan 14 12:36:53 2003 --- halt Mon Oct 3 17:43:14 2005 *************** *** 22,29 **** echo } halt_get_remaining() { ! awk '$2 ~ /^\/$|^\/proc|^\/dev/{next} $3 == "tmpfs" || $3 == "proc" {print $2 ; next} /(^#|loopfs|autofs|devfs|^none|^\/dev\/root)/ {next} {print $2}' /proc/mounts --- 22,30 ---- echo } + # 03-Oct-2005 AlainF For 2.6 kernels halt_get_remaining() { ! awk '$2 ~ /^\/$|^\/proc|^\/sys|^\/dev/{next} $3 == "tmpfs" || $3 == "proc" {print $2 ; next} /(^#|loopfs|autofs|devfs|^none|^\/dev\/root)/ {next} {print $2}' /proc/mounts ------------------------- end halt.patch ------------------- Last, I have configured swup to not update the kernel and the RPM that contains /etc/rc.sysinit to avoid my patched version being overwritten. That boils up to this line in /etc/swup/swup.conf: exclude_pkg_regexp = "(kernel.*)|(initscripts.*)" Greets, _Alain_ _______________________________________________ tsl-discuss mailing list [email protected] http://lists.trustix.org/mailman/listinfo/tsl-discuss
