Bug 475770

Summary: Stateless boot does not work when /var is in separate partition
Product: Red Hat Enterprise Linux 5 Reporter: Michal Marciniszyn <mmarcini>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED WONTFIX QA Contact: BaseOS QE <qe-baseos-auto>
Severity: low Docs Contact:
Priority: medium    
Version: 5.3CC: dkovalsk, harald, ian, msusta, mvadkert, notting, pknirsch, syeghiay, tvujec
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-08-25 14:56:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 513501    

Description Michal Marciniszyn 2008-12-10 12:20:33 UTC
Description of problem:
When we use readonly root option from /etc/sysconfig/readonly-root the system won't boot when /var is on separate partition.

Version-Release number of selected component (if applicable):
initscripts-8.45.25-1.el5

How reproducible:
Create machine with sepaprate / and /var. Boot with readonly root set to yes.

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Throws tons of errors and hangs during syslog startup.


Expected results:
boot up machine with / mounted as read only

Additional info:

Comment 2 Harald Hoyer 2008-12-10 13:14:03 UTC
if /var is manually mounted before rc.sysinit sets up the readonly symlinks this works.

Same goes for all files and directories mentioned in /etc/rwtab. If they are on a seperate partition, those partitions better be mounted before.

Comment 6 Bill Nottingham 2008-12-10 15:43:23 UTC
I'd say this is release-note worthy. I think if you're trying to support a stateless read-only configuration, restricting how it's partitioned is valid. Attempting to arbitrarily do the mapping when other filesystems are mounted is rather impractical.

Comment 7 Bill Nottingham 2009-01-28 15:43:18 UTC
Setting as 'requires release note'; the answer is mostly "don't do that."

Comment 8 Ian Dall 2009-03-01 13:41:35 UTC
There is a work around, so long as you are using an initrd. Create a /etc/fstab.sys with entries for the var partition and any other partitions you are pasting together to make a "root" partition.

Put these entries in /etc/fstab as well, with "noauto" option. Otherwise
after your stateless bind mounts are done, they will be covered over by /var being mounted again. This is all because this early in the process /etc/mtab isn't up to date. Actually is /etc/mtab is a symbolic link to /proc/mounts, then I think the "noauto" won't be necessary.

The entries in /etc/fstab.sys will get mounted from initrd, before the switchroot happens.

It would still be good if it were documented.

Comment 9 Bill Nottingham 2009-03-03 22:55:49 UTC
Given that that involves mounting local filesystems read-write without ever fscking them from the initrd, I don't think that's a solution we really want to push for people to use.

Comment 10 Ian Dall 2009-03-04 14:32:57 UTC
Yah. In my case the /var is an nfs mount so wouldn't fsck it anyway. It is not clear what the original case was.

Comment 11 Ian Dall 2009-03-05 03:20:17 UTC
And non-network filesystem partitions should be handled by https://bugzilla.redhat.com/show_bug.cgi?id=487926