Re: NFS cleaned up, one TODO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Warren Togami wrote:
The following are now the valid syntaxes for NFS.

root=[<server-ip>:]<root-dir>[:<nfs-options>]
root=nfs:[<server-ip>:]<root-dir>[:<nfs-options>]
root=nfs4:[<server-ip>:]<root-dir>[:<nfs-options>]
root=dhcp
    root-path=<server-ip>:<root-dir>[,<nfs-options>]
    root-path=nfs:<server-ip>:<root-dir>[,<nfs-options>]
    root-path=nfs4:<server-ip>:<root-dir>[,<nfs-options>]
root=/dev/nfs [nfsroot=...]

TODO:
I managed to fix the root=/dev/nfs case that specifies nfsroot=, but I don't understand why it doesn't work if you lack nfsroot=. Two NFS tests are commenteed out until that is fixed. Any ideas?

The Problem is here:

# LEGACY convert root=<server-ip>:/<path
case "$netroot" in
   [0-9]*:/*|[0-9]*\.[0-9]*\.[0-9]*[!:]|/*)
      netroot=nfs:$netroot;;
esac

After this part netroot looks like "netroot=nfs:/dev/nfs" if
root=/dev/nfs. This is later interpreted as path.

Patch below fixes this.

diff --git a/modules.d/95nfs/parse-nfsroot.sh b/modules.d/95nfs/parse-nfsroot.sh
index f05fb2a..9e41335 100755
--- a/modules.d/95nfs/parse-nfsroot.sh
+++ b/modules.d/95nfs/parse-nfsroot.sh
@@ -95,6 +95,7 @@ fi

# LEGACY convert root=<server-ip>:/<path
case "$netroot" in
+    /dev/nfs) netroot=nfs;;
    [0-9]*:/*|[0-9]*\.[0-9]*\.[0-9]*[!:]|/*)
       netroot=nfs:$netroot;;
esac
diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh



/dev/nfs)netroot=nfs;;




Warren Togami
wtogami@xxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux