I need to recompile my kernel on RHEL WS5 with only two changes.

  1. Change stack size from 4k to 8k
  2. Limit usable memory to 4096.

How do I recompile the kernel without changing anything else but these two items?


To change only the new values you will need the config the old kernel was build from.

In RHEL you can find this in: /boot/config-$(\uname -r)

Copy this file to the kernel source and change the values you want. Use make menuconfig for a ncurses gui.

For other distributions: If the config option CONFIG_IKCONFIG_PROC was set, your kernel configuration is available under /proc/config.gz

  • I took the liberty of converting it to $(command). If for any reason it is not equivalent please rollback (and in such case I'm really sorry). – Maciej Piechotka Sep 29 '10 at 16:36
  • For future reference, you can just use \` to escape them – Michael Mrozek Sep 29 '10 at 16:51
  • thx Maciej, its the same. – echox Sep 29 '10 at 17:27
  • @Michael: yeah, but ` wont work if you try to nest the tics bar \`foo\` baror other variants. – echox Sep 29 '10 at 17:28
  • Strange, it works in comments but not in posts – Michael Mrozek Sep 29 '10 at 18:34

I'm no expert for RHEL WS5 but for Cent OS 5, which is basically RHEL with all references to Redhat removed, there is a nice tutorial at centos.org which explains how to build a modified version of the distribution kernel. The procedure explained there will probably work for RHEL WS, too.


I believe the "change kernel stack size" option is long gone...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.