Bug 487926 - Local filesystems not mounted with readonly-root
Summary: Local filesystems not mounted with readonly-root
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-01 14:09 UTC by Ian Dall
Modified: 2014-03-17 03:17 UTC (History)
2 users (show)

Fixed In Version: 8.86.3-1
Clone Of:
Environment:
Last Closed: 2009-03-04 01:10:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ian Dall 2009-03-01 14:09:40 UTC
Description of problem:
With readonly root configured, local (non nfs) filesystems are not automounted.

Version-Release number of selected component (if applicable):
initscripts-8.86-1.i386

How reproducible:

Always

Steps to Reproduce:
1.Configure a machine with readonly-root.
2.Include "none	/mnt	tmpfs	0	0" in /etc/fstab
3.Boot into single usermode
  
Actual results:

 /mnt is not mounted and is not writeable.


Expected results:

 /mnt should be mounted

Additional info:

The particular problem of /tmp not being writeable is avoidable by ensuring that /tmp is in /etc/rwtab (which it is by default in the distribution). However, this problem applies to any other filesystem eg on a hard disk or usb stick or whatever.

The problem seems to be in /etc/rc.d/rc.sysinit, where:

# Mount all other filesystems (except for NFS and /proc, which is already
# mounted). Contrary to standard usage,
# filesystems are NOT unmounted in single user mode.
if [ "$READONLY" != "yes" ] ; then
        action $"Mounting local filesystems: " mount -a -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
else
        action $"Mounting local filesystems: " mount -a -n -t nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev
fi

Does not do the right thing when READONLY is "yes". It is hard to see what was meant here. I don't think you want to mount all the net work filesystems yet, but you certainly do want to mount any tmpfs, ext2 etc filesystems. I think the only reason for the conditional is to allow the "-n" option because /etc/mtab is not writeable.

I've been using "mount -a -n  -t nonfs,nfs4,smbfs,ncpfs,cifs,gfs,gfs2 -O no_netdev" for the second arm of the conditional successfully.

Fedora 8 did not have this conditional at all (and would throw annoying error messages, but otherwise work).

Comment 1 Bill Nottingham 2009-03-04 01:10:57 UTC
It's a thinko in the patch.

Fixed in http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=0c224207525ff4279066abef35ae1a5b74a07a5a

Comment 2 Fedora Update System 2009-04-02 18:04:54 UTC
initscripts-8.86.1-1 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/initscripts-8.86.1-1

Comment 3 Fedora Update System 2009-04-03 04:16:35 UTC
initscripts-8.86.2-1 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/initscripts-8.86.2-1

Comment 4 Fedora Update System 2009-04-22 20:23:05 UTC
initscripts-8.86.3-1 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


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