Saturday, June 19, 2010

Boot Time Parameters for Linux Kernel on CentOS 5

In CentOS, the default boot lader is GRUB (Grand Unified Boot loader). GRUB allows users to choose which operating system you would like to boost. In addition, GRUB can be used to inform or pass parameters to the kernel

How to modify GRUB

Step 1:
When GRUB start, press any keys and it will show you a boot menu.

Step 2:
In the menu, you can select the kernel to boot and press "e"

Step 3: You will see something like this on the screen
grub append > ro root=LABEL=/ rhgb quiet

Step 4a: Put in the necessary parameters. For example, if I wish to boot to "single"
grub append > ro root=LABEL=/ single

Step 4b: If I wish to boot into console with network support, use the parameter: init=/sbin/init 3
grub append > ro root=LABEL=/ init=/sbin/init 3

Step 4c: If I wish to specify the memory, use the parameters: mem=MEMORY_SIZE
grub append > ro root=LABEL=/ mem=1024M

Step 4d: If you wish to reboot the kernel after the kernel panic, you can set the parameter panic=SECOND
grub append > ro root=LABEL=/ panic=30

For more parameters, do read the excellent article on
  1. 10 boot time parameters you should know about the Linux kernel
  2. Booting to Single Mode for Centos LINUX

No comments: