Bug 438377

Summary: installer copies stage2.img from NFS to /tmp, kills low-memory machines
Product: [Fedora] Fedora Reporter: David Woodhouse <dwmw2>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: davej, ma
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-16 08:39:40 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 235705    
Description Flags
patch none

Description David Woodhouse 2008-03-20 13:16:41 EDT
In nfsinstall.c we copy stage2.img from /mnt/source/images/stage2.img to /tmp,
and then loopback-mount it from there. This takes about 118MiB of RAM, which is
a _lot_, and prevents us from being able to install on a number of low-memory
systems which used to work.

Can't we just loopback-mount the stage2.img from the NFS location, like we used to?
Comment 1 Jeremy Katz 2008-03-20 13:23:32 EDT
Chris is looking at this, but we were more concerned first with getting things
working at all after all of the upheaval needed for stage2=
Comment 2 David Woodhouse 2008-03-20 13:38:29 EDT
I'm taking a look but I'm confused by the error handling. I think that if you
put a stage2.img file into the NFS directory which isn't a valid ISO image, then
mountStage2() will return 1 but that will be interpreted as success...

                    rc = mountStage2("/tmp/stage2.img", stage2dir);


                    if (rc && rc == -1) {
                        foundinvalid = 1;
                        logMessage(WARNING, "not the right one");
                    } else {
                        stage = NFS_STAGE_DONE;
                        rc = asprintf(&url, "nfs:%s:%s", host, directory);
Comment 3 David Woodhouse 2008-03-20 14:49:40 EDT
Created attachment 298731 [details]

This seems to do the trick for me (and fixes urlinstall.c to compile too, while
I'm at it)
Comment 4 Chris Lumens 2008-03-24 16:02:18 EDT
*** Bug 438450 has been marked as a duplicate of this bug. ***
Comment 5 Chris Lumens 2008-03-28 16:12:46 EDT
Memory usage should be better now.
Comment 6 David Woodhouse 2008-04-08 04:48:38 EDT
This doesn't seem to be fixed -- booting anaconda I see it's still
throwing away half my PS3's memory by copying stage2.img into /tmp/ instead of
using it in-place. 
Comment 7 David Woodhouse 2008-04-09 13:00:47 EDT
Looks like we'll use the stage2.img in place if we find it on a boot.iso, but
still we don't use it when we find it on NFS. We should.

Also, when we use stage2.img from a CD I don't think we're using RHupdates/ from
the NFS install directory any more, are we?
Comment 8 Chris Lumens 2008-04-16 08:39:40 EDT
Committed.  Thanks.

This all needs to be revisited for f10 anyway.