Bug 475770 - Stateless boot does not work when /var is in separate partition
Summary: Stateless boot does not work when /var is in separate partition
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts
Version: 5.3
Hardware: All
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks: 5.4, TechnicalNotes
TreeView+ depends on / blocked
 
Reported: 2008-12-10 12:20 UTC by Michal Marciniszyn
Modified: 2014-02-10 23:03 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-08-25 14:56:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1344 0 normal SHIPPED_LIVE initscripts bug fix update 2009-09-01 10:44:36 UTC

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


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