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!
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html