LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Full RAM memory Slackware 12.1. (http://www.linuxquestions.org/questions/slackware-14/full-ram-memory-slackware-12-1-a-647970/)

glore2002 06-09-2008 05:27 AM

Full RAM memory Slackware 12.1.
 
Hello!

How can I make Slackware 12.1 recognize (and make use of) my 4Gb of RAM memory? If I run vmstat, it seems to recognize only 3Gb.

Thanks in advance,
Glore2002.-

scoban 06-09-2008 06:17 AM

Recompile kernel with 64gb ram support

lucazorzi 06-09-2008 06:18 AM

I'm afraid you'll have to recompile your kernel with the HIGHMEM64G option enabled.

Woodsman 06-09-2008 01:20 PM

Recently I had to do this.

There are three memory usage options when compiling the kernel:

CONFIG_NOHIGHMEM
CONFIG_HIGHMEM4G
CONFIG_HIGHMEM64G


The first option limits using up to 1GB. The second option limits using up to but not including 4GB. That is, a 4GB box will only use 3GB or so. The last option will recognize 4GB or more. The BIOS might recognize 4GB at boot, but without recompiling, the Linux kernel will not.

glore2002 06-09-2008 09:22 PM

Recompile? Is that easy or risky?
 
Hello back and thanks for your answers.
So, in order to recompile kernel, What steps should I follow? Will that mean losing some or all of my insalled programs?
If Slackwar recognizes my full 4Gb, Will that be an advantage or not?

If I run free -m at command line now, I get this:

total used free shared buffers cached
Mem: 3285 606 2678 0 61 370
-/+ buffers/cache: 173 3111
Swap: 0 0 0


I have 4Gb of RAM installed.

Thanks again,

Glore2002.-

T3slider 06-09-2008 10:07 PM

See here for a great kernel compiling guide.
Quote:

Originally Posted by glore2002
Will that mean losing some or all of my insalled programs?

No, you won't lose any of your programs or files. You won't have to reinstall anything, either.
Quote:

Originally Posted by glore2002
If Slackwar recognizes my full 4Gb, Will that be an advantage or not?

More RAM is always a good thing, so yes, I would definitely say that this is worth it. If you don't want to learn too much about kernel compiling you can just use the .config file for the generic-smp kernel as a base and just change the one option mentioned above (the .config file for the generic-smp kernel is located in /boot/config-generic-smp-2.6.24.5-smp in Slackware 12.1 -- you should copy it to the kernel source directory and rename it to .config to use it as a base).

onebuck 06-09-2008 10:14 PM

Hi,

'Linux Kernel in a Nutshell' is a must read! And a great desktop reference.

This link and others are available from 'Slackware-Links'. More than just Slackware« links!

glore2002 06-10-2008 05:17 AM

Quote:

Originally Posted by T3slider (Post 3179907)
See here for a great kernel compiling guide.

No, you won't lose any of your programs or files. You won't have to reinstall anything, either.

More RAM is always a good thing, so yes, I would definitely say that this is worth it. If you don't want to learn too much about kernel compiling you can just use the .config file for the generic-smp kernel as a base and just change the one option mentioned above (the .config file for the generic-smp kernel is located in /boot/config-generic-smp-2.6.24.5-smp in Slackware 12.1 -- you should copy it to the kernel source directory and rename it to .config to use it as a base).


This looks nice T3slider!

(at least, it looks easier!). Would it have the same effect as re-compiling kernel? This is how my /boot/config-generic-smp-2.6.24.5-smp looks like now:
:
:
# CONFIG_NOHIGHMEM is not set
CONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
:
:

So, What should I do? (detailed explanation will be appreciated!).
Thanks again!
Glore2002.-

glore2002 06-10-2008 05:26 AM

Something else...
 
By the way, next time I install Slackware from scratch ┐Where and when during installation should I tell Slackware my amount of RAM to set everything correctly?

Thank you!

Glore2002.-

shadowsnipes 06-10-2008 11:43 AM

Quote:

Originally Posted by glore2002 (Post 3180158)
By the way, next time I install Slackware from scratch ┐Where and when during installation should I tell Slackware my amount of RAM to set everything correctly?

Thank you!

Glore2002.-

Since the kernel images are prebuilt I don't think there is any way currently that you can specify that you need high mem support. So, you might have to rebuild your kernel every time.

It's a nice problem to have, having more memory than what your system to knows what to do with. Thankfully it is easily fixable as mentioned previously.

Edit:
Quote:

Originally Posted by glore2002 (Post 3180152)
This looks nice T3slider!

(at least, it looks easier!). Would it have the same effect as re-compiling kernel? This is how my /boot/config-generic-smp-2.6.24.5-smp looks like now:
:
:
# CONFIG_NOHIGHMEM is not set
CONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
:
:

So, What should I do? (detailed explanation will be appreciated!).
Thanks again!
Glore2002.-

Use the guides that you were told about. After you have copied over the generic config file to the linux src directory you
make menuconfig
Go to
"Processor Type and Features" -> "High Memory Support" and select 64GB.
Exit and then make, and do the rest of the steps in the guide.

GrapefruiTgirl 06-10-2008 11:57 AM

Quote:

Originally Posted by glore2002 (Post 3180152)
This looks nice T3slider!

(at least, it looks easier!). Would it have the same effect as re-compiling kernel? This is how my /boot/config-generic-smp-2.6.24.5-smp looks like now:
:
:
# CONFIG_NOHIGHMEM is not set
CONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
:
:

So, What should I do? (detailed explanation will be appreciated!).
Thanks again!
Glore2002.-

No, this does not have the same effect as recompiling the kernel; the suggestion made here is simply intended to save you the (small) task of going through the configuration menu to set the changes to the kernel configuration.

You still need to recompile the kernel to incorporate the edit you made to the .config file.

After editing the .config file to activate the HIGHMEM64 option, you will need to move/copy/save this .config file into your kernel source folder, then execute:
Code:

make clean
make
make modules_install

That will build the new kernel and install the modules. You must then copy the new kernel image to your /boot folder, and configure & run LILO to tell the bootloader the name/location of the new image you just made.

As well as reading the man page for `lilo` the links provided by other users above should give you all the info you need about building a new kernel.

If you proceed and get stuck or lost, tell us what you have done so far and we will guide you further.

SVA

EDIT - this assumed you ARE using the LILO bootloader. If you are using something else, then the LILO instruction I gave will not apply, but something else will.

glore2002 06-10-2008 07:05 PM

Hard to decide Isn't it?
 
Thanks for such a valuable information.

For me, it's hard to decide what to do:

On one side, by rebuilding the Kernel, I would gain full access to my 4Gb. But (on the other side), by reading the guide I also see that some packages may need to be re-compiled (alsa?) to match the new kernel (I don't clearly understand this point).

The guide is really good but, as a newbie, I think I need to have all the detailed and exact steps I should follow in order to access 4Gb without losing any of my packages and lilo. This to make sure I don't make mistakes because of misunderstanding the guide.

What I find really hard to believe is that one is not able to install Slackware from scratch enabling HIGHMEM64G.

Well, I'll keep on reading. As always, your help is very welcome.


Thank you!
Glore2002.-

GrapefruiTgirl 06-10-2008 07:25 PM

No problem! Your patience and willingness to read are commendable, and the right way to go about things. Rather than simply doing stuff without knowing why it is how it is, you will hopefully *understand* what it is you are doing.

The way it is now, without the 64G option, your kernel uses the top 1/4 of your memory to map the lower 3/4 of the memory. So, it isn't technically "missing", but rather the kernel has access to it and you don't.

Chances are VERY HIGH (ridiculously high) that you will not lose (or need to recompile) any packages by rebuilding your kernel, especially if you are rebuilding the exact same version of the kernel. In fact, the only way you would lose packages is... Well, I don't really know :p but I suppose it is possible somehow.. Anything's possible. :D

As far as enabling the 64G option while installing, the installation process would need to compile the kernel on the fly, during installation. Slackware does not do this, but instead provides some compiled kernels which are intended to suit the majority of general needs. An example of a Linux that DOES (or CAN) compile a kernel on the fly, is Gentoo; Gentoo is compiled from scratch AND installed during installation. As you might guess, a distro that compiles EVERYTHING from scratch as it installs takes a longer time to install, AND needs more user input to do it.

Best of success with the reading. You will get there!

Sasha

glore2002 06-10-2008 09:15 PM

Let's see if I can do it. Now it became a challenge!
 
OK. Let's see if I can do it myself:

Please, help me, writing down the needed steps. I will add questions when in doubt.

Question #0: Should I always be root? (During the whole process that follows I mean). My answer would be YES.

a) I edit my /boot/config-generic-smp-2.6.24.5-smp and change:

CONFIG_X86_CPUID=m

# CONFIG_NOHIGHMEM is not set

CONFIG_HIGHMEM4G=y

# CONFIG_HIGHMEM64G is not set

CONFIG_PAGE_OFFSET=0xC0000000

CONFIG_HIGHMEM=y


To make it look as
:

CONFIG_X86_CPUID=m

# CONFIG_NOHIGHMEM is not set

#CONFIG_HIGHMEM4G=y

CONFIG_HIGHMEM64G=y
(****)

CONFIG_PAGE_OFFSET=0xC0000000

CONFIG_HIGHMEM=y


Is this OK?

b) I should copy this newly /boot/config-generic-smp-2.6.24.5-smp to where the Kernel source resides (and change its name to .config). Question #1: Do I have to copy it to /usr/src/linux or to /usr/src/linux-2.6.24.5 ? I don't have to download any kernel source because I need to re-build the same Kernel I am using right now. Is that ok?

c) Here is where I get lost. What follows? :confused:

Yes, I know, I didn't get too far but at least I am trying to make some little steps. :-)

Thanks again!

Glore2002.-

Petri Kaukasoina 06-11-2008 10:08 AM

Quote:

Originally Posted by glore2002 (Post 3180942)
I edit my /boot/config-generic-smp-2.6.24.5-smp and change:

On top of that file: "Automatically generated make config: don't edit".
Just copy that to your kernel source directory as .config and use, for example, make menuconfig, instead.


All times are GMT -5. The time now is 12:50 PM.