Hello, all members.
I have been recently migrated from Arch to Artix with dinit.
Once I set up the all daemons I need, I found random-seed fails at boot.
# dinitctl list
[[+] ] boot
[{+} ] system
[{+} ] login.target (has console)
[{+} ] local.target
[{+} ] pre-local.target
[{+} ] early-fs-local.target
[{+} ] early-fs-pre.target
[{+} ] early-devices.target
[{+} ] udevd-early
[{+} ] early-prepare.target
[{+} ] root-ro
[{+} ] pseudofs
[{+} ] cgroups
[{+} ] tmpfs
[{+} ] kmod-static-nodes
[{+} ] tmpfiles-dev
[{+} ] udev-settle
[{+} ] udev-trigger
[{+} ] early-root-rw.target
[{+} ] fsck-root
[{+} ] early-fs-fstab.target
[{+} ] fsck
[{+} ] early-console.target
[{+} ] early-keyboard.target
[{+} ] net-lo
[{+} ] hostname
[{+} ] swap
[ {X}] random-seed
[{+} ] early-modules.target
[{+} ] modules
[{+} ] sysctl
[{+} ] binfmt
[{+} ] hwclock
[{+} ] locale
[{+} ] tmpfiles-setup
[{+} ] sysusers
[{+} ] cleanup
[{+} ] network.target
[{+} ] pre-network.target
[{+} ] getty
[{+} ] udevd (pid: 1029)
[{+} ] iwd (pid: 1285)
[{+} ] dbus (pid: 1257)
[{+} ] dbus-pre
[{+} ] NetworkManager (pid: 1473)
[{+} ] sddm (pid: 1513)
[{+} ] logind
[{+} ] seatd (pid: 1245)
[{+} ] sddm-pre
[{+} ] chronyd (pid: 1474)
[{+} ] turnstiled (pid: 1243)
[{+} ] acpid (pid: 1242)
[{+} ] tlp
[{+} ] apparmor
[{+} ] firewalld (pid: 1282)
[{+} ] fcron (pid: 1240)
[{+} ] bluetoothd (pid: 1281)
[{+} ] syslog-ng (pid: 1085)
[{+} ] tty1 (pid: 1531)
[{+} ] tty2 (pid: 1532)
[{+} ] tty3 (pid: 1535)
[{+} ] tty4 (pid: 1533)
[{+} ] tty5 (pid: 1534)
[{+} ] tty6 (pid: 1536)
This service runs normally when I execute
dinitctl start random-seed
after login.
But my system has any other problems in spite of failure of random-seed.
What does this service do? Can I disable this, or should I fix something to work?
Thanks.
Service is in /lib/dinit.d you can add logfile:
logfile = /var/log/dinit/random-seed.log
To see the error.
Must be the dinti version of https://www.freedesktop.org/software/systemd/man/latest/systemd-random-seed.service.html.
Thanks for explanation, kiblaster.
Adding a logfile line into the random-seed init file resulted in another error, though.
[user1@artix-zenbook ~]$ sudo dinitctl status random-seed
Service: random-seed
State: STOPPED (could not be launched)
Stage: opening log file
Error: Success
Without the logfile item, error 1 appears.
[user1@artix-zenbook ~]$ sudo dinitctl status random-seed
[sudo] password for user1:
Service: random-seed
State: STOPPED (failed to start; exited - status 1)
Error: Success
anyone else laugh?
Did the log file get made?
You can try to launch the command manually from a terminal.
Probably the most weird error this year :D
No log file was created.
It runs normally when I executed on the terminal.
[user1@artix-zenbook ~]$ sudo /usr/lib/dinit/seedrng
Seeding 256 bits and crediting
Saving 256 bits of creditable seed for next boot
I'll try to reinstall Artix today.
Unfortunately, reinstall (using weekly built iso) is not the answer.
Next, I modified some rc files:
[user1@artix-zenbook ~]$ cat /usr/lib/dinit.d/pre-local.target
type = internal
depends-on = early-fs-local.target
depends-on = early-console.target
depends-on = net-lo
depends-on = hostname
waits-for = swap
# waits-for = random-seed
waits-for = sysctl
waits-for = binfmt
waits-for = hwclock
waits-for = locale
[user1@artix-zenbook ~]$ cat /usr/lib/dinit.d/random-seed
type = scripted
command = /usr/lib/dinit/seedrng
stop-command = /usr/lib/dinit/seedrng
restart = false
# waits-for = early-modules.target
# after = early-devices.target
# after = early-root-rw.target
after = local.target
And finally random-seed gets working.
Hmmmm I remember vaguely about something with hashing and entropy at boot that it helps having a consistent boot when hardware is polling all different random generation numbers, for example: Long time ago when setting up Manjaro-OpenRC from scratch in I think 2016 or 2017, so I've installed it from a barebone base image and gone through all the config all myself - so imagine my consternation when I noticed that my PC started to boot to Linux faster whenever i shook my mouse violently... Back then google was actually working as intended and I quickly found out what all of that matter: https://man.archlinux.org/man/systemd-random-seed.service.8.en
Humm... interesting. I have never thought what is the kernel entropy pool and why it is important. Thanks for explanation.