Usage: debugedit [OPTION...]
-b, --base-dir=STRING base build directory of objects
-d, --dest-dir=STRING directory to rewrite base-dir into
-l, --list-file=STRING file where to put list of source and header file
-i, --build-id recompute build ID note and print ID on stdout
-?, --help Show this help message
--usage Display brief usage message
In Debian/Ubuntu, grub.cfg is fully generated by scripts and any manual changes made to it will be clobbered. In RHEL/CentOS however, grub.cfg is modified by scripts but manual changes are persisted, and is actually the canonical location for certain settings.
The tool which manages grub.cfg is grubby, which is called by /sbin/new-kernel-pkg when kernels are installed or removed. The –copy-default parameter is passed to grubby when a new kernel is installed, which causes it to copy the kernel parameters from the current default kernel. Setting the default kernel parameters for future-installed kernels is therefore done by editing the entry for the default kernel in grub.cfg.
If you weren’t automating this you could simply edit grub.cfg manually and change all the current kernel entries. However, you can use grubby to modify grub.cfg in order to avoid parsing it or writing regular expressions. For example, this will remove the rhgb and quiet parameters from the specified kernel version.