| Summary: | Disc installer loads install.img from disc when --repo= and --stage2= are passed at boot | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Dustin Black <dblack> |
| Component: | doc-Installation_Guide | Assignee: | Jack Reed <jreed> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | ecs-bugs |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.2 | CC: | jskeoch, pbokoc |
| Target Milestone: | rc | Keywords: | Documentation, Reopened |
| Target Release: | 6.3 | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-02-25 23:34:50 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
This is by design. We changed the logic in loader (as you found) to always pull install.img from local media if we find it, primarily due to the fact that install.img is large and people were complaining about slow downloads over HTTP or FTP links. In your case, it's basically the same complaint but a less common setup for the "local" media. Your workaround is sufficient, though you can just leave off install.img entirely. The other way is to network boot the system, which will then pull all of the files from the server site specified (well, except kernel and initrd.img, since that booted up the system during the PXE process, but you get the idea). Hey David,
According to the RHEL 6 Installation Guide:
"stage2=URL
Specifies a path to an install.img file instead of to an installation source. Otherwise, follows the same syntax as repo=. If stage2 is specified, it takes precedence over all other methods of finding the install.img. Otherwise, anaconda attempts to find the install.img first on any existing DVD, and then from the location given by repo= or method=.
If only stage2= is given without repo= or method=, anaconda uses whatever repos the installed system would have enabled by default for installation."
I understand that the current behavior is by design, but it doesn't jive with the documentation, or even with the code comment:
"... However if stage2= was given, use that value as an override here. That will also then bypass any method selection UI in loader."
If the user expects to provide the stage2= parameter to override "all other methods of finding the install.img," then it seems the installer should comply with this request, and never attempt to load stage2 from the mounted disc.
This needs to be updated in the documentation, then. We can't really change the stage2 fetching behavior without significant pain, and it's going to be completely different for RHEL7 anyway. I'm curious why something as simple as this (admittedly VERY terrible pseudo-code) patch couldn't be done in loader.c
AFAICT, this is the only place we're getting hung up, and if we simply check for the passing of the stage2= option, we should be able to safely (?) bypass the entire if (url) {} section.
Though maybe, I guess, the real problem is in the setupCdrom function from cdinstall.c, which seems to indiscriminately copy the file from the disc regardless of whether stage2= was set.
As notacoder, I'll be happy to accept my flogging for the audacity of my suggestions, but still, I'm curious. ;)
*** loader.c 2011-11-04 11:53:03.000000000 -0400
--- loader.dlb.c 2012-03-05 14:23:35.480797176 -0500
***************
*** 1293,1298 ****
--- 1293,1299 ----
* That will also then bypass any method selection UI in loader.
*/
if (!FL_ASKMETHOD(flags)) {
+ if (!<stage2= is set>) {
url = findAnacondaCD("/mnt/stage2");
if (url) {
/* This is specific to RHEL, which does not have the mirror system
I've edited the information about stage2=URL to reflect Comment 2. It now reads: "Specifies a path to an install.img file instead of to an installation source. Otherwise, follows the same syntax as repo=. If stage2 is specified, it typically takes precedence over other methods of finding install.img. However, if anaconda finds install.img on local media, the stage2 URL will be ignored. If stage2 is not specified and install.img cannot be found locally, anaconda looks to the location given by repo= or method=. If only stage2= is given without repo= or method=, anaconda uses whatever repos the installed system would have enabled by default for installation." [Compare with the original, excerpted in Comment 3.] I'm assuming that the stage2=URL prompt still has value for NFS. However, if it doesn't even work for NFS and no longer has any value, let me know and I'll remove it. This bug has been verified and implemented for 6.4, so I am changing the status to CLOSED CURRENT RELEASE. |
Description of problem: Using the release or boot ISO images mounted from a local machine (client) via iLO to a remote machine (server) where the install will occur. The connection between client and server is excessively slow and unreliable (VPN from a remote geographic location). Expecting to perform the complete install from a network-shared repo (http) that is local to the server being installed. PXE is not an available option. Unless the "askmethod" option is explicitly passed (forcing interactivity that is undesired), the installer always downloads stage2 install.img from the mounted disc to the local drive. Over the slow connection, this causes an installer delay of up to 10 minutes to transfer the 130MB+ file. Steps to Reproduce: 1. Limit bandwidth between client and server to <2Mbps 2. Mount RHEL 6.2 release DVD or boot ISO via remote console (iLO) 3. Press Esc at boot menu 4. Pass at the boot prompt: linux text nofb noipv6 ksdevice=eth0 ip=<ip> netmask=<netmask> gateway=<gateway> dns=<dns1,dns2> ks=<kickstart URL> repo=<repo URL> stage2=<repo URL> Actual results: The install.img file is copied from the mounted disc to the local drive, causing a significant delay in the installer. Expected results: The repo= and/or stage2= parameters should override loading of the stage2 install.img from the "local" disc, and instead load it from the specified network repo. Additional info: Code snippet from loader.c below. It appears to confirm the above observation that only the "askmethod" parameter will override the loading of install.img from the mounted ISO. The stage2= parameter apparently overrides this, but only later in the process after the transfer from disc has already occurred. This apparently operates as designed, as so is not necessarily a code bug, however it arguably does not operate strictly as documented. We've been able to mitigate this problem for a specific customer instance by building a custom boot ISO with a blank install.img file, and passing the repo= parameter. /* Before anything else, see if there's a CD/DVD with a stage2 image on * it. However if stage2= was given, use that value as an override here. * That will also then bypass any method selection UI in loader. */ if (!FL_ASKMETHOD(flags)) { url = findAnacondaCD("/mnt/stage2"); if (url) { /* This is specific to RHEL, which does not have the mirror system * set up like Fedora does. If the CD/DVD doesn't have packages, * then it's a boot.iso and we still need to prompt for the * installation source. */ if (!access("/mnt/stage2/.discinfo", R_OK)) { skipLangKbd = 1; flags |= LOADER_FLAGS_NOPASS; setStage2LocFromCmdline(url, loaderData); skipMethodDialog = 1; logMessage(INFO, "Detected stage 2 image on CD (url: %s)", url); winStatus(50, 3, _("Media Detected"), _("Found local installation media"), 0); sleep(3); newtPopWindow(); } else { logMessage(DEBUGLVL, "This appears to be a boot.iso."); umountStage2(); free(url); url = NULL; } } if (!loaderData->stage2Data && loaderData->instRepo) { /* If no CD/DVD with a stage2 image was found and we were given a * repo=/method= parameter, try to piece together a valid setting * for the stage2= parameter based on that. */ char *tmp; checked_asprintf(&tmp, "%s/images/install.img", loaderData->instRepo); logMessage(INFO, "no stage2= given, assuming %s", tmp); setStage2LocFromCmdline(tmp, loaderData); free(tmp); if (loaderData->method == METHOD_URL) ((urlInstallData*)loaderData->stage2Data)->noverifyssl = loaderData->instRepo_noverifyssl; /* If we had to infer a stage2= location, but the repo= parameter * we based this guess on was wrong, we need to correct the typo * in both places. Unfortunately we can't really know what the * user meant, so the best we can do is take the results of * running stage2= through the UI and chop off any /images/whatever * path that's at the end of it. */ loaderData->inferredStage2 = 1; if (loaderData->method != -1) { skipMethodDialog = 1; } } else if (!url && loaderData->stage2Data) { logMessage(DEBUGLVL, "Have stage2 location, so skipping method dialog"); skipMethodDialog = 1; } } else { /* Needed because they have already been set when parsing cmdline. * (Leaks a little.) */ logMessage(DEBUGLVL, "askmethod parameter given"); loaderData->method = -1; loaderData->stage2Data = NULL; }