How do I alter the kernel cmdline and rebuild grub2 on CentOS 7?

Chris Burton
2016-09-15 15:37

 

The kernel command line (cmdline) can be edited in "/etc/default/grub" (GRUB_CMDLINE_LINUX).

 

Once edited you will need to rebuild the config for grub2 using the following command

 

grub2-mkconfig --output=/boot/grub2/grub.cfg

 

You can then reboot and the new cmdline will be used (this can be verified by "cat /proc/cmdline").

 

 

Tags: centos, centos7, cmdline, grub, grub2, linux
Average rating: 0 (0 Votes)

You can comment this FAQ