This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Cannot NFS boot with autofs enabled share

I've setup /etc/exports to make three different root file systems available as:

  /home/rootfs-tisdk

  /home/rootfs-base

  /home/rootfs-arago

Next, I've setup autofs to have /net as a mount point. The map for this points to targetNFS supplied by /home/rootfs-tisdk

Then, I setup uboot nfs root parameters to point to 192.168.0.102:/net/targetNFS and saved the environment.

 

Restarting sitara eXperimenter board . . . . got to the mount point of the bootup and failed.

 

However, the autofs did its job and mounted /net/targetNFS with /home/rootfs-tisdk.

Is there any way to get Sitara eXperimenter board to boot over NFS that is satisfied with autofs?

The reason for doing this is to be able to easily switch root file systems.

I found one other way of doing this without changing u-boot parameters . .  .

Set uboot nfs root to look for /home/targetNFS and create a symbolic link to one of the real file systems in /home.

The nfs server needs restarting everytime I change the link.

 

Anyone have ideas of how to quickly change root files systems easily using autofs?

--jlf

  • Perhaps as a different solution you could use the uboot env params. I've set up multiple boot args depending on where to get the root fs and then used macro substitions to replace parameters and then saved the env.

    Example:

    setenv nfsroot_arago console......the usual parameters.... root=/dev/nfs rw nfsroot=<your host ip>:/home/rootfs-arago

    setenv nfsroot_tisdk   console.... like above .... root=/dev/nfs rw nfsroot=<your host ip>:/home/rootfs-tisdk

    Then when you want to switch between nfs mounts

    setenv bootargs $nfsroot_arago

    double check to make sure bootargs was set correctly with a printenv, then saveenv