RockyLinux8 이상에서 부팅시 생성되는 /var/log/dmesg 파일이 존재하지 않는 현상이 있었다.
이를 해결하기 위해 아래 방법을 수행하면 된다.

1) vi /etc/systemd/system/dmesg.service 파일에 아래 내용 추가  (해당 파일은 없으니 만들어야 함)

 [Unit]
 Description=Create /var/log/dmesg on boot
 ConditionPathExists=/var/log/dmesg

 [Service]
 ExecStart=/usr/bin/dmesg
 StandardOutput=file:/var/log/dmesg

 [Install]
 WantedBy=multi-user.target

2) /var/log/dmesg 파일 생성 및 SeLinux 컨텍스트 확인 (Selinux가 비활성화 상태면 dmesg파일만 만들면 된다.)

 # touch /var/log/dmesg
 # restorecon -v /var/log/dmesg (selinux 비활성화면 이 라인은 스킵)

3) 부팅 시 서비스가 시작되도록 활성화

 # systemctl enable dmesg

4) 시스템 재시작 (재부팅 후 /var/log/dmesg 파일 생성 및 파일 내용 확인 할 것)

 #shutdown -r now


참조 : https://www.getpagespeed.com/solutions/the-var-log-dmesg-file-is-not-created-during-boot-for-rocky-linux-8