HowTo Fix The rngd.service

From NST Wiki
Jump to: navigation, search

If you have a problem where your rngd.service fails to start (this applies systems using systemd like Fedora, CentOS 7 and RHEL 7 as well as NST systems), we have found the following work around:

Step 1

Make a copy of the rngd.service systemd file:

cp /usr/lib/systemd/system/rngd.service /etc/systemd/system/rngd.service

Step 2

Edit your new copy of /etc/systemd/system/rngd.service and add the "-r /dev/urandom -o /dev/random" options to the ExecStart value as shown below:

Description=Hardware RNG Entropy Gatherer Daemon

ExecStart=/sbin/rngd -f -r /dev/urandom -o /dev/random


Step 3

Instruct systemd to reload its configuration files, restart the rngd service and verify it is working:

[root@tlp ~]# systemctl daemon-reload
[root@tlp ~]# systemctl stop rngd
[root@tlp ~]# systemctl start rngd
[root@tlp ~]# systemctl status rngd
● rngd.service - Hardware RNG Entropy Gatherer Daemon
   Loaded: loaded (/etc/systemd/system/rngd.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2016-12-01 17:19:32 UTC; 4s ago
 Main PID: 3381 (rngd)
   CGroup: /system.slice/rngd.service
           └─3381 /sbin/rngd -f -r /dev/urandom -o /dev/random

Dec 01 17:19:32 tlp-can systemd[1]: Started Hardware RNG Entropy Gatherer D...n.
Dec 01 17:19:32 tlp-can systemd[1]: Starting Hardware RNG Entropy Gatherer .....
Hint: Some lines were ellipsized, use -l to show in full.
[root@tlp ~]# 

It would be wise to reboot the machine as well to verify that the rngd service comes up clean after a power outage.