How to add parameters to the Linux kernel via GRUB

debian grub

If you have reached a moderately advanced level in Linux, then undoubtedly you have had to compile the kernel, something that for beginners sounds almost scary but is not really difficult, taking the proper precautions of course.

But there are other ways to modify the behavior of the Linux kernel, for example by modifying files in directories such as / proc or / sys, and another much more direct is to add parameters to the kernel when we start Linux, from GRUB, and what we are going to see now is how to do it in Debian and derivatives (Ubuntu, Linux Mint, etc).

For that we add the kernel parameters to the GRUB configuration file, which is / etc / default / grub, which we do with the following command:

sudo -e /etc/default/grub

or by replacing gedit with our preferred editor (vim, nano). What we have to do is add parameters to variable GRUB_CMDLINE_LINUX_DEFAULT, which must have the form 'name = value'. For example 'loglevel = 3', which will tell the kernel to register only non-critical errors, warnings, normals and debug (that is, it is registered from the level that we indicate upwards). OR 'noexec = on', which activates the mapping of memory sectors as non-executable, the possibilities are many and this link we have a very complete explanation of all of them.

Once we have finished we update the kernel configuration, for which we execute:

sudo update-grub

More information - MATE is coming to the Debian repositories


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.