Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


linux:kernel_add_param

Add parameters to kernel boot

To temporarily add a boot parameter to a kernel:

  1. Start your system and wait for the GRUB menu to show (if you don't see a GRUB menu, press and hold the left Shift key right after starting the system).
  2. Now highlight the kernel you want to use, and press the E key. You should be able to see and edit the commands associated with the highlighted kernel.
  3. Go down to the line starting with linux and add your parameter foo=bar to its end.
  4. Now press Ctrl + X to boot.

To make this change permanent:

  1. Run sudo vim /etc/default/grub from terminal
  2. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append foo=bar to its end. For example: GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash foo=bar”. Save the file and close the editor.
  3. Finally, start a terminal and run: sudo update-grub to update GRUB's configuration file (you probably need to enter your password).

On the next reboot, the kernel should be started with the boot parameter. To permanently remove it, simply remove the parameter from GRUB_CMDLINE_LINUX_DEFAULT and run sudo update-grub again.

To verify your changes, you can see exactly what parameters your kernel booted with by executing cat /proc/cmdline.

linux/kernel_add_param.txt · Last modified: 2019/02/05 09:32 by tplecko