Bug 846103 - RHEL6 Anaconda requires stage2= boot option for NFS ISO installs
Summary: RHEL6 Anaconda requires stage2= boot option for NFS ISO installs
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Beaker
Classification: Retired
Component: scheduler
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact:
URL:
Whiteboard: Misc
Depends On: 1013413
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-06 20:12 UTC by Stefanie Forrester
Modified: 2019-04-03 09:01 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1013413 (view as bug list)
Environment:
Last Closed: 2019-04-03 08:57:31 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1035514 0 unspecified CLOSED anaconda cannot find stage2 image when attempting to install from ISO 2021-02-22 00:41:40 UTC

Internal Links: 1035514

Description Stefanie Forrester 2012-08-06 20:12:17 UTC
Description of problem:
Currently there's no easy way to do an 'nfsiso' install in Beaker. 

The workaround is to create a custom kickstart without an installation source specified, and then specify the necessary options in Beaker-> Provision-> Kernel Options:

repo=nfsiso:my.nfs.server:/RHEL/6.3/Server/x86_64/iso/ stage2=nfs:my.nfs.server:/RHEL/6.3/Server/x86_64/os/images/install.img ks=http://some.other.server/rhel6.3_x86-64.cfg

When those options are used, the install completes, using the iso image as the install source. 

Additional information:
It's possible that the custom kickstart is not needed, since some kernel options passed at boot time override options in the kickstart file. However, it's unclear if 'repo=' is one of those options that take precedence.

Comment 1 Stefanie Forrester 2012-08-07 17:08:53 UTC
I tested another installation, placing the nfsiso line *in* the kickstart file instead of specifying it on the command-line. This wasn't successful. Anaconda gave an error, since it was looking for /RHEL/6.3/Server/x86_64/iso/images/install.img, instead of using the stage2 image that was passed on the command-line.

Boot Options: stage2=nfs:my.nfs.server:/RHEL/6.3/Server/x86_64/os/images/install.img ks=http://some.other.server/rhel6.3_x86-64.cfg

Kickstart file:
nfs --server my.nfs.server --dir /RHEL/6.3/Server/x86_64/iso/ 


According to the docs, the stage2= parameter usually has precedence. If that were the case this time, the install would've completed successfully. Unfortunately, this seems to be one of the exceptions to the usual behavior. 

http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/ch-parmfiles-Miscellaneous_parameters.html

Comment 2 Dan Callaghan 2012-08-08 06:00:24 UTC
The repo= parameter isn't needed, Beaker always passes the installation tree location inside the kickstart with the url or nfs command instead.

Beaker is actually almost all the way there with supporting NFS ISO installs, there are just a few bits missing:

* For RHEL5 (and I think RHEL4 and RHEL3) it is enough to put this in the kickstart:

nfs --server hostname --dir /path/to/dir/containing/iso/

and Anaconda will find the .iso and mount it and grab all its images from there. You can get this working currently in Beaker, by adding a URL to the distro tree with nfs+iso:// as the scheme, and then pass 'method=nfs+iso' in ksmeta for your job.

All we're missing here is that beaker-import does not add those nfs+iso:// URLs, so you have to set that manually in the Lab Controllers tab on the Distro Tree page.

* RHEL6 Anaconda no longer supports grabbing the images out of the mounted ISO automatically (bug 584472). It expects to find images/install.img in the same directory beside the ISO. Unfortunately that's not how our trees are usually laid out.

If we could get rel-eng to add a symlink images -> ../os/images inside each iso directory, that would solve this problem. Then Anaconda could automatically fetch the install.img and it would work the same as RHEL5 and earlier.

Otherwise Beaker will need to supply the stage2= parameter with the install.img location. We would have to expand beaker-import to record this extra image location (on top of the pxeboot images we currently track).

I tried passing stage2= manually but I get the same behaviour as Stephanie noted in comment 2: Anaconda insists that I didn't pass stage2= (and then fails) even though it's there in the kernel args. Not sure if this is an Anaconda bug or what.

* RHEL7 (at least as of RHEL-7.0-20120711.2) Anaconda has added back the necessary smarts to grab everything it needs from the mounted ISO, so as per RHEL5 there is nothing else Beaker needs to do once it knows the nfs+iso:// URL.

* I haven't tried Fedora 16 or 17 yet. We don't mirror Fedora ISOs in BNE so I have to fetch them from outside which will take some time. I'm expecting Anaconda (at least in F17) behaves the same as RHEL7, in which case nothing special is needed.

Comment 3 Stefanie Forrester 2012-08-23 19:51:03 UTC
Do you think this feature will be present in the next Beaker release then? I can open a ticket with rel-eng and get those symlinks in place.

Comment 4 Bill Peck 2012-08-23 19:56:43 UTC
(In reply to comment #3)
> Do you think this feature will be present in the next Beaker release then? I
> can open a ticket with rel-eng and get those symlinks in place.

Bugzilla already opened with rel-eng, see Depends above.  I'm hopeful that I can get the import script updated to import nfs+iso for the next release.

Comment 5 Raymond Mancy 2012-09-23 22:12:38 UTC
It looks like we're still waiting on 846799.

Comment 7 Raymond Mancy 2012-09-24 14:41:50 UTC
Pushing this to future_maint until our blocker is not a blocker

Comment 8 Nick Coghlan 2013-09-30 00:55:12 UTC
The proposed change to RHEL6 trees was rejected. This needs to be re-estimated based on passing the stage2 parameter to support RHEL6.

Comment 9 Dan Callaghan 2013-09-30 01:18:29 UTC
(In reply to Dan Callaghan from comment #2)
> All we're missing here is that beaker-import does not add those nfs+iso://
> URLs, so you have to set that manually in the Lab Controllers tab on the
> Distro Tree page.

I have cloned bug 1013413 for this.

Comment 10 Dan Callaghan 2013-09-30 01:23:53 UTC
For the RHEL6 stage2= problem, we will need to add a new field or image type in distro trees and make beaker-import record the stage2 location there, and then the provisioning code can pull it out of there and add it to kernel options.

Comment 13 Dan Callaghan 2013-11-28 00:27:48 UTC
It is possible to work around this by passing a stage2= kernel option in the recipe explicitly, as in:

    <recipe kernel_options="stage2=...">

Comment 18 Tomas Klohna 🔧 2019-04-03 08:57:31 UTC
Closing the issue due to no longer being relevant. If this still affects your workflow, feel free to reopen.


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