Linux with more than 64MB RAM

Linux with more than 64MB RAM

31 Jul 1997
25 Jun 1998
References: Linux BootPrompt-HOWTO

Linux kernel 2.0.30
slackware installation

I foolishly used to think this:

This one should go down in the books as completely idiotic. Linux is making the same mistake Bill Gates made in assuming that no one would ever need more than 640K of memory. Linux assumes that you probably won't have more than 64MB of memory.

But I have been corrected! Thanks to Kevin McCarthy who has told me this.

Just FYI, the problem w/ Linux not knowing the real amount of memory is due to a BIOS limitation, and not a software limitation. The BIOS can not properly report memory over 64MB, and this information must be known before the kernel is loaded into memory. Hence, this info is passed to the kernel as a boot command line argument, so that the reliability of the system will not be dependent on a flaky BIOS report.

It was _not_ due to an assumption that nobody would use more than 64MB RAM.

So if you do want more than 64MB of RAM in your Linux system, you have to add a line to your lilo.conf file. The line is this:

        append="mem=96M" # tell the kernel how much memory it has
You have to be careful to put it in the right place. The right place is below the line that specifies where your image is. Here is my whole lilo.conf file.
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda
#compact        # faster, but won't work on all systems.
# delay = 5
vga = normal    # force sane state
ramdisk = 0     # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /vmlinuz
  append="mem=96M" # tell the kernel how much memory it has
  root = /dev/sda1
  label = Linux
  read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends

Then DO NOT FORGET! You must run lilo after you change the configuration.
     /sbin/lilo

Then reboot and that should do it. You can verify the memory via the free command or by running "top". My top produces something like this:


9:42am  up 13:01,  1 user,  load average: 0.02, 0.06, 0.01
46 processes: 45 sleeping, 1 running, 0 zombie, 0 stopped
CPU states:  2.8% user,  3.7% system,  0.0% nice, 93.5% idle
Mem:  95604K av, 92536K used,  3068K free, 14152K shrd,  7268K buff
Swap:     0K av,     0K used,     0K free               75356K cached

  PID USER     PRI  NI SIZE  RES SHRD STAT %CPU %MEM  TIME COMMAND
 2465 mckenna   16   0  868  468  332 R     6.5  0.4  0:00 top
    1 root       0   0  780  300  232 S     0.0  0.3  0:17 init [3] 
    2 root       0   0    0    0    0 SW    0.0  0.0  0:01 kflushd
    3 root     -12 -12    0    0    0 SW<   0.0  0.0  0:00 kswapd
    4 root       0   0    0    0    0 SW    0.0  0.0  0:00 nfsiod
    ...

Return to Gene's Home Page
Return to Gene's Random Unix Crap