LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help... NFS error-Kernel problem (https://www.linuxquestions.org/questions/linux-newbie-8/help-nfs-error-kernel-problem-621962/)

bree 02-18-2008 05:31 AM

Help... NFS error-Kernel problem
 
Hi,

Im a newbie and Im using Slackware Linux.

I want to use NFS in my Pcs.

After spending the whole day looking for setting up the NFS, I successfully install the NFS server (It works, I have tried to access it with my other PC) however the client could not access it.

# mount 192.168.1.1:/xx /tmp
mount: unknown filesystem type 'nfs'

I have check my client PC, it does not have nfs entry in the
</proc/filesystem>
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev sockfs
nodev pipefs
nodev futexfs
nodev tmpfs
nodev inotifyfs
nodev eventpollfs
nodev devpts
reiserfs
nodev ramfs
nodev usbfs
nodev smbfs
vfat

I have checked the kernel and it does not have NFS module installed; However, it does exist in the kernel source code.

How can I install only the NFS module instead of re installing all my kernel?

bitpicker 02-18-2008 08:39 AM

Here's what I would do on Gentoo:

Code:

cd /usr/src/linux
make menuconfig

to get a configuration menu. Go to the list of supported file systems and activate nfs as module (<M>)
Save the config.
Code:

make
make modules_install

This compiles and installs the module, but there's no need to reinstall the kernel.

Robin

bree 02-19-2008 01:54 AM

Isn't it will re install all the module in the kernel?

Anyway, I have tried it, but I don't see any effect. (Just check the /proc/filesystem and the nfs entry still not exists)
How can I check whether it was successful or not?

Do I need to reboot?

Thx

bitpicker 02-19-2008 02:10 AM

It will indeed reinstall all modules, but that's just a matter of automatically replacing them all within seconds and adding the one you just compiled. The modules are in their own directory in /lib/modules/name-of-your-kernel. The reinstallation doesn't touch the actual kernel at all.

Of course this assumes that the .config file in your source directory actually corresponds with the kernel you are using, so that the added <M> for the NFS module is the only difference.

Robin

bree 02-19-2008 02:28 AM

root@pcclient:/lib/modules/2.6.13.2# ls
build@ modules.ccwmap modules.inputmap modules.symbols
kernel/ modules.dep modules.isapnpmap modules.usbmap
modules.alias modules.ieee1394map modules.pcimap source@

root@pcclient:/lib/modules/2.6.13.2/kernel/fs# ls
binfmt_aout.ko cifs/ isofs/ nls/ smbfs/ vfat/
binfmt_misc.ko fat/ msdos/ quota_v2.ko udf/

there is no nfs inside the kernel folder; however it the nfs folder does exists in /lib/modules/2.6.13.2/build/fs & /lib/modules/2.6.13.2/source/fs .

Is that mean my module installation failed, or do I need to reboot first?

bitpicker 02-19-2008 03:44 AM

I think you'll find that the build and source subdirectories are actually only symlinks to your kernel sources.

I have just tried it myself, as I don't use nfs. I enabled nfs support in the kernel configuration, which gives you a set of further options, but I have ignored them; you'll have to see for yourself whether you need any of them. After make and make modules_install the nfs module turned up in its own subdirectory (...)/kernel/fs/nfs. To make use of it without rebooting, simply issue the command:

Code:

modprobe nfs
If that command doesn't give you any error message, then nfs support should be working.

Robin

bree 02-19-2008 04:05 AM

The nfs sub folder does not show up in the kernel/fs/ folder.

Quote:

Originally Posted by bree (Post 3062195)
root@pcclient:/lib/modules/2.6.13.2/kernel/fs# ls
binfmt_aout.ko cifs/ isofs/ nls/ smbfs/ vfat/
binfmt_misc.ko fat/ msdos/ quota_v2.ko udf/

I have tried the modprobe nfs, here is the result:

root@pcclient:/boot# modprobe nfs
FATAL: Module nfs not found.

....desperately need help.... :scratch:

bitpicker 02-19-2008 07:27 AM

Have you followed all the steps?

- cd /usr/src/linux
- make menuconfig
- select NFS in the file system section by hitting space until it displays <M>
- <ESC> to return through the submenus, save config once prompted to do so
- make
- make modules_install
- modprobe nfs

The only reason I can think of why this wouldn't work is that the kernel you have sources for is not the one you are using. The command

Code:

uname -r
should give you the exact version number of the running kernel, and it should coincide with the name of the directory in /lib/modules where the modules end up. As you expect the modules to turn up in the directory /lib/modules/2.6.13.2/kernel/fs the command should spit out 2.6.13.2.

If it doesn't, and there is no other /lib/modules subdirectory which fits the output of uname -r, your sources probably don't match the kernel.

That's a bit of guesswork on my part, but I'm pretty positive I'm not talking complete rubbish here... ;)

Robin

bree 02-19-2008 09:02 PM

...more frustrated.......
 
Yes, I have followed all your guide. I even did it twice :)

