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=11.22.33.44:/data/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...