Bug 475770 - Stateless boot does not work when /var is in separate partition
Stateless boot does not work when /var is in separate partition
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.3
All Linux
medium Severity low
: rc
: ---
Assigned To: initscripts Maintenance Team
BaseOS QE
:
Depends On:
Blocks: 5.4/TechnicalNotes
  Show dependency treegraph
 
Reported: 2008-12-10 07:20 EST by Michal Marciniszyn
Modified: 2014-02-10 18:03 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-08-25 10:56:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Marciniszyn 2008-12-10 07:20:33 EST
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 08:14:03 EST
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 10:43:23 EST
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 10:43:18 EST
Setting as 'requires release note'; the answer is mostly "don't do that."
Comment 8 Ian Dall 2009-03-01 08:41:35 EST
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 17:55:49 EST
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 09:32:57 EST
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-04 22:20:17 EST
And non-network filesystem partitions should be handled by https://bugzilla.redhat.com/show_bug.cgi?id=487926

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