Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm PXE-booting a Ubuntu 10.10 system, where I specify the kernel parameters as follows:

append root=/dev/nfs initrd=ubuntu-boot/initrd.img-2.6.35-24-generic
nfsroot=,fsc ip=dhcp rw

I need to use the mount option 'fsc' in order to use FS-cache functionality (the cachefilesd package.) However, when I try this I get the following error upon boot:

nfsmount: bad option 'fsc'

Why doesn't nfsmount permit this option? (It works fine when you mount manually with mount -o fsc after booting up.)

I changed nfsmount to mount -t nfs in the file /usr/share/initramfs-tools/scripts/nfs and then I ran update-initramfs -u to update the initramfs image, but it seems this still gives an error:

mount: unknown nfs mount option 'fsc'

My guess would be that this is a limitation of the mount functionality in klibc. What would be the best way to address this? Does the nfsmount program need to be patched?

Since this seems to be a limitation of the nfsmount tool in klibc, I was thinking that I could add /sbin/mount.nfs to the initramfs image and mount the nfsroot with this tool instead. I copied it into the folder /usr/lib/klibc/bin and I updated the script /usr/share/initramfs-tools/scripts/nfs as follows:

mount.nfs ${NFSROOT} ${rootmnt} -o nolock ${roflag} ${NFSOPTS}

After booting the updated initramfs image, there is a long delay when mount.nfs is executed and then the following message is displayed:

mount.nfs: an incorrect mount option was specified  
Begin: Retrying nfs mount ... Begin: Running /scripts/nfs-premount ... done.

However, this message is displayed no matter what mount options I use, so it appears to be a different problem altogether...

share|improve this question
up vote 5 down vote accepted

I finally manged to solve it. Here are the steps:

  1. Add mount.nfs from Ubuntu 10.04 to the initramfs image (copy it into the /usr/lib/klibc/bin folder.)
  2. Change the nfsmount line in /usr/share/initramfs-tools/scripts/nfs to:

    mount.nfs ${NFSROOT} ${rootmnt} -o nolock ${roflag} ${NFSOPTS}
  3. Update the initramfs image with either mkinitramfs or update-initramfs.

This would enable the fsc option on the nfsroot for my Ubuntu 10.10 system. I have no idea why I'm not able to use mount.nfs from 10.10 though -- perhaps a regression?

share|improve this answer
Great! Are you going to accept your answer? – user8290 Jan 31 '11 at 14:27
Ah, good idea! :-) – meanderix Feb 7 '11 at 18:56

The kernel has not been compiled with that module (CONFIG_NFS_FSCACHE in kernel config). And a link to a guide for that: Ubuntu Kernel/Compile

share|improve this answer
It is compiled with it, I use the feature all the time (but just in /etc/fstab), I suspect maybe the nfsmount tool in userspace doesn't support this or something? – Jorge Castro Jan 28 '11 at 22:06
I found the following bug report that seems to indicate that it has been added in Maverick: – meanderix Jan 28 '11 at 23:06
My fstab entry also specifies the fsc option, but it seems to be ignored: /dev/nfs / nfs fsc 1 1 – meanderix Jan 28 '11 at 23:08
Thanks, Jorge and meanderix. Mysterious. Interesting. Seems like a bounty question? This is a great feature to get working right. – user8290 Jan 28 '11 at 23:43
I'm new in this community, but if it's possible to promote the question I think that would be great. – meanderix Jan 28 '11 at 23:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.