LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   problems with a rhas patch upgrade (http://www.linuxquestions.org/questions/linux-software-2/problems-with-a-rhas-patch-upgrade-150111/)

msteudel 02-24-2004 06:54 PM

problems with a rhas patch upgrade
 
Ok so I have a RHAS 2.4.9-e.3enterprise, and I wanted to apply the following updates:

-rw-r--r-- 1 root bin 6266743 Feb 17 11:06 kernel-BOOT-2.4.9-e.37.i386.rpm
-rw-r--r-- 1 root bin 1688214 Feb 17 11:06 kernel-doc-2.4.9-e.37.i386.rpm
-rw-r--r-- 1 root bin 1199489 Feb 17 11:06 kernel-headers-2.4.9-e.37.i386.rpm
-rw-r--r-- 1 root bin 28351475 Feb 17 11:06 kernel-source-2.4.9-e.37.i386.rpm

I mounted these on the server and ran the following commands:

rpm -Fv kernel*
rpm -ivh kernel-BOOT-2.4.9-e.37.i386.rpm

This installed the kernel patch just fine, I edited the grub.conf, rebooted, and the actual patch seemed to go ok.

But then I found that after applying the patch nfs would no longer load automatically into the kernel.

The work around I did was edit the /etc/rc.d/init.d/netfs

Then added that line into the /etc/rc.d/init.d/netfs file (see line 39)


30 NCPFSTAB=`grep -v '^#' /etc/fstab | awk '{ if ($3 ~ /^ncpfs$/ && $4 !~ /noauto/) print $2}'`

31 NETDEVMTAB=`grep -v '^#' /proc/mounts | awk '{ if (($4 ~ /_netdev/) && ($2 != "/")) print $2}'`

32 NFSMTAB=`grep -v '^#' /proc/mounts | awk '{ if (($3 ~ /nfs$/) && ($2 != "/")) print $2}'`

33 SMBMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^smbfs$/ ) print $2}'`

34 NCPMTAB=`grep -v '^#' /proc/mounts | awk '{ if ($3 ~ /^ncpfs$/ ) print $2}'`

35

36 # See how we were called.

37 case "$1" in

38 start)
39 modprobe nfs

40 [ -n "$NFSFSTAB" ] &&

41 {

42 [ ! -f /var/lock/subsys/portmap ] && service portmap start


43 action $"Mounting NFS filesystems: " mount -a -t nfs

44 }

45 [ -n "$SMBFSTAB" ] && action $"Mounting SMB filesystems: " mount -a -t smbfs

46 [ -n "$NCPFSTAB" ] && action $"Mounting NCP filesystems: " mount -a -t ncpfs

47 touch /var/lock/subsys/netfs

48 action $"Mounting other filesystems: " mount -a -t nonfs,smbfs,ncpfs

49 ;;

50 stop)

51 # Unmount loopback stuff first


This seems like a hack. I'm curious if there is something I should've done, in my process that would've kept nfs loading into the kernel, instead of having to adding modprobe to the netfs file.

Thanks, Mark

jailbait 02-24-2004 07:30 PM

"I'm curious if there is something I should've done, in my process that would've kept nfs loading into the kernel, instead of having to adding modprobe to the netfs file."

Whether a module is part of the bootable kernel or a loadable kernel module is determined when the kernel is compiled. In order to change the location of the nfs module you would have to change the kernel config file and recompile the kernel.

If you want to correct the problem by using modprobe there are simpler ways to do it than the way you chose. The nfs module simply has to be loaded before the first time that it is used. I would place the command:
modprobe nfs
in /etc/rc.local which is the last script to be run when you boot.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites

msteudel 02-26-2004 01:21 PM

Thanks for the info, I'll try moving the modprobe nfs around ...


All times are GMT -5. The time now is 10:59 AM.