Red Hat Bugzilla – Bug 529197
anaconda kernel command line option stage2= does not honor NFS options
Last modified: 2010-02-23 14:38:58 EST
Created attachment 364904 [details]
First attempt at making the stage2= parameter parsing honor NFS options
Description of problem:
The kernel command line option 'stage2=' when passed onto anaconda is not parsed the same as the command line option 'ks='.
With ks= I can use the following syntax to specify NFS options for the mount:
With stage2= the same sort of syntax:
Leads to anaconda trying to mount host "nfsvers=3" and path "host".
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Boot a known good environment with the stage2= syntax above
Failure to mount stage2 via NFS.
Stage2 mounted via NFS using the provided options.
I made a preliminary patch which is only compile tested, but I am having trouble getting up to speed with pungi etc. to test this in our environment. Hopefully it will be enough but I cannot say for sure.
Created attachment 365035 [details]
consolidate parsing nfs options in ks= and stage2=, anaconda 12.xx version
I worked on this some more, here is the first of two patches. This one is for F12, anaconda 12.xx.
I tested this by injecting the resulting loader/init binaries into an existing rawhide initrd.img. It works in my environment, both with and without NFS options for both ks= and stage2= specified on the commandline.
Created attachment 365036 [details]
consolidate parsing nfs options in ks= and stage2=, anaconda 13.xx version
Here's the other one for anaconda 13.xx (git master) which is only compile-tested since I don't really know how to create a bootable anaconda 13.xx tree. Effectively this is the patch before I "backported" it to git f12-branch.
Hopefully this will help to get it into master at least. f12-branch would be nice as well but I understand the risk of destabilizing anaconda this late in the release cycle, so if you decide it's not worth it I understand.
Stijn, thanks for your patches, they look good, but I noticed that ks and therefore suggested stage2= syntax for nfs: differs from that of repo=, which according to wiki is:
So for example in install without stage2= boot option, not from media, and with
repo=nfs:host:nfsvers=3:/path/to/repo boot option,
anaconda will automatically infer stage2 location as
nfs:host:nfsvers=3:/path/to/repo/images/install.img (which has swapped options and server).
AFAIK nfs options for repo= option have never been implemented, so the easiest way could be to change the syntax for repo= options. As Chris has implemented the repo= stuff, I am asking for his opinion - what do you think, Chris - shall we change repo=nfs: syntax to
And Chris, should I take a look at repo= nfs options implemenation?
To Chris: hm, I thought needinfo would send you an email, but it doesn't seem so, so I'm adding you to CC, see my question in comment #3 please.
> shall we change repo=nfs: syntax to repo=[:options]:<server>:/<path>?
Err..., something is missing here. A repository type needs to follow after "=" and it could be something else than "nfs". You would like to make that uniform with a format for "ks" which is "ks=nfs[:options]:<server>:<path>". Right? It certainly makes sense to me.
I believe that you are refering to http://fedoraproject.org/wiki/Anaconda/Options . BTW - what shows there for:
is somewhat weird. Looks suspiciously like an overenthusiastic automatic edit.
(In reply to comment #5)
> > shall we change repo=nfs: syntax to repo=[:options]:<server>:/<path>?
> Err..., something is missing here. A repository type needs to follow after "="
> and it could be something else than "nfs". You would like to make that uniform
> with a format for "ks" which is "ks=nfs[:options]:<server>:<path>". Right? It
> certainly makes sense to me.
yep, that's what I meant, thanks for correction
> I believe that you are refering to
It turned out that the wiki documentation was wrong, the correct repo= syntax is
the same as that of ks=, so Stijn, could you post your updated patches to anaconda-devel-list? I'd ack them for master but someone else may see something I have missed.
Created attachment 366102 [details]
patch for yuminstall.py to parse NFS options for repo=
Radek, I think that your comment #3 is correct, it appears that parsing NFS options for repo= has not been implemented.
Attached is a patch for f12-branch that implements this for my specific use case. I don't know however whether this is a good location to do so. I'm not entirely sure which anaconda installation paths can use NFS locations, so in order to consolidate any parsing I'd love to get pointed in the right direction to do so.
In the meantime this patch allows me to kickstart from an NFS repo location while working around bug 528537 .
Stijn's patch will be in version 13.8 of anaconda. Thanks for reporting and fixing the issue.
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle.
Changing version to '12'.
More information and reason for this action is here: