Nfs root

From Attie's Wiki
Jump to: navigation, search

Setting up an NFS server


NFS Server Configuration

You must export the filesystem with the following parameters:

/nfsroot *(rw,fsid=0,no_root_squash,no_subtree_check)


setenv ipaddr
setenv serverip
setenv bootfile uImage

Kernel Configuration

Below are the kernel arguments used for mounting an NFS root filesystem

example: root=/dev/nfs ip= nfsroot=/nfsroot

The parameters for the ip argument are as follows:

  1. Host IP Address (
  2. NFS Server IP (
  3. Gateway IP (none)
  4. Netmask ( or /24)
  5. Hostname (none)
  6. Interface (usb0)
  7. Auto IP configure / DHCP after boot (off)


NFS root filesystems always seem to be fiddly to get setup. There is an option 'nfsrootdebug' that prints out debug messages, for example:

[    4.674285] net eth0: SMSC911x/921x identified at 0xc8884000, IRQ: 336
[    5.689666] IP-Config: Complete:
[    5.692871]      device=eth0, addr=, mask=, gw=,
[    5.701721]      host=, domain=, nis-domain=(none),
[    5.708160]      bootserver=, rootserver=, rootpath=
[    5.718017] Root-NFS: nfsroot=/nfsroot
[    5.725036] NFS: nfs mount opts='nolock,addr='
[    5.731018] NFS:   parsing nfs mount option 'nolock'
[    5.736267] NFS:   parsing nfs mount option 'addr='
[    5.742706] NFS: MNTPATH: '/nfsroot'
[    5.749328] NFS: sending MNT request for
[    7.775848] NFS: MNT server returned result -13
[    7.780883] NFS: unable to mount server, error -13
[    7.787384] VFS: Unable to mount root fs via NFS, trying floppy.
[    7.794891] VFS: Cannot open root device "nfs" or unknown-block(2,0)

Error -13 - tips

  • Moving the NFS file system on the server
  • Use the nolock option as a kernel argument
Personal tools