Select Page

Let me guess, you have a machine with more than 4 Gb of RAM, but Debian GNU/Linux isn’t detecting all of it, right?

Well, you probably did what most newer Linux users do, and installed the standard i386 version of Debian. My test machine for instance, was installed with the Debian GNU/Linux 5.0.4 “Lenny” Official i386 KDE CD. This installation uses the 2.6.26-2-686 kernel, but is only a 32 bit OS (Operating System).

A 32 bit OS will only identify between 3.25 Gb and 3.75 Gb of RAM, even if more is installed. It has been rumored, different hardware, utilizing the same OS, may lead to more or less RAM being identified. However, I’ve never swapped out a motherboard just to try this. It has also been rumored, 2 installed, 2 Gb RAM chips, may only be seen as a total of 2 Gb, on a 32 bit OS. However, I have tried swapping out various 2 Gb RAM Chips, and have never had this result. My testing always produced over 3 Gb of RAM visible by the 32 Bit OS.

debian open logo

debian open logo 50x61

If you have 4 Gb or more RAM installed on your Debian GNU/Linux system, type:
test:~# grep -i memory /var/log/dmesg

The “highmem” value should be larger than 0 (Zero) k, but will probably not exceed the 4,000,000 k mark. If it does, you have a 64 bit OS installed, or you may already have the “bigmem” kernel installed.

There are two ways to utilize RAM sizes larger than 4 Gb with Debian GNU/Linux. You can either install a 64 Bit OS or you can install the bigmem kernel. The “bigmem” kernel is what this blog article was written for. Though it may be possible to run a 64 bit OS on 32 bit hardware, it probably isn’t the best option until you are an Advanced Linux User.

First we want to start off by finding out exactly what Linux Distro and Kernel Version you have installed on your system. To do this, please reference this blog article: “How do I tell which Version of Linux is Running?”

It is probably best to use the same “bigmem” kernel version as the standard kernel version, so we need to search for it. To do so, go to the command line and type:
test:~# apt-cache search linux-image-2.6.26-2-686

The numbers following “linux-image-” are for my test system, and the latest Debian GNU/Linux “Lenny” KDE release at the time of this article. The numbers/version you find on your system may not be exactly the same as I have shown. You will want to use the exact number string you find by following the first step, above!

The above command will search for all the possible kernel images matching the version number you typed in. You will probably get about 2 or 4 lines of results. Do not be alarmed if you get more. You will be looking for “linux-image-2.6.26-2-628-bigmem” as one of the results.

To install the bigmem kernel, type:
test:~# apt-get install linux-image-2.6.26-2-686-bigmem

Again, the numbers following “linux-image-” and before “-bigmem” are for my test system, and the latest Debian GNU/Linux “Lenny” KDE release at the time of this article. The numbers/version you found on your system may not be exactly the same as I have shown. You will want to use the exact number string you find by following the first step, above!

This command requires your PC have access to an internet connection. The “apt-get” part of the command is basically telling the PC to download the file from the internet. The “install” part of the command is instructing the PC to install the package, once it is downloaded. The faster your internet connection, the quicker the entire installation process will complete.

After the installation has finished, you will need to reboot your system. To do so from the command line, simply type:
test:~# shutdown now -r

Otherwise, reboot your system however you are familiar.

When your system reboots, you will see the default kernel selected is the “bigmem” kernel.

Once you have logged back into your Debian GNU/Linux OS, go to the command line and type:
test:~# grep -i memory /var/log/dmesg

The “highmem” value should now better reflect the total RAM available to your machine. If it still doesn’t look quite right, remember any on-board devices, such as a Video Card, which does not have it’s own RAM, will also use/share the system RAM.