In case of boot problem, you can enable log on boot:
We can change the GRUB parameters during the boot from the GRUB command line. Note that this is not permanent and usually the preferred way to do.
1. To do this, restart the system and when the GRUB splash screen comes. Select/highlight the kernel you wish to boot using the up/down arrow keys. In my case, I have only one kernel to select :)
select kernel to be booted from GRUB menu RHEL 7
2. Press the e key to edit the entry. Select/highlight the line starting with the word kernel.
debug level boot logs RHEL 7
3. Press the e key to edit the line. Remove the arguments rhgb quiet and replace by loglevel=7 systemd.log_level=debug. Press CTRL+x to accept the changes and boot the system. You should see a lot of logs on you screen now.
Increase verbosity of boot messages persistently across reboots
Edit the file /etc/default/grub and remove the rhgb and quiet arguments from the kernel lines and and the parameters loglevel=7 and systemd.log_level=debug instead. It is not recommended to edit the /boot/grub2/grub.cf file directly. Instead you can use the grub2-mkconfig command to generate grub.cfg. This command uses the template scripts in /etc/grub.d and menu-configuration settings taken from /etc/default/grub when generating grub.cfg.
Before (/etc/default/grub) :
linux16 /vmlinuz-3.10.0-514.el7.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet LANG=en_US.UTF-8
After (/etc/default/grub):
linux16 /vmlinuz-3.10.0-514.el7.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap LANG=en_US.UTF-8 loglevel=7 systemd.log_level=debug
Afterwards run below command:
# grub2-mkconfig -o /boot/grub2/grub.cfg
If UEFI:
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
0 (KERN_EMERG) system is unusable 1 (KERN_ALERT) action must be taken immediately 2 (KERN_CRIT) critical conditions 3 (KERN_ERR) error conditions 4 (KERN_WARNING) warning conditions 5 (KERN_NOTICE) normal but significant condition 6 (KERN_INFO) informational 7 (KERN_DEBUG) debug-level messages