Hi Nitin,

Nitin Bhardwaj:
> I removed the --ro, while mounting /sysroot . and then the mount was
> successful, but I encountered another issue thereafter; The way RHEL
> is designed that initially the root filesystem ( / ) is mounted
> read-only and later, when init starts executing, it reads /etc/fstab
> and tried to run fsck , and thereafter remount it( root filesystem - /
> ) read-write.
> 
> Now, the init complains that it cannot run fsck on a 'mounted' root
> filesystem. So, I tried to change the strategy a bit:
> 
> 1.mount /sysroot read-only as before.
> 2.change aufs mount as follows: mount -t aufs -o
> br:/sysroot/bin=ro:/sysroot/.mount/bin=ro /sysroot/bin /sysroot/bin
> 3.edit the /etc/fstab so that now init re-mounts aufs as well as root fs as rw
> 
> I tried step 2 with my running CentOS, it worked , albeit with a
> warning in dmesg:
> 
> aufs verify_opts:1267:mount[7065]: first branch should be rw

Yes, because your aufs (/sysroot/bin) is not specified readonly.
I guess your strategy should be,
1.mount /sysroot readwrite
2.change aufs mount as follows:
        mount --ro -t aufs -o br:/sysroot/bin:/sysroot/.mount/bin=ro 
/sysroot/bin /sysroot/bin
3.edit the /etc/fstab and write 0 to the sixth field of aufs (/sysroot/bin)
4. remount aufs readwrite (can you do this by /etc/fstab?)


> However, in the initrd boot o/p the aufs mount fails as follows:
> aufs au_xino_create:512:init[1]: open /tmp/.aufs.xino(-2)
> mount: error mounting /sysroot/bin on /sysroot/bin as aufs: Invalid argument
> 
> Why am I getting failure on boot time, but not otherwise ?

Because you specified all branches readonly and aufs cannot find the
first writable branch which is the default path of xino files. And then
aufs tries /tmp as the next candidate, but got an error -2 which means
ENOENT "No such file or directory". I guess there is no /tmp in your
initramfs or initrd.


J. R. Okajima

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com

Reply via email to