We can provide various parameters for Linux kernel startup. These parameters can customize the default kernel behavior or notify the kernel about hardware configuration. Kernel parameters should be passed to the kernel through a boot loader such as GRUB or LILO at kernel startup.
In this tutorial, I will describe how to add kernel parameters through GRUB on linux.
If you are using the GRUB boot loader and want to modify or add kernel parameters, You can edit the GRUB configuration file. The following describes how to add kernel startup parameters to the GRUB configuration file for a specific release.
Add the kernel startup parameters to Debian-based systems On Debian or Ubuntu. If you want to add the kernel parameters when the system is started, you can edit the grub configuration Template under the/etc/default/GRUB directory. Add the kernel parameters in the format of "name = value" in the GRUB_CMDLINE_LINUX_DEFAULT variable.
$ Sudo-e/etc/default/grub GRUB_CMDLINE_LINUX_DEFAULT = "...... name = value"
Run the following command to generate a GRUB configuration file.
$ Sudo update-grub if you cannot find the update-grub command, you can install it using the following command.
$ Sudo apt-get install grub2-common add kernel startup parameters on Fedora to add kernel parameters at startup, you can edit the grub configuration Template under the/etc/default/GRUB directory. Add Kernel Parameters in the format of "name = value" in GRUB_CMDLINE_LINUX variables.
$ Sudo-e/etc/default/grub GRUB_CMDLINE_LINUX = "...... name = value"
Then run the following command to generate the GRUB2 configuration file.
$ Sudo grub2-mkconfig-o/boot/grub2/grub. cfg adds kernel startup parameters to CentOS. To add kernel parameters at startup, you can directly edit the GRUB configuration file/boot/grub. conf. In the configuration file, find the entry that describes the default Linux image. The "default = N" character string in the top line of the file indicates which entry is the default image.
After finding the default image entry, append the kernel parameters at the end of the section starting with "kernel/vmlinuz. The parameter format is "name = value ".
Grub and mbr during Linux boot
Installation and Use of grub
Grub Bootstrap Configuration File Analysis
CentOS 6.4 grub and password