Bug 888615 - /var/lib/random-seed file is not functional under readonly root enabled
Summary: /var/lib/random-seed file is not functional under readonly root enabled
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 18
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Václav Pavlín
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 888618 (view as bug list)
Depends On: 808907
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-19 02:21 UTC by Joey Boggs
Modified: 2013-03-15 14:41 UTC (History)
13 users (show)

Fixed In Version: initscripts-9.45-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of: 808907
Environment:
Last Closed: 2013-03-15 14:41:20 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joey Boggs 2012-12-19 02:21:45 UTC
+++ This bug was initially created as a clone of Bug #808907 +++

Description of problem:
/var/lib/random-seed file is not functional under readonly root enabled. This file cannot be removed due to "Read-only file system" error and the system will show the error message when booting: "systemd-random-seed[517]: Failed to write new random seed file: Bad file descriptor".

Version-Release number of selected component (if applicable):
initscripts-9.34.2-1.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Just install base and core groups
2. Enable readonly root function in /etc/sysconfig/readonly-root file, set READONLY=yes and TEMPORARY_STATE=yes.
3. Add mount option ro in /etc/fstab for / directory.
4. Reboot
  
Actual results:
"systemd-random-seed[517]: Failed to write new random seed file: Bad file descriptor" and the file cannot be removed/modified.

Expected results:
No error for /var/lib/random-seed.


Seeing the same error in Fedora 18 alpha still.

Comment 1 Lukáš Nykrýn 2013-03-13 09:55:17 UTC
*** Bug 888618 has been marked as a duplicate of this bug. ***

Comment 2 Václav Pavlín 2013-03-14 09:16:22 UTC
Hi, this is not bug in readonly-root, but in systemd-random-seed.service. Adding fedora-readonly.service to systemd-randomd-seed's After solves this issue - /var/lib/random-seed is bind mounted as rw before it is used.

-After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service
+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service fedora-readonly.service

There is another issue with selinux involved bz #921456.

Comment 3 Václav Pavlín 2013-03-14 11:58:30 UTC
Proper solution is to add random-seed to Before= in fedora-readonly.service - switching back to initscipts

Comment 4 Václav Pavlín 2013-03-14 12:13:15 UTC
Patch commited to git -> http://git.fedorahosted.org/cgit/initscripts.git/commit/?id=d43d856ff2c8fd144a0d2030cb4655e7acea6084 -> post


Note You need to log in before you can comment on or make changes to this bug.