User Tools

Site Tools


cs:kernel_boot_parameters
Return to Home page

Differences

This shows you the differences between two versions of the page.


cs:kernel_boot_parameters [2024/04/08 22:34] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Kernel boot parameters ======
 +How to configure kernel boot parameters with grub2
  
 +===== Example of the "isolcpus" option =====
 +  * Open the file ''/etc/default/grub''. Example:
 +   <code bash>sudo gedit /etc/default/grub</code>
 +
 +  * Edit the option ''GRUB_CMDLINE_LINUX_DEFAULT'' in the file ''/etc/default/grub'' to boot all the kernels with the new option. In this case, the kernel boot option ''isolcpus=2,3'' has been used, on a 4 cores CPU, to boot the kernel (and the other OS processes) using CPU cores 0 and 1, while CPU cores 2 and 3 are isolated, i.e., not used.
 +<code bash>
 +GRUB_CMDLINE_LINUX_DEFAULT="quiet splash isolcpus=2,3"
 +</code>
 +
 +  * Run the command:
 +<code bash>
 +sudo update-grub
 +</code>
 +to make active the GRUB configuration at the next reboot.
 +
 +===== Choose which kernel use for boot =====
 +If you want to boot the third kernel of the second sub-menu, you have to modify in file ''/etc/default/grub'' the variable ''GRUB_DEFAULT'' in the following way:
 +<code bash>
 +GRUB_DEFAULT=1>2
 +</code>
 +and to make effective modification you have to run the command:
 +<code bash>
 +sudo update-grub
 +</code>
 +
 +If you want to choose directly an entry of the main menu, for instance the third entry, the variable ''GRUB_DEFAULT'' has to be modified in the following way:
 +<code bash>
 +GRUB_DEFAULT=2
 +</code>
 +
 +There is also the option to specify directly the name of the kernel (this is the solution I prefer):
 +<code bash>
 +GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.2.0-18-generic-pae"
 +</code>
 +
 +To know the names of the kernels you can type the command:
 +<code bash>
 +grep menuentry /boot/grub/grub.cfg
 +</code>
 +
 +===== Boot in recovery mode =====
 +  * Select //Recovery mode// among kernel options
 +  * Select a //root section//
 +  * Type ''mount -o remount,rw /'', if you want to enable write access to the filesystem

If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it

You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/kernel_boot_parameters?do=diff&rev2%5B0%5D=1476193035&rev2%5B1%5D=1478270179&difftype=sidebyside
/web/htdocs/www.skenz.it/home/data/pages/cs/kernel_boot_parameters.txt · Last modified: 2024/04/08 22:34 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki
Privacy Policy