All of lore.kernel.org
 help / color / mirror / Atom feed
* Failed to use read-only NFS as the root filesystem
@ 2010-07-04 16:48 Min Jun,Xi
       [not found] ` <AANLkTimW2-WTf1oqheGOQgfIHcUVpFOEakpnAO8aiQGf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Min Jun,Xi @ 2010-07-04 16:48 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Harald Hoyer

Hi All,
there's one problem here.
I tried to set one read-only NFS directory as the root filesystem, but
there're several problems, and lead to one situation that the root
filesystem is remounted using read-write option.
The kernel parameter is here:
+++++++++++
append="root=nfs:192.168.11.107:/install/netboot/rhel6/ppc64/compute/rootimg:ro
STATEMNT= XCAT=192.168.11.107:3001 ip=dhcp"
+++++++++++
#please ignore STATEMNT and XCAT, which are the OPTIONS created by myself.
Before "switch_root" command is running, we can see the root
filesystem is mounted read-only, you can find it here:
++++++++++++
192.168.11.107:/install/netboot/rhel6/ppc64/compute/rootimg on
/sysroot type nfs (ro,nolock,nfsvers=3,addr=192.168.11.107)
++++++++++++
However, after "switch_root" is running, all have been changed like this:
+++++++++++++++++++++++++++++++++++++++++
dracut: Switching root
                Welcome to Red Hat Enterprise Linux Server
                Press 'I' to enter interactive startup.
Starting udev: [  OK  ]
Setting hostname ca4dsls02:  [  OK  ]
Setting up Logical Volume Management:   No volume groups found
[  OK  ]
Checking filesystems
Checking all file systems.
[  OK  ]
Remounting root filesystem in read-write mode:  [  OK  ]
Mounting local filesystems:  [  OK  ]
++++++++++++++++++++++++++++++++++++++++++
Can you find it?  "Remounting root filesystem in read-write mode:  [  OK  ]"
Finally, I found something related with it.
In "/etc/init.d/rc.sysinit", the code looks like this:
+++++
639  Remount the root filesystem read-write.
640 update_boot_stage RCmountfs
641 if remount_needed ; then
642   action $"Remounting root filesystem in read-write mode: " mount
-n -o rem    ount,rw /
643 fi
+++++
It seems the "update_boot_state" function tells us we need to remount
the NFS directory, then it remounts the root filesystem with
read-write option.
Is there any option or flag which can be used to disable it? I think
the developers from redhat should know about it.
Thank you!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-05  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-04 16:48 Failed to use read-only NFS as the root filesystem Min Jun,Xi
     [not found] ` <AANLkTimW2-WTf1oqheGOQgfIHcUVpFOEakpnAO8aiQGf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-04 17:16   ` David Dillow
     [not found]     ` <1278263760.4311.59.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
2010-07-05  9:23       ` Steffen Maier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.