Mailing List Archive

Support open source code!


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

tlug: RedHat head-banging



After banging my head against this problem (getting both network cards
recognized after upgrading to kernel 2.2.3) for a while, I've finally
broken through. But I'm not sure what I've done.

The first network card was compiled in to the kernel. To get the module for
the second network card to load properly I had to make two changes to
rc.sysinit - relevent extract shown below. The redhat versions were much
more complex and rather opaque. What are they doing? Can I delete them?

I've decided RedHat is a very non-standard distribution, because every time
I read in a how-to that "most installations will have/do ..." the file or
directory is never like that. Two examples that may be relevent here:

  1.Lilo boot files are in /boot/vmlinuz-X.Y.Z instead of /vmlinuz. So I
decided to be standard and put the new kernel in /vmlinuz. It works but
rc.sysinit mentions "/boot/vmlinuz" - did that cause a problem?

  2.It had a "/lib/modules/preferred" symbolic link to
"/lib/modules/2.0.34-0.6". For some reason it deletes and recreates this
each time you boot, but once I had /lib/modules/2.2.3 there it failed to
create the link each time. That was my first change. But it still wasn't
enough as the modules.dep file had "preferred" in all the path names, so
the kernel was failing to find the module (why?). That was the reason for
my second change.

Well, it works and I suppose that is all that matters :-).

Darren


---------
# Get the modules ready to go -- we use awk here as cut is in /usr/bin
rm -f /lib/modules/preferred
if [ -n $USEMODULES ]; then
    set `cat /proc/cmdline`
    while [ $# -gt 0 ]; do
	if echo $1 | grep '^BOOT_IMAGE=' > /dev/null ; then
	    image=`echo $1 | awk -F= '{ print $2 }'`
	    kernelfile=`/sbin/lilo -I $image`
	    if [ -n "$kernelfile" ]; then
		kernelname=`echo $kernelfile | awk -F- '{ print $1 }'`
		versioninfo=`echo $kernelfile | sed "s|${kernelname}-||"`
		if [ "$kernelname" = "/boot/vmlinuz" -a \
		     -d /lib/modules/$versioninfo -a \
		     $versioninfo != `uname -r` ]; then
		     ln -sf $versioninfo /lib/modules/preferred
		fi
	    fi
	fi
	shift
    done
fi

#### Added by Darren, as the above isn't working
rm -f /lib/modules/preferred
ln -sf `uname -r` /lib/modules/preferred


if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
    # Get ready for kerneld if module support in the kernel
    echo -n "Finding module dependencies... "
    if [ -f /lib/modules/preferred ]; then
	depmod -a preferred
    else
	depmod -a preferred
    fi
    echo "done"
fi

#### Added by Darren, in case the above is a problem
depmod -a 2.2.3
#Change 2.2.3 to `uname -r' if it works.

-------------

-------------------------------------------------------------------
Next Nomikai: March 19 (Fri), 19:30  Tengu TokyoEkiMae 03-3275-3691
Next Technical Meeting: April 10 (Sat), 12:30   place: Temple Univ.
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links