I agree with what you said, I think my source & kernel did not match; However here is what I got:

<code>
root@jktfileserveragb:~# uname -r
2.6.13.2

root@jktfileserveragb:~# ls /lib/modules/
2.4.31/ 2.6.13.2/ 2.6.13.2BKP/

root@jktfileserveragb:~# ls /lib/modules/2.6.13.2/kernel/fs/
binfmt_aout.ko cifs/ isofs/ nls/ smbfs/ vfat/
binfmt_misc.ko fat/ msdos/ quota_v2.ko udf/
</code>

It does match, do you have any other way to check whether the source & the kernel match each other?

PS: After I done the make modules_install the files under folder /lib/modules/2.6.13.2/kernel are updated, so probably the source & the kernel does match, just somehow, it does not install the new modules. :D

bitpicker 02-20-2008 01:51 AM

I'm sure there's a better way of checking whether the sources match the kernel, but someone else will have to chime in with that. My experience is limited to getting my sources via portage, compiling them and installing the kernel by hand.

I think we can discount the 2.4 kernel directory, but there's the same kernel with the additional suffix of BKP to the module directory. Have you checked whether the nfs module might have ended up in that one? I don't know whether the naming convention in Slackware is anything like the one in Gentoo, so maybe the BKP directory is actually where your module ended up. If that's not the directory your running kernel is using I'd suggest installing the newly compiled kernel from the source directory next to the one you're using. You just have to copy the file (supposing you're on i386 architecture) /usr/src/linux/arch/i386/boot/bzimage to your /boot directory and rename it whatever you wish to; for instance, if your current kernel in /boot is called kernel-2.6.23 you could call this one kernel-2.6.23-testing. Then you go to /boot/grub (yet another assumption; if Slackware uses Lilo as bootloader you'll have to check how to do it in Lilo, I'm not familiar with that one) and edit menu.lst or grub.conf, whichever your setup uses. You'll find a set of lines in there referring to your current kernel. It probably is the first set of kernel information, and there will be a line 'default 0' in there, which means that the first entry is the default one (counting starts with 0). Here's my grub.conf as an example:

Code:

default 0
timeout 5

title=Gentoo Linux 2.6.23-r8
root (hd0,0)
kernel /boot/kernel-2.6.23-gentoo-r8 root=/dev/hdb3

title=Gentoo Linux 2.6.23-r6
root (hd0,0)
kernel /boot/kernel-2.6.23-gentoo-r6 root=/dev/hdb3

title Windows 98
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1

In this case, the kernel with the suffix -r8 is booted as default, but the menu will also show the -r6 one and Windows 98, which I can optionally choose. No matter how many entries you have, you should copy the one the default setting refers to and paste it in its own block underneath, then change the name given in title= and the kernel line (and whatever else there might be) to the name you've given to the copied bzimage file (like for instance append -testing, as I suggested).

When you reboot, the grub menu should then display this kernel as an option, which you can select and try. If the config file you used to enable nfs does not match your remaining kernel setup, you'll see any number of error messages, but if it does, your nfs support should now be working. When you find that this new kernel is working ok you can simple move it to the first spot in grub.conf so it boots as default. If it doesn't work ok your old kernel will still be there and you can reboot into it any time.

Robin


All times are GMT -5. The time now is 05:26 AM.