Adding new method of system configuration#13
Conversation
Command line (option 129, sometimes called uarg) is replaced by: * CMDLINE=... Root mounts are defined using: * ROOTMNT=SRV:REMOTEPATH:MNTPT * ROOTTYPE=nfs|nfs4|... * ROOTOPTS=vers=3,... ROOTTYPE defines the filesystem type, i.e. nfs4 or nfs. You may use other options too, like 9p, if that is supported by the image. ROOTOPTS defines options passed to the mount command in /etc/fstab ROOTMNT defines the actual mounts
marciodo
left a comment
There was a problem hiding this comment.
What happens if the parameters are sent both via DHCP and kernel options? I think you protected BOOTFILE parameter in fs_skeleton/etc/init.d/S90local, but I believe that there will be duplicated entries in fstab because fs_skeleton/usr/share/udhcpc/site.script will still run.
|
@marciodo Thanks for the feedback; yes that is what would happen. I have an uncommitted patch that fixes this, but haven't tested it yet. |
|
My intent is to have the new method be 1st priority:
|
|
|
||
| # Append NFS specific options | ||
| case "${FT}" in | ||
| nfs|nfs4) |
There was a problem hiding this comment.
Do we need to do anything here about using NFS 4.1 instead of 4.0?
There was a problem hiding this comment.
I'm also going to change the behavior of the case. If ROOTOPTS is supplied, it should take precedence over the built-in options, particularly for deployments where i.e., noresvport is not needed
| # Continue here and let then also specify a BOOTFILE | ||
| fi | ||
| # New path: Parse the boot file out of the kernel parameters | ||
| if `cat /proc/cmdline | grep -q 'CMDLINE='`; then |
There was a problem hiding this comment.
This could be simplified by if grep -q 'CMDLINE=' /proc/cmdline; then.
| fi | ||
| # New path: Parse the boot file out of the kernel parameters | ||
| if `cat /proc/cmdline | grep -q 'CMDLINE='`; then | ||
| BOOTFILE=`cat /proc/cmdline | grep -Eo 'CMDLINE=\S+' | cut -d '=' -f2` |
There was a problem hiding this comment.
Just in case CMDLINE has entries with more than one =, you could use -f2- in cut.
| start) | ||
| MO=`cat /proc/cmdline | grep -Eo 'ROOTOPTS=\S+' | sed 's/ROOTOPTS=//g'` | ||
| FT=`cat /proc/cmdline | grep -Eo 'ROOTTYPE=\S+' | cut -d '=' -f2` | ||
| ROOTMNT=`cat /proc/cmdline | grep -Eo 'ROOTMNT=\S+' | cut -d '=' -f2` |
There was a problem hiding this comment.
Just in case ROOTTYPE and ROOTMNT have entries with more than one =, you could use -f2- in cut.
…e were saved by linux-menuconfig when the selection was made for NFS v4.1.
…IG_SMP=y. Removing it to simplify the config.
Command line (option 129, sometimes called uarg) is replaced by:
Root mounts are defined using:
ROOTTYPE defines the filesystem type, i.e. nfs4 or nfs. You may use other options too, like 9p, if that is supported by the image.
ROOTOPTS defines options passed to the mount command in /etc/fstab
ROOTMNT defines the actual mounts
Tested only locally for now