# How do I limit the amount of ram to 1536M?

## DingbatCA

How do I limit the amount of ram to 1536M?

The system has 4096M  I want the system to only see 1536M

```

cat /proc/meminfo 

MemTotal:      3556296 kB

...

```

```

title Gentoo 2.6.30-gentoo-r1

root (hd0,0)

kernel /linux-2.6.30-gentoo-r1 root=/dev/md3 vga=0x318 console=tty0 console=ttyS0,38400 mem=1536M max_cpus=2

```

----------

## Roman_Gruber

Hi,

You are right its a boot parameter, but I think its mem, ...

Sry I also have to check google now

----------

## DingbatCA

Any luck?

----------

## poly_poly-man

any reason why?

----------

## jongeek

 *DingbatCA wrote:*   

> 
> 
> ```
> 
> title Gentoo 2.6.30-gentoo-r1
> ...

 

The kernel line in your grub config should work fine. I've used the "mem=" option on a couple of machines to test low-memory conditions. I just tested on a box in my cube, and it worked fine. Its also listed in /usr/src/linux/Documentation/kernel-parameters.txt.

What does

```

cat /proc/cmdline

```

say after you've booted using the grub config you listed ?

----------

## DingbatCA

```

cat /proc/cmdline 

root=/dev/md3 vga=0x318 console=tty0 console=ttyS0,38400 selinux=0

```

WTF?!

----------

## jongeek

 *DingbatCA wrote:*   

> 
> 
> ```
> 
> title Gentoo 2.6.30-gentoo-r1
> ...

 

What else is in your grub config ? Can you post the whole file ?

----------

## DingbatCA

cat /boot/grub/grub.conf

```
default=0

serial --unit=0 --speed=38400

terminal --timeout=2 console serial

title Gentoo 2.6.30-gentoo-r1

root (hd0,0)

kernel /linux-2.6.30-gentoo-r1 root=/dev/md3 vga=0x318 console=tty0 console=ttyS0,38400 mem=1536M max_cpus=2 
```

cat /proc/cmdline

```

root=/dev/md3 vga=0x318 console=tty0 console=ttyS0,38400 selinux=0

```

Why is my mem argument and my CPU argument not working, not even showing up!

----------

## jongeek

You don't happen to also have LILO installed, do you ? I can't think of any reason why your grub config would not be honored, unless it is not grub that is booting your system.

----------

## DingbatCA

This is a clean install.  So there are no strange packages installed.

----------

## jongeek

Bizarro. Two other things I thought of.

1) Is menu.lst a symlink pointing to grub.conf (the way it should be), or are they two separate files ? Maybe its not reading the grub.conf you think it is.

```

ll /boot/grub/menu.lst

lrwxrwxrwx 1 root root 9 2008-11-07 08:49 /boot/grub/menu.lst -> grub.conf

```

2) Do you have more than one Linux install on your computer ? Its possible grub is reading the grub.conf from a different partition if you have some sort of multi-boot setup.

Neither of these sound likely from what you've posted, but I'm grasping at straws here.

----------

## DingbatCA

single boot, nothing special

```
ls -la /boot/grub/ | grep menu.lst

lrwxrwxrwx 1 root root     11 Aug 18 16:51 menu.lst -> ./grub.conf

```

----------

## platojones

 *DingbatCA wrote:*   

> 
> 
> ```
> 
> cat /proc/cmdline 
> ...

 

It's pretty obvious it dropped the second line....looks to me like you have a newline character at the end of the first line...put it all on one line and let it wrap.

----------

## cyrillic

HINT : Look at your grub.conf with /boot mounted, then look at your grub.conf with /boot unmounted.

----------

