Debian Codegraph @

upstream/debian-unstable/man8/systemd-random-seed.service.8

raw
1 '\" t
2 .TH "SYSTEMD\-RANDOM\-SEED\&.SERVICE" "8" "" "systemd 261~rc3" "systemd-random-seed.service"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 systemd-random-seed.service, systemd-random-seed \- Load and save the OS system random seed at boot and shutdown
24 .SH "SYNOPSIS"
25 .PP
26 systemd\-random\-seed\&.service
27 .PP
28 /usr/lib/systemd/systemd\-random\-seed
29 .SH "DESCRIPTION"
30 .PP
31 systemd\-random\-seed\&.service
32 is a service that loads an on\-disk random seed into the kernel entropy pool during boot and saves it at shutdown\&. See
33 \fBrandom\fR(4)
34 for details\&. By default, no entropy is credited when the random seed is written into the kernel entropy pool, but this may be changed with
35 \fI$SYSTEMD_RANDOM_SEED_CREDIT\fR, see below\&. On disk the random seed is stored in
36 /var/lib/systemd/random\-seed\&.
37 .PP
38 Note that this service runs relatively late during the early boot phase, i\&.e\&. generally after the initrd phase has finished and the
39 /var/
40 file system has been mounted\&. Many system services require entropy much earlier than this \(em this service is hence of limited use for complex system\&. It is recommended to use a boot loader that can pass an initial random seed to the kernel to ensure that entropy is available from earliest boot on, for example
41 \fBsystemd-boot\fR(7), with its
42 \fBbootctl random\-seed\fR
43 functionality\&.
44 .PP
45 When loading the random seed from disk, the file is immediately updated with a new seed retrieved from the kernel, in order to ensure no two boots operate with the same random seed\&. This new seed is retrieved synchronously from the kernel, which means the service will not complete start\-up until the random pool is fully initialized\&. On entropy\-starved systems this may take a while\&. This functionality is intended to be used as synchronization point for ordering services that require an initialized entropy pool to function securely (i\&.e\&. services that access
46 /dev/urandom
47 without any further precautions)\&.
48 .PP
49 Care should be taken when creating OS images that are replicated to multiple systems: if the random seed file is included unmodified each system will initialize its entropy pool with the same data, and thus \(em if otherwise entropy\-starved \(em generate the same or at least guessable random seed streams\&. As a safety precaution crediting entropy is thus disabled by default\&. It is recommended to remove the random seed from OS images intended for replication on multiple systems, in which case it is safe to enable entropy crediting, see below\&. Also see
50 \m[blue]\fBSafely Building Images\fR\m[]\&\s-2\u[1]\d\s+2\&.
51 .PP
52 See
53 \m[blue]\fBRandom Seeds\fR\m[]\&\s-2\u[2]\d\s+2
54 for further information\&.
55 .SH "ENVIRONMENT"
56 .PP
57 \fI$SYSTEMD_RANDOM_SEED_CREDIT\fR
58 .RS 4
59 By default,
60 systemd\-random\-seed\&.service
61 does not credit any entropy when loading the random seed\&. With this option this behaviour may be changed: it either takes a boolean parameter or the special string
62 "force"\&. Defaults to false, in which case no entropy is credited\&. If true, entropy is credited if the random seed file and system state pass various superficial concisistency checks\&. If set to
63 "force"
64 entropy is credited, regardless of these checks, as long as the random seed file exists\&.
65 .sp
66 Added in version 243\&.
67 .RE
68 .SH "SEE ALSO"
69 .PP
70 \fBsystemd\fR(1), \fBrandom\fR(4), \fBsystemd-boot\fR(7), \fBsystemd-stub\fR(7), \fBbootctl\fR(1), \fBsystemd-boot-random-seed.service\fR(8)
71 .SH "NOTES"
72 .IP " 1." 4
73 Safely Building Images
74 .RS 4
75 \%https://systemd.io/BUILDING_IMAGES
76 .RE
77 .IP " 2." 4
78 Random Seeds
79 .RS 4
80 \%https://systemd.io/RANDOM_SEEDS
81 .RE