systemd-random-seed fails to start because /var/lib/systemd/random-seed is read only
| Affects | Status | Importance | Assigned to | Milestone | ||
|---|---|---|---|---|---|---|
| Snappy | Status tracked in Trunk | |||||
| | 15.04 |
High
|
Unassigned | |||
| | Trunk |
High
|
filippo carugati | |||
Bug Description
The systemd-random-seed service fails to start on boot, because it cannot write /var/lib/
This is very bad as the Snappy device will not have any entropy stored after subsequent boots. The file should be made writable, so the service can store entropy there for the next boot.
Leaves the problem of first boot though. Snappy images should not ship with a random-seed. This means on first boot there is little to no entropy.
If the Kernel does not have http://
| description: | updated |
| Jamie Strandboge (jdstrand) wrote : | #1 |
| Martin Pitt (pitti) wrote : | #2 |
This was supposed to be fixed by https:/
| Simon Eisenmann (longsleep) wrote : | #3 |
None of the writeable mounts in /var/lib/systemd seem to work here.
| Simon Eisenmann (longsleep) wrote : | #4 |
The problem is that writable mounts are bind mounts and when initrd transfers the entries from /etc/system-
That way it will never be able to mount anything writable which does not exist in the first place.
| Martin Pitt (pitti) wrote : | #6 |
Sorry for the unintended duplicate comment #15.
Indeed "sudo touch /var/lib/
| filippo carugati (pippothebest) wrote : | #7 |
pippo@pippo-
● system-
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
| Jens Elkner (jelmd) wrote : | #8 |
And this prevents ZFS boot, when /var is a separate ZFS, because than it cannot be mounted:
dir is not empty!
Wondering, why it cannot be placed below /run/ ...
| John Lenton (chipaca) wrote : | #9 |
Jens, that sounds like a completely different bug. Unless you're running a ubuntu core device off zfs with a very customised gadget... :-)
| John Lenton (chipaca) wrote : | #10 |
Filippo, where is that?
| Oliver Grawert (ogra) wrote : | #11 |
@jens the random-seed file is used to hold the last seed value, so when you boot there is info how the last random seed looked like to make sure the new seed is not identical this time, to guarantee randomness across reboots.
the /run filesystem is a tmpfs and wiped on each reboot so the file needs to be placed on a persistent place in the filesystem.
also, as john said, we do not actually support zfs based snappy ubuntu-core yet, how did you create this image ?
@filippo: the service is called systemd-


FYI, /var/lib/ systemd/ random- seed is intended to be writable:
$ grep random /etc/system- image/writable- paths systemd/ random- seed auto persistent transition none
# random seed
/var/lib/