Bug 438377 - installer copies stage2.img from NFS to /tmp, kills low-memory machines
Summary: installer copies stage2.img from NFS to /tmp, kills low-memory machines
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Chris Lumens
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 438450 (view as bug list)
Depends On:
Blocks: F9Target
TreeView+ depends on / blocked
 
Reported: 2008-03-20 17:16 UTC by David Woodhouse
Modified: 2008-04-16 12:39 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-04-16 12:39:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch (2.09 KB, patch)
2008-03-20 18:49 UTC, David Woodhouse
no flags Details | Diff

Description David Woodhouse 2008-03-20 17:16:41 UTC
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 17:23:32 UTC
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 17:38:29 UTC
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);

                    free(buf);

                    if (rc && rc == -1) {
                        foundinvalid = 1;
                        logMessage(WARNING, "not the right one");
                        umount("/mnt/source");
                    } else {
                        stage = NFS_STAGE_DONE;
                        rc = asprintf(&url, "nfs:%s:%s", host, directory);
                        break;
                    }


Comment 3 David Woodhouse 2008-03-20 18:49:40 UTC
Created attachment 298731 [details]
patch

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 20:02:18 UTC
*** Bug 438450 has been marked as a duplicate of this bug. ***

Comment 5 Chris Lumens 2008-03-28 20:12:46 UTC
Memory usage should be better now.

Comment 6 David Woodhouse 2008-04-08 08:48:38 UTC
This doesn't seem to be fixed -- booting anaconda 11.4.0.65 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 17:00:47 UTC
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 12:39:40 UTC
Committed.  Thanks.

This all needs to be revisited for f10 anyway.


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