Bug 529197 - anaconda kernel command line option stage2= does not honor NFS options
anaconda kernel command line option stage2= does not honor NFS options
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
12
All Linux
low Severity low
: ---
: ---
Assigned To: Radek Vykydal
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-15 09:12 EDT by Stijn Hoop
Modified: 2010-02-23 14:38 EST (History)
2 users (show)

See Also:
Fixed In Version: anaconda-13.8-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-02-23 14:38:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
First attempt at making the stage2= parameter parsing honor NFS options (1.07 KB, patch)
2009-10-15 09:12 EDT, Stijn Hoop
no flags Details | Diff
consolidate parsing nfs options in ks= and stage2=, anaconda 12.xx version (5.27 KB, patch)
2009-10-16 07:09 EDT, Stijn Hoop
no flags Details | Diff
consolidate parsing nfs options in ks= and stage2=, anaconda 13.xx version (5.39 KB, patch)
2009-10-16 07:10 EDT, Stijn Hoop
no flags Details | Diff
patch for yuminstall.py to parse NFS options for repo= (908 bytes, patch)
2009-10-26 10:10 EDT, Stijn Hoop
no flags Details | Diff

  None (edit)
Description Stijn Hoop 2009-10-15 09:12:20 EDT
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:

ks=nfs:nfsvers=3:host:/path/to/kickstart.ks

With stage2= the same sort of syntax:

stage2=nfs:nfsvers=3:host:/path/to/dvd

Leads to anaconda trying to mount host "nfsvers=3" and path "host".

Version-Release number of selected component (if applicable):

12.38

How reproducible:

Everytime

Steps to Reproduce:
1. Boot a known good environment with the stage2= syntax above
  
Actual results:

Failure to mount stage2 via NFS.

Expected results:

Stage2 mounted via NFS using the provided options.

Additional info:

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.
Comment 1 Stijn Hoop 2009-10-16 07:09:50 EDT
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.
Comment 2 Stijn Hoop 2009-10-16 07:10:36 EDT
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.
Comment 3 Radek Vykydal 2009-10-21 11:48:37 EDT
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:

repo=nfs:<server>[:options]:/<path>.

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
repo=[:options]:<server>:/<path>?

And Chris, should I take a look at repo= nfs options implemenation?
Comment 4 Radek Vykydal 2009-10-21 11:53:38 EDT
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.
Comment 5 Michal Jaegermann 2009-10-22 10:52:25 EDT
> 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:
repo=http://...
ks=ftp://...
ks=http://...
is somewhat weird. Looks suspiciously like an overenthusiastic automatic edit.
Comment 6 Radek Vykydal 2009-10-22 11:23:39 EDT
(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
> http://fedoraproject.org/wiki/Anaconda/Options

yes
Comment 7 Radek Vykydal 2009-10-22 11:53:43 EDT
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.
Comment 8 Stijn Hoop 2009-10-23 08:38:53 EDT
Patches sent.
Comment 9 Stijn Hoop 2009-10-26 10:10:26 EDT
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 .
Comment 10 Radek Vykydal 2009-11-04 10:06:18 EST
Stijn's patch will be in version 13.8 of anaconda. Thanks for reporting and fixing the issue.
Comment 11 Bug Zapper 2009-11-16 08:43:07 EST
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Note You need to log in before you can comment on or make changes to this bug.