Linux – How to add systemd.setenv in GRUB2

centosgrub2linux

I would like to add systemd.setenv=NSS_HASH_ALG_SUPPORT=+MD5 parameter in grub2 for centos7?

I don't know which files I've to modify, and which lines I've to insert this parameter.

Thaks for your help.

Best Answer

The grub configuration is found in /etc/sysconfig/grub on CentOS 7 systems.

Within you will find the default kernel command line parameters, which you can edit.

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto  vconsole.keymap=us rhgb quiet"

After editing the file, run grub2-mkconfig to regenerate the grub configuration.

grub2-mkconfig > /boot/grub2/grub.cfg
Related Topic