[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: boot floppies 2.2.8 catch 22



On Sun Mar 19, 2000 at 12:35:30AM +0000, Dale Scheetz wrote:
> I've just been trying these newest boot floppies on an old 486.
> 
> It has 8 meg of memory and 500 meg of disk space yet to partition.
> 
> The install.en.txt file says that 4 meg is enough. This is wrong.
> 
> The function key help on the rescue floppy indicates that 8 meg is enough
> if you have swap space. However, even if I has a swap partition created on
> the HD, how would I get it mounted in time to do any good? More to the
> point, how can I make a swap partition before I boot up the rescue kernel
> and its file system?
> 
> Needless to say, when I put the root file system floppy in to be read, the
> system gets a little ways before it says:
> 
> init started: BusyBox ....
> Sorry, your computer does not have enough memory.

I suspect something is wrong here.

In boot-floppies/utilities/busybox/init.c line 444
I check if the computer has enough memory using:

    if (check_free_memory() > 1000)
	return;
    ...
    /* Try to turn on swap */
    ...
    /* If swap has failed to be enabled */
    message(CONSOLE, "Sorry, your computer does not have enough memory.\r\n");

Where the function check_free_memory() (init.c line 228) is:

    /* How much memory does this machine have? */
    static int check_free_memory()
    {
	struct sysinfo info;

	sysinfo(&info);
	if (sysinfo(&info) != 0) {
	    message(LOG, "Error checking free memory: %s\n", strerror(errno));
	    return -1;
	}

	return(info.freeram/1024);

    }

If your box has 8 meg, and check_free_memory() returns <=1000
then check_free_memory() is broken.  I chenged it a couple of 
weeks ago to use sysinfo(2) to avoid using /proc (i.e. /proc/meminfo)
in init (which is bad, bad, bad), but I must have screwed something up...

 -Erik

--
Erik B. Andersen   Web:    http://www.xmission.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--


Reply to: